TILEMASTER2004 DATA V1
SCRIPT: 350
0 Message "Welcome to the arena!"
0 Message "[He quickly looks you up and down.]  You look like you can take care of yourself.  Unfortunately, we have enough combatants for now, so spectators only."
0 Pause
0 CMessage "Would you like to watch an event? "
0 Verify N2
0 Message "Well, come back if you change your mind!"
1 Message "Next!"
0 BREAK
2 NOOP
0 CRandom 30 - 30 11 30 12 5 14 5 15
10 SetFlag 27 0
0 Message "The next combat is between two skilled fighters.  It should be very exciting as they match their skills against each other."
0 GOTO N20
11 SetFlag 27 1
0 Message "The next combat is between a skilled fighter and two horrible orcs!  Needless to say, it should be very exciting."
0 GOTO N20
12 SetFlag 27 2
0 Message "The next combat is between a skilled fighter and several nasty little goblins!  You really shouldn't miss it."
0 GOTO N20
14 SetFlag 27 3
0 Message "You're in luck!  Right now we have a special event, a monster fight, specifically goblins vs. kobolds!  Both horrible creatures, the question is which one you hate more!"
0 GOTO N20
15 SetFlag 27 4
0 Message "You're in luck!  Right now we have a special event, a monster fight, specifically a goblin vs. giant rats!  Both horrible creatures, the question is which one you hate more!"
20 CMessage "Admission is only 3 gp, ok? "
0 Verify N22
21 Message "Too bad, should be a great battle.  Come back if you change your mind."
0 GOTO 1
22 Pay 3 23
0 Message "[You hand him the payment.]"
0 CMessage "Do you want to place a 5 gp wager? "
0 Verify N30
0 SetFlag 28 0
0 GOTO N100
23 Message "Too bad, should be a great battle.  But you can always come back later; we have some other great battles coming up."
0 GOTO 1
30 Pay 5 100
0 Message "[You hand him the payment.]"
0 Pause
0 CheckFlag 27 1 N1
0 CheckFlag 27 2 N2
0 CheckFlag 27 3 N3
0 CheckFlag 27 4 N4
0 Message "The odds are even on this one"
0 Message "1: Fighter 1 (10 gp if he wins)"
0 Message "2: Fighter 2 (10 gp if he wins)"
0 GOTO N40
1 Message "The odds are in the fighter's favor"
0 Message "1: Fighter (6 gp if he wins)"
0 Message "2: 2 orcs (14 gp if they win)"
0 GOTO N40
2 Message "The odds are in the fighter's favor"
0 Message "1: Fighter (6 gp if he wins)"
0 Message "2: 3 goblins (14 gp if they win)"
0 GOTO N40
3 Message "The odds are slightly in the goblins' favor"
0 Message "1: 3 goblins (8 gp if they win)"
0 Message "2: 3 kobolds (12 gp if they win)"
0 GOTO N40
4 Message "The odds are slightly in the goblin's favor"
0 Message "1: 1 goblin (8 gp if he wins)"
0 Message "2: 4 giant rats (12 gp if they win)"
40 CMessage "Which side? "
0 AddKeyWords 1 42 2 43
41 DoKeyInput
0 GOTO P41
42 Message "1"
0 SetFlag 28 1
0 GOTO N100
43 Message "2"
0 SetFlag 28 2
100 SetRedraw 0
0 Message "Where do you want to sit:"
0 Message "1: North"
0 Message "2: East"
0 Message "3: South"
0 Message "4: West"
0 CMessage "? "
0 AddKeyWords 1 101 2 102 3 103 4 104
1 DoKeyInput
0 GOTO P1
101 Message "1"
0 Teleport 76 32 29
0 GOTO N1
102 Message "2"
0 Teleport 76 36 40
0 GOTO N1
103 Message "3"
0 Teleport 76 31 44
0 GOTO N1
104 Message "4"
0 Teleport 76 20 34
1 SetMapCreatures RESETPOS 19 28 22 46
0 SetMapCreatures BEHAVIOR-STATIC 19 28 22 46
0 SetMapCreatures RESETPOS 34 28 37 46
0 SetMapCreatures BEHAVIOR-STATIC 34 28 37 46
0 SetMapCreatures RESETPOS 23 28 33 31
0 SetMapCreatures BEHAVIOR-STATIC 23 28 33 31
0 SetMapCreatures RESETPOS 23 43 33 46
0 SetMapCreatures BEHAVIOR-STATIC 23 43 33 46
0 ReplaceTile 23 1 19 28 21 36
0 ReplaceTile 23 98 19 38 21 46
0 ReplaceTile 23 98 22 44 27 46
0 ReplaceTile 23 1 29 44 34 46
0 ReplaceTile 23 1 35 28 37 46
0 ReplaceTile 23 1 22 28 34 30
0 SetRedraw 1
0 Message "[You go up the stairs of the arena and find a seat.]"
0 Pause
0 Script 503
0 AlterPCTile 1004
0 Message "[You sit down.]"
0 Pause
0 SetView 28 37
0 Message "[You look down at the arena.]"
0 Message "(If you want to leave before the combat is completed, press 'Y' to indicate that you are done watching.)"
0 Pause
0 CheckFlag 27 1 N121
0 CheckFlag 27 2 N122
0 CheckFlag 27 3 N123
0 CheckFlag 27 4 N124
120 SetRedraw 0
0 MakeMapObj Creature 40 24 37 -ID 1
0 SetCreature 1 -BEHAVIOR ATTACK -GROUP 2 -TGROUP 3
0 MakeMapObj Creature 40 32 37 -ID 5
0 SetCreature 5 -BEHAVIOR ATTACK -GROUP 3 -TGROUP 2
0 SetRedraw 1
0 Message "The gates open at both ends of the arena, a well-armed fighter entering from each."
0 GOTO N200
121 SetRedraw 0
0 MakeMapObj Creature 40 24 37 -ID 1
0 SetCreature 1 -BEHAVIOR ATTACK -GROUP 2 -TGROUP 3
0 MakeMapObj Creature 10 32 37 -ID 5
0 SetCreature 5 -BEHAVIOR ATTACK -GROUP 3 -TGROUP 2 -TARGET NOTPC
0 MakeMapObj Creature 10 32 36 -ID 6
0 SetCreature 6 -BEHAVIOR ATTACK -GROUP 3 -TGROUP 2 -TARGET NOTPC
0 SetRedraw 1
0 Message "The gates open at both ends of the arena.  A well-armed fighter enters from one end, and a pair of angry-looking orcs stride out from the other, looking around in rage."
0 GOTO N200
122 SetRedraw 0
0 MakeMapObj Creature 40 24 37 -ID 1
0 SetCreature 1 -BEHAVIOR ATTACK -GROUP 2 -TGROUP 3
0 MakeMapObj Creature 11 32 37 -ID 5
0 SetCreature 5 -BEHAVIOR ATTACK -GROUP 3 -TGROUP 2 -TARGET NOTPC
0 MakeMapObj Creature 11 32 36 -ID 6
0 SetCreature 6 -BEHAVIOR ATTACK -GROUP 3 -TGROUP 2 -TARGET NOTPC
0 MakeMapObj Creature 11 32 38 -ID 7
0 SetCreature 7 -BEHAVIOR ATTACK -GROUP 3 -TGROUP 2 -TARGET NOTPC
0 SetRedraw 1
0 Message "The gates open at both ends of the arena.  A well-armed fighter enters from one end, and a several vicious-looking goblins run out from the other."
0 GOTO N200
123 SetRedraw 0
0 MakeMapObj Creature 11 24 37 -ID 1
0 SetCreature 1 -BEHAVIOR ATTACK -GROUP 2 -TGROUP 3 -TARGET NOTPC
0 MakeMapObj Creature 11 24 36 -ID 2
0 SetCreature 2 -BEHAVIOR ATTACK -GROUP 2 -TGROUP 3 -TARGET NOTPC
0 MakeMapObj Creature 11 24 38 -ID 3
0 SetCreature 3 -BEHAVIOR ATTACK -GROUP 2 -TGROUP 3 -TARGET NOTPC
0 MakeMapObj Creature 64 32 37 -ID 5
0 SetCreature 5 -BEHAVIOR ATTACK -GROUP 3 -TGROUP 2 -TARGET NOTPC
0 MakeMapObj Creature 64 32 36 -ID 6
0 SetCreature 6 -BEHAVIOR ATTACK -GROUP 3 -TGROUP 2 -TARGET NOTPC
0 MakeMapObj Creature 64 32 38 -ID 7
0 SetCreature 7 -BEHAVIOR ATTACK -GROUP 3 -TGROUP 2 -TARGET NOTPC
0 SetRedraw 1
0 Message "The gates open at both ends of the arena.  Several vicious-looking goblins enter from one end, and several goblin-like creatures with a slightly different appearance run out from the other."
0 GOTO N200
124 SetRedraw 0
0 MakeMapObj Creature 11 24 37 -ID 1
0 SetCreature 1 -BEHAVIOR ATTACK -GROUP 2 -TGROUP 3 -TARGET NOTPC
0 MakeMapObj Creature 76 32 37 -ID 5
0 SetCreature 5 -BEHAVIOR ATTACK -GROUP 3 -TGROUP 2 -TARGET NOTPC
0 MakeMapObj Creature 76 32 36 -ID 6
0 SetCreature 6 -BEHAVIOR ATTACK -GROUP 3 -TGROUP 2 -TARGET NOTPC
0 MakeMapObj Creature 76 32 38 -ID 7
0 SetCreature 7 -BEHAVIOR ATTACK -GROUP 3 -TGROUP 2 -TARGET NOTPC
0 MakeMapObj Creature 76 32 35 -ID 8
0 SetCreature 8 -BEHAVIOR ATTACK -GROUP 3 -TGROUP 2 -TARGET NOTPC
0 SetRedraw 1
0 Message "The gates open at both ends of the arena.  A lone goblin enters from one end, and a several vicious-looking giant rats scurry out from the other."
200 Random 50 201
0 SetFlag 29 0
0 GOTO N300
201 SetFlag 29 1
0 DBG "DBG: Swapping creatures ID's; start positions of ID's will be reversed"
0 SwapCreatureID 1 5
0 SwapCreatureID 2 6
0 SwapCreatureID 3 7
0 SwapCreatureID 4 8
300 CMessage "Done? "
0 Verify N400
0 Pass
0 CheckCreatureEx 1 GONE RETREAT N1
0 GOTO N301
1 CheckCreatureEx 2 GONE RETREAT N2
0 GOTO N301
2 CheckCreatureEx 3 GONE RETREAT N3
0 GOTO N301
3 CheckCreatureEx 4 GONE RETREAT N420
301 CheckCreatureEx 5 GONE RETREAT N1
0 GOTO P300
1 CheckCreatureEx 6 GONE RETREAT N2
0 GOTO P300
2 CheckCreatureEx 7 GONE RETREAT N3
0 GOTO P300
3 CheckCreatureEx 8 GONE RETREAT N410
0 GOTO P300
400 Message "You decide to leave early."
0 CheckFlag 28 0 N1
0 Message "You miss the results and so lose the bet."
1 SetFlag 29 1
0 GOTO N500
410 Message "The combat has ended"
0 DBG "DBG: ID side 1 has won"
0 CheckFlag 29 1 N440
0 GOTO N430
420 Message "The combat has ended"
0 DBG "DBG: ID side 2 has won"
0 CheckFlag 29 1 N430
0 GOTO N440
430 Message "Side 1 has won!"
0 Message "Noise from the crowd explodes in response"
0 CheckFlag 28 1 N1
0 CheckFlag 28 2 N2
0 SetFlag 29 0
0 GOTO N5
1 Message "You won the bet"
0 SetFlag 29 2
0 GOTO N5
2 Message "You have lost the bet"
0 SetFlag 29 1
0 GOTO N5
440 Message "Side 2 has won!"
0 Message "Noise from the crowd explodes in response"
0 CheckFlag 28 1 N1
0 CheckFlag 28 2 N2
0 SetFlag 29 0
0 GOTO N5
1 Message "You have lost the bet"
0 SetFlag 29 1
0 GOTO N5
2 Message "You won the bet"
0 SetFlag 29 2
5 Pause
0 Message "The crowd begins to stir"
0 GOTO N500
500 SetRedraw 0
0 RemoveMapObj Creature 1-8 -DELETE -FAILOK
0 ReplaceTile 1 23 19 28 21 36
0 ReplaceTile 98 23 19 38 21 46
0 ReplaceTile 98 23 22 44 27 46
0 ReplaceTile 1 23 29 44 34 46
0 ReplaceTile 1 23 35 28 37 46
0 ReplaceTile 1 23 22 28 34 30
0 SetMapCreatures BEHAVIOR-WANDER 19 28 22 46
0 SetMapCreatures BEHAVIOR-WANDER 34 28 37 46
0 SetMapCreatures BEHAVIOR-WANDER 23 28 33 31
0 SetMapCreatures BEHAVIOR-WANDER 23 43 33 46
0 SetView PC
0 SetRedraw 1
0 Pause
0 Message "[You stand up.]"
0 AlterPCTile BASE
0 DeleteTile 1004
0 DeleteFrame 1004
0 CheckFlag 29 1 N1
0 CheckFlag 29 2 N2
0 GivePCMB 3 8 16
0 GOTO N600
1 GivePCMB 3 3 6
0 GOTO N600
2 GivePCMB 3 10 20
0 Pause
0 SetRedraw 0
0 Teleport 75 14 36
0 SetMapCreatures RESETPOS 12 33 14 34
0 SetRedraw 1
0 Message "[You go back downstairs to collect your winnings.]"
0 Pause
0 Message "Here you are!"
0 CheckFlag 27 1 N502
0 CheckFlag 27 2 N503
0 CheckFlag 27 3 N504
0 CheckFlag 27 4 N505
501 Message "[He hands you 10 gp]"
0 GiveItem 1 10
0 GOTO N600
502 CheckFlag 28 2 N1
0 Message "[He hands you 6 gp]"
0 GiveItem 1 6
0 GOTO N600
1 Message "[He hands you 14 gp]"
0 GiveItem 1 14
0 GOTO N600
503 CheckFlag 28 2 N1
0 Message "[He hands you 6 gp]"
0 GiveItem 1 6
0 GOTO N600
1 Message "[He hands you 14 gp]"
0 GiveItem 1 14
0 GOTO N600
504 CheckFlag 28 2 N1
0 Message "[He hands you 8 gp]"
0 GiveItem 1 8
0 GOTO N600
1 Message "[He hands you 12 gp]"
0 GiveItem 1 12
0 GOTO N600
505 CheckFlag 28 2 N1
0 Message "[He hands you 8 gp]"
0 GiveItem 1 8
0 GOTO N600
1 Message "[He hands you 12 gp]"
0 GiveItem 1 12
600 AutoSave
0 BREAK
