- 2
- Posts
- 14
- Years
- Seen Jan 9, 2013
I am trying to set up a trainer script.
I have the trainer ID set to which trainer i want in PET.
I use the script generator and it asks me to type in the trainer i want (i type in 0x002) it loads the script.
I then change the text it says to what i want. I save, compile, copy the offset, exit, and save my file in advance map. I load up the ROM but the trainer does nothing.
I also tried copying my one working trainer script (dont know how i did it) into my new one. The trainer loads now but it has the ??? pokemon. I also cannot change what he says, it always loads back up to the other trainer, even after i change the text, save, and compile again.
I am bad at this...
In AdvanceMap, after you copy the offset to the person in the 'Script Offset' box, look up three more boxes and you should see a 'Trainer' box. You need to change that box to $01. This tells AdvanceMap that the event is a trainer.
Next, look for a box called 'View Radius', and set that number to however many blocks away you want the trainer to catch you for a battle. So if you put 4 blocks in his radius, the trainer's line of sight will only be four blocks long.
Hope this helps.
-----------------------------------------------------------------------------------------------------------------------------------------------------
Okay, so I'm almost completely new to scripting itself, much less PKSV. Although I do have one high school semester's worth of web design and javascript, so that's helped me through some of the way, and really I'm just messing around so far.
My problem today is that I am trying to make an event where you walk up to a man, he talks back to you, and at the end of the message he gives you an item (in my case it's a nugget). After this is completed, you can't receive another nugget from him. Instead, he just gives you another, yet different, message.
Seems like this can be easily solved with flags, right? You would think, and I don't think the flag is the problem here. My problem is that I can't get the 'ITEM OBTAINED!' text to show up properly. Instead of saying, "Obtained the NUGGET!" it says, "Obtained the ?????????". It's probably because I don't know the ID for nugget in PKSV, but it does give me a nugget so I don't know.
If anybody could help with this, that would be great.
Oh and if it helps;
This is my script before I compile/paste offsets:
Spoiler:
#dynamic 0x740000
#org @main
lock
faceplayer
checkflag 0x201
if 0x1 jump @done
msgbox @before
callstd MSG_NORMAL
additem NUGGET 1
callstd MSG_OBTAIN
setflag 0x201
release
end
#org @done
message @after
callstd MSG_NORMAL
release
end
#org @before
= Are you going against\nTeam Rocket?\pReally?\nAll by yourself?\pHere, let me help you out.\nThis should sell for a pretty \ppenny at Viridian's Pok\emart.
#org @after
= Beat those morons for me, okay?
And this is my script after I compile/paste offset:
Spoiler:
#org 0x8740AD1
'-----------------------------------
lock
faceplayer
checkflag 0x201
if true jump 0x8740AF0 ' Flag is set
msgbox 0x8740AF9 ' Are you going agains...
callstd MSG_LOCK ' Built-in lock command
additem NUGGET 1
callstd MSG_OBTAIN ' Obtained the XXXXXX!
setflag 0x201
release
end
#org 0x8740AF0
'-----------------------------------
message 0x8740B8D ' Beat those morons ...
callstd MSG_LOCK ' Built-in lock command
release
end
#org 0x8740AF9
= Are you going against\nTeam Rocket?\pReally?\nAll by yourself?\pHere, let me help you out.\nThis should sell for a pretty \ppenny at Viridian's Pok\emart.
#org 0x8740B8D
= Beat those morons for me, okay?
Last edited: