• 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.

vietazn654

A sound soul dwells within me
371
Posts
14
Years
Hey guys.
I'm trying to make a givepokemon script for my hack.
Version: Firered
Editor:XSE
The problem I have is that each time I try to compile it with the Batch Compiler i get a message that says #org/#seek directives not found. I looked earlier on the thread, and I saw a similar error, but the only problem in that person's script was that they used @dynamic instead of #dynamic. I have looked through my script, and I have no idea what I did wrong.
Here is the script:
Spoiler:

If anyone can help than I would really appreciate it.
Thanks in advance!

um, try putting this:

Code:
#dynamic 0x800000

#org @start
[B]lock
faceplayer[/B]
checkflag 0x828
if 0x1 goto @done
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x6
release 
end

#org @take
givepokemon 0x41 0x5 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
release 
end

#org @done
msgbox @6 0x6
release
end

#org @name
call 0x1A74EB
return

#org @1 
= [player], I want to give you a gift\nfor your birthday.\pThis was my  prize pokemon\nwhen I was a trainer.\pWill you promise to take\ncare of  it?

#org @2 
= Well if you're sure...

#org @3
= You received Alakazam!

#org @4
= Would you like to give a\nnickname to Alakazam?

#org @5
= Take good care of Alakazam.

#org @6 
= I can see you're taking good care of Alakazam.
 
Last edited:

Zeffy

g'day
6,402
Posts
15
Years
  • Age 27
  • Seen Feb 7, 2024
Thank you both for your replies. Zeffy, if that is not what the problem is, than do you know why I keep getting the #org/#seek directives not found error?

Note: for those who have not read my original problem, it is two posts above this one.

Thanks in advance!

I'm sorry, I meant after. I edited my post. :>
For the solutions, look at ^'s and ^^'s post.
 

Bolens

Soul Hacker
359
Posts
14
Years
  • Age 30
  • PA
  • Seen Aug 22, 2016
Hi guys, I keep getting an error with this script. I insert it into the game fine, but then it locks up the game. Any suggestions?

Code:
#dyn 0x740000
#org @start
lockall
checkflag 0x250 
if true jump @done
applymovement PLAYER @5
applymovement 0x3 @3
applymovement 0x4 @4
msgbox @talk
callstd MSG_LOCK
setflag 0x250
copyvarifnotzero 0x8000 TOWNMAP
copyvarifnotzero 0x8001 1
callstd MSG_OBTAIN
:end
msgbox @talk2
callstd MSG_LOCK
applymovement 0x3 @31
pauseevent 0x0
applymovement 0x4 @41
pauseevent 0x0
disappear 0x3
disappear 0x4
releaseall
end

#org @done
releaseall
end

#org @5
m say_!! look_right look_left end

#org @3
m look_left end

#org @4
m look_right end

#org @talk
= So, your the new recruit for\nbecoming a Pokemon master. This\lwill be interesting! Well, enough\ltalk, down to business. We, Team\lSeplin want to rid this world of\lall those who in our opinions are\lnot worthy of Pokemon. As of now,\lyou are not old enough to join us,\lbut when you are, I strongly urge\lyou to join. You can achieve great\lthings with us, don't doubt that.\lWell, to help you on your journey,\lhave this.

#org @talk2
= That TOWNMAP should help you in\nyour quest to become a Pokemon\lmaster. We'll proabably see you\laround someplace in the future.\lFor now, have fun on your journey!

#org @31
m walk_down walk_left walk_left walk_left walk_left end

#org @41
m walk_down walk_left walk_left end
This is using PKSV if you didn't know. :classic:
 
860
Posts
17
Years
I made a script, not sure if it works because I haven't compiled it yet.
I first wanted to have it checked by people who are more advanced in scripting.
Spoiler:


If there's sopmething wrong with the script let me know pls, if not also let me know because then I know if I can compile it or not :D
 

Binary

え?
3,977
Posts
16
Years
  • Age 29
  • Seen Apr 7, 2014
It's not "message", it's "msgbox". And put "0x" infront of every numeral that's hex.
Spoiler:

Try compiling it.
 

Ven

