- 53
- Posts
- 9
- Years
- Seen Aug 25, 2023
I'm looking at the berry girl on route 120 since she has the thing where she gives you a rare berry once a day.
dotimebasedevents
seems to be what does it with
FLAG_DAILY_ROUTE_120_RECEIVED_BERRY
Working like a normal flag. However logically I assume the flag gets reset the next day so you can talk to her and get a different berry. My question is how does all this work exactly as I have a bit of understanding but not totally. This is more of how to do time based events in general.
Code:
Route120_EventScript_BerryBeauty:: @ 81F5527
lock
faceplayer
dotimebasedevents
goto_if_set FLAG_DAILY_ROUTE_120_RECEIVED_BERRY, Route120_EventScript_ReceivedBerry
msgbox Route120_Text_BerriesExpressionOfLoveIsntIt, MSGBOX_YESNO
compare VAR_RESULT, YES
call_if_eq Route120_EventScript_BerryLove
compare VAR_RESULT, NO
call_if_eq Route120_EventScript_BerryNotLove
specialvar VAR_RESULT, GetPlayerTrainerIdOnesDigit
switch VAR_RESULT
case 0, Route120_EventScript_GiveFigyBerry
case 5, Route120_EventScript_GiveFigyBerry
case 1, Route120_EventScript_GiveWikiBerry
case 6, Route120_EventScript_GiveWikiBerry
case 2, Route120_EventScript_GiveMagoBerry
case 7, Route120_EventScript_GiveMagoBerry
case 3, Route120_EventScript_GiveAguavBerry
case 8, Route120_EventScript_GiveAguavBerry
case 4, Route120_EventScript_GiveIapapaBerry
case 9, Route120_EventScript_GiveIapapaBerry
end
dotimebasedevents
seems to be what does it with
FLAG_DAILY_ROUTE_120_RECEIVED_BERRY
Working like a normal flag. However logically I assume the flag gets reset the next day so you can talk to her and get a different berry. My question is how does all this work exactly as I have a bit of understanding but not totally. This is more of how to do time based events in general.