Quellcode der Dragonslayer-Edition
Quellcode der Dragonslayer-Edition: 0.9.7(DS V3) Ithil-Edition


Anmerkung: Dies ist nur ein Auszug aus dem Source. Ein etwas älteres, abgespecktes Release der Dragonslayer-Edition ist für jeden Interessenten frei zum Download verfügbar. Was wir uns unbedingt verbitten, ist Diebstahl unserer Arbeit ohne Nennung des Copyrights.
Falls beim Lesen des Source ein Bug entdeckt werden sollte, bitten wir um sofortige Meldung per Anfrage!


./mazemonster.php

zurück
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
<?
/*
mazemonster.php part of the Abandonded Castle Mod By Lonnyl @ http://www.pqcomp.com/logd
Author Lonnyl
version 1.01
June 2004
*/

// MOD by tcb, 15.5.05: Monster kosten WK
//MOD by Alucard, 14.02.06: Anpassung an Irrgarten
require_once "common.php";
checkday();
page_header("Labyrinth Monster");

if (
$_GET['op']=="fight" or $_GET['op']=="run")
{
    
$battle=true;
}

elseif (
$_GET['op']=="lost_soul")
{
    
$badguy = array("creaturename"=>"`@Verlorene Seele`0"
    
,"creaturelevel"=>5
    
,"creatureweapon"=>"Geisterkraft"
    
,"creatureattack"=>10
    
,"creaturedefense"=>15
    
,"creaturehealth"=>200
    
,"maze"=>1
    
,"diddamage"=>0);

    
$userattack=$session['user']['attack']+e_rand(1,3);
    
$userhealth=round($session['user']['hitpoints']/2);
    
$userdefense=$session['user']['defense']+e_rand(1,3);
    
$badguy['creaturelevel']=$session['user']['level'];
    
$badguy['creatureattack']+=($userattack*0.5);
    
$badguy['creaturehealth']+=$userhealth;
    
$badguy['creaturedefense']+=($userdefense*2);
    
$session['user']['badguy']=createstring($badguy);
    
$battle=true;
}

elseif (
$_GET['op']=="devoured_soul")
{
    
$badguy = array("creaturename"=>"`@Verdorrte Seele`0"
    
,"creaturelevel"=>10
    
,"creatureweapon"=>"Seelendurst"
    
,"creatureattack"=>15
    
,"creaturedefense"=>15
    
,"creaturehealth"=>300
    
,"maze"=>1
    
,"diddamage"=>0);

    
$userattack=$session['user']['attack']+e_rand(1,3);
    
$userhealth=round($session['user']['hitpoints']/2);
    
$userdefense=$session['user']['defense']+e_rand(1,3);
    
$badguy['creaturelevel']=$session['user']['level'];
    
$badguy['creatureattack']+=($userattack*0.5);
    
$badguy['creaturehealth']+=$userhealth;
    
$badguy['creaturedefense']+=($userdefense*2);
    
$session['user']['badguy']=createstring($badguy);
    
$battle=true;
}

elseif (
$_GET['op']=="ghost1")
{
    
$badguy = array("creaturename"=>"`@Durchsichtiges Spektre`0"
    
,"creaturelevel"=>0
    
,"creatureweapon"=>"Geisterkraft"
    
,"creatureattack"=>1
    
,"creaturedefense"=>2
    
,"creaturehealth"=>1000
    
,"maze"=>1
    
,"diddamage"=>0);

    
$userattack=$session['user']['attack']+e_rand(1,3);
    
$userhealth=round($session['user']['hitpoints']/2);
    
$userdefense=$session['user']['defense']+e_rand(1,3);
    
$badguy['creaturelevel']=$session['user']['level'];
    
$badguy['creatureattack']+=($userattack*0.5);
    
$badguy['creaturehealth']+=$userhealth;
    
$badguy['creaturedefense']+=($userdefense*2);
    
$session['user']['badguy']=createstring($badguy);
    
$battle=true;
}