Tyrian
124
Posts
14
Years
  • Seen Mar 19, 2011
Spoiler:

The script works fine, but it won't let the player go at the end.
I'm not sure what the problem is.
Oh, and it's a level script.
 

x Necromorph x

Super Saiyan 4
295
Posts
13
Years
Ok, lol I know ive been asking a lot of questions, but I made a level script off of this givepokemon script
Spoiler:

Its supposed to move the player to your mom and she gives you a pikachu, it is supposed to activate after this script
Spoiler:


In a tutorial for level scripting I was reading, it said I had to add setvar 0xvar 0x1 to the second script to make it activate the level script.

The reason I am posting is because that did not work.
How do I make an even happen after another on a diff map?
Also would my scripts work with the situation?
"You try to leave town.. a guy stops you and brings you to your house, when you walk in your mom tells you a pokemon was left for you, and she gives it to you. After that, shes back to her regular "you look tired, take a rest" thing""

Thanks!


Anybody wanna give me some help?
 

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
At the beggining of the game, you set a variable to 0x1.
You set the script tile to some script that makes the person go to the house, you unset the variable, the level script executes, you set it back to 0x1, and bam! There you go! ;)
 
1,774
Posts
15
Years
Wasn't sure whether I should post this here or in the Simple Questions thread, so I settled for here. Prepare for a long post...:
Over the past several months, I've made numerous attempts at learning to script. I used the search function, and found the necessary tutorials for XSE. Through reading the tutorials and trying out everything I read, I figured it wouldn't be too hard.
A problem arose, however, and to this day it holds me back. I've read the tutorials so many times by now that I know various scripts off by heart, such as basic message scripts, and Yes/No scripts. But they don't work.
I'll explain exactly what I do. I have the ROM open in A- Map, with XSE set as the scripter (when it asked how offsets were separated or whatever it asks when you choose it, I said "No"). I have the newest versions of both XSE and A- Map. Anyway, I use A-Map's Free Space finder, and search for 50 bytes, usually. I copy the offset (for the sake of an example, it'll be E3CF64 here), and go to the NPC/script in Events viewer, pasting the offset there. I click "Open Script" (or whatever that button is labelled). When XSE opens, it already has written:
Code:
---------------
#org 0xE3CF64
I erase all but the '0xE3CF64'. I then type a script. For here, I'll do a Yes/No script, because these give me the problem.
Code:
#dynamic 0xE3CF64
#org @start
lock
faceplayer
msgbox @technology
boxset 0x5
if 0x1 goto @yes
if 0x0 goto @no
release
end

#org @technology
= Do you know about technology?

#org @yes
= You do?\pIsn't it incredible?

#org @no
= You don't know?\pThat's... Pretty lame, sorry.
I hit 'Compile' and the window pops up with about 4 different offsets at the bottom. The one that's highlighted automatically is '@start', so I hit 'Copy', then I paste that back in A- Map where the original offset (that I'd found in A- Maps Free Space Finder) was.
I hit 'save' in A- Map, and open my ROM in VBA. I go to the NPC with that script, and talk to them. The first message, along with the Yes/No box appears, but when I select either Yes or No, the first message repeats, and the text box doesn't close. I have to talk to another NPC or enter a house to make it disappear.
I've tried this on a Ruby, FireRed and Emerald Rom, and got the same results for each. I would really appreciate it if anyone could tell me if they know what's going wrong. It could be something totally stupid, but it's got me stumped for ages, and is really halting progress on my hack. When I decompile the script, under "Strings" there is only the first message, and the script often has a 'showcoins' command for some reason- in fact, in FR when I tested it, after selecting Yes, '0 Coins' showed in the text box, but overlapping the previous message as opposed to erasing it.
When I am typing in the Raw Text for the messages, I usually leave a single blank line between them- is this wrong, and could this cause the problem? Again, I'm truly stuck here, and need all the help I can get.
Thanks for your time, if you felt compelled to read this whole 3000 characters +. Any help is greatly appreciated.
 

Logan

