Script Help Thread (DO NOT REQUEST SCRIPTS) Page 288

Started by HackMew December 20th, 2008 5:10 AM
  • 625717 views
  • 9682 replies

tajaros

Hi I'm dawg

Age 24
Male
Philippines
Seen August 7th, 2015
Posted April 15th, 2013
855 posts
11.1 Years
ok I am still kind of confused. I don't really understand setvar and don't know how to use it. If I do use it to I have to take out check flag and setflag? And will this event only happen once right?
Ok so you already used a checkflag in your script right?, then you don't need to input a setvar in your script unless your going to do a Level Script... :)

Ok this is what you have to do... :)
In A-map click on the script box where your script is there's a textbox there that says variable if you haven't put anything on it it should have $0000, then change that number to maybe 3500, (I don't know if this variable is safe but try it out! xD) After that save and test it out, if nothing happens when you walk on the script box then change the 3500, then test it out again... :)

For level scripts uhhh, it's really hard to explain but now you have to include the setvar in your script, maybe read some scripting tutorials it would help you a lot... :)
Male
Connecticut
Seen March 3rd, 2014
Posted March 1st, 2014
39 posts
10.9 Years

Ok so you already used a checkflag in your script right?, then you don't need to input a setvar in your script unless your going to do a Level Script... :)

Ok this is what you have to do... :)
In A-map click on the script box where your script is there's a textbox there that says variable if you haven't put anything on it it should have $0000, then change that number to maybe 3500, (I don't know if this variable is safe but try it out! xD) After that save and test it out, if nothing happens when you walk on the script box then change the 3500, then test it out again... :)

For level scripts uhhh, it's really hard to explain but now you have to include the setvar in your script, maybe read some scripting tutorials it would help you a lot... :)
But i don't understand if I have both setflag and checkflag in my script already then where do I include my setvar?


Ok so you already used a checkflag in your script right?, then you don't need to input a setvar in your script unless your going to do a Level Script... :)

Ok this is what you have to do... :)
In A-map click on the script box where your script is there's a textbox there that says variable if you haven't put anything on it it should have $0000, then change that number to maybe 3500, (I don't know if this variable is safe but try it out! xD) After that save and test it out, if nothing happens when you walk on the script box then change the 3500, then test it out again... :)

For level scripts uhhh, it's really hard to explain but now you have to include the setvar in your script, maybe read some scripting tutorials it would help you a lot... :)
Can you actually fix up my script with using the setvar to make it a level script? So basically what i am asking is if you can use my script and include the setvar and fix my script up or something then tell me how to put it into my game as a level script?
#dynamic 0x1C6DE5
#org @start
checkflag 0x201
if 0x1 goto @done
applymovement 0x01 @move
waitmovement 0x0
msgbox @1 0x6 
trainerbattle 0x0 0x2B6 0x0 @intro @defeat
applymovement 0x1 @move2
msgbox @3 0x6
applymovement 0x2 @move4
waitmovement 0x0
msgbox @2 0x6
applymovement 0x1 @move5
waitmovement 0x0
msgbox @4 0x6
setflag 0x201
release
end
#org @done
release
end
#org @move
#raw 0x02
#raw 0x56
#raw 0x00
#raw 0x08
#raw 0x02
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x01
#raw 0xFE
#org @move2
#raw 0x56
#raw 0x00
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x01
#raw 0xFE
#org @move4
#raw 0x56
#raw 0x01
#raw 0x16
#raw 0x16
#raw 0x02
#raw 0x17 
#raw 0x17 
#raw 0x17 
#raw 0x01
#raw 0xFE
#org @move5
#raw 0x09 
#raw 0x09 
#raw 0x09 
#raw 0xFE
#org @1
= WHO ARE YOU AND WHAT ARE YOU DOING\nIN MY ROOM!?\pPORYGON GO!!
#org @2
= FELIX: Hold on a minute there\nbuddy!\pMove one step and I will have\nmy Baltoy personaly drag you down\lto the police station!\pNow everybody just calm down!\nWho are you?\land where did you come from?\pWAIT WHAT??\pOh my goodness we are soo sorry!\pPaige!!\pThis is our new neighbor who just\nmoved here!\p
#org @3
= FELIX DO SOMETHING!!!
#org @4
= PAIGE: I am very sorry! I didn't\nmean to make a scene.\pLet me introduce myself properly.\nMy name is PAIGE and this is my\lbrother FELIX.\pWe are both Pokemon Trianers\nourselves.\pYou see we already have our\nPokemon. We got them yesterday\lfrom the Professer.\pMy is obviously a Porygon as you\nsaw.\pAnd my brother has a Baltoy.\pWe have been training hard because\nwe are going to get all 8 Gym\lBadges and take on the Pokemon\lLeague!\pBefore you came we were actually\ngetting ready to set off on our\ljourney.\pWait! I know! How about we have a\nlittle competition!\pWhoever get's the first badge\nbefore the other wins!\pSo as you see there is no time to\nloose!\pCome on FELIX let's get there\nfirst!\pBye!\nI'll see you soon!
#org @intro
= I DON"T KNOW WHAT YOU ARE DOING\nHERE BUT IM CALLING THE COPS\lAFTER THIS BATTLE!!
#org @defeat
= HOW DID I LOOSE TO A CRIMINAL LIKE\nYOU?!?!?
Besides my other question which I still don't understand :P

I have one more small simple question. In my othe script (level script) once the script finishes and the guy disapears (like he is supposed to) when I go into a new town, route, etc. in game and come back the guy is standing back in his original spot. To make it simple. Once he disapears and I leave the town and come back he comes back into the map when he is supposed to be gone for ever. Here is my script.

#dynamic 0x800000
#org @start
setvar 0x4033 0x1
applymovement 0x3 @move
waitmovement 0x0
msgbox @1 0x6
applymovement 0x3 @move2
applymovement 0xFF @move2
waitmovement 0x0
msgbox @2 0x6
applymovement 0x3 @move3
applymovement 0xFF @move3
waitmovement 0x0
msgbox @3 0x6
applymovement 0x3 @move4
applymovement 0xFF @move4
waitmovement 0x0
msgbox @4 0x6
applymovement 0x3 @move5
waitmovement 0x0
msgbox @5 0x6
applymovement 0x3 @move6
waitmovement 0x0
hidesprite 0x03
release
end
#org @move
#raw 0x08
#raw 0x08
#raw 0xFE
#org @move2
#raw 0x01
#raw 0x03
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x01
#raw 0xFE
#org @move3
#raw 0x02
#raw 0x0A 
#raw 0x0A 
#raw 0x0A 
#raw 0x0A 
#raw 0x0A 
#raw 0x0A 
#raw 0x0A 
#raw 0x0A 
#raw 0x01
#raw 0x09 
#raw 0x09 
#raw 0x09 
#raw 0x09 
#raw 0x09 
#raw 0x02
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x01
#raw 0x09
#raw 0x09 
#raw 0x09 
#raw 0x01
#raw 0xFE
#org @move4
#raw 0x03
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x01
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x03
#raw 0x0B 
#raw 0x0B 
#raw 0x0B 
#raw 0x00
#raw 0x08 
#raw 0x08 
#raw 0x08 
#raw 0x08 
#raw 0x03
#raw 0x0B
#raw 0x0B
#raw 0x01
#raw 0xFE
#org @move5
#raw 0x56
#raw 0x02
#raw 0xFE
#org @move6
#raw 0x02
#raw 0x17
#raw 0x17
#raw 0x17
#raw 0x01
#raw 0x16
#raw 0x16
#raw 0x02
#raw 0x17
#raw 0x17
#raw 0x17
#raw 0x00
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x02
#raw 0x17 
#raw 0x17 
#raw 0x17 
#raw 0x17 
#raw 0x17 
#raw 0x17 
#raw 0x17 
#raw 0x17 
#raw 0xFE
#org @1
= [PLAYER]! It's me dad!\pBefore you say anything abut my\nhair! The hair dresser screwed up\land gave me this emo cut!\pAnyway, i'm back! It is so nice to\nsee you [PLAYER]!\pI don't have much time but let me\nshow you around a little bit!\pFollow me.
#org @2 
= This in front of us is the\nPokemart.\pIn here you can buy and sell\nthings.\pThere is one of theese in almost\nevery town, city, or villige.
#org @3 
= This is the Pokemon Center.\pHere you can heal up all of your\ntired or fainted Pokemon back to\lfull health.\pIn the upstairs part of the\nPokemon center you can trade and\lconnect with people world wide!
#org @4 
= Right in front of us is a Pokemon\nGym.\pGym's consit of trainers that you\nmust battle to challenge the Gym\lLeader.\pThe Gym leader is a very powerful\ntrainer.\pEach gym usses a different type.\pFor example a ggym might only use\nFighting types.\pOr a gym might use all electric\ntypes.\pWhen you beat a gym leader they\nwill usually give you a new TM.\lAnd shall always give you a badge\lto show you beat them.\pWhen you get all 8 badges you can\nenter the Pokemon League.\pThere you can battle the Elite 4\nand the champion.\pThey are the strongest trainers in\nall of the Arorian Region.\pIf you can beat the Elite 4 and\nthe champion without losing all\lyour Pokemon then your are truely\lthe Pokemon champion.
#org @5
= Will you look at the time! I got\nto hurry. I am not going back to\lmy gym yet but I have to go visit\lsomeone.\pBye [PLAYER]!\nI'll see you later!
Most of the script is jus movements.

Satoshi Ookami

Memento Mori

Age 30
Male
Abyss of Time, Great Seal
Seen August 5th, 2018
Posted July 3rd, 2018
14,253 posts
14.8 Years
But i don't understand if I have both setflag and checkflag in my script already then where do I include my setvar?
Whenever you want. Because we, scripters, are lazy (every programmer is) we just put it at the beginning so we don't need to care about it anymore.


I have one more small simple question. In my othe script (level script) once the script finishes and the guy disapears (like he is supposed to) when I go into a new town, route, etc. in game and come back the guy is standing back in his original spot. To make it simple. Once he disapears and I leave the town and come back he comes back into the map when he is supposed to be gone for ever. Here is my script.
Because you forgot to set the flag.
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List
Male
Connecticut
Seen March 3rd, 2014
Posted March 1st, 2014
39 posts
10.9 Years
Whenever you want. Because we, scripters, are lazy (every programmer is) we just put it at the beginning so we don't need to care about it anymore.



Because you forgot to set the flag.
So if I set the flag I wouldn't need a checkflag because it is a level script it will only happen once right? Oh and with the other script it works but it repeats the same parts like 2 in a row sometimes.

Satoshi Ookami

Memento Mori

Age 30
Male
Abyss of Time, Great Seal
Seen August 5th, 2018
Posted July 3rd, 2018
14,253 posts
14.8 Years
So if I set the flag I wouldn't need a checkflag because it is a level script it will only happen once right?
That's precisly right.
Checkflag is globally pretty useless command if you ask me...
It's useful only if you need another event to happen only after another.
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List
Male
Connecticut
Seen March 3rd, 2014
Posted March 1st, 2014
39 posts
10.9 Years
That's precisly right.
Checkflag is globally pretty useless command if you ask me...
It's useful only if you need another event to happen only after another.


Ok thanks! So if I am doing this right my script should look like this now
#dynamic 0x6D2A3C
#org @start
setvar 0x4033 0x1
setflag 0x201
applymovement 0x3 @move
waitmovement 0x0
msgbox @1 0x6
applymovement 0x3 @move2
applymovement 0xFF @move2
waitmovement 0x0
msgbox @2 0x6
applymovement 0x3 @move3
applymovement 0xFF @move3
waitmovement 0x0
msgbox @3 0x6
applymovement 0x3 @move4
applymovement 0xFF @move4
waitmovement 0x0
msgbox @4 0x6
applymovement 0x3 @move5
waitmovement 0x0
msgbox @5 0x6
applymovement 0x3 @move6
waitmovement 0x0
movesprite 0x03 0x25 0x12
release
end
#org @move
#raw 0x08
#raw 0x08
#raw 0xFE
#org @move2
#raw 0x01
#raw 0x03
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x01
#raw 0xFE
#org @move3
#raw 0x02
#raw 0x0A 
#raw 0x0A 
#raw 0x0A 
#raw 0x0A 
#raw 0x0A 
#raw 0x0A 
#raw 0x0A 
#raw 0x0A 
#raw 0x01
#raw 0x09 
#raw 0x09 
#raw 0x09 
#raw 0x09 
#raw 0x09 
#raw 0x02
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x01
#raw 0x09
#raw 0x09 
#raw 0x09 
#raw 0x01
#raw 0xFE
#org @move4
#raw 0x03
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x01
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x03
#raw 0x0B 
#raw 0x0B 
#raw 0x0B 
#raw 0x00
#raw 0x08 
#raw 0x08 
#raw 0x08 
#raw 0x08 
#raw 0x03
#raw 0x0B
#raw 0x0B
#raw 0x01
#raw 0xFE
#org @move5
#raw 0x56
#raw 0x02
#raw 0xFE
#org @move6
#raw 0x02
#raw 0x17
#raw 0x17
#raw 0x17
#raw 0x01
#raw 0x16
#raw 0x16
#raw 0x02
#raw 0x17
#raw 0x17
#raw 0x17
#raw 0x00
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x02
#raw 0x17 
#raw 0x17 
#raw 0x17 
#raw 0x17 
#raw 0x17 
#raw 0x17 
#raw 0x17 
#raw 0x17 
#raw 0xFE
#org @1
= [PLAYER]! It's me dad!\pBefore you say anything abut my\nhair! The hair dresser screwed up\land gave me this emo cut!\pAnyway, i'm back! It is so nice to\nsee you [PLAYER]!\pI don't have much time but let me\nshow you around a little bit!\pFollow me.
#org @2 
= This in front of us is the\nPokemart.\pIn here you can buy and sell\nthings.\pThere is one of theese in almost\nevery town, city, or villige.
#org @3 
= This is the Pokemon Center.\pHere you can heal up all of your\ntired or fainted Pokemon back to\lfull health.\pIn the upstairs part of the\nPokemon center you can trade and\lconnect with people world wide!
#org @4 
= Right in front of us is a Pokemon\nGym.\pGym's consit of trainers that you\nmust battle to challenge the Gym\lLeader.\pThe Gym leader is a very powerful\ntrainer.\pEach gym usses a different type.\pFor example a ggym might only use\nFighting types.\pOr a gym might use all electric\ntypes.\pWhen you beat a gym leader they\nwill usually give you a new TM.\lAnd shall always give you a badge\lto show you beat them.\pWhen you get all 8 badges you can\nenter the Pokemon League.\pThere you can battle the Elite 4\nand the champion.\pThey are the strongest trainers in\nall of the Arorian Region.\pIf you can beat the Elite 4 and\nthe champion without losing all\lyour Pokemon then your are truely\lthe Pokemon champion.
#org @5
= Will you look at the time! I got\nto hurry. I am not going back to\lmy gym yet but I have to go visit\lsomeone.\pBye [PLAYER]!\nI'll see you later!
About to test now.

Nope tha code I just posted didn't work. I left odale town then came back he was right back into his original spot :( :(
Male
MI
Seen June 29th, 2014
Posted August 9th, 2013
16 posts
11.7 Years
I was having trouble with scripting, so i got some help. This other person made a script that works perfectly for them. No problems occurred in the rom we were working on for him. But when i run the rom stuff goes wrong. The scrip that was made (which is only supposed to occur once) occurs twice for me. Multiple times I tried and I can do the script twice over, no more, no less. Also when I go to other maps (like from a town to a route) everything goes weird, it will show random sprites and building pieces that I did not put there, this has always happened, on any rom I change. I downloaded Amap 1.92 (i was having worse problems with 1.95) from this site.

Does anyone know how I can fix these problems? It is making it near impossible to make a rom hack.
For the first part, I think that you didn't set a var value. If you do, then your event will only happen once.

For the second part, I believe you have a map connections problem. In that case, I have no idea how do help you. Go look at the Advance Map Tutorial at this site.

Satoshi Ookami

Memento Mori

Age 30
Male
Abyss of Time, Great Seal
Seen August 5th, 2018
Posted July 3rd, 2018
14,253 posts
14.8 Years
Nope tha code I just posted didn't work. I left odale town then came back he was right back into his original spot :( :(
And does the OW have 201 as ID?
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List
Male
Connecticut
Seen March 3rd, 2014
Posted March 1st, 2014
39 posts
10.9 Years
And does the OW have 201 as ID?
Haha i can't belive I forgot that! Thank you sooo much. Now if only I can figure out why that other script is repeating some parts in the middle of the script.

Also does anyone know why I get this message while trying to compile my script?

Message I get:
No #org/#seek directives were found. Can't compile script.
Male
London
Seen December 25th, 2022
Posted August 15th, 2017
40 posts
11.4 Years
Haha i can't belive I forgot that! Thank you sooo much. Now if only I can figure out why that other script is repeating some parts in the middle of the script.

Also does anyone know why I get this message while trying to compile my script?

Message I get:
No #org/#seek directives were found. Can't compile script.
You might want to show us the script so we can take a look :P

miksy91

Dark Energy is back in action! ;)