elseif (
$_GET['op']=="ghost2")
{
    
$badguy = array("creaturename"=>"`@Wütendes Spektre`0"
    
,"creaturelevel"=>0
    
,"creatureweapon"=>"Geisterkraft"
    
,"creatureattack"=>1
    
,"creaturedefense"=>2
    
,"creaturehealth"=>400
    
,"maze"=>1
    
,"diddamage"=>0);

    
$userattack=$session['user']['attack']+e_rand(1,3);
    
$userhealth=round($session['user']['hitpoints']/2);
    
$userdefense=$session['user']['defense']+e_rand(1,3);
    
$badguy['creaturelevel']=$session['user']['level'];
    
$badguy['creatureattack']+=($userattack*0.5);
    
$badguy['creaturehealth']+=$userhealth;
    
$badguy['creaturedefense']+=($userdefense*1.5);
    
$session['user']['badguy']=createstring($badguy);
    
$battle=true;
}

elseif (
$_GET['op']=="ghost3")
{
    
$badguy = array("creaturename"=>"`@erbostes Spektre`0"
    
,"creaturelevel"=>10
    
,"creatureweapon"=>"Geisterkraft"
    
,"creatureattack"=>5
    
,"creaturedefense"=>20
    
,"creaturehealth"=>400
    
,"maze"=>1
    
,"diddamage"=>0);

    
$userattack=$session['user']['attack']+e_rand(1,3);
    
$userhealth=round($session['user']['hitpoints']/2);
    
$userdefense=$session['user']['defense']+e_rand(1,3);
    
$badguy['creaturelevel']=$session['user']['level'];
    
$badguy['creatureattack']+=($userattack*0.5);
    
$badguy['creaturehealth']+=$userhealth;
    
$badguy['creaturedefense']+=($userdefense*1.5);
    
$session['user']['badguy']=createstring($badguy);
    
$battle=true;
}

elseif (
$_GET['op']=="bat")
{
    
$badguy = array("creaturename"=>"`@Fledermaus`0"
    
,"creaturelevel"=>0
    
,"creatureweapon"=>"Scharfe Zähne"
    
,"creatureattack"=>1
    
,"creaturedefense"=>2
    
,"creaturehealth"=>1
    
,"maze"=>1
    
,"diddamage"=>0);

    
$userattack=$session['user']['attack']+e_rand(1,3);
    
$userhealth=round($session['user']['hitpoints']/2);
    
$userdefense=$session['user']['defense']+e_rand(1,3);
    
$badguy['creaturelevel']=$session['user']['level'];
    
$badguy['creatureattack']+=($userattack*0.5);
    
$badguy['creaturehealth']+=($userhealth*0.5);
    
$badguy['creaturedefense']+=($userdefense*0.5);
    
$session['user']['badguy']=createstring($badguy);
    
$battle=true;
}

elseif (
$_GET['op']=="bigbat")
{
    
$badguy = array("creaturename"=>"`@Riesige Fledermaus`0"
    
,"creaturelevel"=>0
    
,"creatureweapon"=>"Scharfe Zähne"
    
,"creatureattack"=>3
    
,"creaturedefense"=>5
    
,"creaturehealth"=>40
    
,"maze"=>1
    
,"diddamage"=>0);

    
$userattack=$session['user']['attack']+e_rand(1,3);
    
$userhealth=round($session['user']['hitpoints']/2);
    
$userdefense=$session['user']['defense']+e_rand(1,3);
    
$badguy['creaturelevel']=$session['user']['level'];
    
$badguy['creatureattack']+=($userattack*0.5);
    
$badguy['creaturehealth']+=($userhealth*0.5);
    
$badguy['creaturedefense']+=($userdefense*0.5);
    
$session['user']['badguy']=createstring($badguy);
    
$battle=true;
}

elseif (
$_GET['op']=="rat")
{
    
$badguy = array("creaturename"=>"`@Riesige Ratte`0"
    
,"creaturelevel"=>0
    
,"creatureweapon"=>"Scharfe Zähne"
    
,"creatureattack"=>1
    
,"creaturedefense"=>2
    
,"creaturehealth"=>1
    
,"maze"=>1
    
,"diddamage"=>0);

    
$userattack=$session['user']['attack']+e_rand(1,3);
    
$userhealth=round($session['user']['hitpoints']/2);
    
$userdefense=$session['user']['defense']+e_rand(1,3);
    
$badguy['creaturelevel']=$session['user']['level'];
    
$badguy['creatureattack']+=($userattack*0.75);
    
$badguy['creaturehealth']+=($userhealth*0.75);
    
$badguy['creaturedefense']+=($userdefense*0.75);
    
$session['user']['badguy']=createstring($badguy);
    
$battle=true;
}

