Script Help Thread (DO NOT REQUEST SCRIPTS) Page 273

Started by HackMew December 20th, 2008 5:10 AM
  • 625760 views
  • 9682 replies
Age 42
Male
Denmark
Seen December 22nd, 2022
Posted May 28th, 2012
29 posts
11.1 Years
I'm attempting to use a rudimentary warping script, but when it gets to the warp, it makes the door sound and then leads to the game crashing and going black. What am I doing wrong?

#dynamic 0x0100003E
#org @start
lock
faceplayer
msgbox @1 0x6
msgbox @2 0x5
compare 0x800D 0x1
if 0x1 goto @yes
release
end

#org @1
= You open the drawer...\p...\pAnd find a ladder!

#org @2
= Would you like to\nuse it?

#org @yes
msgbox @okay 0x6
fadescreen 0x1 < I've tried it without these
warp 0x0 0x65 0x0 0x0 0x0 < I've tried it with the params "0x0 0x65 0xFF 0x2 0x2" as well, to no avail.
fadescreen 0x0 < Again, tried it without these
release
end

#org @okay
= You step down the ladder...
Could you have switched bank & map ?

When looking in the XSE command help, you'll see that:
Warp 0x"bank" 0x"map" 0x"exit" 0x"x" 0x"y"

My guess is, that you need to do either:
0x65 0x0 0x0 0x0 0x0
or
0x65 0x0 0xFF 0x0 0x0
since you seem to have tried anything else.

I'm getting the "Too Less Parameters on Line 8. The correct number is 4." - It's been a while since I've done scripting so I wasn't surprised that it was kind of messed up, can anyone help here?

Script:
Spoiler:
#dynamic 0x800000

#org @start
lockall
applymovement 0x03 @move
waitmovement 0x0
msgbox @msg1 0x6
trainerbattle 0x3 0x5 0x0
@defeat msgbox @msg2 0x6
applymovement 0x03 @move2
waitmovement 0x0
setflag 0x1200
setvar 0x5050 0x1
hidesprite 0x3
releaseall
end

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

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

#org @msg1 = = Hi! I'm May, I recently moved here\nfrom Hoenn to explore the Kanto\lregion and discover new Pokémon.\lWhat's your name?\lNice to meet you [playert]! I have an\lidea, since Professor Oak has\lentrusted me with a Pokemon how\labout we have a quick battle?
#org @msg2 = = I think me and Eevee need to train\nsome more, next time we meet I\lwill be much tougher! See ya\laround [player]
#org @defeat = = Woah! That was really fun..
When reading the Trainerbattle XSE command help you should see:
Trainerbattle 0x"type" 0x"battle#toStart" 0x"reserved" 0x"challengeTextPointer" 0x"defeatTextPointer"

So what you need to do is:
trainerbattle 0x3 0x5 0x0 @msg1 @defeat
msgbox @msg2 0x6
Zilvereyes - Newbie
Hacking: Pokémon Fire Red

[Guides]:
Adding 0x0 - 0x57 Name Header to FireRed - Incomplete (Still working on it though [10-05-2012])
Seen May 13th, 2015
Posted March 4th, 2014
8 posts
15.5 Years
To my opinion, try to add a lock & release before the warp... Not sure, still new to it.

Question: How can I change the item(s) stored in my computer? I've searched for hours, I am starting to abandon the idea...
You're good at this! It worked :D
Thanks alot Mallowigi.
joined in 2007 just to download shiny gold!
developing my own hack right now just for the fun of it! :P
a total newbie at scripting...
Female
Pacific Northwest (USA)
Seen August 19th, 2012
Posted August 19th, 2012
24 posts
12.4 Years
Woo! I got my basic mindreading script to work! :D It checks if you've got Abra, then allows you to reach the 2nd message.

My question is, how can I ask it to check for Abra (0x3F), Kadabra (0x40) OR Alakazam (0x41)?

I appreciate the help, thank you very much!

'---------------
#org 0x800400
lock
faceplayer
msgbox 0x8800445 MSG_NORMAL '"Hi! This is my normal talking\nscr..."
setvar 0x8004 0x3F
special2 LASTRESULT 0x17C
compare LASTRESULT 0x1
if 0x1 goto 0x8800422
release
end

'---------------
#org 0x800422
msgbox 0x880046D MSG_YESNO '"Mind read?"
compare LASTRESULT 0x1
if 0x1 goto 0x8800438
release
end

'---------------
#org 0x800438
textcolor 0x2
msgbox 0x880047A MSG_NORMAL '"What?! You can read my mind?!"
release
end


'---------
' Strings
'---------
#org 0x800445
= Hi! This is my normal talking\nscript.

#org 0x80046D
= Mind read?

