- 3
- Posts
- 118
- Days
- Seen Jan 31, 2025
Hey everyone,
I'm new to scripting and just completed my first script. The point of the script is to be a yes/no question followed the npc giving a caterpie. Everything works as expected, except the npc keeps moving after the "player received caterpie" part shows up and I want him stationary, and the sprite for caterpie during nicknaming is a bulbasaur. Apologies if it's all over the place, it's my first script.
#dynamic 0x801000
#org @Main
lock
faceplayer
checkflag 0x100
if 0x0 goto @giveorg
msgbox @checkin 0x2
end
#org @giveorg
msgbox @yesno 0x5
compare LASTRESULT 0x1
if 0x1 goto @YesOrg
msgbox @No 0x2
end
#org @yesno
= Do you want this Caterpie?
#org @YesOrg
countpokemon
compare LASTRESULT 0x6
if 0x1 goto @Full
goto @give
end
#org @give
msgbox @Thanks 0x2
givepokemon 0x000A 0x5 0x008B 0x0 0x0 0x0
fanfare 0x13E
msgbox @notify 0x4
waitfanfare
closeonkeypress
setflag 0x100
msgbox @qname 0x5
compare LASTRESULT 0x1
if 0x1 gosub @NickName
msgbox @3 0x2
end
#org @Full
msgbox @partyfull 0x2
end
#org @partyfull
= Come back when you have room.
#org @notify
= [player] received CATERPIE!
#org @qname
= Would you like to give CATERPIE a\nnickname?
#org @No
= Aww man, what am I gonna do with\nit now?
#org @Thanks
= Oh thank you! I hate bugs.
#org @NickName
call 0x1A74EB
return
#org @3
= Just keep it in its pokeball.
#org @checkin
= How's it going bug lover?
I'm new to scripting and just completed my first script. The point of the script is to be a yes/no question followed the npc giving a caterpie. Everything works as expected, except the npc keeps moving after the "player received caterpie" part shows up and I want him stationary, and the sprite for caterpie during nicknaming is a bulbasaur. Apologies if it's all over the place, it's my first script.
#dynamic 0x801000
#org @Main
lock
faceplayer
checkflag 0x100
if 0x0 goto @giveorg
msgbox @checkin 0x2
end
#org @giveorg
msgbox @yesno 0x5
compare LASTRESULT 0x1
if 0x1 goto @YesOrg
msgbox @No 0x2
end
#org @yesno
= Do you want this Caterpie?
#org @YesOrg
countpokemon
compare LASTRESULT 0x6
if 0x1 goto @Full
goto @give
end
#org @give
msgbox @Thanks 0x2
givepokemon 0x000A 0x5 0x008B 0x0 0x0 0x0
fanfare 0x13E
msgbox @notify 0x4
waitfanfare
closeonkeypress
setflag 0x100
msgbox @qname 0x5
compare LASTRESULT 0x1
if 0x1 gosub @NickName
msgbox @3 0x2
end
#org @Full
msgbox @partyfull 0x2
end
#org @partyfull
= Come back when you have room.
#org @notify
= [player] received CATERPIE!
#org @qname
= Would you like to give CATERPIE a\nnickname?
#org @No
= Aww man, what am I gonna do with\nit now?
#org @Thanks
= Oh thank you! I hate bugs.
#org @NickName
call 0x1A74EB
return
#org @3
= Just keep it in its pokeball.
#org @checkin
= How's it going bug lover?