Last active
August 20, 2019 00:54
-
-
Save huderlem/bb48e6c076b8c9daa19407f9755d50cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
script BugContestOfficer_EnterContest | |
{ | |
if (var(VAR_BUG_CONTEST_PRIZE) != ITEM_NONE) { | |
bufferitemname(0, VAR_BUG_CONTEST_PRIZE) | |
msgbox(BugContestOfficer_Text_GivePrizeItem) | |
giveitem_std(VAR_BUG_CONTEST_PRIZE) | |
if (var(VAR_RESULT)) { | |
setvar(VAR_BUG_CONTEST_PRIZE, ITEM_NONE) | |
} else { | |
msgbox(BugContestOfficer_Text_NoRoomInBag) | |
} | |
return | |
} | |
if (flag(FLAG_DAILY_BUG_CATCHING_CONTEST) == TRUE) { | |
msgbox(BugContestOfficer_Text_ContestIsOver) | |
setvar(VAR_RESULT, 0) | |
return | |
} | |
special(CopyCurrentDayOfWeekStringToVar1) | |
msgbox(BugContestOfficer_Text_ContestIntro, MSGBOX_YESNO) | |
if (var(VAR_RESULT) == NO) { | |
msgbox(BugContestOfficer_Text_TakePartInFuture) | |
setvar(VAR_RESULT, 0) | |
return | |
} | |
specialvar(VAR_RESULT, IsPlayerPartyAndPokemonStorageFull) | |
if (var(VAR_RESULT) == TRUE) { | |
msgbox(BugContestOfficer_Text_PartyAndBoxFull) | |
setvar(VAR_RESULT, 0) | |
return | |
} | |
msgbox(BugContestOfficer_Text_ChoosePokemon) | |
special(SavePlayerParty) | |
fadescreen(1) | |
special(SelectBugCatchingContestMon) | |
waitstate | |
if (var(VAR_RESULT) == 0) { | |
special(LoadPlayerParty) | |
msgbox(BugContestOfficer_Text_ComeSeeMeLater) | |
setvar(VAR_RESULT, 0) | |
return | |
} | |
special(ReducePlayerPartyToSelectedMons) | |
setvar(VAR_0x8004, 2) | |
setvar(VAR_0x8005, 4) | |
special(CallFrontierUtilFunc) | |
msgbox(BugContestOfficer_Text_HereAreTheParkBalls) | |
playfanfare(MUS_FANFA4) | |
message(BugContestOfficer_Text_ReceivedParkBalls) | |
waitfanfare | |
msgbox(BugContestOfficer_Text_SendOff) | |
closemessage | |
setflag(FLAG_DAILY_BUG_CATCHING_CONTEST) | |
setvar(VAR_BUG_CATCHING_CONTEST_STATE, 1) | |
special(EnterBugCatchingContest) | |
setvar(VAR_RESULT, 1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment