• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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.

hinkage

Everyone currently in an argument with this member
382
Posts
13
Years
  • Age 28
  • Seen Mar 24, 2024
I need use vars becouse my script is more difficult, and bulbasaur is only example. Var will be selected by player , and wilbattle should be selected too (for example: i chose from party pokemons my bulbasaur-setvar 0x8005 0x1, and later wildbattle with bulbasaur). But, yes, i think wildbattle command doesn's accept vars :/

I think I could help you out more if you actually posted your script here.
 
10
Posts
14
Years
  • Seen Sep 21, 2012
I think I could help you out more if you actually posted your script here
Code:
#org @start
lock
msgbox @msg 0x5
compare 0x800d 0x1
if 0x1 goto @next
call @wildbattle
compare 0x7030 0x1
if 0x1 goto @next
call @end
waitstate
end

#org @end
release
end

#org @next
special2 0x800D 0x84
compare 0x800D 0x1
if 0x1 goto @1pok
fadescreen 0x1
special 0x9F
waitstate
special2 0x800D 0x85
compare 0x800D 0x0
if 0x1 goto @cant
special2 0x8005 0xBA
bufferpokemon 0x0 0x8005
msgbox @release 0x6
checksound
cry 0x8005 0x0
msgbox @msg3 0x6
waitcry
setvar 0x7030 0x1
release
end

#org @wildbattle
compare 0x7030 0x1
if 0x0 goto @empty
showpokepic 0x8005 0xA 0x3
pause 0x20
subvar 0x7030 0x1
hidepokepic
msgbox @msg22 0x6
wildbattle 0x8005 0x5 0x1
release
end
I left msgboxes.
 

heyo

HEYO!
113
Posts
11
Years
  • Age 27
  • Seen Nov 24, 2023
This tutorial tells you how to fix that problem:

Thank you so much, but now I have another problem. When I exit that house, the name of the town no longer pops up, and when I go to the Route next to it the music doesn't change, and the name doesn't pop up their either.
 
9
Posts
11
Years
help

how do i get this script to stop looping


#org 0x8EB0BA0
'-----------------------------------
lock
faceplayer
special FR_NATIONAL_DEX
setflag FR_POKEDEX
fanfare 0x13E
msgbox 0x8EB0B53 ' Hey I just updated y...
callstd MSG_LOCK ' Built-in lock command
waitfanfare
applymovement 0xA 0x8EB0B86 ' walk_left walk_left ...
pauseevent 0x0
setflag 0x900
release
end


#org 0x8EB0B53
= Hey I just updated your \nPOK\eDEX for free.

#org 0x8EB0B86
M walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left end
 

Rogue42

Ninja
9
Posts
11
Years
  • Seen Aug 28, 2013
Hey I'm working on a Ruby hack for me and my friends and I need to know how to change the rivals name so when you type [rival] it will say a name of your choosing.
 
215
Posts
11
Years
  • Seen Jul 14, 2020
How would I make an in game pokemon trading script?
For example, one of those NPCs that you find that say "I'll trade you my geodude for your poliwag".

I tried a simple givepokemon and removepokemon script but I didn't like it very much and I don't know how to make it like the one they have in the meta game.

If you know how to do this, please PM me and help me! thanks! =)
 

Alignment

Revered with the stars
308
Posts
14
Years
  • Seen Dec 25, 2016
how do i get this script to stop looping


#org 0x8EB0BA0
'-----------------------------------
lock
faceplayer
special FR_NATIONAL_DEX
setflag FR_POKEDEX
fanfare 0x13E
msgbox 0x8EB0B53 ' Hey I just updated y...
callstd MSG_LOCK ' Built-in lock command
waitfanfare
applymovement 0xA 0x8EB0B86 ' walk_left walk_left ...
pauseevent 0x0
setflag 0x900
release
end


#org 0x8EB0B53
= Hey I just updated your \nPOK\eDEX for free.

#org 0x8EB0B86
M walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left end

I encourage you check out a tutorial. The section you need is flags, if you still can't figure it out I'll tell you that you're missing the "checkflag" portion of the script.

Check the spoilers if you're really stuck, but please try to do what I suggested above or it's no fun D:
Spoiler:


Hey I'm working on a Ruby hack for me and my friends and I need to know how to change the rivals name so when you type [rival] it will say a name of your choosing.

You can't change it once it's selected in the intro screen. Actually, you can change that with ASM. I believe HackMew accomplished this in his hack. That's really an advanced strategy though. Try to work around it, sorry for being unable to give direct help.
 

DoubleDare96

Pybro
6
Posts
11
Years
Game: Fire Red
Script: XSE

Here is my script
Spoiler:

