Ok I'm taking a shot in the dark since this forum doesn't seem very active. I need help with a script. It's a multiple dialog box script that summons enemies. Basically my problem is that no matter with MessageBox I'm in, the Buttons always act as if they're in Box 1. Here's the script.
Begin _trainingbackup
Short ScriptState
Short Button
If ( MenuMode == 1 )
Return
EndIf
If ( OnActivate == 1 )
If ( ScriptState == 0 )
MessageBox "What would you like to summon?" "Scrib - Level 1 | 20 Gold" "Rat - Level 2 | 35 Gold" "Kwama Warrior - Level 3 | 45 Gold" "Bonewalker - Level 4 | 70 Gold" "Scamp - Level 5 | 75 Gold" "Next"
Set ScriptState to 0
EndIf
EndIf
If ( ScriptState == 0 )
Set Button to GetButtonPressed
If ( Button == 0 )
If ( Player->GetItemCount Gold_001 < 20 )
MessageBox "You don't have enough gold"
Else
Player->RemoveItem "Gold_001" 20
MessageBox "You summon a level 1 Scrib."
PlaceAtPC "scrib", 1, 128, 3
Set ScriptState to 1
EndIf
EndIf
If ( Button == 1 )
If ( Player->GetItemCount Gold_001 < 35 )
MessageBox"You don't have enough gold."
Else
Player->RemoveItem "Gold_001" 35
MessageBox "You summon a level 2 Rat."
PlaceAtPC "Rat", 1, 128, 3
Set ScriptState to 1
EndIf
EndIf
If ( Button == 2 )
If ( Player->GetItemCount Gold_001 < 45 )
MessageBox "You don't have enough gold."
Else
Player->RemoveItem "Gold_001" 45
MessageBox "You summon a level 3 Kwama Warrior"
PlaceAtPC "kwama warrior", 1, 128, 3
Set ScriptState to 1
EndIf
EndIf
If ( Button == 3 )
If ( Player->GetItemCount Gold_001 < 70 )
MessageBox "You don't have enough gold."
Else
Player->RemoveItem "Gold_001" 70
MessageBox "You summon a level 4 Bonewalker."
PlaceAtPC "bonewalker", 1, 128, 3
Set ScriptState to 1
EndIf
EndIf
If ( Button == 4 )
If ( Player->GetItemCount Gold_001 < 75 )
MessageBox "You don't have enough gold."
Else
Player->RemoveItem "Gold_001" 75
MessageBox "You summon a level 5 Scamp."
PlaceAtPC "scamp", 1, 128, 3
Set ScriptState to 1
EndIf
EndIf
If ( Button == 5 )
Set ScriptState to 3
EndIf
EndIf
If ( ScriptState == 3 )
Set Button to GetButtonPressed
MessageBox "Levels Six through Ten" "Shalk - Level 6 | 60 Gold" "Skeleton Warrior - Level 7 | 110 Gold"
If ( Button == 0 )
If (Player->GetItemCount Gold_001 < 60 )
MessageBox "You don't have enough gold."
Else
Player->RemoveItem "Gold_001" 60
MessageBox "You summon a level 6 Shalk."
PlaceAtPc "shalk", 1, 128, 3
Set ScriptState to 3
EndIf
EndIf
If ( Button == 1 )
If ( Player->GetItemCount Gold_001 < 110 )
MessageBox "You don't have enough gold."
Else
Player->RemoveItem "Gold_001" 110
MessageBox "You summon a level 7 Skeleton Warrior"
PlaceAtPC "skeleton warrior", 1, 128, 3
Set ScriptState to 3
EndIf
EndIf
EndIf
If ( ScriptState == 1 )
Set ScriptState to 0
EndIf
If ( ScriptState == 3 )
Set ScriptState to 0
EndIf
End _trainingbackup