Male
Finland
Seen September 21st, 2022
Posted September 21st, 2022
1,480 posts
14.6 Years
Hello all, I have a problem about Pokemon Emerald Hacking. I want to make a new person and make him talk. I made a person but I can't make him talk because I don't know which offset use(empty offset). How to find an empty offset for this? Can someone tell me or show me how?
Download a hex editor (any will do) and open the rom with it. Look for area where there is free space (marked as FF FF FF FF...) and use that as the offset of your script.
Pokémon Dark Energy
Some ROM hacking related stuff

thanethane98

Self Proclaimed Expert

Seen November 16th, 2013
Posted July 1st, 2013
82 posts
10.9 Years
Hello all, I have a problem about Pokemon Emerald Hacking. I want to make a new person and make him talk. I made a person but I can't make him talk because I don't know which offset use(empty offset). How to find an empty offset for this? Can someone tell me or show me how?
An alternative to the hex editor would be using HackMew's Free Space Finder tool, which can find an empty offset for you. Either way will work though.
Back and ROM hacking again!
Male
Seen December 4th, 2012
Posted December 4th, 2012
6 posts
10.9 Years
Game: Pokémon Ruby
Type: Person Movement
Editor: Pokéscript
Spoiler:
#org $script
lock
faceplayer
applymovement 1 $move
$move 1 ; #binary 0x05 0x17 0x04 0x2F 0x06 0x09 0x07 0xFE
pausemove 0x0000
release
end