#org 0x80047A
= What?! You can read my mind?!
Currently working on a TEXT Walkthrough for WesleyFG's Pokemon Light Platinum!
http://quintessencea.weebly.com/

"My Microsoft is broken!" When you fix computers and hear the sweet old lady say this one to you, be afraid.

Mana

Age 31
Male
UK
Seen March 25th, 2023
Posted August 18th, 2021
10,075 posts
14.3 Years
Woo! I got my basic mindreading script to work! :D It checks if you've got Abra, then allows you to reach the 2nd message.

My question is, how can I ask it to check for Abra (0x3F), Kadabra (0x40) OR Alakazam (0x41)?

I appreciate the help, thank you very much!
Quite simply you add:

...
setvar 0x8004 0x40
special2 LASTRESULT 0x17C
compare LASTRESULT 0x1
if 0x1 goto 0x8800422
setvar 0x8004 0x41
special2 LASTRESULT 0x17C
compare LASTRESULT 0x1
if 0x1 goto 0x8800422
...

Beneath your check for Abra (Or put Alakazam at the top so it checks for that, then Kadabra, then Abra.
Female
Pacific Northwest (USA)
Seen August 19th, 2012
Posted August 19th, 2012
24 posts
12.4 Years
@SwiftSign-
Thank you so much! Popped that in and it worked like a charm :) I didn't realize you could use the same setvar more than once, I thought it would be WAY more complicated! Thanks again!
Currently working on a TEXT Walkthrough for WesleyFG's Pokemon Light Platinum!
http://quintessencea.weebly.com/

"My Microsoft is broken!" When you fix computers and hear the sweet old lady say this one to you, be afraid.

blue

gucci

Male
United Kingdom
Seen September 26th, 2021
Posted August 7th, 2019
21,056 posts
15.4 Years
Thanks for the advice but I'm still getting the same "Too many parameters on Line 8. The correct number is 4"

Spoiler:
#dynamic 0x800000

#org @start
lockall
applymovement 0x013 @move
waitmovement 0x0
msgbox @msg1 0x6
trainerbattle 0x3 0x5 0x0 @msg1 @defeat
msgbox @msg2 0x6
applymovement 0x013 @move2
waitmovement 0x0
setflag 0x1258
setvar 0x5064 0x1
hidesprite 0x13
releaseall
end

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

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

#org @msg1 = Hi! I'm May, I recently moved here\nfrom Hoenn to explore the Kanto\lregion and discover new Pokémon.\lWhat's your name?\lNice to meet you [playert]! I have an\lidea, since Professor Oak has\lentrusted me with a Pokemon how\labout we have a quick battle?
#org @msg2 = I think me and Eevee need to train\nsome more, next time we meet I\lwill be much tougher! See ya\laround [player]
#org @defeat = Woah! That was really fun..


Can someone correct this script so it will function as a trainer battle movement script please, it would be much appreciated.

DrFuji

Heiki Hecchara‌‌

Age 30
Male
Aussie
Seen 4 Days Ago
Posted February 12th, 2021
1,693 posts
13.7 Years
Thanks for the advice but I'm still getting the same "Too many parameters on Line 8. The correct number is 4"

Spoiler:
#dynamic 0x800000

#org @start
lockall
applymovement 0x013 @move
waitmovement 0x0
msgbox @msg1 0x6
trainerbattle 0x3 0x5 0x0 @msg1 @defeat
msgbox @msg2 0x6
applymovement 0x013 @move2
waitmovement 0x0
setflag 0x1258
setvar 0x5064 0x1
hidesprite 0x13
releaseall
end

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

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

#org @msg1 = Hi! I'm May, I recently moved here\nfrom Hoenn to explore the Kanto\lregion and discover new Pokémon.\lWhat's your name?\lNice to meet you [playert]! I have an\lidea, since Professor Oak has\lentrusted me with a Pokemon how\labout we have a quick battle?
#org @msg2 = I think me and Eevee need to train\nsome more, next time we meet I\lwill be much tougher! See ya\laround [player]
#org @defeat = Woah! That was really fun..


Can someone correct this script so it will function as a trainer battle movement script please, it would be much appreciated.
You're getting the parameter error because of your trainerbattle type: 0x3 only supports one textbox rather than two so it displays the text that the person says after the battle and neglects the introduction completely. Remove the '@msg1' pointer in the trainerbattle command (since you're saying it beforehand) and it should work perfectly. There is some more information in this thread if you want it.
Male
Seen August 21st, 2013
Posted June 26th, 2013
90 posts
11 Years
None of the scripts I made are working. Idk what's wrong.
Firered hack. It's supposed to be a sign post.

