Quellcodeviewer der Dragonslayer-Edition
Quellcodeviewer der Dragonslayer-Edition : 0.9.7+jt ext (GER)


Anmerkung: Dies ist nur ein Auszug aus dem Source. Um das jeweils aktuelle, vollständige Release zu erhalten, ist eine Anfrage mit gültiger Email-Adresse erforderlich. Ebenso sollte darin die Serveradresse bzw. sonstiger Verwendungszweck aufgeführt sein. 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!


./train.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:
<?php

// 14072004

/*********************************************************************
 * MODIFIZIERT DURCH
 * Admin @ Dreythal
 * Juli 2015
*********************************************************************/

require_once 'common.php';
checkday();
page_header('Hallen der Meister');

output('`n`c`b<span style="color: #FF8080;">H</span><span style="color: #EF8078;">a</span><span style="color: #DF8070;">l</span><span style="color: #CF8068;">l</span><span style="color: #BF8060;">e</span><span style="color: #AF8058;">n</span><span style="color: #9F8050;"> </span><span style="color: #8F8048;">d</span><span style="color: #808040;">e</span><span style="color: #808040;">r</span><span style="color: #8F8048;"> </span><span style="color: #9F8050;">M</span><span style="color: #AF8058;">e</span><span style="color: #BF8060;">i</span><span style="color: #CF8068;">s</span><span style="color: #DF8070;">t</span><span style="color: #EF8078;">e</span><span style="color: #FF8080;">r</span>`b`c`n',true);
// = "Hallen der Meister"

$sql "SELECT * FROM masters WHERE creaturelevel = ".$session['user']['level'];
$result db_query($sql) or die(sql_error($sql));