I am having a problem where whenever i talk to the person, they move the direction they're supposed to, but only one space per 0x00, and when they walk left or right, the movement is very sped up and glitchy. I am rather new to scripting, but i cant tell what ive done wrong at all. I've shortened the script to this, but the result is the same.
Male
Connecticut
Seen March 3rd, 2014
Posted March 1st, 2014
39 posts
10.9 Years
Ok I have yet another problem. In my givepokemon script when he gives me the Pokemon and I say yes to give him a nickname the nickname screen wont show up and the box stays there till i continue and then since I still recieve the squirtle even if I dont give it a nickname it has absoulutely no name at all. also I put it to be level 15 but its level 21 instead. Here is my script:
#dynamic 0x39D4EE
#org @start
checkflag 0x202
if 0x1 goto @done
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x6
release
end
#org @take
givepokemon 0x7 0x15 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
setflag 0x202
release
end
#org @name
call 0x1A74EB
return
#org @done
msgbox @6 0x6
release
end

#org @1
= Hello there youngling. Would you\ndo me a kind favor?\pMy Squirtle hasn't been listening\nto me anymore.\pWill you be kind enough to take it\nfor me?
#org @2
= Oh, I see you can't take my\nSquirtle for me.
#org @3
= [black_fr]You received a Squirtle!
#org @4
= [black_fr]Would you like to give a\nnickname to Squirtle?
#org @5
= I trust in you that you will take\ncare of my Squirtle.
#org @6
= You are taking good care of\nSquirtle right?

