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!


./battlearena.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:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:
529:
530:
531:
532:
533:
534:
535:
536:
537:
538:
539:
540:
541:
542:
543:
544:
545:
546:
547:
548:
549:
550:
551:
552:
553:
554:
555:
556:
557:
558:
559:
560:
561:
562:
563:
564:
565:
566:
567:
568:
569:
570:
571:
572:
573:
574:
575:
576:
577:
578:
579:
580:
581:
582:
583:
584:
585:
586:
587:
588:
589:
590:
591:
592:
593:
594:
595:
596:
597:
598:
599:
600:
601:
602:
603:
604:
605:
606:
607:
608:
609:
610:
611:
612:
613:
614:
615:
616:
617:
618:
619:
620:
621:
622:
623:
624:
625:
626:
627:
628:
629:
630:
631:
632:
633:
634:
635:
636:
637:
638:
639:
640:
641:
642:
643:
644:
645:
646:
647:
648:
649:
650:
651:
652:
653:
654:
655:
656:
657:
658:
659:
660:
661:
662:
663:
664:
665:
666:
667:
668:
669:
670:
671:
672:
673:
674:
675:
676:
677:
678:
679:
680:
681:
682:
683:
684:
685:
686:
687:
688:
689:
690:
691:
692:
693:
694:
695:
696:
697:
698:
699:
700:
701:
702:
703:
704:
705:
706:
707:
708:
709:
710:
711:
712:
713:
714:
715:
716:
717:
718:
719:
720:
721:
722:
723:
724:
725:
726:
727:
728:
729:
730:
731:
732:
733:
734:
735:
736:
737:
738:
739:
740:
741:
742:
743:
744:
745:
746:
747:
748:
749:
750:
751:
752:
753:
754:
755:
756:
757:
758:
759:
760:
761:
762:
763:
764:
<?php

// 09092004

//Battle Arena - first release
//Created by Lonny Luberts of http://www.pqcomp.com/logd e-mail logd@pqcomp.com
//place this file in the main(logd) folder
//addfield `battlepoints` int(11) NOT NULL default '0' to accounts
//
//addfield `pqinttemp` int(20) NOT NULL default '0' to accounts (will re-use this in further modules, temp data field)
//(this version uses 'specialmisc' for that purpose; pqinttemp not needed -- anpera)
//
//in dragon.php after
// ,"beta"=>1
//add
// ,"battlepoints"=>1
//this way battlepoints do not reset after dragon kill
// translation by anpera

/*********************************************************************
 * MODIFIZIERT DURCH
 * Admin @ Dreythal
 * Oktober 2014
*********************************************************************/

require_once 'common.php';
checkday();

page_header('Arena');

output('`n`c`b<span style="color: #808080;">D</span><span style="color: #909090;">i</span><span style="color: #A0A0A0;">e</span><span style="color: #B0B0B0;"> </span><span style="color: #C0C0C0;">A</span><span style="color: #C0C0C0;">r</span><span style="color: #AAAAAA;">e</span><span style="color: #959595;">n</span><span style="color: #808080;">a</span>`b`c`n',true);
// = "Die Arena"