I want to be able to use that to make sprite 0x6 only visible during the event. I set sprite 0x6 to hidden in Advance Map but that makes him only visible during the door animation. After the door animation he is invisible during the @hey pointer where he is talking and is still invisible during the @run animation. Please help me!
 

tajaros

Hi I'm dawg
855
Posts
11
Years
Game: Fire Red
Script: XSE

Here is my script
Spoiler:

I want to be able to use that to make sprite 0x6 only visible during the event. I set sprite 0x6 to hidden in Advance Map but that makes him only visible during the door animation. After the door animation he is invisible during the @hey pointer where he is talking and is still invisible during the @run animation. Please help me!

Are you using JPAN's engine?

If, not remove the setting in Advance-map that 0x6 is hidden, instead input in the person ID 002C, and it should be appear when you use showsprite and hide using hidesprite... :)
 
296
Posts
11
Years
Okay, I'm brand new to this, so I'm sure it's a really simple fix, but I cannot see what's wrong for the life of me.
I'm just trying to do a simple yes/no script in which the player receives a Treecko if they push yes (copying a script almost directly from a tutorial by Full Metal). However, when I go to test it, "yes" ends up getting treated the same as "no", and I can't get the pokemon. Can anybody see what I did wrong?

Game: Ruby
Type: Person event
Editor: PKSV
Script:
Spoiler:


<update>

Thanks to Ash493 and Alignment, it was the missing "compare" line that was causing the problem :) Ash493's recommendation worked, but I'll probably be using Alignment's solution in the future just because I prefer words over numbers ;)
 
Last edited:

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
I don't know how you got into jump command but jump command is not good.

Code:
#dynamic 0x740000

#org @main
lock
faceplayer
checkflag 0x200
if 0x1 [B][COLOR="Red"]goto[/COLOR][/B] @haveit
message @want
callstd [I]MSG_YESNO[/I] [COLOR="red"]I don't know if this can be used... if it doesn't work replace it with 0x5.[/COLOR]
[B][COLOR="Red"]compare 0x800D 0x1[/COLOR][/B]
if 0x1 [B][COLOR="red"]goto[/COLOR][/B] @yes
[B][COLOR="red"]if 0x0 goto[/COLOR][/B] @no
[B][COLOR="red"]release
end[/COLOR][/B]

#org @haveit
message @howsit
callstd [I]MSG_NORMAL[/I] [COLOR="red"]Same. But Normal is 0x6.[/COLOR]
release
end

#org @yes
setflag 0x200
[S]add[/S][B][COLOR="red"]give[/COLOR][/B]pokemon TREECKO 5 00 0 0 0
message @herego
callstd MSG_NORMAL
release
end

#org @no
message @dontwant
callstd MSG_NORMAL
release
end

#org @want 
= I have this TREECKO, but I don't want it. \nWould you like it?

#org @howsit
= How is my TREECKO doing?

#org @dontwant
= Oh, ok. I'll find another trainer.

#org @herego
= Here you go. Please take good care of my TREECKO!
 
Last edited:

Alignment

Revered with the stars
308
Posts
14
Years
  • Seen Dec 25, 2016
Okay, I'm brand new to this, so I'm sure it's a really simple fix, but I cannot see what's wrong for the life of me.
I'm just trying to do a simple yes/no script in which the player receives a Treecko if they push yes (copying a script almost directly from a tutorial by Full Metal). However, when I go to test it, "yes" ends up getting treated the same as "no", and I can't get the pokemon. Can anybody see what I did wrong?

Game: Ruby
Type: Person event
Editor: PKSV
Script:
Spoiler:

If you're using PKSV you don't need to say 0x1 and stuff, it provides confusion. Just say compare LASTRESULT YES and it should work. If 0x1 will not work, you need to check the last result.

Spoiler:


That's the fix, try it out should work
 

passarbye

Just passin' thru
21
Posts
11
Years
  • Seen Dec 8, 2017
Script problems

Hey guys, i'm having some issues with three different scripts.
some help with them would be greatly appreciated.

Game: Pokemon Fire Red BPRE
Editor: XSE
Script: trying to make a situation where you get to pick from 3 pokemon from people, rather than from items like oak's place.
i also want them to recognize if you've picked a pokemon from one of the other people.

Spoiler:



Screenshots in attachments!



i can talk to all three of them, and all three will give me their pokemon (had to restart to test for each one). they will even talk to me after i take their pokemon, but the other two that didn't give me their pokemon will either just beep when i talk to them (no dialogue box), or crash the game.
i've used the debug option in XSE before compiling, but no errors occur at debug.


i am a total noob when it comes to scripting, so if i'm using something wrong, then please tell me.

i'd like to know how to fix this so that one will give me a pokemon, but the other two won't after i take one.
 

DoubleDare96

Pybro
6
Posts
11
Years
Hey guys, i'm having some issues with three different scripts.
some help with them would be greatly appreciated.

Game: Pokemon Fire Red BPRE
Editor: XSE
Script: trying to make a situation where you get to pick from 3 pokemon from people, rather than from items like oak's place.
i also want them to recognize if you've picked a pokemon from one of the other people.

Spoiler:



Screenshots in attachments!



i can talk to all three of them, and all three will give me their pokemon (had to restart to test for each one). they will even talk to me after i take their pokemon, but the other two that didn't give me their pokemon will either just beep when i talk to them (no dialogue box), or crash the game.
i've used the debug option in XSE before compiling, but no errors occur at debug.


i am a total noob when it comes to scripting, so if i'm using something wrong, then please tell me.

i'd like to know how to fix this so that one will give me a pokemon, but the other two won't after i take one.

Try having all three of them use the same flag. The reason that it doesn't work is because you checkflag 0x1200 or whatever for each one and it goes straight to @done instead of checking @picked.
 
Last edited:
2
Posts
11
Years
  • Seen Sep 24, 2012
Var-Number?!

Need help with var number, with some var numbers the scripts seem to work but reset when i change maps and with some they dont work at all.
How do i find out which var number is correct and for what are they used?
Or is there a problem in the script?

Game: FireRed
Type: Trigger
Editor: XSE

Spoiler:
 

Bilaterus

ToBe Best Spriter ;)
31
Posts
12
Years
  • Seen Nov 6, 2012
Hey this is quite a long script with some movement and a battle, I would like to find out what is inevitably wrong with it but it won't let me compile! I keep getting an error message saying 'run time error 13 type mismatch'. I've looked over it and I'm finding it difficult to find a/the mistake I have made. I'm still working on it but if it's saying errors now there's no point carrying on. :O

Game:
Fire Red (The best one! Lol)
Type:
Level Script
Editor:
PokeScript
Script:
Spoiler:


Thanks in advance for the help!

EDIT: For all those with a similar problem I found out that I had too many movements in one offset (i.e
$seven 1 ; #binary 0x61 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0xFE
should be cut down to
$seven 1 ; #binary 0x61 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0xFE
$seven2 1 ; #binary 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0xFE
So yup :)
 
Last edited:

passarbye

Just passin' thru
21
Posts
11
Years
  • Seen Dec 8, 2017
Try having all three of them use the same flag. The reason that it doesn't work is because you checkflag 0x1200 or whatever for each one and it goes straight to @done instead of checking @picked.
if i use the same flag, then won't all three of them ask how each pokemon is doing?

say i take a pokemon from person A.
person A sets flag 0x1200

if i talk to person B, and they checkflag 0x1200, then they'll go straight to their @done and ask how their pokemon is doing (when i didn't take it), instead of telling me that i've already taken one from person A

so how would i go about writing that?

if i take a pokemon from person A, i want them to talk to me about how their pokemon is doing (which i can do).
but if i talk to person B after taking a pokemon from person A, i want person B to tell me that i can't have theirs.
 

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
@passarby: Use of 3 flags is a good idea.
But... do it this way:

Let all 3 OWs have different flags and check them like this:
checkflag 0xflag of the OW
if 0x1 goto "How's my PKMN doing?"
checkflag 0xflag of the different OW
if 0x1 goto "I cannot give you mine"
checkflag 0xflag of the last OW
if 0x1 goto "I cannot give you mine"

By using this script will go to the right #org because the flags will be set differently ;)
 
17
Posts
13
Years
  • Seen Oct 15, 2018
Hey this is quite a long script with some movement and a battle, I would like to find out what is inevitably wrong with it but it won't let me compile! I keep getting an error message saying 'run time error 13 type mismatch'. I've looked over it and I'm finding it difficult to find a/the mistake I have made. I'm still working on it but if it's saying errors now there's no point carrying on. :O

Game:
Fire Red (The best one! Lol)
Type:
Level Script
Editor:
PokeScript
Script:
Spoiler:


Thanks in advance for the help!

EDIT: For all those with a similar problem I found out that I had too many movements in one offset (i.e
$seven 1 ; #binary 0x61 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0xFE
should be cut down to
$seven 1 ; #binary 0x61 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0xFE
$seven2 1 ; #binary 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0xFE
So yup :)
For future reference PokeScript is really buggy and not really supported by many people anymore so be wary.
 
215
Posts
11
Years
  • Seen Jul 14, 2020
Running Shoes Help!!!

Hey I wrote a script for running shoes, but it doesn't work! Like everything is fine except the player does not recieve the running shoes, when they hold B they won't run! Can someone please tell me why this happens?

I use XSE 1.1.1 and am moding pokemon fire red
this is the script
Spoiler:
 
Status
Not open for further replies.
Back
Top