Satoshi Ookami

Memento Mori

Age 30
Male
Abyss of Time, Great Seal
Seen August 5th, 2018
Posted July 3rd, 2018
14,253 posts
14.8 Years
Game: Pokémon Ruby
Type: Person Movement
Editor: Pokéscript
Spoiler:
#org $script
lock
faceplayer
applymovement 1 $move
$move 1 ; #binary 0x05 0x17 0x04 0x2F 0x06 0x09 0x07 0xFE
pausemove 0x0000
release
end

I am having a problem where whenever i talk to the person, they move the direction they're supposed to, but only one space per 0x00, and when they walk left or right, the movement is very sped up and glitchy. I am rather new to scripting, but i cant tell what ive done wrong at all. I've shortened the script to this, but the result is the same.
Because you are using Pokescript.
It's outdated, buggy etc... use XSE ;)

@EHero: Because 15 is 21 in hex.
To get the result you want you need to convert number of level to hex.
15 to hex is F. So instead of 0x15 you need to input 0xF.
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List
Male
Connecticut
Seen March 3rd, 2014
Posted March 1st, 2014
39 posts
10.9 Years
Because you are using Pokescript.
It's outdated, buggy etc... use XSE ;)

@EHero: Because 15 is 21 in hex.
To get the result you want you need to convert number of level to hex.
15 to hex is F. So instead of 0x15 you need to input 0xF.
Thanks but when he asks to give it a nickname and I hit yes nothing happensI just have to continue the talking like usualy and then he gives me the pokemon but it has no name. Even when I don't give it a a nickname it has no name!
Female
Seen October 3rd, 2012
Posted August 15th, 2012
8 posts
10.9 Years
Okay, so I'm working with the script that determines your starter and your rival's starter in Fire Red. What I've found is that all three of the Pokeballs on Oak's desk have different offsets despite having the exact same script. If you start messing around without giving them all the same offset it goes completely haywire. After I did that, I got this script:

