Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub
Reload this Page Script Help Thread (DO NOT REQUEST SCRIPTS)

Notices
For all updates, view the main page.

ROM Hacking Hub General discussions about ROM Hacking and Emulation. Not sure where to start? This is the place for you.
Posting links to ROMs is illegal and is not tolerated anywhere on the forum.
New threads in this forum are to be approved by a moderator before they are displayed.



Closed Thread
 
Thread Tools
  #9126    
Old December 4th, 2013 (06:36 PM). Edited December 4th, 2013 by Flugmerkur.
Flugmerkur's Avatar
Flugmerkur Flugmerkur is offline
 
Join Date: Nov 2013
Posts: 71
Dr.fuji, I got my script working exactly how I wanted it now. Thank you.

However I have a new question about scripting. setvar 0x1 sets the variable to happen just once. What would I type to make it happen over and over again until a certain flag was set? Would I simply not set a var? EDIT: i just figured out how to do what I needed. I think I'm getting the hang of basic scripting! Yay! I still would like to no if there is a special setvar that happens over and over again.
__________________
Listen to my music!
http://www.youtube.com/watch?v=0QIY8TrlP8Q&feature=c4-overview&list=UUbQ2CHJlOX2oHJkFedIVJag
  #9127    
Old December 5th, 2013 (12:01 AM).
ep!c ep!c is offline
Banned
 
Join Date: Mar 2013
Gender: Male
Posts: 124
Send a message via Skype™ to ep!c
Just use a temporary variable?
0x8000-0x800B should work without destroying the player-facing and lastresult..
  #9128    
Old December 5th, 2013 (01:30 PM).
KillerKrabs's Avatar
KillerKrabs KillerKrabs is offline
 
Join Date: Nov 2013
Location: Arizona
Age: 21
Gender: Male
Nature: Lonely
Posts: 9
Send a message via Skype™ to KillerKrabs
Quote originally posted by karatekid552:
JPAN's clean patch for FR is what you are looking for. It gets rid of all scripts and frees up the space.
Thank you, but is there one for the other games? Or does FR have the best game engine?
  #9129    
Old December 5th, 2013 (02:48 PM).
karatekid552's Avatar
karatekid552 karatekid552 is offline
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Posts: 1,767
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote originally posted by KillerKrabs:
Thank you, but is there one for the other games? Or does FR have the best game engine?
FR is the most hacked and is the only one with that patch. However, you could always make one for the other games.
__________________

Paired with Simba
  #9130    
Old December 6th, 2013 (12:09 AM).
Satoshi Ookami's Avatar
Satoshi Ookami Satoshi Ookami is offline
Memento Mori
Gold Tier
 
Join Date: Jul 2008
Location: Abyss of Time, Great Seal
Age: 22
Gender: Male
Nature: Calm
Posts: 12,950
Quote originally posted by karatekid552:
FR is the most hacked and is the only one with that patch. However, you could always make one for the other games.
I believe he wouldn't need a patch if he could do all those things by himself...
__________________
ROM hacking FAQ - Read before asking how to play a hack. | Previous Sign 2 | Previous Sign

Anime List | PSN Trophy List
  #9131    
Old December 6th, 2013 (12:15 AM).
zachatoo's Avatar
zachatoo zachatoo is offline
Zachatoo
 
Join Date: Jul 2013
Gender: Male
Posts: 7
Code:
In addition, you seem to be using an older version of XSE. Are you using version 1.1.1?
Thanks for the help! And for the link, I've only managed to find 1.0.0 before now!