[img]http://pldh.net/media/pokecons_action/403.gif
10,417
Posts
15
Years
Wasn't sure whether I should post this here or in the Simple Questions thread, so I settled for here. Prepare for a long post...:
Over the past several months, I've made numerous attempts at learning to script. I used the search function, and found the necessary tutorials for XSE. Through reading the tutorials and trying out everything I read, I figured it wouldn't be too hard.
A problem arose, however, and to this day it holds me back. I've read the tutorials so many times by now that I know various scripts off by heart, such as basic message scripts, and Yes/No scripts. But they don't work.
I'll explain exactly what I do. I have the ROM open in A- Map, with XSE set as the scripter (when it asked how offsets were separated or whatever it asks when you choose it, I said "No"). I have the newest versions of both XSE and A- Map. Anyway, I use A-Map's Free Space finder, and search for 50 bytes, usually. I copy the offset (for the sake of an example, it'll be E3CF64 here), and go to the NPC/script in Events viewer, pasting the offset there. I click "Open Script" (or whatever that button is labelled). When XSE opens, it already has written:
Code:
---------------
#org 0xE3CF64
I erase all but the '0xE3CF64'. I then type a script. For here, I'll do a Yes/No script, because these give me the problem.
Code:
#dynamic 0xE3CF64
#org @start
lock
faceplayer
msgbox @technology
boxset 0x5
if 0x1 goto @yes
if 0x0 goto @no
release
end

#org @technology
= Do you know about technology?

#org @yes
= You do?\pIsn't it incredible?

#org @no
= You don't know?\pThat's... Pretty lame, sorry.
I hit 'Compile' and the window pops up with about 4 different offsets at the bottom. The one that's highlighted automatically is '@start', so I hit 'Copy', then I paste that back in A- Map where the original offset (that I'd found in A- Maps Free Space Finder) was.
I hit 'save' in A- Map, and open my ROM in VBA. I go to the NPC with that script, and talk to them. The first message, along with the Yes/No box appears, but when I select either Yes or No, the first message repeats, and the text box doesn't close. I have to talk to another NPC or enter a house to make it disappear.
I've tried this on a Ruby, FireRed and Emerald Rom, and got the same results for each. I would really appreciate it if anyone could tell me if they know what's going wrong. It could be something totally stupid, but it's got me stumped for ages, and is really halting progress on my hack. When I decompile the script, under "Strings" there is only the first message, and the script often has a 'showcoins' command for some reason- in fact, in FR when I tested it, after selecting Yes, '0 Coins' showed in the text box, but overlapping the previous message as opposed to erasing it.
When I am typing in the Raw Text for the messages, I usually leave a single blank line between them- is this wrong, and could this cause the problem? Again, I'm truly stuck here, and need all the help I can get.
Thanks for your time, if you felt compelled to read this whole 3000 characters +. Any help is greatly appreciated.

You're a tad behind on times, Eoin. Boxset hasn't been used in XSE for a while now. Messages are formatted like such now:

Code:
#org @start
msgbox @msg1 MSG_FACE/0x[w/e]
end
Also, with your yesno script, you're not comparing anything so the script won't work. You'd need to read from 0x800D/LASTRESULT:

Code:
msgbox @msg1 MSG_YESNO
compare 0x800D 0x1
if 0x1 goto @yes
compare 0x800D 0x0
if 0x1 goto @no
Also, @yes and @no are pointers to further parts in the script and won't work directly as messages. If you wanted a message you'd have to add this into the script:

Code:
#org @yes
msgbox @msg2 MSG_NORMAL
release
end

#org @no
msgbox @msg3 MSG_NORMAL
release
end

Hope this helps you grasp that concept more. If you want to go in-depth feel free to PM me. n_n
 

Ki77y666

I'm with stupid ^
118
Posts
15
Years
just a question how do i set where a person goes after they loose a battle. for an example (well this is actually my plan) you walk in a town got to the next route get some thing go back to the town then go the other route and then some one battles you. that all works but when and if you loose you go your home town which is before that town, before the route with the battle and your home town is where you are meant to go after you win the battle some my problem is i want when you loose the battle to end up in the pokecenter before the battle not the home town and with out having to go into the pokecenter as well
 