Spoiler:
#dynamic 0x720178
#org @start
lock
faceplayer
msgbox @1 0x3
release
end

#org @1
= Blackthorn City Gym.

I then compile it and copy the start one which is "7201D8" and paste it where it needs to go. But the script doesn't work
Bulgaria
Seen July 27th, 2014
Posted June 12th, 2012
48 posts
15.7 Years
I have a person unit which you can talk to and you get your pokemon but when you talk to him in game:

1st: It displays [player]: Has obtained ????????
2nd: You can spam it and everytime it gives you a greatball instead of saying "The bag is empty."

Code:

'---------------
#org 0x740000
lock
checkflag 0x828
if 0x0 goto 0x87405AA
if 0x1 goto 0x87405E8
end

'---------------
#org 0x7405AA
msgbox 0x87405F3 0x0 '"My pokemon!\n[player] received EEV..."
givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
giveitem 0x4 0x5 0x0
fadescreen 0x1
fadescreen 0x0
setflag 0x828
release
end

'---------------
#org 0x7405E8
msgbox 0x874062D 0x0 '"The bag is empty."
release
end


'---------
' Strings
'---------
#org 0x7405F3
= My pokemon!\n[player] received EEVEE.\p[player] received 5 Pokeballs.

#org 0x74062D
= The bag is empty.
Male
England
Seen September 17th, 2019
Posted September 24th, 2012
111 posts
12 Years
Yeah, I need help again ;) I finally have XSE 1.1 so there should be no movement problems.

Anyway, rather than just locking to the spot like it has happened before... nothing happens. I triple checked all the flags and they're not set, so I have no idea why the script doesn't work. And yes, I have the Var Numbers set to how they should be in A-Map.