'---------------
#org 0x169DAE
lock
faceplayer
setvar 0x4001 0x2
setvar 0x4002 0x4
setvar 0x4003 0x7
setvar 0x4004 0x6
compare 0x4055 0x3
if 0x4 goto 0x8169DE4
compare 0x4055 0x2
if 0x1 goto 0x8169BE1
msgbox 0x871A5DF MSG_KEEPOPEN '"Those are Poké Balls.Oh look! It's..."
release
end

'---------------
#org 0x169DE4
msgbox 0x818EA45 MSG_KEEPOPEN '"That's PROF. OAK's last POKéMON."
release
end

'---------------
#org 0x169BE1
applymovement 0x4 0x81A75EF
waitmovement 0x0
showpokepic 0x4002 0xA 0x3
textcolor 0x0
compare 0x4001 0x0
if 0x1 goto 0x8169C14
compare 0x4001 0x1
if 0x1 goto 0x8169C33
compare 0x4001 0x2
if 0x1 goto 0x8169C52
end

'---------------
#org 0x169C14
msgbox 0x818E272 MSG_YESNO '"I see! BULBASAUR is your choice.\n..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169C74
compare LASTRESULT 0x0
if 0x1 goto 0x8169C71
end

'---------------
#org 0x169C33
msgbox 0x818E207 MSG_YESNO '"Hm! SQUIRTLE is your choice.\nIt's..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169C74
compare LASTRESULT 0x0
if 0x1 goto 0x8169C71
end

'---------------
#org 0x169C52
msgbox 0x818E194 MSG_YESNO '"Ah! CHARMANDER is your choice.\nYo..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169C74
compare LASTRESULT 0x0
if 0x1 goto 0x8169C71
end

'---------------
#org 0x169C74
hidepokepic
hidesprite LASTTALKED
msgbox 0x818E2E5 MSG_KEEPOPEN '"This POKéMON is really quite\nener..."
call 0x81A6675
setflag 0x828
setflag 0x291
givepokemon 0x4002 0x5 0x0 0x0 0x0 0x0
copyvar 0x4031 0x4001
bufferpokemon 0x0 0x4002
preparemsg 0x818E30D '"[player] received the [buffer1]\nf..."
waitmsg
fanfare 0x13E
waitfanfare
msgbox 0x81A56A7 MSG_YESNO '"Do you want to give a nickname to\..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169CCC
compare LASTRESULT 0x0
if 0x1 goto 0x8169CDC
end

'---------------
#org 0x169C71
hidepokepic
release
end

'---------------
#org 0x1A6675
copyvar 0x8012 0x8013
return

'---------------
#org 0x169CCC
setvar 0x8004 0x0
call 0x81A74EB
goto 0x8169CDC

'---------------
#org 0x169CDC
closeonkeypress
compare 0x4001 0x1
if 0x1 goto 0x8169CFF
compare 0x4001 0x2
if 0x1 goto 0x8169D1F
compare 0x4001 0x0
if 0x1 goto 0x8169D0F
end

'---------------
#org 0x1A74EB
fadescreen 0x1
special 0x9E
waitstate
return

'---------------
#org 0x169CFF
applymovement 0x8 0x8169D62
waitmovement 0x0
goto 0x8169D2F

'---------------
#org 0x169D1F
applymovement 0x8 0x8169D72
waitmovement 0x0
goto 0x8169D2F

'---------------
#org 0x169D0F
applymovement 0x8 0x8169D6B
waitmovement 0x0
goto 0x8169D2F

'---------------
#org 0x169D2F
textcolor 0x0
msgbox 0x818DD34 MSG_KEEPOPEN '"[rival]: I'll take this one, then!"
hidesprite 0x4004
textcolor 0x3
bufferpokemon 0x0 0x4003
preparemsg 0x818DD52 '"[rival] received the [buffer1]\nfr..."
waitmsg
fanfare 0x13E
waitfanfare
setvar 0x4055 0x3
checkflag 0x83E
if 0x1 call 0x8169D5C
release
end

'---------------
#org 0x169D5C
setvar 0x4070 0x1
return


'---------
' Strings
'---------
#org 0x71A5DF
= Those are Poké Balls.

#org 0x18EA45
= That's PROF. OAK's last POKéMON.

#org 0x18E272
= I see! BULBASAUR is your choice.\nIt's very easy to raise.\pSo, [player], you want to go with\nthe GRASS POKéMON BULBASAUR?

#org 0x18E207
= Hm! SQUIRTLE is your choice.\nIt's one worth raising.\pSo, [player], you've decided on the\nWATER POKéMON SQUIRTLE?

#org 0x18E194
= Ah! CHARMANDER is your choice.\nYou should raise it patiently.\pSo, [player], you're claiming the\nFIRE POKéMON CHARMANDER?

#org 0x18E2E5
= This POKéMON is really quite\nenergetic!

#org 0x18E30D
= [player] received the [buffer1]\nfrom PROF. OAK!

