Prev: 60513 Up: Map Next: 60592
60530: Script Routine: (30) Have Berk interact with a door in front of him
Let Berk interact with the door directly in front of him.
ScriptRoutine_BerkDoorInFront 60530 LD BC,(29356) Load BC with the current-entity pointer (Pointer_CurrentEntity).
60534 LD A,(BC) Load A from the byte at BC.
60535 CP 5 Is A equal to 5? If so, jump to Script_DoorAhead_Hit.
60537 JR Z,Script_DoorAhead_Hit
60539 CP 8 Is A equal to 8? If so, jump to Script_DoorAhead_YellowCupRim.
60541 JR Z,Script_DoorAhead_YellowCupRim
60543 CP 16 Is A equal to 16? If so, jump to Script_DoorAhead_TaskProp.
60545 JR Z,Script_DoorAhead_TaskProp
60547 CP 3 Is A equal to 3? If not, jump to AdvanceScriptInstruction.
60549 JP NZ,AdvanceScriptInstruction
60552 LD BC,40237 Point BC at basket rim layout GraphicLayout_BasketRim.
This entry point is used by the routine at ScriptRoutine_BerkOpenDoorInFront.
Install basket rim layout GraphicLayout_BasketRim into slot 36945 (type 3 basket ahead).
Script_DoorInteract_Scan 60555 LD (36945),BC Store BC in 36945.
60559 JP AdvanceScriptInstruction Jump to AdvanceScriptInstruction to run the next script instruction.
Select yellow cup rim layout GraphicLayout_YellowCupRim for the type-5 entity ahead.
Script_DoorAhead_Hit 60562 LD BC,40318 Point BC at yellow cup rim layout GraphicLayout_YellowCupRim.
This entry point is used by the routine at ScriptRoutine_BerkOpenDoorInFront.
Install the chosen yellow cup layout into slot 36931.
Script_DoorInteract_StoreDoorSlot 60565 LD (36931),BC Store BC in 36931.
60569 JP AdvanceScriptInstruction Jump to AdvanceScriptInstruction to run the next script instruction.
Select yellow cup rim layout GraphicLayout_YellowCupRim for the type-8 entity ahead.
Script_DoorAhead_YellowCupRim 60572 LD BC,40318 Point BC at yellow cup rim layout GraphicLayout_YellowCupRim.
This entry point is used by the routine at ScriptRoutine_BerkOpenDoorInFront.
Install the chosen layout into slot 36917.
Script_DoorInteract_Found 60575 LD (36917),BC Store BC in 36917.
60579 JP AdvanceScriptInstruction Jump to AdvanceScriptInstruction to run the next script instruction.
Select layout 41294 for the type-16 seed box ahead.
Script_DoorAhead_TaskProp 60582 LD BC,41294 Load BC with 41294.
This entry point is used by the routine at ScriptRoutine_BerkOpenDoorInFront.
Install the chosen seed-box layout into slot 36903.
Script_DoorInteract_StoreAltDoorSlot 60585 LD (36903),BC Store BC in 36903.
60589 JP AdvanceScriptInstruction Jump to AdvanceScriptInstruction to run the next script instruction.
Prev: 60513 Up: Map Next: 60592