elseif (
$_GET['op']=="minotaur")
{
    
$badguy = array("creaturename"=>"`@Minotaurus`0"
    
,"creaturelevel"=>0
    
,"creatureweapon"=>"Hörner"
    
,"creatureattack"=>1
    
,"creaturedefense"=>40
    
,"creaturehealth"=>1000
    
,"maze"=>1
    
,"diddamage"=>0);

    
$userattack=$session['user']['attack']+e_rand(1,3);
    
$userhealth=round($session['user']['hitpoints']/2);
    
$userdefense=$session['user']['defense']+e_rand(1,3);
    
$badguy['creaturelevel']=$session['user']['level'];
    
$badguy['creatureattack']+=($userattack-4);
    
$badguy['creaturehealth']+=$userhealth;
    
$badguy['creaturedefense']+=$userdefense;
    
$session['user']['badguy']=createstring($badguy);
    
$battle=true;
}

//welche für irrgarten
elseif ($_GET['op']=="bigspider")
{
    
$badguy = array("creaturename"=>"`^Riesige Spinne`0"
    
,"creaturelevel"=>0
    
,"creatureweapon"=>"Spinnengift und klebrige Fäden"
    
,"creatureattack"=>3
    
,"creaturedefense"=>5
    
,"creaturehealth"=>40
    
,"maze"=>1
    
,"diddamage"=>0);

    
$userattack=$session['user']['attack']+e_rand(1,3);
    
$userhealth=round($session['user']['hitpoints']/2);
    
$userdefense=$session['user']['defense']+e_rand(1,3);
    
$badguy['creaturelevel']=$session['user']['level'];
    
$badguy['creatureattack']+=($userattack*0.5);
    
$badguy['creaturehealth']+=($userhealth*0.5);
    
$badguy['creaturedefense']+=($userdefense*0.5);
    
$session['user']['badguy']=createstring($badguy);
    
$battle=true;
}

elseif (
$_GET['op']=="zyklop")
{
    
$badguy = array("creaturename"=>"`^Zyklop`0"
    
,"creaturelevel"=>10
    
,"creatureweapon"=>"Stachelkeule"
    
,"creatureattack"=>15
    
,"creaturedefense"=>15
    
,"creaturehealth"=>300
    
,"maze"=>1
    
,"diddamage"=>0);

    
$userattack=$session['user']['attack']+e_rand(1,3);
    
$userhealth=round($session['user']['hitpoints']/2);
    
$userdefense=$session['user']['defense']+e_rand(1,3);
    
$badguy['creaturelevel']=$session['user']['level'];
    
$badguy['creatureattack']+=($userattack*0.5);
    
$badguy['creaturehealth']+=$userhealth;
    
$badguy['creaturedefense']+=($userdefense*2);
    
$session['user']['badguy']=createstring($badguy);
    
$battle=true;
}

elseif (
$_GET['op']=="gardner")
{
    
$badguy = array("creaturename"=>"`^irrer Gärtner`0"
    
,"creaturelevel"=>10
    
,"creatureweapon"=>"blutige Heckenschere"
    
,"creatureattack"=>5
    
,"creaturedefense"=>20
    
,"creaturehealth"=>400
    
,"maze"=>1
    
,"diddamage"=>0);

    
$userattack=$session['user']['attack']+e_rand(1,3);
    
$userhealth=round($session['user']['hitpoints']/1.5);
    
$userdefense=$session['user']['defense']+e_rand(1,3);
    
$badguy['creaturelevel']=$session['user']['level'];
    
$badguy['creatureattack']+=($userattack*0.7);
    
$badguy['creaturehealth']+=$userhealth;
    
$badguy['creaturedefense']+=($userdefense*1.7);
    
$session['user']['badguy']=createstring($badguy);
    
$battle=true;
}

elseif (
$_GET['op']=="snakegod")
{
    
$badguy = array("creaturename"=>"`@Wadjet Schlangengöttin`0"
    
,"creaturelevel"=>0
    
,"creatureweapon"=>"Giftzähne"
    
,"creatureattack"=>1
    
,"creaturedefense"=>40
    
,"creaturehealth"=>1000
    
,"maze"=>1
    
,"diddamage"=>0);

    
$userattack=$session['user']['attack']+e_rand(2,5);
    
$userhealth=round($session['user']['hitpoints']/1.25);
    
$userdefense=$session['user']['defense']+e_rand(1,4);
    
$badguy['creaturelevel']=$session['user']['level'];
    
$badguy['creatureattack']+=($userattack-4);
    
$badguy['creaturehealth']+=$userhealth;
    
$badguy['creaturedefense']+=$userdefense;
    
$session['user']['badguy']=createstring($badguy);
    
$battle=true;
}

if (
$battle)
{
    
$maze_type = empty($session['user']['maze_visited']) ? 1//0=schloss, 1=irrgarten
    
include_once ("battle.php");

    if (
$victory)
    {
        
$session['user']['turns'] = max($session['user']['turns']-1,0);

        
output("`0`b`4Du hast `^".$badguy['creaturename']."`4 besiegt.`0`b`n");
        
$badguy=array();
        
$session['user']['badguy']="";
        
$session['user']['specialinc']="";
        
$gold=e_rand(100,500);
        
$experience=$session['user']['level']*e_rand(37,80);
        
output("`#Du erhältst `6".$gold." `#Gold!`n");
        
$session['user']['gold']+=$gold;
        
output("`#Du erhältst `6".$experience." `#Erfahrung!`n");
        
$session['user']['experience']+=$experience;
        
        if( !
$maze_type )
        {
            
addnav("Weiter","abandoncastle.php?loc=".$session['user']['pqtemp']);
        }
        else
        {
            
addnav("Weiter","gardenmaze.php?pos=".$session['user']['pqtemp']);
        }

        if (
count($session['bufflist'])>&& is_array($session['bufflist']) || $_GET['skill']!="")
        {
            
// Knappe nicht vergessen!
            
if (is_array($session['bufflist']['decbuff']))
            {
                
$decbuff=$session['bufflist']['decbuff'];
            }
            
// Edelsteinelsterbuff
            
if ($session['bufflist']['gemelster'])
            {
                
$arr_gemelster_buff $session['bufflist']['gemelster'];
            }
            
$_GET['skill']="";
            
$session['bufflist']=array();
            if (
is_array($decbuff))
            {
                
$session['bufflist']['decbuff']=$decbuff;
            }
            if (
is_array($arr_gemelster_buff))
            {
                
$session['bufflist']['gemelster'] = $arr_gemelster_buff;
            }
        }

    }
    elseif (
$defeat)
    {
        
output("`&Als Du auf dem Boden aufschlägst, rennt `^".$badguy['creaturename']."");

        
$sql "SELECT name,state FROM disciples WHERE master=".$session['user']['acctid']."";
        
$result db_query($sql);
        if (
db_num_rows($result)>0)
        {
            
$rowk db_fetch_assoc($result);
        }
        
$kname=$rowk['name'];
        
$kstate=$rowk['state'];
        
        if ((
$kstate>0) && ($kstate<20))
        { 
            
output(" `&mit `^".$kname." `&");
            
debuglog("Verlor einen Knappen bei einer Niederlage im Schloss/Irrgarten.");
        }
        
output("`& weg.");

        
addnews("`%".$session['user']['name']."`5 wurde von ".$badguy['creaturename']."`% im ".($maze_type"Irrgarten des verlassenen Schlosses" "Verlassenen Schloss")." erschlagen.");
        if(!
$maze_type)
        {
            
savesetting('CASTLEMOVES',getsetting('CASTLEMOVES',0)+$session['user']['mazeturn']);
            
user_set_aei(array('castlemaze_visited' => implode(',',$session['mazevisited'])));
            unset(
$session['mazevisited']);
        }
        
$badguy=array();
        
//$session['user']['badguy']="";
        //$session['user']['hitpoints']=0;
        //$session['user']['alive']=0;
        
killplayer(0,0,1,'shades.php','Weiter');
    }
    else
    {
        
fightnav(true,false);
        if (
$badguy['creaturehealth'] > 0)
        {
            
$hp=$badguy['creaturehealth'];
        }
    }
}
else
{
    if( !
$maze_type )
    {
        
redirect("abandoncastle.php?loc=".$session['user']['pqtemp']);
    }
    else
    {
        
redirect("gardenmaze.php?pos=".$session['user']['pqtemp']);
    }
}
//I cannot make you keep this line here but would appreciate it left in.
//rawoutput("<div style=\"text-align: left;\"><a href=\"http://www.pqcomp.com\" target=\"_blank\">Abandonded Castle by Lonny @ http://www.pqcomp.com</a><br>");
page_footer();
?>
0.9.7(DS V3) Ithil-Edition