Binary ROM HackingNeed a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.
So can someone help me out with the simplest way to script in-game npcs to trade with you? If there's an easy way to edit existing traders, and maybe just change the Pokémon numbers that they want/trade? Hopefully someone can help out, thanks.
__________________
Check out our hack, POKEMON VALOR in the Progressing Hacks page!
Always looking for feedback and suggestions.
I'm definitely not a pro at this, but I got it to work once. I sort of forget how, but this is the script I used (I use PKSV-UI, not XSE for scripting):
Spoiler:
#dyn 0x740000
#org @main
lock
faceplayer
setvar 0x8008 0x1
copyvar 0x8004 0x8008
special2 LASTRESULT 0xFC
copyvar 0x8009 LASTRESULT
checkflag 0xABCD
if == jump @alreadydone
message @ask
callstd MSG_YESNO
compare LASTRESULT NO
if == jump @endscript
special 0x9F
waitspecial
lock
faceplayer
copyvar 0x800A 0x8004
compare 0x8004 0x6
if >= jump @playerclickedB
copyvar 0x8005 0x800A
special2 LASTRESULT 0xFF
copyvar 0x800B LASTRESULT
comparevars2 LASTRESULT 0x8009
if != jump @notrightpokemon
copyvar 0x8004 0x8008
copyvar 0x8005 0x800A
special 0xFD
special 0xFE
waitspecial
lock
faceplayer
message @thankyou
callstd MSG_NORMAL
setflag 0xABCD
release
end
#org @ask
= You know what?\pI'm thinking I'd like to\nbecome a PSYCHIC.\pBut I don't have any PSYCHIC\ntype POK\eMON.\pSay[.]\nDo you have a \v\h02?\pI'll trade you my \v\h03\nfor it.
#org @thankyou
= Sweet!\nHey, thanks a lot!
#org @alreadydone
message @howisit
callstd MSG_NORMAL
release
end
#org @howisit
= Hey!\nHow's \v\h03 treating you?\pI love my \v\h02!\nThanks a lot!
#org @endscript
message @notrade
callstd MSG_NORMAL
release
end
#org @notrade
= Really?\nAww, man[.]\pWell, if you ever get a\n\v\h02, let me know, okay?
#org @playerclickedB
message @nevermind
callstd MSG_NORMAL
release
end
#org @nevermind
= Really?\nAww, man[.]\pWell, if you ever change\nyour mind, I'll be here.