• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.
Well, thank you for trying. I'm still at a loss on how to activate the movement and PKSV won't even load an edited version of that.. Any other ideas?

applymovent activates the movement and it works like this:

applymovement 0xcharacterID 0xOFFSET

put the example i put up earlyer in XSE
add the line:
#dynamic 0x800000
on top and it will compile
 
hmmm i can't get it to work... here's the piece of script:
Spoiler:


Depending on where you stand when you talk to him(front or right), he runs to a location(applymovement) on the map(coordinates 6,6). And the goal is to keep him there when i enter that map the next time. Applymovement works so 0x1 is the correct person #. And 0x6 0x6 are the coordinates where he should stay. Yet when i enter the map again, he is at coordinates 1,10 where he started.

Does anybody see what i'm overlooking here?

You can make the sprite at 6.6 and in the start of the event put movesprite2 so the man will goto 1.10 and do every thing and if you need put him back to his place again :D or if its in a map you can put a levelscript type 04 and put the movesprite2 there so it wont be seen by the player.

Its the way Nintendo did in OAK's starting script.
 
Last edited:
hi, why isn't that script working proprely?

Code:
'---------------
#dynamic 0x719830
#org @start
lock
faceplayer
random 0x385
copyvar 0x4060 0x800D
addvar 0x4060 0x1
bufferpokemon 0x1 0x4060
msgbox @Want 0x5
compare LASTRESULT 0x1
if 0x1 goto @yes
goto @no

#org @yes
countpokemon
compare LASTRESULT 0x6
if 0x1 goto @PartyFull
msgbox @Obtained 0x2
givepokemon 0x4060 0x5 0x0 0x0 0x0 0x0
msgbox @TakeCare 0x2
release
end

#org @no
msgbox @DontWant 0x2
release
end

#org @partyfull
msgbox @TxtPartyFull 0x2
release
end


#org @Want
= Vieil homme: Tu veux un \v\h03?

#org @Obtained
= [player] a recu un \v\h03!

#org @TakeCare
= Vieil homme: Prends soin de \v\h03?

#org @DontWant
= Vieil homme: Tant pis pour toi!

#org @TxtPartyFull
= Vieil homme: désolé, ton équipe est pleine!
It sometimes ask me if I want an attack name and sometimes if I want a pokemon... And sometimes it crashes

and by the way: how can I delete the point you can fly to on the first map?

thancks by advance, supersam2
 
Last edited:
hi, why isn't that script working proprely?

Code:
'---------------
#dynamic 0x719830
#org @start
lock
faceplayer
random 385
copyvar 0x4060 0x800D
addvar 0x4060 0x1
bufferpokemon 0x1 0x4060
msgbox @Want 0x5
compare LASTRESULT 0x1
if 0x1 goto @yes
// Used to be #org @no
msgbox @DontWant 0x2
end

#org @yes
countpokemon
compare LASTRESULT 0x6
if 0x1 goto @PartyFull
msgbox @Obtained 0x2
givepokemon 0x4060 0x5 0x0 0x0 0x0 0x0
msgbox @TakeCare 0x2
end

#org @partyfull
msgbox @TxtPartyFull 0x2
end


#org @Want
= Vieil homme: Tu veux un [buffer2]?

#org @Obtained
= [player] a recu un [buffer2]!

#org @TakeCare
= Vieil homme: Prends soin de [buffer2]?

#org @DontWant
= Vieil homme: Tant pis pour toi!

#org @TxtPartyFull
= Vieil homme: désolé, ton équipe est pleine!
It sometimes ask me if I want an attack name and sometimes if I want a pokemon... And sometimes it crashes

and by the way: how can I delete the point you can fly to on the first map?

thancks by advance, supersam2