#org 0x1A56A7
= Do you want to give a nickname to\nthis [buffer1]?

#org 0x18DD34
= [rival]: I'll take this one, then!

#org 0x18DD52
= [rival] received the [buffer1]\nfrom PROF. OAK!


'-----------
' Movements
'-----------
#org 0x1A75EF
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements

#org 0x169D62
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements

#org 0x169D72
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x2E 'Face Up (Delayed)
#raw 0xFE 'End of Movements

#org 0x169D6B
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x2E 'Face Up (Delayed)
#raw 0xFE 'End of Movements
The numbers in bold are the important ones.

0x0 = Bulbasaur
0x1 = Squirtle
0x2 = Charmander

By switching them around from their natural order as shown above, I was able to make it where the Rival always goes for the Poke Ball that contains the Pokemon that weak to yours. If you pick Charmander, your Rival will walk in front of Bulbasaur's Poke Ball.

However the problem is that the text still reads that he received Squirtle. And Squirtle's Poke Ball disappears. I keep looking at the code, I can't figure out how to change that because the text command says that Rival received [buffer1] or in A-Text I think it's labeled as \v[&H02]. That's a general command, how do I change it?

For that matter the command hidesprite appears in the Rival's code, but it doesn't seem to label which sprite it's going to hide. How do I change this?

Basically, how do I change the name of the Pokemon that the Rival receives and which Poke Ball sprite disappears from the table?
Male
Seen December 1st, 2017
Posted July 19th, 2015
49 posts
11.3 Years
Hello guys, I have a little question here:
I've looked into the Pokepic script (which you could find in diegoisawesome scripting tut) lately, and i wanna get the picture of the pokemon appear right on the right of the screen, above the text, which is just look like this:

What is the correct coordinate? please help me, thank you.
Hack I support:

-----------------------------------------------------------
Hey, you guys should check this out, it is an awesome club, I confirmed that :)
Male
Seen August 16th, 2012
Posted August 16th, 2012
1 posts
10.8 Years
GAME: Pokemon ruby
TYPE: Level Script (Inserting)
SCRIPT: Copied from the tutorial
I am trying to insert my script, and im following cooleys tutorial, but the part where you go into the "map script offset" and change #raw word 0xFFFF to 0x0 is where im stuck. in the MSO, #raw word 0x0 is already there, and when i try to use the script, it performs, and then i get jibberish and weird music plays then a battle starts. Is there a different process when inserting scripts into a Ruby rom? I am also using the living room in landon's house. Thanks!
Male
Connecticut
Seen March 3rd, 2014
Posted March 1st, 2014
39 posts
10.9 Years
EHero70


Ok with this script (Give Pokemon) Everyhting goes well till he aks me if I want to give my Pokemon a nickname. If I say yes the nickname screen doesn't show up and Im stuck with a Pokemon that has no name. If I say no to the nickname the script continues but once again my Pokemon still has absoulutely no name. Any help??

#dynamic 0x39D4EE
#org @start
checkflag 0x202
if 0x1 goto @done
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x6
release
end
#org @take
givepokemon 0xF 0x15 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
setflag 0x202
release
end
#org @name
call 0x1A74EB
return
#org @done
msgbox @6 0x6
release
end
#org @1
= Hello there youngling. Would you\ndo me a kind favor?\pMy Squirtle hasn't been listening\nto me anymore.\pWill you be kind enough to take it\nfor me?
#org @2
= Oh, I see you can't take my\nSquirtle for me.
#org @3
= [black_fr]You received a Squirtle!
#org @4
= [black_fr]Would you like to give a\nnickname to Squirtle?
#org @5
= I trust in you that you will take\ncare of my Squirtle.
#org @6
= You are taking good care of\nSquirtle right?
Male
Seen January 8th, 2017
Posted March 13th, 2014
154 posts
11 Years
Hey, can someone help me out?
I'm doing a script where your two rivals in the game meet up with you at the same time, and take turns battling you, and so far I've only got the script to work, up until the part where the second rival approaches the player, then right when she's in front of the player, before she can say anything, my game freezes. Anyone know why this is happenning?
#dynamic 0x800000
#org @start
checkflag 0x178
if 0x1 goto @done
clearflag 0x180
lock
msgbox @wait 0x6
applymovement 0xFF @stop
showsprite 0x1
applymovement 0x01 @chris
waitmovement 0x01
msgbox @alright 0x6
showsprite 0x02
msgbox @huh 0x6
showsprite 0x02
applymovement 0xFF @notice
applymovement 0x02 @ace
waitmovement 0x2
pause 0x20
msgbox @hey 0x6
msgbox @who 0x6
msgbox @intro 0x6
msgbox @sorry 0x6
msgbox @well 0x6
msgbox @no! 0x6
trainerbattle 0x1 0x75 0x0 @challenge1 @defeat1 @after1
release
end

#org @after1
msgbox @see 0x6
msgbox @ohyeah 0x6
fadescreen 0x1
special 0x00
fanfare 0x100
fadescreen 0x0
trainerbattle 0x1 0x76 0x0 @challenge2 @defeat2 @after2
release
end

#org @see
= CHRIS: Well, ACE, what'd ya' think\nabout that!?

#org @ohyeah
= ACE: I think I'm gonna show you\nwhat a REAL battle looks like!\lHere, [player], let me heal your POKEMON\lfirst!

#org @challenge2
= ACE: Alright, here I come!

