View Single Post
  #826    
Old January 13th, 2013, 08:06 PM
Powerflare's Avatar
Powerflare
Pokémon Trainer N
 
Join Date: May 2008
Location: Unova
Age: 17
Gender: Male
Nature: Rash
I'm having a few problems with one of my scripts. First of all, the nicknaming portion of the script does not work (when it goes to nickname the Pokémon ingame, it nicknames "?" and not the appropriate Pokémon - the Magikarp given in this script). My second issue: the flag (0x9006) which prevents the guy from selling the Magikarp twice (instead he just tells you to scram) appears to work; however, when I leave the room/open the start menu etc., it seemingly clears the flag/ignores the checkflag and acts as if you've never talked to the guy before (so you can buy another Magikarp - c'mon, that'd be WAY too overpowered if someone could buy TWO Magikarp ). Any suggestions/thoughts/corrections?

PS: I am aware there is no offset after the #dynamic 0x in the spoiler. I didn't think it mattered which offset it was set to. I compiled the script in a test ROM so the offset used for that would be different than the actual offset I intend to compile this script to.

EDIT: Also, another minor glitch/oddity that came up: right around when the Pokémon is given, the lock on the NPC is seemingly released and he begins moving again.

Spoiler:
Code:
#dynamic 0x

#org @start
checkflag 0x9006
if 0x1 goto @start2
lock
faceplayer
showmoney 0x0 0x0 0x0
textcolor 0x0
msgbox @msg1 0x5
compare LASTRESULT 0x1
if 0x0 goto @end
checkmoney 0x1F4 0x0
compare LASTRESULT 0x1
if 0x0 goto @notenough
countpokemon
compare LASTRESULT 0x6
if 0x1 goto @fullparty
textcolor 0x0
msgbox @msg4 0x6
paymoney 0x1F4 0x0
updatemoney 0x0 0x0 0x0
givepokemon 0x81 0x5 0x0 0x0 0x0 0x0
fanfare 0x101
textcolor 0x2
msgbox @gotpokemon 0x4
waitfanfare
closeonkeypress
textcolor 0x2
msgbox @liketoname 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
textcolor 0x0
msgbox @msg5 0x6
setflag 0x9006
hidemoney 0x0 0x0
release
end

#org @start2
lock
faceplayer
textcolor 0x0
msgbox @msg6 0x6
release
end

#org @name
countpokemon
subvar 0x800D 0x1
copyvar 0x8004 0x800D
fadescreen 0x1 
special 0x166
waitstate
return

#org @end
textcolor 0x0
msgbox @msg2 0x6
hidemoney 0x0 0x0
release
end

#org @notenough
textcolor 0x0
msgbox @msg3 0x6
hidemoney 0x0 0x0
release
end

#org @fullparty
textcolor 0x2
msgbox @full 0x6
hidemoney 0x0 0x0
release
end

#org @liketoname
= Would you like to give a\nnickname to MAGIKARP?

#org @gotpokemon
= [player] paid an outrageous [$]500\nand bought a[.] MAGIKARP?!

#org @msg1
= MAN: Hey, kid!\pHave I got a deal just for you!\pSee, in the HOENN region,\nthere's this rare POKéMON\lknown as FEEBAS.\pI'll sell one to you for just\n[$]500!\pSo whaddaya say, deal?

#org @msg2
= MAN: I'm just trying to help\nyou out!

#org @msg3
= MAN: Hey, you'll need more\nthan THAT!

#org @msg4
= MAN: Heh-heh, gee thanks kid!

#org @msg5
= MAN: Now git outta 'ere.\pScram!

#org @msg6
= MAN: Git outta 'ere.\pScram!

#org @full
= You're party is full.
__________________
I like that face! Like to battle, do you?"-Crasher Wake

"... ... ... ... ... ... ... ... ... ... ... ..." -Red

Pokémon Black Version || Pokémon White Version

I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.

Last edited by Powerflare; January 13th, 2013 at 08:17 PM.
Reply With Quote