if (
db_num_rows($result) > 0)
{
    
$master db_fetch_assoc($result);
    
    if (
$master['creaturename'] == "Gadriel the Elven Ranger" && $session['user']['race'] == 2)
    {
        
$master['creaturewin'] = "Sowas nennt sich Elf?? Halb-Elf höchstens! Komm wieder, wenn du mehr trainiert hast.";
        
$master['creaturelose'] = "Es ist nur passend, dass ein anderer Elf sich mit mir messen konnte. Du machst gute Fortschritte.";
    }
    
    
$level $session['user']['level'];
    
//$exprequired=((pow((($level-1)/15),3)*3+1)*100*$level);
    //$exparray=array(1=>100,400,602,1012,1540,2207,3041,4085,5395,7043,9121,11740,15037,19171,24330);
//    $exparray=array(1=>100,300,602,1012,1540,2207,3041,4085,5395,7043,9121,11740,15037,19171,24330);

    
$exparray=array(1=>100,400,1002,1912,3140,4707,6641,8985,11795,15143,19121,23840,29437,36071,43930);

    while (list(
$key,$val)=each($exparray))
    {
$exparray[$key]= round($val + ($session['user']['dragonkills']/4) * $session['user']['level'] * 100,0);}

    
$exprequired=$exparray[$session['user']['level']];
    
//output("`\$Exp Required: $exprequired; exp possessed: ".$session['user'][experience]."`0`n");
    
    
if ($_GET['op']=='')
    {
        
output('<span style="color: #FF8080;">D</span><span style="color: #F9807D;">u</span><span style="color: #F3807A;"> </span><span style="color: #ED8077;">b</span><span style="color: #E78074;">e</span><span style="color: #E28071;">t</span><span style="color: #DC806E;">r</span><span style="color: #D6806B;">i</span><span style="color: #D08068;">t</span><span style="color: #CB8065;">t</span><span style="color: #C58062;">s</span><span style="color: #BF805F;">t</span><span style="color: #B9805D;"> </span><span style="color: #B3805A;">d</span><span style="color: #AE8057;">i</span><span style="color: #A88054;">e</span><span style="color: #A28051;"> </span><span style="color: #9C804E;">g</span><span style="color: #97804B;">r</span><span style="color: #918048;">o</span><span style="color: #8B8045;">ß</span><span style="color: #858042;">e</span><span style="color: #80803F;">n Hallen der Meister. Hier, auf dieser Ebene, gibt es einige größere Räume, in denen du brillieren kannst, so du ausreichend für den Kampf geübt hast und den entsprechenden Meister besiegen kannst. Waffengeklirr und Kampfgetose wehen dann und wann an dein Ohr. Du siehst dich nach dem für dich aktuell zuständigen `%Meister '.$master['creaturename'].' <span style="color: #80803F;">um.',true);
        
        
addnav('Meister...');
        
addnav('b?... befragen','train.php?op=question');
        
addnav('h?... herausfordern','train.php?op=challenge');
        
        
addnav('Zurück');
        
//addnav('A?... zur Akademie','academy.php');
        
addnav('S?in die Stadt','village.php');

        
/*
        if ($session['user']['superuser'] > 2)
        {addnav('Superuser Level erhöhen','train.php?op=challenge&victory=1');}
        */
    
}
    
    else if(
$_GET['op']=='challenge')
    {
        if (
$_GET['victory'])
        {
            
$victory=true;
            
$defeat=false;
            
            if (
$session['user']['experience'] < $exprequired)
            
$session['user']['experience'] = $exprequired;

            
// $session['user']['seenmaster'] = 0;
            
if ($session['user']['seenmaster']==2)
            {
$session['user']['seenmaster']=1;}

            else
            {
$session['user']['seenmaster']=0;}
        }
        
        if ((
getsetting(multimaster,1)==0) && $session['user']['seenmaster']==1)
        {
            
output('<span style="color: #FF8080;">F</span><span style="color: #F9807D;">ü</span><span style="color: #F3807A;">r</span><span style="color: #EE8077;"> </span><span style="color: #E88074;">h</span><span style="color: #E38072;">e</span><span style="color: #DD806F;">u</span><span style="color: #D8806C;">t</span><span style="color: #D28069;">e</span><span style="color: #CD8066;"> </span><span style="color: #C78064;">s</span><span style="color: #C28061;">o</span><span style="color: #BC805E;">l</span><span style="color: #B7805B;">l</span><span style="color: #B18059;">t</span><span style="color: #AC8056;">e</span><span style="color: #A68053;">s</span><span style="color: #A18050;">t</span><span style="color: #9B804D;"> </span><span style="color: #96804B;">d</span><span style="color: #908048;">u</span><span style="color: #8B8045;"> </span><span style="color: #858042;">e</span><span style="color: #808040;">s belassen. Du hast genug von den Meistern und ausßerdem haben die ja auch anderes zu tun, als sich den lieben, langen Tag mit dir zu beschäfitgen.</span>',true);

            
addnav('Zurück');
            
//addnav('A?... zur Akademie','academy.php');
            
addnav('S?in die Stadt','village.php'); 
      }

      else
      {
            
/*
            if (!$session['user']['prefs']['nosounds'])
            output('<embed src="media/bigbong.wav" autostart="true" loop="false" hidden="true" volume="100">',true);
            */

            
if (getsetting('multimaster',1)==0)
            
$session['user']['seenmaster'] = 1;
            
            if (
$session['user']['experience']>=$exprequired)
            {
                
$atkflux e_rand(0,$session['user']['dragonkills']);
                
$defflux e_rand(0,($session['user']['dragonkills']-$atkflux));
                
$hpflux = ($session['user']['dragonkills'] - ($atkflux+$defflux)) * 5;
                
$master['creatureattack']+=$atkflux;
                
$master['creaturedefense']+=$defflux;
                
$master['creaturehealth']+=$hpflux;
                
$session['user']['badguy']=createstring($master);
                
$battle=true;
                
                if (
$victory
                {
                    
$badguy createarray($session['user']['badguy']);
                    
                    
output('Mit einem Wirbelsturm aus Schlägen schlägst du deinen Meister nieder.`n');
                }
            }
            
            else
            {
                
output('<span style="color: #FF8080;">D</span><span style="color: #F9807D;">u</span><span style="color: #F3807A;"> </span><span style="color: #EE8077;">f</span><span style="color: #E88074;">ü</span><span style="color: #E38072;">h</span><span style="color: #DD806F;">l</span><span style="color: #D8806C;">s</span><span style="color: #D28069;">t</span><span style="color: #CD8066;"> </span><span style="color: #C78064;">d</span><span style="color: #C28061;">i</span><span style="color: #BC805E;">c</span><span style="color: #B7805B;">h</span><span style="color: #B18059;"> </span><span style="color: #AC8056;">-</span><span style="color: #A68053;"> </span><span style="color: #A18050;">a</span><span style="color: #9B804D;">u</span><span style="color: #96804B;">s</span><span style="color: #908048;">g</span><span style="color: #8B8045;">e</span><span style="color: #858042;">r</span><span style="color: #808040;">üstet mit `l'.$session['user']['weapon'].' <span style="color: #808040;">und `l'.$session['user']['armor'].' <span style="color: #808040;">- in der Lage, `%Meister '.$master['creaturename'].' <span style="color: #808040;">in die Knie zu zwingen. Ein paar andere Übende wohnen diesem Kampf als Zuschauer bei. Kaum hebst du deine Waffe, um den Kampf zu beginnen, ist dieser auch schon wieder vorbei. `%Meister '.$master['creaturename'].' <span style="color: #808040;">bewegt sich so flink und sicher, dass du gar nicht mal wirklich mitbekommst, wie er dich zu Boden bringt. Schallendes Gelächter der Zuschauer erfüllt den Raum.`n`n
                        <span style="color: #FF8080;">P</span><span style="color: #F8807C;">e</span><span style="color: #F28079;">i</span><span style="color: #EC8076;">n</span><span style="color: #E68073;">l</span><span style="color: #E08070;">i</span><span style="color: #DA806D;">c</span><span style="color: #D4806A;">h</span><span style="color: #CE8067;">s</span><span style="color: #C88064;">t</span><span style="color: #C28061;"> </span><span style="color: #BC805E;">b</span><span style="color: #B6805B;">e</span><span style="color: #B08058;">r</span><span style="color: #AA8055;">ü</span><span style="color: #A48052;">h</span><span style="color: #9E804F;">r</span><span style="color: #98804C;">t</span><span style="color: #928049;"> </span><span style="color: #8C8046;">s</span><span style="color: #868043;">t</span><span style="color: #808040;">ehst du wieder auf, klopfst deine Kleidung zurecht und schleichst wie ein geprügelter Hund davon.</span>'
,true);

                
addnav('Zurück');
                
//addnav('A?... zur Akademie','academy.php');
                
addnav('S?in die Stadt','village.php');
                
                
$session['user']['seenmaster']=1;
            }
        }
    }
    
    else if(
$_GET['op']=='question')
    {
        
output('<span style="color: #FF8080;">E</span><span style="color: #F8807C;">h</span><span style="color: #F28079;">r</span><span style="color: #EC8076;">f</span><span style="color: #E68073;">ü</span><span style="color: #E08070;">r</span><span style="color: #DA806D;">c</span><span style="color: #D4806A;">h</span><span style="color: #CE8067;">t</span><span style="color: #C88064;">i</span><span style="color: #C28061;">g</span><span style="color: #BC805E;"> </span><span style="color: #B6805B;">n</span><span style="color: #B08058;">ä</span><span style="color: #AA8055;">h</span><span style="color: #A48052;">e</span><span style="color: #9E804F;">r</span><span style="color: #98804C;">s</span><span style="color: #928049;">t</span><span style="color: #8C8046;"> </span><span style="color: #868043;">d</span><span style="color: #808040;">u dich `%Meister '.$master['creaturename'].'<span style="color: #808040;">, um ihn zu fragen, ob du seiner Meinung nach zum Kampf gegen ihn bereit bist. Er mustert dich von oben bis unten und teilt dir dann mit, dass </span>',true);
        
        if(
$session['user']['experience']>=$exprequired)
        {
            
output('<span style="color: #808040;">du offensichtlich mehr als bereit dazu bist. Ein fast schon neidischer Blick streift flüchtig deine definierten Muskeln.</span>',true);
        }

        else
        {
            
output('<span style="color: #808040;">du dich noch etwas vorbereiten musst. Du solltest noch mindestens `l'.($exprequired-$session['user']['experience']).' <span style="color: #808040;">Erfahrungspunkte dazugewinnen, bevor du dich mit ihm messen kannst.</span>',true);
        }

        if (
$session['user']['reputation']>20)
        
output('`n`n<span style="color: #FF8080;">A</span><span style="color: #F9807D;">b</span><span style="color: #F3807A;">g</span><span style="color: #ED8077;">e</span><span style="color: #E78074;">s</span><span style="color: #E28071;">e</span><span style="color: #DC806E;">h</span><span style="color: #D6806B;">e</span><span style="color: #D08068;">n</span><span style="color: #CB8065;"> </span><span style="color: #C58062;">v</span><span style="color: #BF805F;">o</span><span style="color: #B9805D;">n</span><span style="color: #B3805A;"> </span><span style="color: #AE8057;">d</span><span style="color: #A88054;">i</span><span style="color: #A28051;">e</span><span style="color: #9C804E;">s</span><span style="color: #97804B;">e</span><span style="color: #918048;">m</span><span style="color: #8B8045;"> </span><span style="color: #858042;">U</span><span style="color: #80803F;">mstand ist `%Meister '.$master['creaturename'].' <span style="color: #80803F;">mächtig beeindruckt von deinem ausgezeichneten Ruf. Na, wenn dir `idas`i nicht vor Stolz die Brust schwellen lässt!</span>',true);

        if (
$session['user']['reputation']<-20)
        
output('`n`n<span style="color: #FF8080;">A</span><span style="color: #F9807D;">b</span><span style="color: #F3807A;">g</span><span style="color: #ED8077;">e</span><span style="color: #E78074;">s</span><span style="color: #E28071;">e</span><span style="color: #DC806E;">h</span><span style="color: #D6806B;">e</span><span style="color: #D08068;">n</span><span style="color: #CB8065;"> </span><span style="color: #C58062;">d</span><span style="color: #BF805F;">a</span><span style="color: #B9805D;">v</span><span style="color: #B3805A;">o</span><span style="color: #AE8057;">n</span><span style="color: #A88054;"> </span><span style="color: #A28051;">l</span><span style="color: #9C804E;">ä</span><span style="color: #97804B;">s</span><span style="color: #918048;">s</span><span style="color: #8B8045;">t</span><span style="color: #858042;"> </span><span style="color: #80803F;">dich `%Meister '.$master['creaturename'].' <span style="color: #80803F;">wissen, dass dein umläufiger Ruf als mieser Kämpfer sehr enttäuschend ist.</span>',true);

        
addnav('Meister...');
        
addnav('... befragen','train.php?op=question');
        
addnav('... herausfordern','train.php?op=challenge');

        
addnav('Zurück');
        
//addnav('A?... zur Akademie','academy.php');
        
addnav('S?in die Stadt','village.php');

        
/*
        if ($session['user']['superuser'] > 2) 
        {addnav("Superuser Level erhöhen","train.php?op=challenge&victory=1");}
        */
    
}
    
    else if(
$_GET['op']=='autochallenge')
    {
        
addnav('Kampf');
        
addnav('M?gegen den Meister','train.php?op=challenge');

        
output('<span style="color: #FF8080;">E</span><span style="color: #F9807D;">s</span><span style="color: #F3807A;"> </span><span style="color: #EE8077;">g</span><span style="color: #E88074;">e</span><span style="color: #E38072;">h</span><span style="color: #DD806F;">t</span><span style="color: #D8806C;"> </span><span style="color: #D28069;">d</span><span style="color: #CD8066;">a</span><span style="color: #C78064;">s</span><span style="color: #C28061;"> </span><span style="color: #BC805E;">u</span><span style="color: #B7805B;">m</span><span style="color: #B18059;">l</span><span style="color: #AC8056;">ä</span><span style="color: #A68053;">u</span><span style="color: #A18050;">f</span><span style="color: #9B804D;">i</span><span style="color: #96804B;">g</span><span style="color: #908048;">e</span><span style="color: #8B8045;"> </span><span style="color: #858042;">G</span><span style="color: #808040;">erücht um, dass du offenbar der Meinung bist, du seist so stark und mächtig, dass du es nicht mehr nötig hättest, dich in den Hallen der Meister zu beweisen. Und davon hat auch `%Meister '.$master['creaturename'].' <span style="color: #808040;">gehört. Doch jeder Kämpfer muss früher oder später diese Art des Tributs zollen und selbst du bildest da keine Ausnahme. Und wenn der Berg nicht zum Propheten kommt, muss der Prophet eben zum Berg kommen.`n`n
        
                <span style="color: #FF8080;">J</span><span style="color: #F9807D;">e</span><span style="color: #F3807A;">m</span><span style="color: #EE8077;">a</span><span style="color: #E88074;">n</span><span style="color: #E38072;">d</span><span style="color: #DD806F;"> </span><span style="color: #D8806C;">t</span><span style="color: #D28069;">i</span><span style="color: #CD8066;">p</span><span style="color: #C78064;">p</span><span style="color: #C28061;">t</span><span style="color: #BC805E;"> </span><span style="color: #B7805B;">d</span><span style="color: #B18059;">i</span><span style="color: #AC8056;">r</span><span style="color: #A68053;"> </span><span style="color: #A18050;">v</span><span style="color: #9B804D;">o</span><span style="color: #96804B;">n</span><span style="color: #908048;"> </span><span style="color: #8B8045;">h</span><span style="color: #858042;">i</span><span style="color: #808040;">nten an die Schulter. Als du dich umdrehst, steht `%Meister '
.$master['creaturename'].' <span style="color: #808040;">vor dir und fordert einen Kampf. Also `ijetzt`i kommst du wirklich nicht mehr drum rum.</span>',true);

        if (
$session['user']['hitpoints']<$session['user']['maxhitpoints'])
        {
            
output('`n`n<span style="color: #FF8080;">N</span><span style="color: #F9807D;">e</span><span style="color: #F3807A;">t</span><span style="color: #ED8077;">t</span><span style="color: #E78074;">e</span><span style="color: #E28071;">r</span><span style="color: #DC806E;">w</span><span style="color: #D6806B;">e</span><span style="color: #D08068;">i</span><span style="color: #CB8065;">s</span><span style="color: #C58062;">e</span><span style="color: #BF805F;"> </span><span style="color: #B9805D;">g</span><span style="color: #B3805A;">i</span><span style="color: #AE8057;">b</span><span style="color: #A88054;">t</span><span style="color: #A28051;"> </span><span style="color: #9C804E;">e</span><span style="color: #97804B;">r</span><span style="color: #918048;"> </span><span style="color: #8B8045;">d</span><span style="color: #858042;">i</span><span style="color: #80803F;">r vor dem Kampf noch einen Heiltrank, schließlich kämpft ein ehrenhafter Meister nicht gegen angeschlagene Gegner.</span>',true);

            
$session['user']['hitpoints']=$session['user']['maxhitpoints'];
        }
        
        
$session['user']['reputation']-=2;
        
        if (
$session['user']['seenmaster']==1
        
$session['user']['seenmaster']=2;
        
        
addnews('<span style="color: #FF8080;">D</span><span style="color: #F8807C;">e</span><span style="color: #F28079;">r</span><span style="color: #EC8076;"> </span><span style="color: #E68073;">b</span><span style="color: #E08070;">i</span><span style="color: #DA806D;">s</span><span style="color: #D4806A;">h</span><span style="color: #CE8067;">e</span><span style="color: #C88064;">r</span><span style="color: #C28061;">i</span><span style="color: #BC805E;">g</span><span style="color: #B6805B;">e</span><span style="color: #B08058;">n</span><span style="color: #AA8055;"> </span><span style="color: #A48052;">W</span><span style="color: #9E804F;">e</span><span style="color: #98804C;">i</span><span style="color: #928049;">g</span><span style="color: #8C8046;">e</span><span style="color: #868043;">r</span><span style="color: #808040;">ung zum Kampf hat `%Meister '.$master['creaturename'].' <span style="color: #808040;">ein Ende gesetzt und `%'.$session['user']['name'].' <span style="color: #808040;">gestellt.</span>',true);
    }
    
    if (
$_GET['op']=='fight')
    {
$battle=true;}

    if (
$_GET['op']=='run')
    {
        
output('<span style="color: #FF8080;">D</span><span style="color: #F9807D;">u</span><span style="color: #F3807A;"> </span><span style="color: #EE8077;">k</span><span style="color: #E88074;">a</span><span style="color: #E38072;">n</span><span style="color: #DD806F;">n</span><span style="color: #D8806C;">s</span><span style="color: #D28069;">t</span><span style="color: #CD8066;"> </span><span style="color: #C78064;">d</span><span style="color: #C28061;">i</span><span style="color: #BC805E;">c</span><span style="color: #B7805B;">h</span><span style="color: #B18059;"> </span><span style="color: #AC8056;">v</span><span style="color: #A68053;">o</span><span style="color: #A18050;">r</span><span style="color: #9B804D;"> </span><span style="color: #96804B;">d</span><span style="color: #908048;">i</span><span style="color: #8B8045;">e</span><span style="color: #858042;">s</span><span style="color: #808040;">em Kampf nicht drücken und <span style="color: #808040;">d</span><span style="color: #868043;">a</span><span style="color: #8C8046;">h</span><span style="color: #928049;">e</span><span style="color: #98804C;">r</span><span style="color: #9E804F;"> </span><span style="color: #A48052;">n</span><span style="color: #AA8055;">i</span><span style="color: #B08058;">c</span><span style="color: #B6805B;">h</span><span style="color: #BC805E;">t</span><span style="color: #C28061;"> </span><span style="color: #C88064;">w</span><span style="color: #CE8067;">e</span><span style="color: #D4806A;">g</span><span style="color: #DA806D;">r</span><span style="color: #E08070;">e</span><span style="color: #E68073;">n</span><span style="color: #EC8076;">n</span><span style="color: #F28079;">e</span><span style="color: #F8807C;">n</span><span style="color: #FE807F;">.</span>`c`n',true);
        
        
$_GET['op']='fight';
        
$battle=true;
    }
    
    if(
$battle)
    {
        if (
count($session['bufflist'])>&& is_array($session['bufflist']) || $_GET['skill']!='')
        {
            
$_GET['skill']='';
            
            if (
$_GET['skill']==''
            
$session['user']['buffbackup']=serialize($session['bufflist']);
            
            
$session['bufflist']=array();
            
            
output('`c<span style="color: #FF8080;">W</span><span style="color: #F9807D;">ä</span><span style="color: #F3807A;">h</span><span style="color: #ED8077;">r</span><span style="color: #E78074;">e</span><span style="color: #E28071;">n</span><span style="color: #DC806E;">d</span><span style="color: #D6806B;"> </span><span style="color: #D08068;">d</span><span style="color: #CB8065;">e</span><span style="color: #C58062;">s</span><span style="color: #BF805F;"> </span><span style="color: #B9805D;">K</span><span style="color: #B3805A;">a</span><span style="color: #AE8057;">m</span><span style="color: #A88054;">p</span><span style="color: #A28051;">f</span><span style="color: #9C804E;">e</span><span style="color: #97804B;">s</span><span style="color: #918048;"> </span><span style="color: #8B8045;">k</span><span style="color: #858042;">a</span><span style="color: #80803F;">nnst du keinen Gebrauch von deinen besonder<span style="color: #808040;">e</span><span style="color: #868043;">n</span><span style="color: #8C8046;"> </span><span style="color: #928049;">F</span><span style="color: #98804C;">ä</span><span style="color: #9E804F;">h</span><span style="color: #A48052;">i</span><span style="color: #AA8055;">g</span><span style="color: #B08058;">k</span><span style="color: #B6805B;">e</span><span style="color: #BC805E;">i</span><span style="color: #C28061;">t</span><span style="color: #C88064;">e</span><span style="color: #CE8067;">n</span><span style="color: #D4806A;"> </span><span style="color: #DA806D;">m</span><span style="color: #E08070;">a</span><span style="color: #E68073;">c</span><span style="color: #EC8076;">h</span><span style="color: #F28079;">e</span><span style="color: #F8807C;">n</span><span style="color: #FE807F;">.`c`n</span>',true);
        }
        
        if (!
$victory
        include(
'battle.php');
        
        if (
$victory)
        {            
            
$search=array('%s','%o','%p','%X','%x','%w','%W');
                            
            
$replace=array(($session['user']['sex']?'sie':'ihn'),
                           (
$session['user']['sex']?'sie':'er'),
                           (
$session['user']['sex']?'ihr':'sein'),
                           (
$session['user']['weapon']),
                            
$badguy['creatureweapon'],
                            
$badguy['creaturename'],
                            
$session['user']['name']);
                            
            
$badguy['creaturelose']=str_replace($search,$replace,$badguy['creaturelose']);

            
output('`b`n`@`i'.$badguy['creaturelose'].'`i`0`b`n`n
                    `b<span style="color: #FF8080;">S</span><span style="color: #F9807D;">u</span><span style="color: #F3807A;">p</span><span style="color: #EE8077;">e</span><span style="color: #E88074;">r</span><span style="color: #E38072;">,</span><span style="color: #DD806F;"> </span><span style="color: #D8806C;">d</span><span style="color: #D28069;">u</span><span style="color: #CD8066;"> </span><span style="color: #C78064;">h</span><span style="color: #C28061;">a</span><span style="color: #BC805E;">s</span><span style="color: #B7805B;">t</span><span style="color: #B18059;"> </span><span style="color: #AC8056;">d</span><span style="color: #A68053;">e</span><span style="color: #A18050;">i</span><span style="color: #9B804D;">n</span><span style="color: #96804B;">e</span><span style="color: #908048;">n</span><span style="color: #8B8045;"> </span><span style="color: #858042;">M</span><span style="color: #808040;">eister '
.$badguy['creaturename'].' bezwungen!`0`b`n</span>',true);

            
/*
            if (!$session['user']['prefs']['nosounds'])
            output("<embed src=\"media/cheer.wav\" width=10 height=10 autostart=true loop=false hidden=true volume=100>",true);
            */

            
$session['user']['level']        ++;
            
$session['user']['maxhitpoints'] +=10;
            
$session['user']['soulpoints']   +=5;
            
$session['user']['attack']       ++;
            
$session['user']['defence']      ++;
            
$session['user']['seenmaster']   =0;
            
$session['user']['reputation']   +=3;

            
output('`n<span style="color: #FF8080;">G</span><span style="color: #F8807C;">l</span><span style="color: #F28079;">ü</span><span style="color: #EC8076;">c</span><span style="color: #E68073;">k</span><span style="color: #E08070;">w</span><span style="color: #DA806D;">u</span><span style="color: #D4806A;">n</span><span style="color: #CE8067;">s</span><span style="color: #C88064;">c</span><span style="color: #C28061;">h</span><span style="color: #BC805E;">,</span><span style="color: #B6805B;"> </span><span style="color: #B08058;">d</span><span style="color: #AA8055;">u</span><span style="color: #A48052;"> </span><span style="color: #9E804F;">s</span><span style="color: #98804C;">t</span><span style="color: #928049;">e</span><span style="color: #8C8046;">i</span><span style="color: #868043;">g</span><span style="color: #808040;">st auf `%Level '.$session['user']['level'].' <span style="color: #808040;">auf!`n
                    <span style="color: #FF8080;">D</span><span style="color: #F8807C;">e</span><span style="color: #F28079;">i</span><span style="color: #EC8076;">n</span><span style="color: #E68073;">e</span><span style="color: #E08070;"> </span><span style="color: #DA806D;">m</span><span style="color: #D4806A;">a</span><span style="color: #CE8067;">x</span><span style="color: #C88064;">i</span><span style="color: #C28061;">m</span><span style="color: #BC805E;">a</span><span style="color: #B6805B;">l</span><span style="color: #B08058;">e</span><span style="color: #AA8055;">n</span><span style="color: #A48052;"> </span><span style="color: #9E804F;">L</span><span style="color: #98804C;">e</span><span style="color: #928049;">b</span><span style="color: #8C8046;">e</span><span style="color: #868043;">n</span><span style="color: #808040;">spunkte sind auf `%'
.$session['user']['maxhitpoints'].' <span style="color: #808040;">gestiegen!`n
                    <span style="color: #FF8080;">A</span><span style="color: #F9807D;">u</span><span style="color: #F3807A;">ß</span><span style="color: #ED8077;">e</span><span style="color: #E78074;">r</span><span style="color: #E28071;">d</span><span style="color: #DC806E;">e</span><span style="color: #D6806B;">m</span><span style="color: #D08068;"> </span><span style="color: #CB8065;">b</span><span style="color: #C58062;">e</span><span style="color: #BF805F;">k</span><span style="color: #B9805D;">o</span><span style="color: #B3805A;">m</span><span style="color: #AE8057;">m</span><span style="color: #A88054;">s</span><span style="color: #A28051;">t</span><span style="color: #9C804E;"> </span><span style="color: #97804B;">d</span><span style="color: #918048;">u</span><span style="color: #8B8045;"> </span><span style="color: #858042;">z</span><span style="color: #80803F;">usätzlich `%+1 Angriff <span style="color: #80803F;">und `%+1 Verteidigung<span style="color: #80803F;">!`n</span>'
,true);

            if (
$session['user']['level']<15)
            {
                
output('`n<span style="color: #FF8080;">D</span><span style="color: #F9807D;">u</span><span style="color: #F3807A;"> </span><span style="color: #EE8077;">h</span><span style="color: #E88074;">a</span><span style="color: #E38072;">s</span><span style="color: #DD806F;">t</span><span style="color: #D8806C;"> </span><span style="color: #D28069;">j</span><span style="color: #CD8066;">e</span><span style="color: #C78064;">t</span><span style="color: #C28061;">z</span><span style="color: #BC805E;">t</span><span style="color: #B7805B;"> </span><span style="color: #B18059;">e</span><span style="color: #AC8056;">i</span><span style="color: #A68053;">n</span><span style="color: #A18050;">e</span><span style="color: #9B804D;">n</span><span style="color: #96804B;"> </span><span style="color: #908048;">n</span><span style="color: #8B8045;">e</span><span style="color: #858042;">u</span><span style="color: #808040;">en Meistser.`n</span>',true);
            }

            else
            {
                
output('`b`n<span style="color: #FF8080;">K</span><span style="color: #F9807D;">e</span><span style="color: #F3807A;">i</span><span style="color: #EE8077;">n</span><span style="color: #E88074;">e</span><span style="color: #E38072;">r</span><span style="color: #DD806F;"> </span><span style="color: #D8806C;">i</span><span style="color: #D28069;">m</span><span style="color: #CD8066;"> </span><span style="color: #C78064;">L</span><span style="color: #C28061;">a</span><span style="color: #BC805E;">n</span><span style="color: #B7805B;">d</span><span style="color: #B18059;"> </span><span style="color: #AC8056;">i</span><span style="color: #A68053;">s</span><span style="color: #A18050;">t</span><span style="color: #9B804D;"> </span><span style="color: #96804B;">m</span><span style="color: #908048;">ä</span><span style="color: #8B8045;">c</span><span style="color: #858042;">h</span><span style="color: #808040;">tiger als du!`b`n</span>',true);
            }
            
            if (
$session['user']['referer']>&& $session['user']['level']>=&& $session['user']['refererawarded']<1)
            {
                
$sql "UPDATE accounts SET donation=donation+50 WHERE acctid={$session['user']['referer']}";
                
                
db_query($sql);
                
$session['user']['refererawarded']=1;
                
                
systemmail($session['user']['referer'],"`%Eine deiner Anwerbungen hat's geschafft!`0","`%{$session['user']['name']}`# ist auf Level `%{$session['user']['level']}`# aufgestiegen und du hast deine `%50`# Punkte bekommen!");
            }
            
            if (
$session['user']['level']==10)
            {
$session['user']['donation']+=1;}
            
            
increment_specialty();
            
            
addnav('Meister...');
            
addnav('b?... befragen','train.php?op=question');
            
addnav('h?... herausfordern','train.php?op=challenge');

            
addnav('Zurück');
            
//addnav('A?... zur Akademie','academy.php');
            
addnav('S?in die Stadt','village.php');
            
            
/*
            if ($session['user']['superuser'] > 2) 
            {addnav("Superuser Level erhöhen","train.php?op=challenge&victory=1");}
            */
            
            
addnews('`%'.$session['user']['name'].'`o hat '.($session['user']['sex']?'ihren':'seinen').' Meister `+'.$badguy['creaturename'].'`o an '.($session['user']['sex']?'ihrem':'seinem').' `%'.ordinal($session['user']['age']).'`o Tag besiegt und steigt auf Level `%'.$session['user']['level'].'`o auf!');

            
$badguy=array();
            
$session['user']['hitpoints'] = $session['user']['maxhitpoints'];
            
$sql="SELECT acctid2,turn FROM pvp WHERE acctid1=".$session['user']['acctid']." OR acctid2=".$session['user']['acctid']."";
            
$result db_query($sql) or die(db_error(LINK));
            
$row db_fetch_assoc($result);
            
            if(
$row['acctid2']==$session['user']['acctid'] && $row['turn']==0)
            {
                
output("`n`6`bDu kannst die offene Herausforderung in der Arena jetzt nicht mehr annehmen.`b");
                
                
$sql "DELETE FROM pvp WHERE acctid2=".$session['user']['acctid']." AND turn=0";
                
db_query($sql) or die(db_error(LINK));
            }            
        }
        
        else
        {
            if(
$defeat)
            {                
                
$sql 'SELECT taunt FROM taunts ORDER BY rand('.e_rand().') LIMIT 1';
                
                
$result db_query($sql) or die(db_error(LINK));
                
$taunt db_fetch_assoc($result);
                
$taunt str_replace('%s',($session['user']['gender']?'ihm':'ihr'),$taunt['taunt']);
                
$taunt str_replace('%o',($session['user']['gender']?'er':'sie'),$taunt);
                
$taunt str_replace('%p',($session['user']['gender']?'sein':'ihr'),$taunt);
                
$taunt str_replace('%x',($session['user']['weapon']),$taunt);
                
$taunt str_replace('%X',$badguy['creatureweapon'],$taunt);
                
$taunt str_replace('%W',$badguy['creaturename'],$taunt);
                
$taunt str_replace('%w',$session['user']['name'],$taunt);

                
addnews('`%'.$session['user']['name'].'`o hat `%Meister '.$badguy['creaturename'].' `oherausgefordert und verloren!`n'.$taunt.'`0');
                
                
//$session['user'][alive]=false;
                //$session['user'][gold]=0;

                
$session['user']['hitpoints']=$session['user']['maxhitpoints'];

                
output('`n`%`b'.$badguy['creaturename'].' hat dich besiegt!`b`n`n
                        <span style="color: #FF8080;">B</span><span style="color: #F9807D;">e</span><span style="color: #F3807A;">v</span><span style="color: #EE8077;">o</span><span style="color: #E88074;">r</span><span style="color: #E38072;"> </span><span style="color: #DD806F;">e</span><span style="color: #D8806C;">r</span><span style="color: #D28069;"> </span><span style="color: #CD8066;">d</span><span style="color: #C78064;">i</span><span style="color: #C28061;">r</span><span style="color: #BC805E;"> </span><span style="color: #B7805B;">d</span><span style="color: #B18059;">e</span><span style="color: #AC8056;">n</span><span style="color: #A68053;"> </span><span style="color: #A18050;">v</span><span style="color: #9B804D;">e</span><span style="color: #96804B;">r</span><span style="color: #908048;">n</span><span style="color: #8B8045;">i</span><span style="color: #858042;">c</span><span style="color: #808040;">htenden Schlag versetzt, reicht dir `%Meister '
.$badguy['creaturename'].' <span style="color: #808040;">die Hand und hilft dir auf die Beine. Außerdem bekommst du einen kostenlosen Heiltrank.`n`n</span>',true);
                
                
$search=array('%s','%o','%p','%x','%X','%W','%w');

                
$replace=array(($session['user']['gender']?'ihm':'ihr'),
                               (
$session['user']['gender']?'er':'sie'),
                               (
$session['user']['gender']?'sein':'ihr'),
                               (
$session['user']['weapon']),
                               
$badguy['creatureweapon'],
                               
$badguy['creaturename'],
                               
$session['user']['name']);
                               
                
$badguy['creaturewin']=str_replace($search,$replace,$badguy['creaturewin']);
                
                
output('<span style="color: #FF8080;">E</span><span style="color: #F8807C;">i</span><span style="color: #F28079;">n</span><span style="color: #EC8076;">e</span><span style="color: #E68073;">n</span><span style="color: #E08070;"> </span><span style="color: #DA806D;">s</span><span style="color: #D4806A;">p</span><span style="color: #CE8067;">ö</span><span style="color: #C88064;">t</span><span style="color: #C28061;">t</span><span style="color: #BC805E;">i</span><span style="color: #B6805B;">s</span><span style="color: #B08058;">c</span><span style="color: #AA8055;">h</span><span style="color: #A48052;">e</span><span style="color: #9E804F;">n</span><span style="color: #98804C;"> </span><span style="color: #928049;">K</span><span style="color: #8C8046;">o</span><span style="color: #868043;">m</span><span style="color: #808040;">mentar kann sich `%Meister '.$badguy['creaturename'].' <span style="color: #808040;">aber nicht verkneifen: `l"'.$badguy['creaturewin'].'"</span>',true);
                
                
addnav('Meister...');
                
addnav('b?... befragen','train.php?op=question');
                
addnav('h?... herausfordern','train.php?op=challenge');

                
addnav('Zurück');
                
//addnav('A?... zur Akademie','academy.php');
                
addnav('S?in die Stadt','village.php');
                
                
/*
                if ($session['user']['superuser'] > 2) 
                {addnav('Superuser Level erhöhen','train.php?op=challenge&victory=1');}
                */
                

                
if ($session['user']['seenmaster']!=2)
                
$session['user']['seenmaster']=1;
            }

            else
            {
fightnav(false,false);}
        }
    }
}

else
{
    
output('<span style="color: #FF8080;">D</span><span style="color: #F9807D;">u</span><span style="color: #F3807A;"> </span><span style="color: #EE8077;">s</span><span style="color: #E88074;">u</span><span style="color: #E38072;">c</span><span style="color: #DD806F;">h</span><span style="color: #D8806C;">s</span><span style="color: #D28069;">t</span><span style="color: #CD8066;"> </span><span style="color: #C78064;">d</span><span style="color: #C28061;">a</span><span style="color: #BC805E;">s</span><span style="color: #B7805B;"> </span><span style="color: #B18059;">a</span><span style="color: #AC8056;">l</span><span style="color: #A68053;">t</span><span style="color: #A18050;">e</span><span style="color: #9B804D;"> </span><span style="color: #96804B;">G</span><span style="color: #908048;">e</span><span style="color: #8B8045;">b</span><span style="color: #858042;">ä</span><span style="color: #808040;">ude auf und flanierst durch die Hallen der Meister. Hier und dort wird hart gekämpft, ein kurzer Plausch über den richtigen Umgang mit Waffen gehalten oder die Wunden eines verletzten Übenden versorgt. Für dich gibt es allerdings keinen Meister mehr, duhast ausgelernt. Ziehe in die Wälder und zolle deinen Tribut.</span>',true);

    
addnav('Zurück');
    
//addnav('A?... zur Akademie','academy.php');
    
addnav('S?in die Stadt','village.php');
}

page_footer();
?>
0.9.7+jt ext (GER)