improve goto_if macros
This commit is contained in:
@@ -7,7 +7,7 @@ MauvilleCity_GameCorner_EventScript_20FBB9:: @ 820FBB9
|
||||
msgbox MauvilleCity_GameCorner_Text_210460, MSGBOX_DEFAULT
|
||||
checkitem ITEM_COIN_CASE, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_20FCB7
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_20FCB7
|
||||
message MauvilleCity_GameCorner_Text_2104DF
|
||||
waitmessage
|
||||
showmoneybox 0, 0, 0
|
||||
@@ -33,10 +33,10 @@ MauvilleCity_GameCorner_EventScript_20FC0C:: @ 820FC0C
|
||||
MauvilleCity_GameCorner_EventScript_20FC33:: @ 820FC33
|
||||
checkcoins VAR_TEMP_1
|
||||
compare VAR_TEMP_1, 9950
|
||||
goto_if 4, MauvilleCity_GameCorner_EventScript_20FCE1
|
||||
goto_if_ge MauvilleCity_GameCorner_EventScript_20FCE1
|
||||
checkmoney 0x3e8, 0
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_20FCC1
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_20FCC1
|
||||
givecoins 50
|
||||
takemoney 0x3e8, 0
|
||||
updatemoneybox 0, 0
|
||||
@@ -54,10 +54,10 @@ MauvilleCity_GameCorner_EventScript_20FC33:: @ 820FC33
|
||||
MauvilleCity_GameCorner_EventScript_20FC75:: @ 820FC75
|
||||
checkcoins VAR_TEMP_1
|
||||
compare VAR_TEMP_1, 9500
|
||||
goto_if 4, MauvilleCity_GameCorner_EventScript_20FCE1
|
||||
goto_if_ge MauvilleCity_GameCorner_EventScript_20FCE1
|
||||
checkmoney 0x2710, 0
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_20FCC1
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_20FCC1
|
||||
givecoins 500
|
||||
takemoney 0x2710, 0
|
||||
updatemoneybox 0, 0
|
||||
@@ -110,7 +110,7 @@ MauvilleCity_GameCorner_EventScript_20FCF1:: @ 820FCF1
|
||||
msgbox MauvilleCity_GameCorner_Text_2105D7, MSGBOX_DEFAULT
|
||||
checkitem ITEM_COIN_CASE, 1
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_20FD0D
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_20FD0D
|
||||
release
|
||||
end
|
||||
|
||||
@@ -154,7 +154,7 @@ MauvilleCity_GameCorner_EventScript_20FD83:: @ 820FD83
|
||||
MauvilleCity_GameCorner_EventScript_20FD91:: @ 820FD91
|
||||
msgbox MauvilleCity_GameCorner_Text_210705, MSGBOX_YESNO
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_20FE92
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_20FE92
|
||||
switch VAR_TEMP_1
|
||||
case 1, MauvilleCity_GameCorner_EventScript_20FDCB
|
||||
case 2, MauvilleCity_GameCorner_EventScript_20FE05
|
||||
@@ -164,11 +164,11 @@ MauvilleCity_GameCorner_EventScript_20FD91:: @ 820FD91
|
||||
MauvilleCity_GameCorner_EventScript_20FDCB:: @ 820FDCB
|
||||
checkcoins VAR_TEMP_2
|
||||
compare VAR_TEMP_2, 1000
|
||||
goto_if 0, MauvilleCity_GameCorner_EventScript_20FE79
|
||||
goto_if_lt MauvilleCity_GameCorner_EventScript_20FE79
|
||||
bufferdecorationname 1, 88
|
||||
checkdecorspace 88
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_20FE87
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_20FE87
|
||||
takecoins 1000
|
||||
givedecoration 88
|
||||
updatecoinsbox 1, 1
|
||||
@@ -180,11 +180,11 @@ MauvilleCity_GameCorner_EventScript_20FDCB:: @ 820FDCB
|
||||
MauvilleCity_GameCorner_EventScript_20FE05:: @ 820FE05
|
||||
checkcoins VAR_TEMP_2
|
||||
compare VAR_TEMP_2, 1000
|
||||
goto_if 0, MauvilleCity_GameCorner_EventScript_20FE79
|
||||
goto_if_lt MauvilleCity_GameCorner_EventScript_20FE79
|
||||
bufferdecorationname 1, 89
|
||||
checkdecorspace 89
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_20FE87
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_20FE87
|
||||
takecoins 1000
|
||||
givedecoration 89
|
||||
updatecoinsbox 1, 1
|
||||
@@ -196,11 +196,11 @@ MauvilleCity_GameCorner_EventScript_20FE05:: @ 820FE05
|
||||
MauvilleCity_GameCorner_EventScript_20FE3F:: @ 820FE3F
|
||||
checkcoins VAR_TEMP_2
|
||||
compare VAR_TEMP_2, 1000
|
||||
goto_if 0, MauvilleCity_GameCorner_EventScript_20FE79
|
||||
goto_if_lt MauvilleCity_GameCorner_EventScript_20FE79
|
||||
bufferdecorationname 1, 90
|
||||
checkdecorspace 90
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_20FE87
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_20FE87
|
||||
takecoins 1000
|
||||
givedecoration 90
|
||||
updatecoinsbox 1, 1
|
||||
@@ -231,7 +231,7 @@ MauvilleCity_GameCorner_EventScript_20FE9F:: @ 820FE9F
|
||||
msgbox MauvilleCity_GameCorner_Text_2105D7, MSGBOX_DEFAULT
|
||||
checkitem ITEM_COIN_CASE, 1
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_20FEBB
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_20FEBB
|
||||
release
|
||||
end
|
||||
|
||||
@@ -293,7 +293,7 @@ MauvilleCity_GameCorner_EventScript_20FF8A:: @ 820FF8A
|
||||
special sub_81398C0
|
||||
msgbox MauvilleCity_GameCorner_Text_210629, MSGBOX_YESNO
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_210118
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_210118
|
||||
switch VAR_TEMP_1
|
||||
case 1, MauvilleCity_GameCorner_EventScript_20FFDD
|
||||
case 2, MauvilleCity_GameCorner_EventScript_210017
|
||||
@@ -305,10 +305,10 @@ MauvilleCity_GameCorner_EventScript_20FF8A:: @ 820FF8A
|
||||
MauvilleCity_GameCorner_EventScript_20FFDD:: @ 820FFDD
|
||||
checkcoins VAR_TEMP_2
|
||||
compare VAR_TEMP_2, 1500
|
||||
goto_if 0, MauvilleCity_GameCorner_EventScript_2100FF
|
||||
goto_if_lt MauvilleCity_GameCorner_EventScript_2100FF
|
||||
checkitemspace ITEM_TM32, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_21010D
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_21010D
|
||||
takecoins 1500
|
||||
giveitem ITEM_TM32, 1
|
||||
updatecoinsbox 1, 1
|
||||
@@ -320,10 +320,10 @@ MauvilleCity_GameCorner_EventScript_20FFDD:: @ 820FFDD
|
||||
MauvilleCity_GameCorner_EventScript_210017:: @ 8210017
|
||||
checkcoins VAR_TEMP_2
|
||||
compare VAR_TEMP_2, 3500
|
||||
goto_if 0, MauvilleCity_GameCorner_EventScript_2100FF
|
||||
goto_if_lt MauvilleCity_GameCorner_EventScript_2100FF
|
||||
checkitemspace ITEM_TM29, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_21010D
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_21010D
|
||||
takecoins 3500
|
||||
giveitem ITEM_TM29, 1
|
||||
updatecoinsbox 1, 1
|
||||
@@ -335,10 +335,10 @@ MauvilleCity_GameCorner_EventScript_210017:: @ 8210017
|
||||
MauvilleCity_GameCorner_EventScript_210051:: @ 8210051
|
||||
checkcoins VAR_TEMP_2
|
||||
compare VAR_TEMP_2, 4000
|
||||
goto_if 0, MauvilleCity_GameCorner_EventScript_2100FF
|
||||
goto_if_lt MauvilleCity_GameCorner_EventScript_2100FF
|
||||
checkitemspace ITEM_TM35, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_21010D
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_21010D
|
||||
takecoins 4000
|
||||
giveitem ITEM_TM35, 1
|
||||
updatecoinsbox 1, 1
|
||||
@@ -350,10 +350,10 @@ MauvilleCity_GameCorner_EventScript_210051:: @ 8210051
|
||||
MauvilleCity_GameCorner_EventScript_21008B:: @ 821008B
|
||||
checkcoins VAR_TEMP_2
|
||||
compare VAR_TEMP_2, 4000
|
||||
goto_if 0, MauvilleCity_GameCorner_EventScript_2100FF
|
||||
goto_if_lt MauvilleCity_GameCorner_EventScript_2100FF
|
||||
checkitemspace ITEM_TM24, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_21010D
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_21010D
|
||||
takecoins 4000
|
||||
giveitem ITEM_TM24, 1
|
||||
updatecoinsbox 1, 1
|
||||
@@ -365,10 +365,10 @@ MauvilleCity_GameCorner_EventScript_21008B:: @ 821008B
|
||||
MauvilleCity_GameCorner_EventScript_2100C5:: @ 82100C5
|
||||
checkcoins VAR_TEMP_2
|
||||
compare VAR_TEMP_2, 4000
|
||||
goto_if 0, MauvilleCity_GameCorner_EventScript_2100FF
|
||||
goto_if_lt MauvilleCity_GameCorner_EventScript_2100FF
|
||||
checkitemspace ITEM_TM13, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_21010D
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_21010D
|
||||
takecoins 4000
|
||||
giveitem ITEM_TM13, 1
|
||||
updatecoinsbox 1, 1
|
||||
@@ -404,11 +404,10 @@ MauvilleCity_GameCorner_EventScript_21012E:: @ 821012E
|
||||
MauvilleCity_GameCorner_EventScript_210137:: @ 8210137
|
||||
lock
|
||||
faceplayer
|
||||
checkflag FLAG_0x0E2
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_210213
|
||||
goto_if_set FLAG_0x0E2, MauvilleCity_GameCorner_EventScript_210213
|
||||
msgbox MauvilleCity_GameCorner_Text_210750, MSGBOX_YESNO
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_210209
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_210209
|
||||
switch VAR_STARTER_MON
|
||||
case 0, MauvilleCity_GameCorner_EventScript_21017C
|
||||
case 1, MauvilleCity_GameCorner_EventScript_2101A6
|
||||
@@ -419,7 +418,7 @@ MauvilleCity_GameCorner_EventScript_21017C:: @ 821017C
|
||||
bufferdecorationname 1, 88
|
||||
checkdecorspace 88
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_2101FA
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_2101FA
|
||||
msgbox MauvilleCity_GameCorner_Text_21079C, MSGBOX_DEFAULT
|
||||
givedecoration_std 88
|
||||
setflag FLAG_0x0E2
|
||||
@@ -430,7 +429,7 @@ MauvilleCity_GameCorner_EventScript_2101A6:: @ 82101A6
|
||||
bufferdecorationname 1, 89
|
||||
checkdecorspace 89
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_2101FA
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_2101FA
|
||||
msgbox MauvilleCity_GameCorner_Text_21079C, MSGBOX_DEFAULT
|
||||
givedecoration_std 89
|
||||
setflag FLAG_0x0E2
|
||||
@@ -441,7 +440,7 @@ MauvilleCity_GameCorner_EventScript_2101D0:: @ 82101D0
|
||||
bufferdecorationname 1, 90
|
||||
checkdecorspace 90
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_2101FA
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_2101FA
|
||||
msgbox MauvilleCity_GameCorner_Text_21079C, MSGBOX_DEFAULT
|
||||
givedecoration_std 90
|
||||
setflag FLAG_0x0E2
|
||||
@@ -469,17 +468,16 @@ MauvilleCity_GameCorner_EventScript_21021D:: @ 821021D
|
||||
faceplayer
|
||||
checkitem ITEM_COIN_CASE, 1
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_21023D
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_21023D
|
||||
msgbox MauvilleCity_GameCorner_Text_210830, MSGBOX_DEFAULT
|
||||
goto MauvilleCity_GameCorner_EventScript_2102A9
|
||||
end
|
||||
|
||||
MauvilleCity_GameCorner_EventScript_21023D:: @ 821023D
|
||||
checkflag FLAG_0x0E1
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_21026B
|
||||
goto_if_set FLAG_0x0E1, MauvilleCity_GameCorner_EventScript_21026B
|
||||
checkcoins VAR_TEMP_1
|
||||
compare VAR_TEMP_1, 1
|
||||
goto_if 4, MauvilleCity_GameCorner_EventScript_21026B
|
||||
goto_if_ge MauvilleCity_GameCorner_EventScript_21026B
|
||||
setflag FLAG_0x0E1
|
||||
givecoins 20
|
||||
msgbox MauvilleCity_GameCorner_Text_2108A0, MSGBOX_DEFAULT
|
||||
@@ -538,7 +536,7 @@ MauvilleCity_GameCorner_EventScript_2102D6:: @ 82102D6
|
||||
lockall
|
||||
checkitem ITEM_COIN_CASE, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
setvar VAR_0x8004, 0
|
||||
specialvar VAR_RESULT, GetSlotMachineId
|
||||
playslotmachine VAR_RESULT
|
||||
@@ -549,7 +547,7 @@ MauvilleCity_GameCorner_EventScript_2102F6:: @ 82102F6
|
||||
lockall
|
||||
checkitem ITEM_COIN_CASE, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
setvar VAR_0x8004, 1
|
||||
specialvar VAR_RESULT, GetSlotMachineId
|
||||
playslotmachine VAR_RESULT
|
||||
@@ -560,7 +558,7 @@ MauvilleCity_GameCorner_EventScript_210316:: @ 8210316
|
||||
lockall
|
||||
checkitem ITEM_COIN_CASE, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
setvar VAR_0x8004, 2
|
||||
specialvar VAR_RESULT, GetSlotMachineId
|
||||
playslotmachine VAR_RESULT
|
||||
@@ -571,7 +569,7 @@ MauvilleCity_GameCorner_EventScript_210336:: @ 8210336
|
||||
lockall
|
||||
checkitem ITEM_COIN_CASE, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
setvar VAR_0x8004, 3
|
||||
specialvar VAR_RESULT, GetSlotMachineId
|
||||
playslotmachine VAR_RESULT
|
||||
@@ -582,7 +580,7 @@ MauvilleCity_GameCorner_EventScript_210356:: @ 8210356
|
||||
lockall
|
||||
checkitem ITEM_COIN_CASE, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
setvar VAR_0x8004, 4
|
||||
specialvar VAR_RESULT, GetSlotMachineId
|
||||
playslotmachine VAR_RESULT
|
||||
@@ -593,7 +591,7 @@ MauvilleCity_GameCorner_EventScript_210376:: @ 8210376
|
||||
lockall
|
||||
checkitem ITEM_COIN_CASE, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
setvar VAR_0x8004, 5
|
||||
specialvar VAR_RESULT, GetSlotMachineId
|
||||
playslotmachine VAR_RESULT
|
||||
@@ -604,7 +602,7 @@ MauvilleCity_GameCorner_EventScript_210396:: @ 8210396
|
||||
lockall
|
||||
checkitem ITEM_COIN_CASE, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
setvar VAR_0x8004, 6
|
||||
specialvar VAR_RESULT, GetSlotMachineId
|
||||
playslotmachine VAR_RESULT
|
||||
@@ -615,7 +613,7 @@ MauvilleCity_GameCorner_EventScript_2103B6:: @ 82103B6
|
||||
lockall
|
||||
checkitem ITEM_COIN_CASE, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
setvar VAR_0x8004, 7
|
||||
specialvar VAR_RESULT, GetSlotMachineId
|
||||
playslotmachine VAR_RESULT
|
||||
@@ -626,7 +624,7 @@ MauvilleCity_GameCorner_EventScript_2103D6:: @ 82103D6
|
||||
lockall
|
||||
checkitem ITEM_COIN_CASE, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
setvar VAR_0x8004, 8
|
||||
specialvar VAR_RESULT, GetSlotMachineId
|
||||
playslotmachine VAR_RESULT
|
||||
@@ -637,7 +635,7 @@ MauvilleCity_GameCorner_EventScript_2103F6:: @ 82103F6
|
||||
lockall
|
||||
checkitem ITEM_COIN_CASE, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
setvar VAR_0x8004, 9
|
||||
specialvar VAR_RESULT, GetSlotMachineId
|
||||
playslotmachine VAR_RESULT
|
||||
@@ -648,7 +646,7 @@ MauvilleCity_GameCorner_EventScript_210416:: @ 8210416
|
||||
lockall
|
||||
checkitem ITEM_COIN_CASE, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
setvar VAR_0x8004, 10
|
||||
specialvar VAR_RESULT, GetSlotMachineId
|
||||
playslotmachine VAR_RESULT
|
||||
@@ -659,7 +657,7 @@ MauvilleCity_GameCorner_EventScript_210436:: @ 8210436
|
||||
lockall
|
||||
checkitem ITEM_COIN_CASE, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
|
||||
setvar VAR_0x8004, 11
|
||||
specialvar VAR_RESULT, GetSlotMachineId
|
||||
playslotmachine VAR_RESULT
|
||||
|
||||
Reference in New Issue
Block a user