Unfortunately, something happened to my rom that seems unfixable (with my skills) so I had to restart (I wasn't far) but my new script works!
__________________
N00B rom hacker...I need all the help I can get.
  #9132    
Old December 7th, 2013 (03:20 PM). Edited December 7th, 2013 by Superjub.
Superjub's Avatar
Superjub Superjub is offline
Pokémon Aureolin
Crystal Tier
 
Join Date: Sep 2007
Location: Hoenn
Age: 20
Gender: Male
Nature: Timid
Posts: 2,289
Edit: Nevermind, it turns out it was the version of XSE. It must have been corrupted somehow, since it was working fine before. '
__________________
  #9133    
Old December 7th, 2013 (04:31 PM).
Flugmerkur's Avatar
Flugmerkur Flugmerkur is offline
 
Join Date: Nov 2013
Posts: 71
How do you get a script to continue from outside to inside a building? Like Professor Oaks script when he says you cant travel without a pokemon and then brings you inside to pick a pokemon.
__________________
Listen to my music!
http://www.youtube.com/watch?v=0QIY8TrlP8Q&feature=c4-overview&list=UUbQ2CHJlOX2oHJkFedIVJag
  #9134    
Old December 7th, 2013 (04:54 PM).
Superjub's Avatar
Superjub Superjub is offline
Pokémon Aureolin
Crystal Tier
 
Join Date: Sep 2007
Location: Hoenn
Age: 20
Gender: Male
Nature: Timid
Posts: 2,289
Quote originally posted by Flugmerkur:
How do you get a script to continue from outside to inside a building? Like Professor Oaks script when he says you cant travel without a pokemon and then brings you inside to pick a pokemon.
You use a Level Script. You can find some more information on them here.
__________________
  #9135    
Old December 7th, 2013 (11:26 PM).
Flugmerkur's Avatar
Flugmerkur Flugmerkur is offline
 
Join Date: Nov 2013
Posts: 71
I thought this was a fairly simple script,but apparently not.
When you step on the script tile it is supposed to say you are about to sail to a certain point ect. Then if you choose yes it moves the player forward one step, while pressing no moves the player back one step.


Spoiler:
#dynamic 0x800000

#org @start
msgbox @talk 0x5
compare 0x800D 0x1
if 0x1 goto @yes
if 0x0 goto @no

#org @talk
= You are about to sail to Mt. Iroh.\pWould you like to continue?

#org @yes
applymovement 0xFF @walk1
waitmovement 0xFF
end

#org @no
applymovement 0xFF @walk2
waitmovement 0xFF
end

#org @walk1
#raw 0x11
#raw 0xFE

#org @walk2
#raw 0x10
#raw 0xFF
__________________
Listen to my music!
http://www.youtube.com/watch?v=0QIY8TrlP8Q&feature=c4-overview&list=UUbQ2CHJlOX2oHJkFedIVJag
  #9136    
Old December 8th, 2013 (06:07 AM).
karatekid552's Avatar
karatekid552 karatekid552 is offline
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Posts: 1,767
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote originally posted by Flugmerkur:
I thought this was a fairly simple script,but apparently not.
When you step on the script tile it is supposed to say you are about to sail to a certain point ect. Then if you choose yes it moves the player forward one step, while pressing no moves the player back one step.


Spoiler:
#dynamic 0x800000

#org @start
msgbox @talk 0x5
compare 0x800D 0x1
if 0x1 goto @yes
if 0x0 goto @no

#org @talk
= You are about to sail to Mt. Iroh.\pWould you like to continue?

#org @yes
applymovement 0xFF @walk1
waitmovement 0xFF
end

#org @no
applymovement 0xFF @walk2
waitmovement 0xFF
end

#org @walk1
#raw 0x11
#raw 0xFE

#org @walk2
#raw 0x10
#raw 0xFF
It looks good. Now, do you know how to use script tiles? If you don't, you should read "Flags, Vars, & Script Tiles".
__________________

Paired with Simba
  #9137    
Old December 8th, 2013 (09:47 AM). Edited December 8th, 2013 by Flugmerkur.
Flugmerkur's Avatar
Flugmerkur Flugmerkur is offline
 
Join Date: Nov 2013
Posts: 71
Quote originally posted by karatekid552:
It looks good. Now, do you know how to use script tiles? If you don't, you should read "Flags, Vars, & Script Tiles".
Yeah, I have used script tiles a lot before and they always worked. Edit: Got it working!

Another question. How do you write a warp script. I want the screen to fade black, warp to a specific map then fade back into gameplay.

Would it go something like this?

Spoiler:
#dynamic 0x800000

#org @start
fadescreen 1
warp (don't know how to write the cordinits in).
fadescreen 0
end
__________________
Listen to my music!
http://www.youtube.com/watch?v=0QIY8TrlP8Q&feature=c4-overview&list=UUbQ2CHJlOX2oHJkFedIVJag
  #9138    
Old December 8th, 2013 (01:32 PM).
karatekid552's Avatar
karatekid552 karatekid552 is offline
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Posts: 1,767
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote originally posted by Flugmerkur:
Yeah, I have used script tiles a lot before and they always worked. Edit: Got it working!

Another question. How do you write a warp script. I want the screen to fade black, warp to a specific map then fade back into gameplay.

Would it go something like this?

Spoiler:
#dynamic 0x800000

#org @start
fadescreen 1
warp (don't know how to write the cordinits in).
fadescreen 0
end
I have a feeling you should see this: http://www.pokecommunity.com/showthread.php?t=164276

Here is a tip I was told when I first started programming: It is not about how many things you know how to do. The only thing you really need to know is that it can be done and where to look for how to do it. Being able to find information is better than knowing information, because no one knows a language completely. Which is why I still reference the link I sent you when I script.
__________________

Paired with Simba
  #9139    
Old December 8th, 2013 (02:00 PM).
avaramoon avaramoon is offline
Mirage Of Tales
 
Join Date: Dec 2011
Location: Sogen Suburb, Avlar
Gender: Female
Nature: Brave
Posts: 499
Would anyone be able to help me with a 'use attack' script? Normally I would just find a template and do trial and error but I literally have no idea what XSE commands I would use. By a 'use attack' script I mean the script would check if a pokemon has a certain attack, then show an animation similar to the one that would show for HM moves? Im bad at explaining, so as an EXAMPLE, how could I make it so that a pokemon could use ember on say, a rock?
__________________
  #9140    
Old December 8th, 2013 (04:58 PM).
karatekid552's Avatar
karatekid552 karatekid552 is offline
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Posts: 1,767
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote originally posted by avaramoon:
Would anyone be able to help me with a 'use attack' script? Normally I would just find a template and do trial and error but I literally have no idea what XSE commands I would use. By a 'use attack' script I mean the script would check if a pokemon has a certain attack, then show an animation similar to the one that would show for HM moves? Im bad at explaining, so as an EXAMPLE, how could I make it so that a pokemon could use ember on say, a rock?
I have an example, but you have to go find it... On a rock... In the game.:p Just go look at one of the rock smash rocks in the Safari Zone.
__________________

Paired with Simba
  #9141    
Old December 11th, 2013 (07:10 PM).
ComedyQuest's Avatar
ComedyQuest ComedyQuest is offline
Noob Hacker
 
Join Date: Sep 2008
Location: Tempe, Arizona, Earth
Age: 22
Gender: Male
Nature: Naive
Posts: 70
I seem to be getting the "No #org/#seek directives were found. Cannot compile." message for this one.

Spoiler:
#dynamic 0x2E4E4C
setvar 0x7000 0x1
applymovement 0x02 @movedad
waitmovement 0x0
msgbox @1 0x6
applymovement 0x02 @movedad2
waitmovement 0x0
msgbox @2 0x6
applymovement 0x02 @movedad3
waitmovement 0x0
applymovement 0xFF @movedad3
waitmovement 0x0
hidesprite 0x02
setflag 0x1000
warp 0x3 0x0 0xFF 0x01 0x08
release
end

#org @movedad
#raw 0x62
#raw 0xFE

#org @1
= Oh! There you are \v\h01!

#org @movedad2
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x1
#raw 0xFE

#org @2
= Good morning! Well, like I\lpromised today, you've reached\lthat age where I can trust you\lwith your own Pokémon!\pFollow me to the workshop!

#org @movedad3
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x10
#raw 0xFE
  #9142    
Old December 11th, 2013 (07:30 PM).
Renegade's Avatar
Renegade Renegade is offline
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
Posts: 998
Quote originally posted by ComedyQuest:
I seem to be getting the "No #org/#seek directives were found. Cannot compile." message for this one.

Spoiler:
#dynamic 0x2E4E4C
setvar 0x7000 0x1
applymovement 0x02 @movedad
waitmovement 0x0
msgbox @1 0x6
applymovement 0x02 @movedad2
waitmovement 0x0
msgbox @2 0x6
applymovement 0x02 @movedad3
waitmovement 0x0
applymovement 0xFF @movedad3
waitmovement 0x0
hidesprite 0x02
setflag 0x1000
warp 0x3 0x0 0xFF 0x01 0x08
release
end

#org @movedad
#raw 0x62
#raw 0xFE

#org @1
= Oh! There you are \v\h01!

#org @movedad2
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x1
#raw 0xFE

#org @2
= Good morning! Well, like I\lpromised today, you've reached\lthat age where I can trust you\lwith your own Pokémon!\pFollow me to the workshop!

#org @movedad3
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x10
#raw 0xFE
Code:
#dynamic 0x2E4E4C

#org @start      // @start can say anything, it doesn't have to be limited to "start".
setvar 0x7000 0x1
applymovement 0x02 @movedad
waitmovement 0x0
msgbox @1 0x6
applymovement 0x02 @movedad2
waitmovement 0x0
msgbox @2 0x6
applymovement 0x02 @movedad3
waitmovement 0x0
applymovement 0xFF @movedad3
waitmovement 0x0
hidesprite 0x02
setflag 0x1000
warp 0x3 0x0 0xFF 0x01 0x08
release
end

#org @movedad
#raw 0x62
#raw 0xFE

#org @1
= Oh! There you are \v\h01!

#org @movedad2
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x1
#raw 0xFE

#org @2
= Good morning! Well, like I\lpromised today, you've reached\lthat age where I can trust you\lwith your own Pokémon!\pFollow me to the workshop!

#org @movedad3
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x10
#raw 0xFE
You just need to give XSE a pointer to start executing the script.
  #9143    
Old December 12th, 2013 (12:21 PM).
GoGoJJTech's Avatar
GoGoJJTech GoGoJJTech is offline
http://GoGoJJTech.com (WIP!)
Silver Tier
 
Join Date: Nov 2012
Location: Earth
Age: 16
Gender: Male
Nature: Quiet
Posts: 1,969
Quote originally posted by CrystalStatic:
#dynamic 0x2E4E4C
This is not free at all. it's already used by Gamefreak. Use 720000 and after for FR and Ruby, for Emerald use E70000 and on
__________________
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
The SoulSilver Music Patch - The Black Music Patch - Mega-Huge Sappy Tutorial
Romhack.me Profile - Pokecommunity Profile - Pokemonhackersonline Profile - Youtube Channel

Join us in the romhacking chat
Pokémon Platinum Red and Blue
  #9144    
Old December 12th, 2013 (02:21 PM).
ComedyQuest's Avatar
ComedyQuest ComedyQuest is offline
Noob Hacker
 
Join Date: Sep 2008
Location: Tempe, Arizona, Earth
Age: 22
Gender: Male
Nature: Naive
Posts: 70
Quote originally posted by gogojjtech:
This is not free at all. it's already used by Gamefreak. Use 720000 and after for FR and Ruby, for Emerald use E70000 and on
Either FSF lied to me or I just didn't copy it right, I suppose, haha. But thanks for the tip!

Quote originally posted by CrystalStatic:
Code:
#dynamic 0x2E4E4C

#org @start      // @start can say anything, it doesn't have to be limited to "start".
setvar 0x7000 0x1
applymovement 0x02 @movedad
waitmovement 0x0
msgbox @1 0x6
applymovement 0x02 @movedad2
waitmovement 0x0
msgbox @2 0x6
applymovement 0x02 @movedad3
waitmovement 0x0
applymovement 0xFF @movedad3
waitmovement 0x0
hidesprite 0x02
setflag 0x1000
warp 0x3 0x0 0xFF 0x01 0x08
release
end

#org @movedad
#raw 0x62
#raw 0xFE

#org @1
= Oh! There you are \v\h01!

#org @movedad2
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x1
#raw 0xFE

#org @2
= Good morning! Well, like I\lpromised today, you've reached\lthat age where I can trust you\lwith your own Pokémon!\pFollow me to the workshop!

#org @movedad3
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x10
#raw 0xFE
You just need to give XSE a pointer to start executing the script.
Ah, I knew I was missing something. Thanks!
  #9145    
Old December 13th, 2013 (03:42 PM).
TWSDerpsterp TWSDerpsterp is offline
 
Join Date: Dec 2013
Gender: Male
Posts: 6
Recently I asked a question about Legendary Scripting in FR, however that ROM Corrupted and I moved on to Ruby. Not only does the music differ to normal battles for legendaries in Ruby, but there is also an animation at the start of Legendary Battles. Anyone know what I have to do to make my legendary Pokemon battles be ACTUAL legendary battles not just normal ones.

Thank you

- Derp
  #9146    
Old December 13th, 2013 (05:23 PM).
FrostedDragonite's Avatar
FrostedDragonite FrostedDragonite is offline
Pokemon ShadowSilver Developer
 
Join Date: Nov 2013
Location: Staten Island, New York
Gender: Male
Posts: 5
Thanks, that helped alot!
  #9147    
Old December 14th, 2013 (06:52 AM).
~Pokedude~ ~Pokedude~ is offline
 
Join Date: Nov 2013
Gender: Male
Posts: 16
Hey guys I use XSE 1.0.0 but wildbattle wont work for me
It crashes here is my script:

#dynamic 0x800000
#org @main
msgbox @cry
callstd 0x2
wildbattle 151 50 0 0
end

#org @cry
= Meeeew!
  #9148    
Old December 14th, 2013 (07:37 AM).
karatekid552's Avatar
karatekid552 karatekid552 is offline
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Posts: 1,767
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote originally posted by ~Pokedude~:
Hey guys I use XSE 1.0.0 but wildbattle wont work for me
It crashes here is my script:

#dynamic 0x800000
#org @main
msgbox @cry
callstd 0x2
wildbattle 151 50 0 0
end

#org @cry
= Meeeew!
Get the newest version from Gamer2020's thread and try this:

Code:
#dynamic 0x800000
#org @main
lock
msgbox @cry 0x2
wildbattle 151 50 0 0
release
end

#org @cry
= Meeeew!
__________________

Paired with Simba
  #9149    
Old December 14th, 2013 (09:48 PM).
zachatoo's Avatar
zachatoo zachatoo is offline
Zachatoo
 
Join Date: Jul 2013
Gender: Male
Posts: 7
I seem to be in an odd predicament.
Spoiler:
'---------------
#dynamic 0x850000
#org @start
lock
faceplayer
msgbox @extras 0x5
if 0x1 goto @cheat
msgbox @no 0x2
release
end

#org @cheat
msgbox @follow 0x2
setvar 0x8004 0xF
setvar 0x8005 0xF
setvar 0x8006 0xF
setvar 0x8007 0xF
special 0x136
special 0x2
warp 0x4 0x6 0x0 0x0 0x3
release
end

#org @follow
= This way.

#org @extras
= Psst! Hey [PLAYER]! Over here!\pWould you like some\nextra POKéMON?

#org @no
= That's ok. I did have an ARCEUS\nbut I guess you don't want it.

I placed this person event (Advanced Map) in Oak's Lab, wanting it to ask if the player wanted to cheat in order to get through the game more quickly. It should then warp you to another map.

However, it always accepts @extras as true whether I select yes or no when I entered the Lab before Oak's script entering the grass. Same thing after I choose a starter pokemon. But after Oak's script and before I choose a starter, @extras is always accepted as false. Does it have something to do with Oak's script that interfere's with mine? I don't understand how that's possible due to dynamic scripts.
__________________
N00B rom hacker...I need all the help I can get.
  #9150    
Old December 15th, 2013 (07:06 AM).
karatekid552's Avatar
karatekid552 karatekid552 is offline
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Posts: 1,767
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote originally posted by zachatoo:
I seem to be in an odd predicament.
Spoiler:
'---------------
#dynamic 0x850000
#org @start
lock
faceplayer
msgbox @extras 0x5
if 0x1 goto @cheat
msgbox @no 0x2
release
end

#org @cheat
msgbox @follow 0x2
setvar 0x8004 0xF
setvar 0x8005 0xF
setvar 0x8006 0xF
setvar 0x8007 0xF
special 0x136
special 0x2
warp 0x4 0x6 0x0 0x0 0x3
release
end

#org @follow
= This way.

#org @extras
= Psst! Hey [PLAYER]! Over here!\pWould you like some\nextra POKéMON?

#org @no
= That's ok. I did have an ARCEUS\nbut I guess you don't want it.

I placed this person event (Advanced Map) in Oak's Lab, wanting it to ask if the player wanted to cheat in order to get through the game more quickly. It should then warp you to another map.

However, it always accepts @extras as true whether I select yes or no when I entered the Lab before Oak's script entering the grass. Same thing after I choose a starter pokemon. But after Oak's script and before I choose a starter, @extras is always accepted as false. Does it have something to do with Oak's script that interfere's with mine? I don't understand how that's possible due to dynamic scripts.
You forgot the most important line! "compare LASTRESULT 0x1"
__________________

Paired with Simba
Closed Thread
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are UTC -8. The time now is 05:09 AM.