Well, your 'random' command is actually choosing a random number between 0 and 901. That's because you put the hexadecimal prefix ('0x') in front of 385. You can either change the number to 181 or just scrap the prefix altogether (that way XSE will treat it as a decimal). That should fix the errors. Other than that, the rest of the corrections (see above) are for efficiency's sake (except for the buffers which I changed so that it's a little easier to read).

As for the fly point, I think you can just move it to another map.
 
I tried with that script and it still don't work...

Code:
'---------------
#dynamic 0x719830
#org @start
lock
faceplayer
random 0x181
copyvar 0x4060 0x800D
addvar 0x4060 0x1
bufferpokemon 0x1 0x4060
msgbox @Want 0x5
compare LASTRESULT 0x1
if 0x1 goto @yes
msgbox @DontWant 0x2
release
end

#org @yes
countpokemon
compare LASTRESULT 0x6
if 0x1 goto @PartyFull
msgbox @Obtained 0x2
givepokemon 0x4060 0x5 0x0 0x0 0x0 0x0
msgbox @TakeCare 0x2
end

#org @partyfull
msgbox @TxtPartyFull 0x2
end


#org @Want
= Vieil homme: Tu veux un [buffer2]?

#org @Obtained
= [player] a recu un [buffer2]!

#org @TakeCare
= Vieil homme: Prends soin de [buffer2]?

#org @DontWant
= Vieil homme: Tant pis pour toi!

#org @TxtPartyFull
= Vieil homme: désolé, ton équipe est pleine!

I really don't understand...
 
the main problem I think: the buffer2 make Attacks name appears but I haven't used any bufferattack command... Where does it come from? If I find this, I'm sure the problem will disappear
 
the main problem I think: the buffer2 make Attacks name appears but I haven't used any bufferattack command... Where does it come from? If I find this, I'm sure the problem will disappear

I used '[buffer2]' because in your 'bufferpokemon' command, you used '0x1' as a parameter. Thus, '[buffer2]' is used to access the contents of the '0x1' buffer. Are you sure that you changed the value in the 'Script Offset' box in AdvanceMap to the address of the new script?
 
I used '[buffer2]' because in your 'bufferpokemon' command, you used '0x1' as a parameter. Thus, '[buffer2]' is used to access the contents of the '0x1' buffer. Are you sure that you changed the value in the 'Script Offset' box in AdvanceMap to the address of the new script?

I don't know why, the script didn't compiled. It appears like it sis but it didn't in fact. I reopened the script and change the value again, taht works. Thank you very much

edit: there is still a little problem: it asked me one time if I want a "?"
 
I don't know why, the script didn't compiled. It appears like it sis but it didn't in fact. I reopened the script and change the value again, taht works. Thank you very much

edit: there is still a little problem: it asked me one time if I want a "?"

I don't know if this is right but I'm pretty sure there's 25 empty slots between Celebi and Treecko? Is it possible that that's the problem?
 
edit: there is still a little problem: it asked me one time if I want a "?"

I think the problem lies in the fact that there are a number (25?) of empty pokémon entries in the midst of the pokémon data (people usually use them to add new pokémon). I would guess that the game randomly chose one of those. You'd have to insert some sort of check which will pick a new number if the number is one of those entries.

edit: Beaten :(
 
one of those has number 389 and that's not normal becuz 0x181 + 0x1 = 0x182 = 386... I thougt the givepokemon use national dex number... Isn't it?

edit: anoter is n°411 and another one is 390
 
Last edited:
Can't find it... It's not in the guide. Is there additional documentation? Thank you and sorry for my noobs questions, but can't evolve without errors ;)
 
Can't find it... It's not in the guide. Is there additional documentation? Thank you and sorry for my noobs questions, but can't evolve without errors ;)
It should be in the same folder as where you extracted XSE. It's named stdpoke.rbh

On the other hand, you can make scripting easier by making use of these RBH files. Like so,

Code:
#include stdpoke.rbh

#dynamic 0x8000000
#org @start
givepokemon PKMN_CHARIZARD 0x36 0x0 0x0 0x0 0x0
end

By using the RBH files, you can just use PKMN_(NAME OF POKEMON HERE). There are also a few more RBH files you can use.
 
yeah but It won't help if I wanna do a random pokemon script. The script would have to check if the random number is not one of those which are not pokemons. (25
compare 0x800D XX
if 0x1 goto @endscript)

Is it the only way?

@ash493: This is related to the values on the right panel but I haven't more complete infos. I tried it too and sometimes it works by changing the values to other similar to another tilescript, sometimes not...
 
yeah but It won't help if I wanna do a random pokemon script. The script would have to check if the random number is not one of those which are not pokemons. (25
compare 0x800D XX
if 0x1 goto @endscript)

Is it the only way?

@ash493: This is related to the values on the right panel but I haven't more complete infos. I tried it too and sometimes it works by changing the values to other similar to another tilescript, sometimes not...
Oh, so a random givepokemon eh? Could you give the whole script? I might have the solution for it. :>
 
Status
Not open for further replies.
Back
Top