• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

DuoRyan

Hack'in as usual, it seem.
335
Posts
14
Years
Okay fix the first problem, anywho how do you make it show a pokemon not from your party in a set animation command?
Spoiler:


Here a video of what I mean
http://www.youtube.com/watch?v=Jkkc4TamU7U
 
Last edited:
6
Posts
16
Years
  • Seen Mar 2, 2015
Script not working

Hello,

I made this awesome script, however it doesn't work the way it should.

Code:
#dynamic 0x806500

#org @start
lock
checkflag 0x1002
if 0x1 goto @done
msgbox @1 0x6
applymovement 0x0A @MW1
waitmovement 0x0
pause 0x10
applymovement 0x0B @JAW1
waitmovement 0x0
pause 0x10
applymovement 0x09 @JEW1
waitmovement 0x0
msgbox @2 0x6
pause 0x20
msgbox @3 0x6
applymovement 0x0D @SUPERMAN1
waitmovement 0x0
applymovement 0x02 @bbbb
waitmovement 0x0
applymovement 0x03 @cccc
waitmovement 0x0
applymovement 0x04 @dddd
waitmovement 0x0
release 
end

#org @SUPERMAN1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @cccc
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x11
#raw 0x02
#raw 0xFE

#org @dddd
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0xFE

#org @bbbb
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x00
#raw 0xFE





#org @1
= Ej Homo! Wachten!

#org @MW1
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0x00
#raw 0xFE

#org @JAW1
#raw 0x02
#raw 0xFE

#org @JEW1
#raw 0x03
#raw 0xFE

#org @2
= [red_fr]JESSIE: Hier die POKéMON!\n[black_fr]MEOWTH: Ja, Etterbakje!\l[blue_fr]JAMES: of anders...\l[black_fr]MEOWTH: Als we je GROWLITHE hebben\ldan geven we hem aan de baas,\l[red_fr]JESSIE: Ja en dan krijgen we vast\lpromotie!

#org @3
= [blue_fr]SUPERMAN: WAAAAAAAACHT!\nIN DE NAAM DER GERECHTIGHEID!

#org @done 
release
end

I'm Hacking Fire red, and this script is located at a sciprt tile.
The Var number is set to 3, and the unkown number to 4050.
The first 4 movements work however the last doesn't work. (@bbbb, @cccc, @dddd). They don't move at all, the rom doesn't crash or anything.
They just don't move and the script ends.
Does anybody know what I'm doing wrong.
 

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
Okay... first... being you I wouldn't say that script that easy is "awesome" =)
Anyways onto the script... I don't see any visible mistakes... so I'd try removing those pause commands that are after waitmovement 0x0.
But if that does not work then I think there's only one other sollution...
Your OWs are too far for movement to start.
 
9
Posts
14
Years
  • Seen May 4, 2013
Ok, I'm new on hacking, so don't hate me please.