if ($_GET['op'] == '')
{
    
output('<span style="color: #808080;">F</span><span style="color: #828282;">r</span><span style="color: #858585;">ü</span><span style="color: #888888;">h</span><span style="color: #8B8B8B;">e</span><span style="color: #8E8E8E;">r</span><span style="color: #919191;"> </span><span style="color: #949494;">w</span><span style="color: #979797;">a</span><span style="color: #9A9A9A;">r</span><span style="color: #9D9D9D;"> </span><span style="color: #A0A0A0;">h</span><span style="color: #A2A2A2;">i</span><span style="color: #A5A5A5;">e</span><span style="color: #A8A8A8;">r</span><span style="color: #ABABAB;"> </span><span style="color: #AEAEAE;">v</span><span style="color: #B1B1B1;">e</span><span style="color: #B4B4B4;">r</span><span style="color: #B7B7B7;">m</span><span style="color: #BABABA;">u</span><span style="color: #BDBDBD;">t</span><span style="color: #C0C0C0;">lich einst der Teufel los. Heute sind die Plätze nur spärlich besetzt, wenn überhaupt jemand hier ist. Die einzigen, die sich hier relativ regelmäßig herumtreiben, sind die "hauseigenen" Gladiatoren, gegen die du antreten kannst, wenn du nicht gegen einen Bewohner antreten möchtest.`n`n
            
            <span style="color: #808080;">D</span><span style="color: #828282;">u</span><span style="color: #858585;"> </span><span style="color: #888888;">e</span><span style="color: #8B8B8B;">r</span><span style="color: #8E8E8E;">b</span><span style="color: #919191;">l</span><span style="color: #949494;">i</span><span style="color: #979797;">c</span><span style="color: #9A9A9A;">k</span><span style="color: #9D9D9D;">s</span><span style="color: #A0A0A0;">t</span><span style="color: #A2A2A2;"> </span><span style="color: #A5A5A5;">e</span><span style="color: #A8A8A8;">i</span><span style="color: #ABABAB;">n</span><span style="color: #AEAEAE;">e</span><span style="color: #B1B1B1;"> </span><span style="color: #B4B4B4;">T</span><span style="color: #B7B7B7;">a</span><span style="color: #BABABA;">f</span><span style="color: #BDBDBD;">e</span><span style="color: #C0C0C0;">l. </span>'
,true);
    
    
$sql 'SELECT battlepoints,name FROM accounts WHERE battlepoints > 0  ORDER BY battlepoints DESC,name';
    
$result db_query($sql);
    
    for (
$i=0;$i<db_num_rows($result);$i++)
    {
        
$row db_fetch_assoc($result);
        
        if (
$row['battlepoints'] > $topbattle and $row['battlepoints'] > 0)
        {
            
$topbattle $row['battlepoints'];
            
$plaque $row['name'];
        }
    }    
    
    
output('<span style="color: #C0C0C0;">Auf dieser steht der Name des aktuellen Arenahelden: ',true);
    
    if (
$plaque <> '')
    {
output('`@'.$plaque.'<span style="color: #C0C0C0;">',true);}
    
    else
    {
output('`lniemand<span style="color: #C0C0C0;">',true);}
    
    
output('`n`n<span style="color: #808080;">A</span><span style="color: #828282;">u</span><span style="color: #858585;">f</span><span style="color: #888888;"> </span><span style="color: #8B8B8B;">e</span><span style="color: #8E8E8E;">i</span><span style="color: #919191;">n</span><span style="color: #949494;">e</span><span style="color: #979797;">r</span><span style="color: #9A9A9A;"> </span><span style="color: #9D9D9D;">w</span><span style="color: #A0A0A0;">e</span><span style="color: #A2A2A2;">i</span><span style="color: #A5A5A5;">t</span><span style="color: #A8A8A8;">e</span><span style="color: #ABABAB;">r</span><span style="color: #AEAEAE;">e</span><span style="color: #B1B1B1;">n</span><span style="color: #B4B4B4;"> </span><span style="color: #B7B7B7;">T</span><span style="color: #BABABA;">a</span><span style="color: #BDBDBD;">f</span><span style="color: #C0C0C0;">el sind die Gladiatoren aufgelistet, mit denen du dich derzeit messen könntest:`n`n</span>',true);
    
    if (
$session['user']['battlepoints'] < 13 || $session['user']['dragonkills']<1
    
output('`l<li>`.Cicero (`lLevel 9`.)',true);
    
    if (
$session['user']['battlepoints'] > 12 && $session['user']['dragonkills'] >= && $session['user']['battlepoints'] < 72 
    
output('`l<li>`.Vibius (`lLevel 10`.)',true);
    
    if (
$session['user']['battlepoints'] >= 36 && $session['user']['dragonkills'] > && $session['user']['battlepoints'] < 180 )
    
output('`l<li>`.Quintus (`lLevel 11`.)',true);
    
    if (
$session['user']['battlepoints'] >= 72 && $session['user']['dragonkills'] > && $session['user']['battlepoints'] < 252 )
    
output('`l<li>`.Cassius (`lLevel 12`.)',true);
    
    if (
$session['user']['battlepoints'] >= 120 && $session['user']['dragonkills'] > && $session['user']['battlepoints'] < 336 )
    
output('`l<li>`.Lucius (`lLevel 13`.)',true);
    
    if (
$session['user']['battlepoints'] >= 180 && $session['user']['dragonkills'] > 5
    
output('`l<li>`.Aurelius (`lLevel 14`.)',true);
    
    if (
$session['user']['battlepoints'] >= 252 && $session['user']['dragonkills'] > 7
    
output('`l<li>`.Proximo (`lLevel 15`.)',true);
    
    if (
$session['user']['battlepoints'] >= 336 && $session['user']['dragonkills'] > 9
    
output('`l<li>`.Maximus (`lLevel 15`.)',true);
    
    
output('</li>`n
            <span style="color: #808080;">W</span><span style="color: #828282;">e</span><span style="color: #858585;">n</span><span style="color: #878787;">n</span><span style="color: #8A8A8A;"> </span><span style="color: #8D8D8D;">d</span><span style="color: #8F8F8F;">u</span><span style="color: #929292;"> </span><span style="color: #959595;">i</span><span style="color: #979797;">n</span><span style="color: #9A9A9A;"> </span><span style="color: #9D9D9D;">d</span><span style="color: #9F9F9F;">e</span><span style="color: #A2A2A2;">r</span><span style="color: #A5A5A5;"> </span><span style="color: #A7A7A7;">A</span><span style="color: #AAAAAA;">r</span><span style="color: #ADADAD;">e</span><span style="color: #AFAFAF;">n</span><span style="color: #B2B2B2;">a</span><span style="color: #B5B5B5;"> </span><span style="color: #B7B7B7;">g</span><span style="color: #BABABA;">e</span><span style="color: #BDBDBD;">g</span><span style="color: #BFBFBF;">en Gladiatoren kämpfen willst, musst du dafür eine Nebelwaldrunde opfern. Außerdem ist es empfehlenswert, den Kampf erst zu suchen, wenn du in bester Verfassung bist.`n`n
    
            <span style="color: #808080;">U</span><span style="color: #828282;">m</span><span style="color: #858585;"> </span><span style="color: #888888;">a</span><span style="color: #8B8B8B;">n</span><span style="color: #8E8E8E;"> </span><span style="color: #919191;">e</span><span style="color: #949494;">i</span><span style="color: #979797;">n</span><span style="color: #9A9A9A;">e</span><span style="color: #9D9D9D;">m</span><span style="color: #A0A0A0;"> </span><span style="color: #A2A2A2;">G</span><span style="color: #A5A5A5;">l</span><span style="color: #A8A8A8;">a</span><span style="color: #ABABAB;">d</span><span style="color: #AEAEAE;">i</span><span style="color: #B1B1B1;">a</span><span style="color: #B4B4B4;">t</span><span style="color: #B7B7B7;">o</span><span style="color: #BABABA;">r</span><span style="color: #BDBDBD;">e</span><span style="color: #C0C0C0;">nkampf teilzunehmen, musst du eine Gebühr entrichten.</span>'
,true);
    
    if (
$session['user']['gold'] < 1
    
output(' <span style="color: #C0C0C0;">Wie du feststellen musst, hast du allerdings nicht ein einziges Stück Gold dabei.',true);
    
    if (
$session['user']['gold'] > and $session['user']['gold'] < 50
    
output(' <span style="color: #C0C0C0;">Du hättest jedoch gar nicht genug Gold dabei, um teilzunehmen.',true);
    
    if (
$session['user']['gold'] > 49 and $session['user']['turns'] > 0
    {
        
addnav('Teilnahme');
        
addnav('Eintritt (`%50 `0Gold)','battlearena.php?op=pay');
    }
    
    
addnav('Gehe zu...');
    
    if (
$session['user']['battlepoints'] > 120 and $session['user']['dragonkills'] > 4
    
addnav('G?... Gemeinschaftsraum','battlearena.php?op=lounge');
    
    
addnav('R?... Rangliste','arenahof.php?op=battlepoints&subop=most');
    
    
addnav('Zurück');
    
addnav('S?in die Stadt','village.php');
}

if (
$_GET['op'] == 'lounge')
{
    
output('`c`b<span style="color: #808080;">D</span><span style="color: #868686;">e</span><span style="color: #8C8C8C;">r</span><span style="color: #939393;"> </span><span style="color: #999999;">G</span><span style="color: #A0A0A0;">e</span><span style="color: #A6A6A6;">m</span><span style="color: #ACACAC;">e</span><span style="color: #B3B3B3;">i</span><span style="color: #B9B9B9;">n</span><span style="color: #C0C0C0;">s</span><span style="color: #C0C0C0;">c</span><span style="color: #B8B8B8;">h</span><span style="color: #B1B1B1;">a</span><span style="color: #AAAAAA;">f</span><span style="color: #A3A3A3;">t</span><span style="color: #9C9C9C;">s</span><span style="color: #959595;">r</span><span style="color: #8E8E8E;">a</span><span style="color: #878787;">u</span><span style="color: #808080;">m</span>`b`c`n
    
            <span style="color: #808080;">H</span><span style="color: #828282;">i</span><span style="color: #858585;">e</span><span style="color: #888888;">r</span><span style="color: #8B8B8B;"> </span><span style="color: #8D8D8D;">e</span><span style="color: #909090;">r</span><span style="color: #939393;">l</span><span style="color: #969696;">a</span><span style="color: #999999;">n</span><span style="color: #9B9B9B;">g</span><span style="color: #9E9E9E;">s</span><span style="color: #A1A1A1;">t</span><span style="color: #A4A4A4;"> </span><span style="color: #A6A6A6;">d</span><span style="color: #A9A9A9;">u</span><span style="color: #ACACAC;"> </span><span style="color: #AFAFAF;">n</span><span style="color: #B2B2B2;">u</span><span style="color: #B4B4B4;">r</span><span style="color: #B7B7B7;"> </span><span style="color: #BABABA;">Z</span><span style="color: #BDBDBD;">u</span><span style="color: #BFBFBF;">tritt, wenn du dich schon ordentlich in Dreythal und seiner Arena bewiesen hast. Tausche dich mit anderen Arenahelden aus oder entspanne dich bis zum nächsten Duell, während die Zuschauer draußen bei Wind und Wetter der Dinge harren.</span>'
,true);

    
addcommentary();
    
viewcommentary('Arena Gemeinschaftsraum','<span style="color: #808080;">M</span><span style="color: #828282;">i</span><span style="color: #858585;">t</span><span style="color: #888888;"> </span><span style="color: #8B8B8B;">a</span><span style="color: #8D8D8D;">n</span><span style="color: #909090;">d</span><span style="color: #939393;">e</span><span style="color: #969696;">r</span><span style="color: #999999;">e</span><span style="color: #9B9B9B;">n</span><span style="color: #9E9E9E;"> </span><span style="color: #A1A1A1;">u</span><span style="color: #A4A4A4;">m</span><span style="color: #A6A6A6;"> </span><span style="color: #A9A9A9;">d</span><span style="color: #ACACAC;">i</span><span style="color: #AFAFAF;">e</span><span style="color: #B2B2B2;"> </span><span style="color: #B4B4B4;">W</span><span style="color: #B7B7B7;">e</span><span style="color: #BABABA;">t</span><span style="color: #BDBDBD;">t</span><span style="color: #BFBFBF;">e prahlen:</span>',20,'prahlt:',true);

    
addnav('Zurück');

    if (@
file_exists('pvparena.php'))
    {
addnav('A?... zur Arena','pvparena.php');}

    else
    {
addnav('A?... zur Arena','battlearena.php');}
}

if (
$_GET[op] == "rank")
{
    
output("`3Diese Krieger haben sich bereits im Kampf bewährt.`n`n");
    
$sql "SELECT battlepoints,name FROM accounts WHERE battlepoints > 0  ORDER BY battlepoints DESC,name";
    
$result db_query($sql);
    for (
$i=0;$i<db_num_rows($result);$i++){
    
$row db_fetch_assoc($result);
    if (
$row[battlepoints] > 0){
        
output($row[name]." `7hat ".$row[battlepoints]." `7Kampfpunkte.`n");
    }
}
addnav('Weiter','battlearena.php');
}

if (
$_GET['op'] == 'pay')
{
    
$session['user']['gold']-=50;
    
$session['user']['turns']-=1;

    
output('<span style="color: #808080;">D</span><span style="color: #828282;">u</span><span style="color: #858585;"> </span><span style="color: #888888;">b</span><span style="color: #8B8B8B;">i</span><span style="color: #8D8D8D;">s</span><span style="color: #909090;">t</span><span style="color: #939393;"> </span><span style="color: #969696;">d</span><span style="color: #999999;">i</span><span style="color: #9B9B9B;">r</span><span style="color: #9E9E9E;"> </span><span style="color: #A1A1A1;">s</span><span style="color: #A4A4A4;">i</span><span style="color: #A6A6A6;">c</span><span style="color: #A9A9A9;">h</span><span style="color: #ACACAC;">e</span><span style="color: #AFAFAF;">r</span><span style="color: #B2B2B2;">,</span><span style="color: #B4B4B4;"> </span><span style="color: #B7B7B7;">d</span><span style="color: #BABABA;">a</span><span style="color: #BDBDBD;">s</span><span style="color: #BFBFBF;">s du es mit einem der Gladiatoren aufnehmen kannst und stellst dich deshalb dieser Probe. Wähle nun deinen Gegner aus, gegen den du antreten möchtest.</span>',true);

    
addnav('Wähle...');

    if (
$session['user']['battlepoints'] < 13 || $session['user']['dragonkills']<1)
    
addnav('... Cicero','battlearena.php?op=Cicero');
    
    if (
$session['user']['battlepoints'] > 12 and $session['user']['dragonkills'] >= && $session['user']['battlepoints'] < 72 
    
addnav('... Vibius','battlearena.php?op=Vibius');
    
    if (
$session['user']['battlepoints'] >= 36 and $session['user']['dragonkills'] > && $session['user']['battlepoints'] < 180 
    
addnav('... Quintus','battlearena.php?op=Quintus');
    
    if (
$session['user']['battlepoints'] >= 72 and $session['user']['dragonkills'] > && $session['user']['battlepoints'] < 252 
    
addnav('... Cassius','battlearena.php?op=Cassius');
    
    if (
$session['user']['battlepoints'] >= 120 and $session['user']['dragonkills'] > && $session['user']['battlepoints'] < 336 
    
addnav('... Lucius','battlearena.php?op=Lucius');
    
    if (
$session['user']['battlepoints'] >= 180 and $session['user']['dragonkills'] > 5
    
addnav('... Aurelius','battlearena.php?op=Aurelius');
    
    if (
$session['user']['battlepoints'] >= 252 and $session['user']['dragonkills'] > 7
    
addnav('... Proximo','battlearena.php?op=Proximo');
    
    if (
$session['user']['battlepoints'] >= 336 and $session['user']['dragonkills'] > 9
    
addnav('... Maximus','battlearena.php?op=Maximus');
}

if (
$_GET[op] == "win"){
    if (
$_GET[op2] == "Cicero"){
        
$winnings e_rand(75,100);
        
$points=1;
        
$session['user']['reputation']+=(11-$session['user']['level']);
    }
    if (
$_GET[op2] == "Vibius"){
        
$points=2;
        
$winnings e_rand(90,175);
        
$session['user']['reputation']+=(12-$session['user']['level']);
    }
    if (
$_GET[op2] == "Quintus"){
        
$points=3;
        
$winnings e_rand(110,228);
        
$session['user']['reputation']+=(13-$session['user']['level']);
    }
    if (
$_GET[op2] == "Cassius"){
        
$points=4;
        
$winnings e_rand(150,300);
        
$session['user']['reputation']+=(14-$session['user']['level']);
    }
    if (
$_GET[op2] == "Lucius"){
        
$points=5;
        
$winnings e_rand(190,409);
        
$session['user']['reputation']+=(15-$session['user']['level']);
    }
    if (
$_GET[op2] == "Aurelius"){
        
$points=6;
        
$winnings e_rand(273,580);
        
$session['user']['reputation']+=(16-$session['user']['level']-15);
    }
    if (
$_GET[op2] == "Proximo"){
        
$points=7;
        
$winnings e_rand(333,680);
        
$session['user']['reputation']+=(16-$session['user']['level']);
    }
    
    if (
$_GET[op2] == "Maximus")
    {
        
$points=8;
        
$winnings e_rand(399,777);
        
$session['user']['reputation']+=(17-$session['user']['level']);
    }
    
    
$gladiator=$_GET['op2'];

    
addnews('`%'.$session['user']['name'].'`- hat '.$gladiator.'`- in der Arena besiegt!');
    
    
output('`@Gratulation, du hast `%'.$gladiator.' `@geschlagen! Du erhältst für deinen Sieg `%'.$points.' `@Kampfpunkte. Außerdem gewinnst du eine Siegprämie in Höhe von `%'.$winnings.' `@Gold!`0');

    
$session['user']['gold']+=$winnings;
    
$session['user']['battlepoints']+=$points;

    if (
$session['user']['hitpoints']<$session['user']['maxhitpoints'])
    
output('`n`n`fDie Wundheiler der Arena versorgen deine Wunden.`0');

    if (
$session['user']['hitpoints']==$session['user']['maxhitpoints'])
    {
        
output('`4Ausgezeichneter Kampf! Du bekommst zusätzlich zum Gewinn dein Eintrittsgeld zurück!`n');
        
$session['user']['gold']+=50;
    }

    if (
$session['user']['hitpoints']<$session['user']['maxhitpoints'])
    
$session['user']['hitpoints']+=round($session['user']['maxhitpoints']*.5);

    if (
$session['user']['hitpoints']>$session['user']['maxhitpoints'])
    
$session['user']['hitpoints']=$session['user']['maxhitpoints'];

    
addnav('Zurück');
    
addnav('A?zur Arena','battlearena.php');
}

if (
$_GET['op'] == 'loose')
{
    
$session['user']['hitpoints']=$session['user']['maxhitpoints'];
    
$who $_GET['op2'];
    
    if (
$who == 'Cicero'
    
$session['user']['battlepoints']-=1;
    
    if (
$who == 'Vibius'
    
$session['user']['battlepoints']-=1;
    
    if (
$who == 'Quintus'
    
$session['user']['battlepoints']-=2;
    
    if (
$who == 'Cassius'
    
$session['user']['battlepoints']-=2;
    
    if (
$who == 'Lucius'
    
$session['user']['battlepoints']-=3;
    
    if (
$who == 'Aurelius'
    
$session['user']['battlepoints']-=3;
    
    if (
$who == 'Proximo'
    
$session['user']['battlepoints']-=4;
    
    if (
$who == 'Maximus'
    
$session['user']['battlepoints']-=4;
    
    
output('<span style="color: #808080;">W</span><span style="color: #828282;">i</span><span style="color: #858585;">e</span><span style="color: #878787;"> </span><span style="color: #8A8A8A;">s</span><span style="color: #8D8D8D;">c</span><span style="color: #8F8F8F;">h</span><span style="color: #929292;">a</span><span style="color: #959595;">d</span><span style="color: #979797;">e</span><span style="color: #9A9A9A;"> </span><span style="color: #9D9D9D;">u</span><span style="color: #9F9F9F;">n</span><span style="color: #A2A2A2;">d</span><span style="color: #A5A5A5;"> </span><span style="color: #A7A7A7;">a</span><span style="color: #AAAAAA;">u</span><span style="color: #ADADAD;">c</span><span style="color: #AFAFAF;">h</span><span style="color: #B2B2B2;"> </span><span style="color: #B5B5B5;">e</span><span style="color: #B7B7B7;">i</span><span style="color: #BABABA;">n</span><span style="color: #BDBDBD;"> </span><span style="color: #BFBFBF;">bisschen peinlich. Du hast gegen `.'.$who.' `$verloren<span style="color: #BFBFBF;">. Aber lasse dich dadurch nicht unterkriegen. Vielleicht gewinnst du das nächste Mal gegen einen Gladiatoren. Die Arena-Heiler versorgen auch immerhin deine Wunden.</span>',true);

//    addnews($session['user'][name].' hat gegen $who in der Arena verloren.');
     
    
addnav('Zurück'); 
    
addnav('A?zur Arena','battlearena.php');
    
    if (
$session['user']['battlepoints']<0
    
$session['user']['battlepoints']=0;
}

if (
$_GET['op'] == 'Cicero')
{
    
$badguy = array('creaturename'      => '`.Cicero`0'
                    
,'creaturelevel'    => 8
                    
,'creatureweapon'   => 'Iaculum'
                    
,'creatureattack'   => 65
                    
,'creaturedefense'  => 65
                    
,'creaturehealth'   => 120
                    
,'creaturegold'     => 0
                    
,'diddamage'        => 0);

    
$badguy['creaturelevel']+=1;
    
$badguy['creatureattack']+=5;
    
$badguy['creaturehealth']+=e_rand(1,50);
    
$badguy['creaturedefense']+=5;
    
$badguy['creaturegold']=0;
    
$session['user']['badguy']=createstring($badguy);
    
    
$_GET['op']='prefight';
}

if (
$_GET['op'] == 'Vibius'){
$badguy = array(        'creaturename'=>'`.Vibius`0'
                                
,'creaturelevel'=>9
                                
,'creatureweapon'=>'Nagelkeule'
                                
,'creatureattack'=>70
                                
,'creaturedefense'=>70
                                
,'creaturehealth'=>140
                                
,'creaturegold'=>0
                                
,'diddamage'=>0);

                                
$badguy['creaturelevel']+=1;
                                
$badguy['creatureattack']+=5;
                                
$badguy['creaturehealth']+=e_rand(1,60);
                                
$badguy['creaturedefense']+=5;
                                
$badguy['creaturegold']=0;
                                
$session['user']['badguy']=createstring($badguy);
                                
$_GET['op']='prefight';
                            }
if (
$_GET['op'] == 'Quintus'){
$badguy = array(        'creaturename'=>'`.Quintus`0'
                                
,'creaturelevel'=>10
                                
,'creatureweapon'=>'Sichel'
                                
,'creatureattack'=>75
                                
,'creaturedefense'=>75
                                
,'creaturehealth'=>160
                                
,'creaturegold'=>0
                                
,'diddamage'=>0);

                                
$badguy['creaturelevel']+=1;
                                
$badguy['creatureattack']+=5;
                                
$badguy['creaturehealth']+=e_rand(1,70);
                                
$badguy['creaturedefense']+=5;
                                
$badguy['creaturegold']=0;
                                
$session['user']['badguy']=createstring($badguy);
                                
$_GET['op']='prefight';
                            }

if (
$_GET['op'] == 'Cassius'){
$badguy = array(        'creaturename'=>'`.Cassius`0'
                                
,'creaturelevel'=>11
                                
,'creatureweapon'=>'Schlagstock'
                                
,'creatureattack'=>80
                                
,'creaturedefense'=>80
                                
,'creaturehealth'=>180
                                
,'creaturegold'=>0
                                
,'diddamage'=>0);

                                
$badguy['creaturelevel']+=1;
                                
$badguy['creatureattack']+=5;
                                
$badguy['creaturehealth']+=e_rand(1,80);
                                
$badguy['creaturedefense']+=5;
                                
$badguy['creaturegold']=0;
                                
$session['user']['badguy']=createstring($badguy);
                                
$_GET['op']='prefight';
                            }
if (
$_GET['op'] == 'Lucius'){
$badguy = array(        'creaturename'=>'`.Lucius`0'
                                
,'creaturelevel'=>12
                                
,'creatureweapon'=>'Lanze'
                                
,'creatureattack'=>85
                                
,'creaturedefense'=>85
                                
,'creaturehealth'=>200
                                
,'creaturegold'=>0
                                
,'diddamage'=>0);

                                
$badguy['creaturelevel']+=1;
                                
$badguy['creatureattack']+=5;
                                
$badguy['creaturehealth']+=e_rand(1,90);
                                
$badguy['creaturedefense']+=5;
                                
$badguy['creaturegold']=0;
                                
$session['user']['badguy']=createstring($badguy);
                                
$_GET['op']='prefight';
                            }
if (
$_GET['op'] == 'Aurelius'){
$badguy = array(        'creaturename'=>'`.Aurelius`0'
                                
,'creaturelevel'=>13
                                
,'creatureweapon'=>'Hasta'
                                
,'creatureattack'=>90
                                
,'creaturedefense'=>90
                                
,'creaturehealth'=>220
                                
,'creaturegold'=>0
                                
,'diddamage'=>0);

                                
$badguy['creaturelevel']+=1;
                                
$badguy['creatureattack']+=5;
                                
$badguy['creaturehealth']+=e_rand(1,100);
                                
$badguy['creaturedefense']+=5;
                                
$badguy['creaturegold']=0;
                                
$session['user']['badguy']=createstring($badguy);
                                
$_GET['op']='prefight';
                            }
if (
$_GET['op'] == 'Proximo'){
$badguy = array(        'creaturename'=>'`.Proximo`0'
                                
,'creaturelevel'=>14
                                
,'creatureweapon'=>'Harpune'
                                
,'creatureattack'=>95
                                
,'creaturedefense'=>95
                                
,'creaturehealth'=>240
                                
,'creaturegold'=>0
                                
,'diddamage'=>0);

                                
$badguy['creaturelevel']+=1;
                                
$badguy['creatureattack']+=5;
                                
$badguy['creaturehealth']+=e_rand(1,110);
                                
$badguy['creaturedefense']+=5;
                                
$badguy['creaturegold']=0;
                                
$session['user']['badguy']=createstring($badguy);
                                
$_GET['op']='prefight';
                            }

if (
$_GET['op'] == 'Maximus')
{
    
$badguy = array('creaturename'      => '`.Maximus`0'
                    
,'creaturelevel'    => 14
                    
,'creatureweapon'   => 'Gladiatorenschwert'
                    
,'creatureattack'   => 125
                    
,'creaturedefense'  => 125
                    
,'creaturehealth'   => 340
                    
,'creaturegold'     => 0
                    
,'diddamage'        => 0);

    
$badguy['creaturelevel']+=1;
    
$badguy['creatureattack']+=e_rand(5,50);
    
$badguy['creaturehealth']+=e_rand(1,160);
    
$badguy['creaturedefense']+=e_rand(5,50);
    
$badguy['creaturegold']=0;
    
$session['user']['badguy']=createstring($badguy);
    
    if (
$badguy['creatureattack'] < $session['user']['attack']) 
    
$badguy['creatureattack'] = ($session['user']['attack'] + e_rand(5,15));
    
    if (
$badguy['creaturehealth'] < $session['user']['hitpoints']) 
    
$badguy['creaturehealth'] = ($session['user']['hitpoints'] + e_rand(5,150));
    
    
//not doing defence, don't want to make him unbeatable
    
$_GET['op']='prefight';


if (
$_GET['op'] == 'prefight')
{
    
output('<span style="color: #808080;">K</span><span style="color: #828282;">a</span><span style="color: #858585;">u</span><span style="color: #888888;">m</span><span style="color: #8B8B8B;"> </span><span style="color: #8D8D8D;">h</span><span style="color: #909090;">a</span><span style="color: #939393;">s</span><span style="color: #969696;">t</span><span style="color: #999999;"> </span><span style="color: #9B9B9B;">d</span><span style="color: #9E9E9E;">u</span><span style="color: #A1A1A1;"> </span><span style="color: #A4A4A4;">d</span><span style="color: #A6A6A6;">i</span><span style="color: #A9A9A9;">c</span><span style="color: #ACACAC;">h</span><span style="color: #AFAFAF;"> </span><span style="color: #B2B2B2;">e</span><span style="color: #B4B4B4;">n</span><span style="color: #B7B7B7;">t</span><span style="color: #BABABA;">s</span><span style="color: #BDBDBD;">c</span><span style="color: #BFBFBF;">hieden, wirst du schon auf den Kampflatz geführt. Dein Gegner erwartet dich bereits. Knochenhart sieht er aus und fast kommst du ins Grübeln, ob das wirklich so eine gute Idee war. Offenbar hat sich das auch sehr schnell herumgesprochen, denn du bemerkst am Rande, dass doch einige Besucher zum Kampf erschienen sind, um sich daran zu ergötzen.`n`n
    
            <span style="color: #808080;">W</span><span style="color: #838383;">e</span><span style="color: #868686;">i</span><span style="color: #898989;">t</span><span style="color: #8C8C8C;">e</span><span style="color: #909090;">r</span><span style="color: #939393;">e</span><span style="color: #969696;"> </span><span style="color: #999999;">F</span><span style="color: #9C9C9C;">e</span><span style="color: #A0A0A0;">s</span><span style="color: #A3A3A3;">t</span><span style="color: #A6A6A6;">s</span><span style="color: #A9A9A9;">t</span><span style="color: #ACACAC;">e</span><span style="color: #B0B0B0;">l</span><span style="color: #B3B3B3;">l</span><span style="color: #B6B6B6;">u</span><span style="color: #B9B9B9;">n</span><span style="color: #BCBCBC;">g</span><span style="color: #C0C0C0;">en kannst du kaum machen, denn `.'
.$badguy['creaturename'].' <span style="color: #BFBFBF;">stürzt sich bereits auf dich. Der Gladiatorenkampf hat begonnen.`n</span>',true);
    
    
$session['user']['specialmisc']=$badguy['creaturehealth'];
    
$_GET['op']='fight';
}

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

if (
$battle)
{
    include_once(
'battle.php');
/*                        
    if (count($session[bufflist])>0 && is_array($session[bufflist]) || $_GET[skill]!="")
    {
       $_GET[skill]="";
       
       if ($_GET['skill']=="") 
       $session['user']['buffbackup']=serialize($session['bufflist']);
       
       $session[bufflist]=array();
    }
*/ 
    
if ($victory)
    {
        
output('`n`@Du hast `^'.$badguy['creaturename'].' `@besiegt. Die Menge grölt: `1"'.$session['user']['name'].'`1, '.$session['user']['name'].'`1!" `@Der Moderator verkündet: `%"'.$session['user']['name'].'`% teilte den vernichtenden Schlag aus!"');

        if (
$badguy['creaturename']=='`.Cicero`0')
        
addnav('Weiter','battlearena.php?op=win&op2=Cicero');

           if (
$badguy['creaturename']=='`.Vibius`0')
        
addnav('Weiter','battlearena.php?op=win&op2=Vibius');

        if (
$badguy['creaturename']=='`.Quintus`0')
        
addnav('Weiter','battlearena.php?op=win&op2=Quintus');

        if (
$badguy['creaturename']=='`.Cassius`0')
        
addnav('Weiter','battlearena.php?op=win&op2=Cassius');

        if (
$badguy['creaturename']=='`.Lucius`0')
        
addnav('Weiter','battlearena.php?op=win&op2=Lucius');

        if (
$badguy['creaturename']=='`.Aurelius`0')
        
addnav('Weiter','battlearena.php?op=win&op2=Aurelius');

        if (
$badguy['creaturename']=='`.Proximo`0')
        
addnav('Weiter','battlearena.php?op=win&op2=Proximo');

        if (
$badguy['creaturename']=='`.Maximus`0')
        
addnav('Weiter','battlearena.php?op=win&op2=Maximus');
        
        
output('`n`n<table border="1" align="center" cellpadding="3" cellspacing="3" width="50%">
                <tr style="background-color: #800000;">
                <td>`c`l`bDeine Gesundheit`c`b`0</td></tr><tr><td>'
,true);
        
        
output(grafbar($session['user']['maxhitpoints'],$session['user']['hitpoints'],'100%',15),true);
        
        
output('</td></tr></table>`n`n',true);

        
output('<table border="1" align="center" cellpadding="3" cellspacing="3" width="50%">
                <tr style="background-color: #800000;">
                <td>`c`l`b'
.$badguy['creaturename'].'`l\'s Gesundheit`c`b`0</td></tr><tr><td>',true);

        
output(grafbar($session['user']['specialmisc'],0,'100%',15),true);

        
output('</td></tr></table>',true);
        
        
$badguy=array();
        
$session['user']['badguy']='';
/*
        if (!is_array($session['bufflist']) || count($session['bufflist']) <= 0) 
        {
            $session['bufflist'] = unserialize($session['user']['buffbackup']);
            
            if (is_array($session['bufflist'])) 
            {} 
            
            else 
            {$session['bufflist'] = array();}
        }
        
        $session['user']['buffbackup'] = "";
*/
    
}
    
    elseif (
$defeat)
    {
        
output('`n`.'.$badguy['creaturename'].' `$hat dich in die Knie gezwungen! Die Menge grölt `%"'.$badguy['creaturename'].'`%! '.$badguy['creaturename'].'`%!`$" und buht dich aus. Du hast dir zwar Mühe gegeben, aber... verloren ist nun mal verloren.`0');

        
$session['user']['hitpoints']=1;
        
$who=$badguy['creaturename'];
        
        if (
$badguy['creaturename']=='`.Cicero`0')
        
addnav('Weiter','battlearena.php?op=loose&op2=Cicero');

        if (
$badguy['creaturename']=='`.Vibius`0')
        
addnav('Weiter','battlearena.php?op=loose&op2=Vibius');

        if (
$badguy['creaturename']=='`.Quintus`0')
        
addnav('Weiter','battlearena.php?op=loose&op2=Quintus');

        if (
$badguy['creaturename']=='`.Cassius`0')
        
addnav('Weiter','battlearena.php?op=loose&op2=Cassius');

        if (
$badguy['creaturename']=='`.Lucius`0')
        
addnav('Weiter','battlearena.php?op=loose&op2=Lucius');

        if (
$badguy['creaturename']=='`.Aurelius`0')
        
addnav('Weiter','battlearena.php?op=loose&op2=Aurelius');

        if (
$badguy['creaturename']=='`.Proximo`0')
        
addnav('Weiter','battlearena.php?op=loose&op2=Proximo');

        if (
$badguy['creaturename']=='`.Maximus`0')
        
addnav('Weiter','battlearena.php?op=loose&op2=Maximus');
        
        
output('`n`n<table border="1" align="center" cellpadding="3" cellspacing="3" width="50%">
                <tr style="background-color: #800000;">
                <td>`c`l`bDeine Gesundheit`c`b`0</td></tr><tr><td>'
,true);

        
output(grafbar($session['user']['maxhitpoints'],0,'100%',15),true);

        
output('</td></tr></table>`n`n',true);

        
output('<table border="1" align="center" cellpadding="3" cellspacing="3" width="50%">
                <tr style="background-color: #800000;">
                <td>`c`l`b'
.$badguy['creaturename'].'`l\'s Gesundheit`c`b`0</td></tr><tr><td>',true);

        
output(grafbar($session['user']['specialmisc'],$badguy['creaturehealth'],'100%',15),true);

        
output('</td></tr></table>',true);
/*
        if (!is_array($session['bufflist']) || count($session['bufflist']) <= 0) 
        {
            $session['bufflist'] = unserialize($session['user']['buffbackup']);
            
            if (is_array($session['bufflist'])) 
            {} 
            
            else 
            {$session['bufflist'] = array();}
        }
        
        $session['user']['buffbackup'] = "";
*/
    
}
    
    else
    {
        
fightnav(true,false);
        
output('`n');
        
        switch(
e_rand(1,11))
        {
            case 
1:
                
output('`.'.$badguy['creaturename'].'`^ versucht, dich mit einem billigen Trick zu verwirren.`n');
                break;

            case 
2:
                break;

            case 
3:
                break;

            case 
4:
                
output('`.'.$badguy['creaturename'].'`^ knurrt dich zähnefletschend an.`n');
                break;

            case 
5:
                
output('`.'.$badguy['creaturename'].'`^ versucht, dir ein Ohr abzubeißen.`n');
                break;

            case 
6:
                
output('`.'.$badguy['creaturename'].'`^ schimpft dich einen Feigling und lacht dreckig.`n');
                break;

            case 
7:
                break;

            case 
8:
                
output('`.'.$badguy['creaturename'].'`^ behauptet, jedes Kind könne besser kämpfen als du.`n');
                break;

            case 
9:
                
output('`.'.$badguy['creaturename'].'`^ höhnt, du seist schwach wie ein Fisch.`n');
                break;

            case 
10:
                
output('`.'.$badguy['creaturename'].'`^ lacht dich herzhaft aus und beleidigt dich von vorne bis hinten.`n');
                break;
            
            case 
11:
                break;
            
            
output('`n`0');
        }
        
        switch(
e_rand(1,15))
        {
            case 
1:
                
output('`fDie Menge tobt vor Begeisterung!');
                break;

            case 
2:
                
output('`fDie Menge gröhlt: "'.$session['user']['name'].' `f'.$session['user']['name'].'`f!".');
                break;

            case 
3:
                
output('`fDie Menge gröhlt: "'.$badguy['creaturename'].' `f'.$badguy['creaturename'].'`f!".');
                break;

            case 
4:
                
output('`fDie Menge wird still.');
                break;

            case 
5:
                
output('`fDie Menge wird nervös!');
                break;

            case 
6:
                
output('`fDie Menge macht eine Welle.');
                break;

            case 
7:
                
output('`fDie Spannung steigt.');
                break;

            case 
8:
                
output('`fDie Menge brüllt: "Nieder mit '.$badguy['creaturename'].'`f!".');
                break;

            case 
9:
                
output('`fDie Menge brüllt: "Nieder mit '.$session['user']['name'].'`f!".');
                break;

            case 
10:
                
output('`fDie Menge kommt in Bewegung! Einige Zuschauer fallen in die Arena, nur um anschließend von einer Wache wieder weggetragen zu werden.');
                break;

            case 
11:
                
output('`fDie Menge ruft: "Mach ihn fertig! Mach ihn fertig!"');
                break;

            case 
12:
                
output('`fDie Menge schreit was das Zeug hält!');
                break;

            case 
13:
                
output('`fDie Menge tobt.');
                break;

            case 
14:
                
output('`fEin dicker, fetter Kerl bemalt sich mit roten Kringeln und führt einen Tanz auf.');
                break;

            case 
15:
                
output('`fEin Fan rennt in die Arena. Im Eifer des Gefechts streifst du ihn und er fliegt in eine Ecke der Arena.');
                break;
                
            
output('`n`n');
        }

/*
        output("`6Moderator: ");
                
        if ($selfdmg > 0) 
        output("`6Autsch, ".$badguy[creaturename]."`6 trifft ".$session[user][name]."`6 mit $selfdmg Punkten!`n");
                
        if ($selfdmg == 0) 
        output($badguy[creaturename]."`6 holt nach ".$session[user][name]."`6 aus, trifft aber nicht!`n");
                
        if ($selfdmg < 0) 
        output($badguy[creaturename]."`6 holt nach ".$session[user][name]."`6 aus, trifft aber nicht!`n".$session[user][name]."`6 nutzt das aus und trifft ".$badguy[creaturename]."`6.`n");
                
        output("`6Moderator: ");
                
        if ($creaturedmg > 0) 
        output("`6Autsch, ".$session[user][name]."`6 trifft ".$badguy[creaturename]."`6 mit $creaturedmg Punkten!`n");
                
        if ($creaturedmg == 0) 
        output($session[user][name]."`6 holt nach ".$badguy[creaturename]."`6 aus, trifft aber nicht!`n");
                
        if ($creaturedmg < 0) 
        output($session[user][name]."`6 holt nach ".$badguy[creaturename]."`6 aus, trifft aber nicht!`n".$badguy[creaturename]."`6 nutzt das aus und trifft ".$session[user][name]."`6.`n");
*/
        
output('`n`n<table border="1" align="center" cellpadding="3" cellspacing="3" width="50%">
                <tr style="background-color: #800000;">
                <td>`c`l`bDeine Gesundheit`c`b`0</td></tr><tr><td>'
,true);

        
output(grafbar($session['user']['maxhitpoints'],$session['user']['hitpoints'],'100%',15),true);

        
output('</td></tr></table>`n`n',true);

        
output('<table border="1" align="center" cellpadding="3" cellspacing="3" width="50%">
                <tr style="background-color: #800000;">
                <td>`c`l`b'
.$badguy['creaturename'].'`l\'s Gesundheit`c`b`0</td></tr><tr><td>',true);
        
        
output(grafbar($session['user']['specialmisc'],$badguy['creaturehealth'],'100%',15),true);

        
output('</td></tr></table>',true);
    }
}

else
{}

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