#org @defeat2
= ACE: You sure have gotten strong!\nBut I have too, huh!

#org @after2
msgbox @that 0x6
msgbox @whatev 0x6
applymovement 0x01 @chrisleave
pause 0x120
hidesprite 0x01
msgbox @acesays 0x6
fanfare 0x101
additem 0xB8 0x1
msgbox @playerrec 0x6
setflag 0x178
setflag 0x180
msgbox @acebye 0x6
applymovement 0x02 @aceleave
pause 0x120
hidesprite 0x02
release
end

#org @that
= ACE: Until I can see you battle\nlike that, CHRIS, [player] won't have as\lmuch fun with you as he does with\lme!

#org @whatev
= CHRIS: Yeah, whatever...\nDon't worry, [player], we'll battle\lagain soon, and without any\linterruptions...\lSee ya'!

#org @chrisleave
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @acesays
= ACE: Well, I guess as long as you\nhad fun with one of us, that's all\lthat matters!\lI'll be leaving now too, I'll see\lyou soon, [player]!\lAnd before I go, take this!

#org @playerrec
= [player] recieved a SOOTHE BELL!

#org @acebye
= ACE: Put that on your POKEMON,\nit'll make the bond between you\land that POKEMON stronger than\lever!\lI've used it on mine to ensure I\lraised them with love and care,\lbut I think your POKEMON would\llike it too!\lUse it well!\lBye, [player]!

#org @aceleave
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x13
#raw 0xFE

#org @done
release
end

#org @wait
= CHRIS: Hey, [player], hold on a sec!

#org @stop
#raw 0x62
#raw 0x0
#raw 0xFE

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

#org @alright
= CHRIS: Alright, I've buckled down\nsince our last battle!\lMy team is trained using hard work\land motivation!\lThey can't be beaten now!\l

#org @huh
= CHRIS: Huh?\nThat girl looks like she knows\lyou...

#org @notice
#raw 0x03
#raw 0xFE

#org @ace
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11

#org @hey
= ACE: Hey, [player]!\nIt's been a while!\lHow's your journey going?

#org @who
= CHRIS: Uh...\nWho's this, [player]?

#org @intro
= ACE: Hi there!\nMy name's ACE!\l[player] and I met on ROUTE 1 and\lbattled!\lI was actually thinking we could\lcatch up with a battle!\lHow about it, [player]?

#org @sorry
= CHRIS: Woah, woah, woah!\nSorry, ACE, but [player] was about to\lbattle me before you came!

#org @well
= ACE: Well, maybe [player] wants to\nbattle me instead!\lI'm sure he has more fun battling\lme anyways!

#org @no!
= CHRIS: No way that's true!\nI've heard enough of this!

#org @challenge1
= CHRIS: [player], let's show her how we\nbattle!

#org @defeat1
= CHRIS: Heh, even though I trained\nso hard, part of me was expecting\lthis.
Male
Seen June 25th, 2022
Posted August 17th, 2012
5 posts
10.8 Years
This warp leads to a black screen freeze. The bank, map, x and y are all correct so I'm not sure what the problem is.

#org 0x8747044
'-----------------------------------
lock
faceplayer
msgbox 0x874708E ' Hm? You need to get ...
callstd MSG_YESNO ' Yes/No message
compare LASTRESULT YES
if == jump 0x87470D6 ' Equal To
msgbox 0x87470AB ' Okay, let me know if...
callstd MSG_LOCK ' Built-in lock command
release
end

#org 0x87470D6
'-----------------------------------
msgbox 0x8747071 ' Alrighty then! Climb...
callstd MSG_NOCLOSE ' Non-closing message
warp 0x3 0x66 0xFF 0x01 0x0A
release
end


#org 0x874708E
= Hm? You need to get onboard?

#org 0x87470AB
= Okay, let me know if you\nchange your mind.

#org 0x8747071
= Alrighty then! Climb aboard!

DrFuji

Heiki Hecchara‌‌

Age 30
Male
Aussie
Seen 4 Days Ago
Posted February 12th, 2021
1,693 posts
13.7 Years
EHero70


Ok with this script (Give Pokemon) Everyhting goes well till he aks me if I want to give my Pokemon a nickname. If I say yes the nickname screen doesn't show up and Im stuck with a Pokemon that has no name. If I say no to the nickname the script continues but once again my Pokemon still has absoulutely no name. Any help??

#dynamic 0x39D4EE
#org @start
checkflag 0x202
if 0x1 goto @done
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x6
release
end

#org @take
givepokemon 0xF 0x15 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
setflag 0x202
release
end
#org @name
call 0x1A74EB
return
#org @done
msgbox @6 0x6
release
end

#org @1
= Hello there youngling. Would you\ndo me a kind favor?\pMy Squirtle hasn't been listening\nto me anymore.\pWill you be kind enough to take it\nfor me?
#org @2
= Oh, I see you can't take my\nSquirtle for me.
#org @3
= [black_fr]You received a Squirtle!
#org @4
= [black_fr]Would you like to give a\nnickname to Squirtle?
#org @5
= I trust in you that you will take\ncare of my Squirtle.
#org @6
= You are taking good care of\nSquirtle right?
I'm assuming this is on FR, but if it isn't then feel free to disregard this post :P

Try replacing your @name pointer with this one:

#org @name
special2 0x8004 0x83
subvar 0x8004 0x1
fadescreen 0x1
special 0x9E
waitstate
return
The only thing is that it will only work if you have 5 Pokemon or less in your party (ie Squirtle should not be transferred to the PC). Unless this is the player's starting Pokemon I'd suggest adding in a check earlier on in the script to see if the player has a full party and if they do they won't be able to get Squirtle until they deposit a Pokemon into the PC.

