summaryrefslogtreecommitdiff
path: root/data/maps/Route116/scripts.inc
diff options
context:
space:
mode:
Diffstat (limited to 'data/maps/Route116/scripts.inc')
-rw-r--r--data/maps/Route116/scripts.inc66
1 files changed, 29 insertions, 37 deletions
diff --git a/data/maps/Route116/scripts.inc b/data/maps/Route116/scripts.inc
index ab8377b1c..519bc0447 100644
--- a/data/maps/Route116/scripts.inc
+++ b/data/maps/Route116/scripts.inc
@@ -5,14 +5,13 @@ Route116_MapScripts:: @ 81F2C0C
.byte 0
Route116_MapScript1_1F2C1C: @ 81F2C1C
- checkflag FLAG_0x08F
- call_if 1, Route116_EventScript_1F2C47
+ call_if_set FLAG_0x08F, Route116_EventScript_1F2C47
compare VAR_0x4039, 1
- call_if 1, Route116_EventScript_273D13
+ call_if_eq Route116_EventScript_273D13
compare VAR_0x4037, 5
- call_if 1, Route116_EventScript_273D1B
+ call_if_eq Route116_EventScript_273D1B
compare VAR_0x4037, 6
- call_if 1, Route116_EventScript_273D1B
+ call_if_eq Route116_EventScript_273D1B
end
Route116_EventScript_1F2C47:: @ 81F2C47
@@ -21,9 +20,9 @@ Route116_EventScript_1F2C47:: @ 81F2C47
Route116_MapScript1_1F2C4F: @ 81F2C4F
compare VAR_0x4037, 5
- call_if 1, Route116_EventScript_27395F
+ call_if_eq Route116_EventScript_27395F
compare VAR_0x4037, 6
- call_if 1, Route116_EventScript_273972
+ call_if_eq Route116_EventScript_273972
end
Route116_MapScript2_1F2C66: @ 81F2C66
@@ -33,10 +32,8 @@ Route116_MapScript2_1F2C66: @ 81F2C66
Route116_EventScript_1F2C70:: @ 81F2C70
lock
faceplayer
- checkflag FLAG_0x08F
- goto_eq Route116_EventScript_1F2C8E
- checkflag FLAG_0x08E
- goto_eq Route116_EventScript_1F2C98
+ goto_if_set FLAG_0x08F, Route116_EventScript_1F2C8E
+ goto_if_set FLAG_0x08E, Route116_EventScript_1F2C98
msgbox Route116_Text_1F3140, MSGBOX_DEFAULT
release
end
@@ -54,8 +51,7 @@ Route116_EventScript_1F2C98:: @ 81F2C98
Route116_EventScript_1F2CA2:: @ 81F2CA2
lock
faceplayer
- checkflag FLAG_0x11F
- goto_eq Route116_EventScript_1F2D2B
+ goto_if_set FLAG_0x11F, Route116_EventScript_1F2D2B
msgbox Route116_Text_1F3317, MSGBOX_DEFAULT
goto Route116_EventScript_1F2CBB
end
@@ -64,17 +60,17 @@ Route116_EventScript_1F2CBB:: @ 81F2CBB
setflag FLAG_0x11F
giveitem_std ITEM_REPEAT_BALL
compare VAR_RESULT, 0
- goto_eq Route116_EventScript_1F2D39
+ goto_if_eq Route116_EventScript_1F2D39
msgbox Route116_Text_1F3521, MSGBOX_DEFAULT
closemessage
compare VAR_FACING, 2
- call_if 1, Route116_EventScript_1F2D15
+ call_if_eq Route116_EventScript_1F2D15
compare VAR_FACING, 1
- call_if 1, Route116_EventScript_1F2D15
+ call_if_eq Route116_EventScript_1F2D15
compare VAR_FACING, 3
- call_if 1, Route116_EventScript_1F2D15
+ call_if_eq Route116_EventScript_1F2D15
compare VAR_FACING, 4
- call_if 1, Route116_EventScript_1F2D20
+ call_if_eq Route116_EventScript_1F2D20
removeobject VAR_LAST_TALKED
clearflag FLAG_HIDE_RUSTBORO_CITY_DEVON_CORP_3F_EMPLOYEE
setflag FLAG_0x100
@@ -168,10 +164,10 @@ Route116_EventScript_1F2DB6:: @ 81F2DB6
faceplayer
checkitem ITEM_BLACK_GLASSES, 1
compare VAR_RESULT, 1
- goto_eq Route116_EventScript_1F2DF1
+ goto_if_eq Route116_EventScript_1F2DF1
specialvar VAR_RESULT, FoundBlackGlasses
compare VAR_RESULT, 1
- goto_eq Route116_EventScript_1F2DE2
+ goto_if_eq Route116_EventScript_1F2DE2
msgbox Route116_Text_1F3657, MSGBOX_DEFAULT
release
end
@@ -187,7 +183,7 @@ Route116_EventScript_1F2DF1:: @ 81F2DF1
msgbox Route116_Text_1F3688, MSGBOX_DEFAULT
specialvar VAR_RESULT, FoundBlackGlasses
compare VAR_RESULT, 1
- goto_eq Route116_EventScript_1F2E1B
+ goto_if_eq Route116_EventScript_1F2E1B
msgbox Route116_Text_1F375E, MSGBOX_DEFAULT
release
end
@@ -201,13 +197,13 @@ Route116_EventScript_1F2E1B:: @ 81F2E1B
Route116_EventScript_1F2E2A:: @ 81F2E2A
delay 20
compare VAR_FACING, 2
- call_if 1, Route116_EventScript_1F2E5E
+ call_if_eq Route116_EventScript_1F2E5E
compare VAR_FACING, 1
- call_if 1, Route116_EventScript_1F2E5E
+ call_if_eq Route116_EventScript_1F2E5E
compare VAR_FACING, 3
- call_if 1, Route116_EventScript_1F2E5E
+ call_if_eq Route116_EventScript_1F2E5E
compare VAR_FACING, 4
- call_if 1, Route116_EventScript_1F2E69
+ call_if_eq Route116_EventScript_1F2E69
removeobject VAR_LAST_TALKED
release
end
@@ -261,18 +257,17 @@ Route116_EventScript_1F2EB7:: @ 81F2EB7
trainerbattle_single TRAINER_JERRY_1, Route116_Text_29BD0C, Route116_Text_29BD66, Route116_EventScript_1F2EF8
specialvar VAR_RESULT, ShouldTryRematchBattle
compare VAR_RESULT, 1
- goto_eq Route116_EventScript_1F2F4E
+ goto_if_eq Route116_EventScript_1F2F4E
setvar VAR_0x8004, 273
specialvar VAR_RESULT, sub_813B4E0
compare VAR_RESULT, 0
- goto_eq Route116_EventScript_1F2F22
+ goto_if_eq Route116_EventScript_1F2F22
msgbox Route116_Text_29BD92, MSGBOX_DEFAULT
release
end
Route116_EventScript_1F2EF8:: @ 81F2EF8
- checkflag FLAG_HAS_MATCH_CALL
- goto_eq Route116_EventScript_1F2F03
+ goto_if_set FLAG_HAS_MATCH_CALL, Route116_EventScript_1F2F03
release
end
@@ -285,8 +280,7 @@ Route116_EventScript_1F2F03:: @ 81F2F03
end
Route116_EventScript_1F2F22:: @ 81F2F22
- checkflag FLAG_HAS_MATCH_CALL
- goto_eq Route116_EventScript_1F2F35
+ goto_if_set FLAG_HAS_MATCH_CALL, Route116_EventScript_1F2F35
msgbox Route116_Text_29BD92, MSGBOX_DEFAULT
release
end
@@ -316,18 +310,17 @@ Route116_EventScript_1F2F93:: @ 81F2F93
trainerbattle_single TRAINER_KAREN_1, Route116_Text_29BFC5, Route116_Text_29BFFA, Route116_EventScript_1F2FD4
specialvar VAR_RESULT, ShouldTryRematchBattle
compare VAR_RESULT, 1
- goto_eq Route116_EventScript_1F302A
+ goto_if_eq Route116_EventScript_1F302A
setvar VAR_0x8004, 280
specialvar VAR_RESULT, sub_813B4E0
compare VAR_RESULT, 0
- goto_eq Route116_EventScript_1F2FFE
+ goto_if_eq Route116_EventScript_1F2FFE
msgbox Route116_Text_29C010, MSGBOX_DEFAULT
release
end
Route116_EventScript_1F2FD4:: @ 81F2FD4
- checkflag FLAG_HAS_MATCH_CALL
- goto_eq Route116_EventScript_1F2FDF
+ goto_if_set FLAG_HAS_MATCH_CALL, Route116_EventScript_1F2FDF
release
end
@@ -340,8 +333,7 @@ Route116_EventScript_1F2FDF:: @ 81F2FDF
end
Route116_EventScript_1F2FFE:: @ 81F2FFE
- checkflag FLAG_HAS_MATCH_CALL
- goto_eq Route116_EventScript_1F3011
+ goto_if_set FLAG_HAS_MATCH_CALL, Route116_EventScript_1F3011
msgbox Route116_Text_29C010, MSGBOX_DEFAULT
release
end