Now, after messing up with scripts, Oak speech script (when he gives Pokedex to players) messed up. There is no way to change it - when I change it to normal script and press "compile", it shows that everything is OK, but when I look at the script again - it is the same as old script. I use PKSV-UI.
Tried to find answer here, but it seems that no one answered normally (or I just don't understand). Please help, because tutorials doesn't say how to fix it.. but it looks like it's common bug here
 

Masou Shoujo Haruna

Don't touch me, I'm sterile
13
Posts
12
Years
  • Seen Dec 14, 2011
i'm trying to make a script delete fainted pokemon for my nuzlocke hack but it doesn't seem to work the way i want it to..

so basically what it does is perform a countpokemon then start checking the last slot up to the first slot for fainted pokemon if it finds one it calls a special which deletes it(P.S. im using JPAN's hacked engine) and then moves on to the next slot up until to the first slot.
i also tested the specials exclusive from JPAN's engine individually and they're both working
Code:
#dynamic 0x800000

#org @start
lock
faceplayer
setvar 0x8004 0x0
countpokemon
copyvar 0x8004 LASTRESULT   //puts 0x1 - 0x6 to 0x8004 depending on pkmn amount
goto @initial
msgbox @string 0x6
release
end

#org @initial
subvar 0x8004 0x1        //subtracted 1 so i can use 0x8004 as the slot pointer and also the counter
compare 0x8004 0x0     //check if pointer is in the 1st slot or only has 1 pkmn
if 0x0 goto @next
special2 0x8005 0x65    //HP check for the 1st slot pkmn, store hp value to 0x8005
compare 0x8005 0x0     //check if fainted
if 0x1 goto @end
msgbox @string 0x6
release
end

#org @next
special2 0x8005 0x65    //check HP of pkmn in current slot pointer, store hp value to 0x8005
compare 0x8005 0x0     //check if fainted
if 0x1 goto @yes
goto @initial

#org @yes
special2 0x8004 0x62     //deletes it and store pkmn party size to 0x8004
goto @initial

#org @end
special 0x62                 //deletes it
msgbox @string 0x6
release
end

#org @string
= removed all dead

additional info

special 0x65
(uses the value inside 0x8004 to determine the slot in the party to check, then returns the current hp of the asked pokemon)

special 0x62
(uses the value inside 0x8004 to determine the slot in the party to delete pkmn then returns the remaining party size, kinda like the take pokemon routine+countpokemon combo)

atm what it does is check the pkmn in the last slot if it is fainted deletes it , if it's alive does nothing. any fainted pkmn that isn't in the last slot still remains also i didn't used call/return commands it just freezes for no apparent reason O_O
there must be something wrong with the way im looping it.. HALP anyone
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
i'm trying to make a script delete fainted pokemon for my nuzlocke hack but it doesn't seem to work the way i want it to..

so basically what it does is perform a countpokemon then start checking the last slot up to the first slot for fainted pokemon if it finds one it calls a special which deletes it(P.S. im using JPAN's hacked engine) and then moves on to the next slot up until to the first slot.
i also tested the specials exclusive from JPAN's engine individually and they're both working
Code:
#dynamic 0x800000

#org @start
lock
faceplayer
setvar 0x8004 0x0
countpokemon
copyvar 0x8004 LASTRESULT   //puts 0x1 - 0x6 to 0x8004 depending on pkmn amount
goto @initial
msgbox @string 0x6
release
end

#org @initial
compare 0x8004 0x0     //check if pointer is in the 1st slot or only has 1 pkmn
if 0x0 goto @next
special2 0x8005 0x65    //HP check for the 1st slot pkmn, store hp value to 0x8005
compare 0x8005 0x0     //check if fainted
if 0x1 goto @end
[b]subvar 0x8004 0x1
goto @initial[/b]

#org @next
special2 0x8005 0x65    //check HP of pkmn in current slot pointer, store hp value to 0x8005
compare 0x8005 0x0     //check if fainted
if 0x1 goto @yes
[b]release
end[/b]

#org @yes
special2 0x8004 0x62     //deletes it and store pkmn party size to 0x8004
[b]release
end[/b]

#org @end
special 0x62                 //deletes it
[b]subvar 0x8004 0x1
goto @initial[/b]

#org @string
= removed all dead

additional info

special 0x65
(uses the value inside 0x8004 to determine the slot in the party to check, then returns the current hp of the asked pokemon)

special 0x62
(uses the value inside 0x8004 to determine the slot in the party to delete pkmn then returns the remaining party size, kinda like the take pokemon routine+countpokemon combo)

atm what it does is check the pkmn in the last slot if it is fainted deletes it , if it's alive does nothing. any fainted pkmn that isn't in the last slot still remains also i didn't used call/return commands it just freezes for no apparent reason O_O
there must be something wrong with the way im looping it.. HALP anyone

@end should have a command that loops you back to the @initial script at the end (goto @initial).

Otherwise, if you have 6 Pokemon in your party, the script will goto @end to delete it, but then will, well, end, because the @end script ends with "release, end". Have it loop back to @initial again to start the process over and see if the Pokemon in the 5th slot has HP or not.

You should probably get rid of the subvar 0x8004 0x1 in @initial. Instead, put the subvar command at the end of @end, before it loops you back to @initial. Also, put the subvar at the end of @initial, so it can reset the count if the last Pokemon in the party has more than 0 HP and check the previous Pokemon in the party - this way it should reset the count to one less each time whether the Pokemon gets deleted or not, until there's only one Pokemon in the party, in which case you have a command at the beginning of @initial that deals with that. However, that should lead you to a separate script that, at the end of it, ends the entire script altogether, because once you've checked all the Pokemon up to the first slot, the script needs to end. You would probably need a special "delete Pokemon" script for that as well, one that doesn't loop it back to the @initial script.

I put the changes in bold. I think that should work, but let me know since I haven't tested it.
 

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
I'd like to ask you guys something =)
I kinda wanna get back to hacking but I encountered a problem :/
(Didn't script for a while o.O)
I'd like to change the truck scene in Ruby/Emerald into something dream-like but for that reason I need to insert level script and remove the 2 level scripts that are already on the map that I know...
I tried it but nothing good came of it... :/ First time ROM stopped in shrinking scene and then the second time after it...

It's not complicated script or something so is there something that needs to be done in order to make intro script working?
Or is it because I'm using 1.0.1 XSE?

Spoiler:
 

Mephodicus

Inventor
26
Posts
12
Years
Uh, yeah, just made this. It's purpose is to stop the player from leaving before talking to a specific person (by using flags of course) and when I walk on the the script event, the player locks in place and nothing else happens. Any ideas?

#dynamic 0x800A00

#org @start
checkflag 0x828
if 0x1 goto @done
msgbox @1 0x6
applymovement 0xFF @move
waitmovement 0x0
release
end

#org @done
release
end

#org @move
#raw 0xC

#org @1
= I can't leave without/ntalking to DR.YUN!
EDIT: Sorry, the flag that was written in the script is the one used to bring up the Pokemon menu >.<

EDIT2: Still doesn't work.
 
Last edited:
5,256
Posts
16
Years
Uh, yeah, just made this. It's purpose is to stop the player from leaving before talking to a specific person (by using flags of course) and when I walk on the the script event, the player locks in place and nothing else happens. Any ideas?
#dynamic 0x800A00

#org @start
checkflag 0x828
if 0x1 goto @done
msgbox @1 0x6
applymovement 0xFF @move
waitmovement 0x0
release
end

#org @done
release
end

#org @move
#raw 0xC

#org @1
= I can't leave without/ntalking to DR.YUN!
Try this:
Code:
#dynamic 0x800A00

#org @start
checkflag 0x828
if 0x1 goto @done
msgbox @1 0x6
applymovement 0xFF @move
waitmovement 0x0
release
end

#org @done
release
end

#org @move
#raw 0xC
[b]#raw 0xFE[/b]

#org @1
= I can't leave without/ntalking to DR.YUN!
When scripting movements, all movements must end in #raw 0xFE.

I'd like to ask you guys something =)
I kinda wanna get back to hacking but I encountered a problem :/
(Didn't script for a while o.O)
I'd like to change the truck scene in Ruby/Emerald into something dream-like but for that reason I need to insert level script and remove the 2 level scripts that are already on the map that I know...
I tried it but nothing good came of it... :/ First time ROM stopped in shrinking scene and then the second time after it...

It's not complicated script or something so is there something that needs to be done in order to make intro script working?
Or is it because I'm using 1.0.1 XSE?
Spoiler:
Would it hurt to post the actual script?
 

Mephodicus

Inventor
26
Posts
12
Years
Try this:
Code:
#dynamic 0x800A00

#org @start
checkflag 0x828
if 0x1 goto @done
msgbox @1 0x6
applymovement 0xFF @move
waitmovement 0x0
release
end

#org @done
release
end

#org @move
#raw 0xC
[B]#raw 0xFE[/B]

#org @1
= I can't leave without/ntalking to DR.YUN!
When scripting movements, all movements must end in #raw 0xFE.

Tried it, still doesn't do anything. I changed the checkflag to 0x8C0 to see if that would do anything but I'm still stuck.
 

Capitalist Ness

can't stump the trump
69
Posts
15
Years
Allright guys, i have two problems.
1st, the script...
It lags when the exclamation cloud appears. This is the script.
Spoiler:


And there's a screen with this happening.
And another problem, cause i didn't put this brown part of big stone.

xck45u.png

Does it have anything with script?
(i mean that big brown rock on wall)
 
5,256
Posts
16
Years
Try adding #raw 0xFE after each movement list. You need to do that, as it tells the game that that set of movements has finished. As for the rock, I'm not sure. Perhaps there are some interfering level scripts - try removing them (save the offsets and details of them first just in case you need to put them back).
 

Capitalist Ness

can't stump the trump
69
Posts
15
Years
Thank you very much, Spherical Ice. You're a nice guy.
But still there's a problem with that rock on wall...

Maybe that rock out of nowhere(yay), is made cause it's start map? That cave is edited Scorched Slab. I used Start Map Chooser Advance version 1.20. This is my setup(sorry for off-topic, i want to solve this problem...)

29ok2eq.png

Again, sorry for off-topic.
 

Capitalist Ness

can't stump the trump
69
Posts
15
Years
Actually, i did this. I erased all level scripts. I actually saw another problem.
1y97yc.png

Fat Ben stands very weird.

Oh, i found the reason that made the "magical rock".
Truck has setmaptile script, right?
Then that means, that Setmaptile script is occuring in the cave. Even when i delete every script.
I think that makes sense.
 
13
Posts
14
Years
  • Seen Aug 23, 2011
When I try to make a script that gives the very first pokemon, you receive the pokemon, but it doesn't show up, what am I doing wrong?
 

Capitalist Ness

can't stump the trump
69
Posts
15
Years
I fixed all glitches, thank you, Spherical Ice.
Now i have smaller problem, what is setflag/special for clock setting in Pokemon Ruby?
 
Status
Not open for further replies.
Back
Top