dr4g0n12

Δράκος
173
Posts
14
Years
This script will not work.
Code:
#dynamic 0x809160
 
#Org @saved
lock
faceplayer
msgbox @comtalk 0x6
applymovement 0x7 @defend
waitmovement 0x0
applymovement 0x5 @latimove1
applymovement 0x6 @latimove2
waitmovement 0x0
msgbox @chartalk 0x6
goto @battle
 
#Org @battle
trainerbattle 0x1 0x245 0x0 @before @after @later
end
 
#Org @later
msgbox @comtalk2 0x6
setflag 0x2C2
fadescreen 0x0
movesprite 0x4 0x00 0x00
movesprite 0x5 0x00 0x00
movesprite 0x6 0x00 0x00
msgbox @chartalk2 0x6
applymovement 0x7 @charflight 
waitmovement 0x0
release
end
 
#Org @comtalk
= RICHIE: The purpose of the tower is\nprobably to summon something.\pThe only problem is,\nthe dark orb did not work here.\pThe writing inside the hole that the dark orb\nwas found said to use the dark orb\lat a certain place at a high elevation.\pI thought it meant here, but.....
 
#Org @chartalk
= CHARIZARD: Sorry to rain on your parade,\nbut whatever you are doing needs\lto be stopped immediately.\p[player] and I will make sure it happens.
 
#Org @before
= RICHIE: Then so be it.\pI will take you down with all my might!\pCHARIZARD: He has two?\n[player], I will battle one of the LATIOS,\nand you can battle the other.\pRICHIE: LETS FIGHT!!!!!
 
#Org @after
= RICHIE: WAAAHHHH!!!!\pI want my mommy!!!!
 
#Org @comtalk2
= RICHIE: This isn't the end yet, [player]!
 
#Org @chartalk2
= CHARIZARD: It looks like we have a problem.\pWhat did he say before I landed?\p[player]: He said they were trying to summon\nsomething with the DARK ORB.\pCHARIZARD: Then we need to take the DARK ORB\nand get it to a safe place,\lrather than where it was first found.
 
#Org @defend
#raw 0x18
#raw 0x18
#raw 0x18
#raw 0x18
#raw 0x18
#raw 0x18
#raw 0x18
#raw 0x18
#raw 0x18
#raw 0x18
#raw 0x18
#raw 0x18
#raw 0x18
#raw 0x18
#raw 0x16
#raw 0x16
#raw 0xFE
 
#Org @latimove1
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0xFE
 
#Org @latimove2
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0xFE
 
#Org @charflight
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0xFE
The battle will not start.
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
just a question how do i set where a person goes after they loose a battle. for an example (well this is actually my plan) you walk in a town got to the next route get some thing go back to the town then go the other route and then some one battles you. that all works but when and if you loose you go your home town which is before that town, before the route with the battle and your home town is where you are meant to go after you win the battle some my problem is i want when you loose the battle to end up in the pokecenter before the battle not the home town and with out having to go into the pokecenter as well

Use the

sethealingplace

command. sethealingplace is set up in Pokemon Centers, so it will only activate once you've visited that town's Center, not the town itself. You can always put the command in the header for the town, though, I suppose.
 

tomotaku

KoganStyle
13
Posts
13
Years
  • Seen Mar 28, 2011
hey, can someone please tell me how to make a script of an event pokemon so that the pokemon cannot be caught and the only way it dissapears is to defeat it..?
 

x Necromorph x

Super Saiyan 4
295
Posts
13
Years
^I have not a clue^

Can some help me.. I made a level script and I want it to activate AFTER i talk to another event. How would I go about doing this?

Thanks
 

Samike360

Lover of May
397
Posts
15
Years
^I have not a clue^

Can some help me.. I made a level script and I want it to activate AFTER i talk to another event. How would I go about doing this?

Thanks

What you would want to do, is set a script before you enter the map, say, if your variable is 7000, you would put a script setvar 7000 0x1, which would stop the level script from happening. Somewhere else, you could add setvar 7000 0x0, which would make the level script happen next time you enter the map.
 
Status
Not open for further replies.
Back
Top