Here's the script, sorry it's hard to work out, I didn't want to rewrite it so I decompiled it.
Spoiler:
'---------------
#org 0x800000
lock
checkflag 0x851
if 0x1 goto 0x8800051
applymovement 0x2 0x8800054
waitmovement 0x2
msgbox 0x880005D MSG_NORMAL '"Dad:[blue_fr] Hey kiddo!\nWait up!"
applymovement 0x2 0x8800057
waitmovement 0x2
applymovement MOVE_PLAYER 0x880005B
waitmovement 0xFF
msgbox 0x880007B MSG_NORMAL '"[blue_fr]Congratulations on your g..."
setflag 0x82F
fanfare 0x105
msgbox 0x880012D MSG_NORMAL '"[player] obtained the[green_fr] Le..."
msgbox 0x8800156 MSG_NORMAL '"Dad:[blue_fr] I believe they're[gr..."
setflag 0x851
release
end

'---------------
#org 0x800051
release
end


'---------
' Strings
'---------
#org 0x80005D
= Dad:[blue_fr] Hey kiddo!\nWait up!

#org 0x80007B
= [blue_fr]Congratulations on your graduation.\pCome back and visit sometime, your\nmother and I will really miss you...\pOh! I almost forgot!\nI got you a little present for\lyour leaving!

#org 0x80012D
= [player] obtained the[green_fr] Leaving Present[black_fr]!

#org 0x800156
= Dad:[blue_fr] I believe they're[green_fr] Running Shoes[blue_fr].\nThere's a label attached to it too.\p[red_fr]If you're using VisualBoyAdvance,\nthe default running control is holding\ldown the X key.


'-----------
' Movements
'-----------
#org 0x800054
#raw 0x62 'Exclamation Mark (!)
#raw 0x0 'Face Down

#org 0x800057
#raw 0xE 'Step Left (Slow)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)

#org 0x80005B
#raw 0x1 'Face Up
Eat pizza and stay punk rock

I map for the Source SDK and dabble in ROM Hacking hmu.
Male
England
Seen September 17th, 2019
Posted September 24th, 2012
111 posts
12 Years
851 is used by the ROM most probably. Use flags in the 1000 area.
Same problem. I used 0x1000 as the flag. I can just walk over it and over it.
Eat pizza and stay punk rock

I map for the Source SDK and dabble in ROM Hacking hmu.
Age 26
Male
Seen July 31st, 2016
Posted June 21st, 2012
17 posts
11.1 Years
This is my first attempt at a level script, so bear with me.

#dynamic 0x800000
#org @start
compare 0x4055 0x5
if 0x0 goto @pokemanzget
release
end

#org @pokemanzget
applymovement 0x2 @move
applymovement 0xFF @move1
applymovement 0x1 @move2
waitmovement 0x0
msgbox @msg 0x6
applymovement 0x1 @move3
waitmovement 0x0
msgbox @msg1 0x6
applymovement 0x1 @move4
applymovement 0x2 @move5
waitmovement 0x0
msgbox @msg2 0x6
setvar 0x4055 0x5
release
end

#org @msg
= Ahh, you decided to come after\nall, [rival] and [player]!\pBetter late than never, I guess.\pContinuing on, those pokeballs.

#org @msg1
= They contain the starter Pokemon.\nI wish for you two to take one.

#org @msg2
= Go ahead, [player], you go first.

#org @move
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x01
#raw 0xFE

#org @move1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @move2
#raw 0x21
#raw 0xFE

#org @move3
#raw 0x24
#raw 0xFE

#org @move4
#raw 0x21
#raw 0xFE

#org @move5
#raw 0x24
#raw 0xFE
What happens is the messed up text, except after opening the script from A-Map, the script was left unharmed.
Male
Seen August 21st, 2013
Posted June 26th, 2013
90 posts
11 Years
Xse is broken i swear.

fire red rom

so i open xse, type this, save it.

open rom and compile it copy the one that says start by it and then paste that offset into advanced map in script offset. But it isn't working!


#dynamic 0x71A23C

#org @start
lock
faceplayer
msgbox @test 0x6
release
end

#org @test
= Testing.



offset it gave me after compile 71A51B

DrFuji

Heiki Hecchara‌‌

Age 30
Male
Aussie
Seen 4 Days Ago
Posted February 12th, 2021
1,693 posts
13.7 Years
This is my first attempt at a level script, so bear with me.

#dynamic 0x800000
#org @start
compare 0x4055 0x5
if 0x0 goto @pokemanzget
release
end

#org @pokemanzget
applymovement 0x2 @move
applymovement 0xFF @move1
applymovement 0x1 @move2
waitmovement 0x0
msgbox @msg 0x6
applymovement 0x1 @move3
waitmovement 0x0
msgbox @msg1 0x6
applymovement 0x1 @move4
applymovement 0x2 @move5
waitmovement 0x0
msgbox @msg2 0x6
setvar 0x4055 0x5
release
end

#org @msg
= Ahh, you decided to come after\nall, [rival] and [player]!\pBetter late than never, I guess.\pContinuing on, those pokeballs.

#org @msg1
= They contain the starter Pokemon.\nI wish for you two to take one.

#org @msg2
= Go ahead, [player], you go first.

#org @move
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x01
#raw 0xFE

#org @move1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @move2
#raw 0x21
#raw 0xFE

#org @move3
#raw 0x24
#raw 0xFE

#org @move4
#raw 0x21
#raw 0xFE

#org @move5
#raw 0x24
#raw 0xFE
What happens is the messed up text, except after opening the script from A-Map, the script was left unharmed.
You can't see it because the glitched text in't actually present in the script but is a 100% in-game glitch. Did you correctly open the Map Script Offset and edit it like in this tutorial?If you need more help then post with the specifics of your level script (the type of level script you're using, variable, value etc.)

Xse is broken i swear.

fire red rom

so i open xse, type this, save it.

open rom and compile it copy the one that says start by it and then paste that offset into advanced map in script offset. But it isn't working!


#dynamic 0x71A23C

#org @start
lock
faceplayer
msgbox @test 0x6
release
end

#org @test
= Testing.



offset it gave me after compile 71A51B
Are you sure you're using XSE 1.1.1? The earlier versions are somewhat glitchy and can't handle simple scripts at times.
Male
Seen August 21st, 2013
Posted June 26th, 2013
90 posts
11 Years
You can't see it because the glitched text in't actually present in the script but is a 100% in-game glitch. Did you correctly open the Map Script Offset and edit it like in this tutorial?If you need more help then post with the specifics of your level script (the type of level script you're using, variable, value etc.)



Are you sure you're using XSE 1.1.1? The earlier versions are somewhat glitchy and can't handle simple scripts at times.
yes I am, same one you linked.
Male
North, it's cold.
Seen July 14th, 2013
Posted November 18th, 2012
49 posts
11.6 Years
Well if this helps when I open the script in advance map this is what it had.

'---------------
#org 0x205D772
nop

that's it o.o
That's happened to me quiet a few times as well. I find that if I don't bother to save it and just compile something that simple, it works fine. I also need to recomplie it a few times. (Try setting your offset of 0x800000 rather than at the first spot that has free space.)
Hackers, Hacker everywhere.

Hacks I support:
FloralSky





Male
Seen June 18th, 2012
Posted June 18th, 2012
37 posts
11 Years
I edited the whole starter events so that there are 2 pokeballs on Oak's table.Everything is working perfectly...except.....
When my rival picks the 1st pokeball,it will not disappear.I run thru the script but as I am a noob at scripting,I cannot figure out how to edit the "disappear"-part of the script.Please,help.


By the way,sry if I posted it in wrong forum but it is important (to me).