Hey, can someone help me out?
I'm doing a script where your two rivals in the game meet up with you at the same time, and take turns battling you, and so far I've only got the script to work, up until the part where the second rival approaches the player, then right when she's in front of the player, before she can say anything, my game freezes. Anyone know why this is happenning?
#dynamic 0x800000
#org @start
checkflag 0x178
if 0x1 goto @done
clearflag 0x180
lock
msgbox @wait 0x6
applymovement 0xFF @stop
showsprite 0x1
applymovement 0x01 @chris
waitmovement 0x01
msgbox @alright 0x6
showsprite 0x02
msgbox @huh 0x6
showsprite 0x02
applymovement 0xFF @notice
applymovement 0x02 @ace
waitmovement 0x2
pause 0x20
msgbox @hey 0x6
msgbox @who 0x6
msgbox @intro 0x6
msgbox @sorry 0x6
msgbox @well 0x6
msgbox @no! 0x6
trainerbattle 0x1 0x75 0x0 @challenge1 @defeat1 @after1
release
end

#org @after1
msgbox @see 0x6
msgbox @ohyeah 0x6
fadescreen 0x1
special 0x00
fanfare 0x100
fadescreen 0x0
trainerbattle 0x1 0x76 0x0 @challenge2 @defeat2 @after2
release
end

#org @see
= CHRIS: Well, ACE, what'd ya' think\nabout that!?

#org @ohyeah
= ACE: I think I'm gonna show you\nwhat a REAL battle looks like!\lHere, [player], let me heal your POKEMON\lfirst!

#org @challenge2
= ACE: Alright, here I come!

#org @defeat2
= ACE: You sure have gotten strong!\nBut I have too, huh!

#org @after2
msgbox @that 0x6
msgbox @whatev 0x6
applymovement 0x01 @chrisleave
pause 0x120
hidesprite 0x01
msgbox @acesays 0x6
fanfare 0x101
additem 0xB8 0x1
msgbox @playerrec 0x6
setflag 0x178
setflag 0x180
msgbox @acebye 0x6
applymovement 0x02 @aceleave
pause 0x120
hidesprite 0x02
release
end

#org @that
= ACE: Until I can see you battle\nlike that, CHRIS, [player] won't have as\lmuch fun with you as he does with\lme!

#org @whatev
= CHRIS: Yeah, whatever...\nDon't worry, [player], we'll battle\lagain soon, and without any\linterruptions...\lSee ya'!

#org @chrisleave
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @acesays
= ACE: Well, I guess as long as you\nhad fun with one of us, that's all\lthat matters!\lI'll be leaving now too, I'll see\lyou soon, [player]!\lAnd before I go, take this!

#org @playerrec
= [player] recieved a SOOTHE BELL!

#org @acebye
= ACE: Put that on your POKEMON,\nit'll make the bond between you\land that POKEMON stronger than\lever!\lI've used it on mine to ensure I\lraised them with love and care,\lbut I think your POKEMON would\llike it too!\lUse it well!\lBye, [player]!

#org @aceleave
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x13
#raw 0xFE

#org @done
release
end

#org @wait
= CHRIS: Hey, [player], hold on a sec!

#org @stop
#raw 0x62
#raw 0x0
#raw 0xFE

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

#org @alright
= CHRIS: Alright, I've buckled down\nsince our last battle!\lMy team is trained using hard work\land motivation!\lThey can't be beaten now!\l

#org @huh
= CHRIS: Huh?\nThat girl looks like she knows\lyou...

#org @notice
#raw 0x03
#raw 0xFE

#org @ace
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11

#org @hey
= ACE: Hey, [player]!\nIt's been a while!\lHow's your journey going?

#org @who
= CHRIS: Uh...\nWho's this, [player]?

#org @intro
= ACE: Hi there!\nMy name's ACE!\l[player] and I met on ROUTE 1 and\lbattled!\lI was actually thinking we could\lcatch up with a battle!\lHow about it, [player]?

#org @sorry
= CHRIS: Woah, woah, woah!\nSorry, ACE, but [player] was about to\lbattle me before you came!

#org @well
= ACE: Well, maybe [player] wants to\nbattle me instead!\lI'm sure he has more fun battling\lme anyways!

#org @no!
= CHRIS: No way that's true!\nI've heard enough of this!

#org @challenge1
= CHRIS: [player], let's show her how we\nbattle!

#org @defeat1
= CHRIS: Heh, even though I trained\nso hard, part of me was expecting\lthis.
You forgot to add 0xFE at the end of your @ace movements
Seen April 4th, 2014
Posted August 22nd, 2012
41 posts
15.9 Years
Hey everyone. I understand the title says do not request scripts, but I have been annoyed by this script for the whole day now. It just doesnt work.

I need a script where a guy will not move out of the way until I have AT LEAST one pokemon with me.

for example, this is what I tried doing (i know there is a chunk of code missing probably but I've tried everything written so much deleted so much, etc)

#org 0x8740214
'-----------------------------------
lock
countpokemon
compare LASTRESULT 0x6
if == jump 0x8740250 ' Equal To
release
end

#org 0x8740250
'-----------------------------------
applymovement 0x3 0x8740284 ' walk_left walk_down ...
return


#org 0x8740284
M walk_left walk_down end