improve goto_if macros
This commit is contained in:
@@ -50,15 +50,15 @@ Route111_MapScript1_1F0D87: @ 81F0D87
|
||||
call Route111_EventScript_1F0DE6
|
||||
call Route111_EventScript_28CCC7
|
||||
checktrainerflag TRAINER_VICKY
|
||||
goto_if 0, Route111_EventScript_1F0E26
|
||||
goto_if_lt Route111_EventScript_1F0E26
|
||||
end
|
||||
|
||||
Route111_EventScript_1F0DC2:: @ 81F0DC2
|
||||
checkplayergender
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq Route111_EventScript_1F0DDA
|
||||
goto_if_eq Route111_EventScript_1F0DDA
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq Route111_EventScript_1F0DE0
|
||||
goto_if_eq Route111_EventScript_1F0DE0
|
||||
return
|
||||
|
||||
Route111_EventScript_1F0DDA:: @ 81F0DDA
|
||||
@@ -72,15 +72,15 @@ Route111_EventScript_1F0DE0:: @ 81F0DE0
|
||||
Route111_EventScript_1F0DE6:: @ 81F0DE6
|
||||
getplayerxy VAR_TEMP_0, VAR_TEMP_1
|
||||
compare VAR_TEMP_1, 34
|
||||
goto_if 0, Route111_EventScript_1F0E25
|
||||
goto_if_lt Route111_EventScript_1F0E25
|
||||
compare VAR_TEMP_1, 107
|
||||
goto_if 2, Route111_EventScript_1F0E25
|
||||
goto_if_gt Route111_EventScript_1F0E25
|
||||
compare VAR_TEMP_1, 72
|
||||
goto_if 2, Route111_EventScript_1F0E22
|
||||
goto_if_gt Route111_EventScript_1F0E22
|
||||
compare VAR_TEMP_0, 2000
|
||||
goto_if 2, Route111_EventScript_1F0E25
|
||||
goto_if_gt Route111_EventScript_1F0E25
|
||||
compare VAR_TEMP_0, 8
|
||||
goto_if 0, Route111_EventScript_1F0E25
|
||||
goto_if_lt Route111_EventScript_1F0E25
|
||||
|
||||
Route111_EventScript_1F0E22:: @ 81F0E22
|
||||
setweather 8
|
||||
@@ -138,8 +138,7 @@ Route111_EventScript_1F0E60:: @ 81F0E60
|
||||
waitstate
|
||||
setvar VAR_0x40CB, 2
|
||||
clearflag FLAG_HIDE_DESERT_UNDERPASS_FOSSIL
|
||||
checkflag FLAG_0x150
|
||||
goto_eq Route111_EventScript_1F0EA7
|
||||
goto_if_set FLAG_0x150, Route111_EventScript_1F0EA7
|
||||
msgbox Route111_Text_1F1C74, MSGBOX_DEFAULT
|
||||
releaseall
|
||||
end
|
||||
@@ -163,12 +162,11 @@ Route111_EventScript_1F0EB9:: @ 81F0EB9
|
||||
lock
|
||||
faceplayer
|
||||
dodailyevents
|
||||
checkflag FLAG_0x92C
|
||||
goto_eq Route111_EventScript_1F0EF4
|
||||
goto_if_set FLAG_0x92C, Route111_EventScript_1F0EF4
|
||||
msgbox Route111_Text_2A6EBD, MSGBOX_DEFAULT
|
||||
giveitem_std ITEM_RAZZ_BERRY
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq Route111_EventScript_272054
|
||||
goto_if_eq Route111_EventScript_272054
|
||||
setflag FLAG_0x92C
|
||||
special GetPlayerBigGuyGirlString
|
||||
msgbox Route111_Text_2A6F3D, MSGBOX_DEFAULT
|
||||
@@ -207,7 +205,7 @@ Route111_EventScript_1F0F22:: @ 81F0F22
|
||||
Route111_EventScript_1F0F2E:: @ 81F0F2E
|
||||
checkitem ITEM_GO_GOGGLES, 1
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq Route111_EventScript_1F0F45
|
||||
goto_if_eq Route111_EventScript_1F0F45
|
||||
setvar VAR_TEMP_3, 1
|
||||
releaseall
|
||||
end
|
||||
@@ -281,7 +279,7 @@ Route111_EventScript_1F0FC5:: @ 81F0FC5
|
||||
setflag FLAG_LANDMARK_WINSTRATE_FAMILY
|
||||
msgbox Route111_Text_1F1475, MSGBOX_YESNO
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq Route111_EventScript_1F0FE7
|
||||
goto_if_eq Route111_EventScript_1F0FE7
|
||||
msgbox Route111_Text_1F14F5, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
@@ -416,11 +414,10 @@ Route111_EventScript_1F119B:: @ 81F119B
|
||||
lock
|
||||
faceplayer
|
||||
compare VAR_0x40CB, 3
|
||||
goto_eq Route111_EventScript_1F11C6
|
||||
goto_if_eq Route111_EventScript_1F11C6
|
||||
compare VAR_0x40CB, 2
|
||||
goto_eq Route111_EventScript_1F11D0
|
||||
checkflag FLAG_0x14E
|
||||
goto_eq Route111_EventScript_1F11DA
|
||||
goto_if_eq Route111_EventScript_1F11D0
|
||||
goto_if_set FLAG_0x14E, Route111_EventScript_1F11DA
|
||||
msgbox Route111_Text_1F1A22, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
@@ -475,7 +472,7 @@ Route111_EventScript_1F1260:: @ 81F1260
|
||||
trainerbattle_single TRAINER_DUSTY_1, Route111_Text_298B08, Route111_Text_298B53, Route111_EventScript_1F128C
|
||||
specialvar VAR_RESULT, ShouldTryRematchBattle
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq Route111_EventScript_1F12AB
|
||||
goto_if_eq Route111_EventScript_1F12AB
|
||||
msgbox Route111_Text_298B9A, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
@@ -512,7 +509,7 @@ Route111_EventScript_1F1307:: @ 81F1307
|
||||
trainerbattle_single TRAINER_WILTON_1, Route111_Text_298F79, Route111_Text_298FA9, Route111_EventScript_1F1333
|
||||
specialvar VAR_RESULT, ShouldTryRematchBattle
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq Route111_EventScript_1F1352
|
||||
goto_if_eq Route111_EventScript_1F1352
|
||||
msgbox Route111_Text_298FD4, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
@@ -534,7 +531,7 @@ Route111_EventScript_1F1369:: @ 81F1369
|
||||
trainerbattle_single TRAINER_BROOKE_1, Route111_Text_299143, Route111_Text_299193, Route111_EventScript_1F1395
|
||||
specialvar VAR_RESULT, ShouldTryRematchBattle
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq Route111_EventScript_1F13B4
|
||||
goto_if_eq Route111_EventScript_1F13B4
|
||||
msgbox Route111_Text_2991C2, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user