Script Help Thread (DO NOT REQUEST SCRIPTS) Page 126

Started by HackMew December 20th, 2008 5:10 AM
  • 625760 views
  • 9682 replies
Age 27
Male
Slovenia
Seen March 30th, 2015
Posted July 24th, 2013
3,475 posts
15.2 Years
So, I decided to make another script since that one wouldn't work. But this one, unfortunately, doesn't work either.
The movements won't happen and the flag 0x1600 won't work.
Spoiler:
#include stditems.rbh

;---------------
#org 0x810FD2
lock
checkitem ITEM_GOLDTEETH 0x1
compare LASTRESULT 0x1
if 0x1 goto 0x8812448
checkflag 0x1600
compare LASTRESULT 0x1
if 0x1 goto 0x8812422
goto 0x88123F6

;---------------
#org 0x812448
applymovement 0x7 0x8812675
waitmovement 0x0
msgbox 0x88125E7 MSG_NORMAL ;"You've got the PIKA-CHEW!\nI knew ..."
sound 0x15
applymovement 0x7 0x881268B
waitmovement 0x0
msgbox 0x8812645 MSG_NORMAL ;"I'm getting my AMULET COIN back!\n..."
applymovement 0x7 0x881267F
waitmovement 0x0
pause 0x83
fadescreen 0x1
hidesprite 0x7
setflag 0x27E
fadescreen 0x0
setvar 0x5824 0x1
release
end

;---------------
#org 0x812422
applymovement 0x7 0x8812675
waitmovement 0x0
msgbox 0x88125AD MSG_NORMAL ;"You need to go to EGGNEST TOWN and..."
applymovement 0x7 0x881267F
waitmovement 0x0
applymovement MOVE_PLAYER 0x8812688
release
end

;---------------
#org 0x8123F6
fadesong 0x121
applymovement 0x7 0x8812675
waitmovement 0x0
msgbox 0x881248E MSG_NORMAL ;"MR. [player], would you help me?\p..."
setflag 0x1600
applymovement 0x7 0x881267F
waitmovement 0x0
applymovement MOVE_PLAYER 0x8812688
fadedefault
release
end

;---------
; Strings
;---------
#org 0x8125E7
= You've got the PIKA-CHEW!\nI knew you could do it!\pI'll go feed it to the crazy\nMURKROW now.

#org 0x812645
= I'm getting my AMULET COIN back!\nYes yes yes!

#org 0x8125AD
= You need to go to EGGNEST TOWN and\nmeet RYAN, remember?

#org 0x81248E
= MR. [player], would you help me?\pThere's a MURKROW back there and\nit appears it's gone crazy!\pIt even stole my AMULET COIN!\p... ... ...\n... ... ...\pI know!\pCould you please, please, please\ngo the EGGNEST TOWN? My grandson\llives there, named RYAN.\pJust talk to him and he'll know\nwhat to do.

;-----------
; Movements
;-----------
#org 0x812675
#raw 0x10 ;Step Down (Normal)
#raw 0x10 ;Step Down (Normal)
#raw 0x12 ;Step Left (Normal)
#raw 0x12 ;Step Left (Normal)
#raw 0x12 ;Step Left (Normal)
#raw 0x10 ;Step Down (Normal)
#raw 0x10 ;Step Down (Normal)
#raw 0x10 ;Step Down (Normal)
#raw 0xFE ;End of Movements

#org 0x81268B
#raw 0x62 ;Exclamation Mark (!)
#raw 0xFE ;End of Movements

#org 0x81267F
#raw 0x11 ;Step Up (Normal)
#raw 0x11 ;Step Up (Normal)
#raw 0x11 ;Step Up (Normal)
#raw 0x13 ;Step Right (Normal)
#raw 0x13 ;Step Right (Normal)
#raw 0x11 ;Step Up (Normal)
#raw 0x11 ;Step Up (Normal)
#raw 0xFE ;End of Movements

#org 0x812688
#raw 0x10 ;Step Down (Normal)
#raw 0xFE ;End of Movements

What could be causing the problem?

NarutoActor

The rocks cry out to me

Age 29
Female
Brooklyn/Marlboro
Seen April 2nd, 2016
Posted March 22nd, 2016
1,974 posts
14.4 Years
Make sure you have the right ID number and like I said before If a flag doesn't work just switch over to a var. Also try re-pointing the script to a different location.
~There are those people who understand hex, F the rest
Male
Seen January 17th, 2015
Posted July 15th, 2011
169 posts
13.8 Years
I was making a script for Brock (The part where he gives you the badge for defeating him),in a hack I'm doing, but for some reason, it doesn't compile it says "Error 13 "type mismatch" on line 28. Missing Dynamic Label."

Game: FireRed
Type: Trainer Battle, Offical Battle
Editor: XSE
Script:

Spoiler:
#dynamic 0x800000
#org @start
trainerbattle 0x1 0x19E 0x0 @intro @defeat @after
msgbox @msg2 0x2
end
#org @after
msgbox @msg 0x2
end
#org @intro
== I'm Brock, the Gym Leader\nof\nPewter City! If you want to\learn\lthe Boulder Badge, you need\lto battle me!
#org @defeat
= For your honor of winning, I\npresent you, the Boulder Badge!
#org @msg
= Good luck on your POKéMON journey!\nYou will face more powerful gym\lleaders than me.
#org @msg2
= Good luck young trainer. And\nbefore I forget....
#org @badge1get
checkflag 0x820
if 0x1 call @Next
setflag 0x820
msgbox @msg3 0x2
release
end
#org @Next
msgbox @msg4 0x2
clearflag 0x820
release
end


[Solved]

HackMew

Mewtwo Strikes Back

Seen October 26th, 2011
Posted October 15th, 2010
1,314 posts
16.9 Years
I was making a script for Brock (The part where he gives you the badge for defeating him),in a hack I'm doing, but for some reason, it doesn't compile it says "Error 13 "type mismatch" on line 28. Missing Dynamic Label."

Game: FireRed
Type: Trainer Battle, Offical Battle
Editor: XSE
Script:

Spoiler:
#dynamic 0x800000
#org @start
trainerbattle 0x1 0x19E 0x0 @intro @defeat @after
msgbox @msg2 0x2
end
#org @after
msgbox @msg 0x2
end
#org @intro
== I'm Brock, the Gym Leader\nof\nPewter City! If you want to\learn\lthe Boulder Badge, you need\lto battle me!
#org @defeat
= For your honor of winning, I\npresent you, the Boulder Badge!
#org @msg
= Good luck on your POKéMON journey!\nYou will face more powerful gym\lleaders than me.
#org @msg2
= Good luck young trainer. And\nbefore I forget....
#org @badge1get
checkflag 0x820
if 0x1 call @Next
setflag 0x820
msgbox @msg3 0x2
release
end
#org @Next
msgbox @msg4 0x2
clearflag 0x820
release
end
Ehm... you should read the error messages, because XSE told you what was wrong already. Missing dynamic label, indeed. That is, there's no msg3 nor msg4 texts in your script.
Male
Seen January 17th, 2015
Posted July 15th, 2011
169 posts
13.8 Years
Ehm... you should read the error messages, because XSE told you what was wrong already. Missing dynamic label, indeed. That is, there's no msg3 nor msg4 texts in your script.
I did, but now I have a problem. When I talk to Brock, he says. "I'm Brock, the Gym leader of..." then it goes blank for four or so more blank lines, we battle, I won, but be doesn't give the badge.
Age 27
Male
Slovenia
Seen March 30th, 2015
Posted July 24th, 2013
3,475 posts
15.2 Years
Make sure you have the right ID number and like I said before If a flag doesn't work just switch over to a var. Also try re-pointing the script to a different location.
So there's nothing wrong with the script?

Pokepal17

More cowbell~

Age 28
Male
Steeltown
Seen July 7th, 2011
Posted May 22nd, 2011
1,517 posts
14.6 Years
So, I decided to make another script since that one wouldn't work. But this one, unfortunately, doesn't work either.
The movements won't happen and the flag 0x1600 won't work.
Spoiler:
#include stditems.rbh

;---------------
#org 0x810FD2
lock
checkitem ITEM_GOLDTEETH 0x1
compare LASTRESULT 0x1
if 0x1 goto 0x8812448
checkflag 0x1600
compare LASTRESULT 0x1
goto 0x88123F6

;---------------
#org 0x812448
applymovement 0x7 0x8812675
waitmovement 0x0
msgbox 0x88125E7 MSG_NORMAL ;"You've got the PIKA-CHEW!\nI knew ..."
sound 0x15
applymovement 0x7 0x881268B
waitmovement 0x0
msgbox 0x8812645 MSG_NORMAL ;"I'm getting my AMULET COIN back!\n..."
applymovement 0x7 0x881267F
waitmovement 0x0
pause 0x83
fadescreen 0x1
hidesprite 0x7
setflag 0x27E
fadescreen 0x0
setvar 0x5824 0x1
release
end

;---------------
#org 0x812422
applymovement 0x7 0x8812675
waitmovement 0x0
msgbox 0x88125AD MSG_NORMAL ;"You need to go to EGGNEST TOWN and..."
applymovement 0x7 0x881267F
waitmovement 0x0
applymovement MOVE_PLAYER 0x8812688
release
end

;---------------
#org 0x8123F6
fadesong 0x121
applymovement 0x7 0x8812675
waitmovement 0x0
msgbox 0x881248E MSG_NORMAL ;"MR. [player], would you help me?\p..."
setflag 0x1600
applymovement 0x7 0x881267F
waitmovement 0x0
applymovement MOVE_PLAYER 0x8812688
fadedefault
release
end

;---------
; Strings
;---------
#org 0x8125E7
= You've got the PIKA-CHEW!\nI knew you could do it!\pI'll go feed it to the crazy\nMURKROW now.

#org 0x812645
= I'm getting my AMULET COIN back!\nYes yes yes!

#org 0x8125AD
= You need to go to EGGNEST TOWN and\nmeet RYAN, remember?

#org 0x81248E
= MR. [player], would you help me?\pThere's a MURKROW back there and\nit appears it's gone crazy!\pIt even stole my AMULET COIN!\p... ... ...\n... ... ...\pI know!\pCould you please, please, please\ngo the EGGNEST TOWN? My grandson\llives there, named RYAN.\pJust talk to him and he'll know\nwhat to do.

;-----------
; Movements
;-----------
#org 0x812675
#raw 0x10 ;Step Down (Normal)
#raw 0x10 ;Step Down (Normal)
#raw 0x12 ;Step Left (Normal)
#raw 0x12 ;Step Left (Normal)
#raw 0x12 ;Step Left (Normal)
#raw 0x10 ;Step Down (Normal)
#raw 0x10 ;Step Down (Normal)
#raw 0x10 ;Step Down (Normal)
#raw 0xFE ;End of Movements

#org 0x81268B
#raw 0x62 ;Exclamation Mark (!)
#raw 0xFE ;End of Movements

#org 0x81267F
#raw 0x11 ;Step Up (Normal)
#raw 0x11 ;Step Up (Normal)
#raw 0x11 ;Step Up (Normal)
#raw 0x13 ;Step Right (Normal)
#raw 0x13 ;Step Right (Normal)
#raw 0x11 ;Step Up (Normal)
#raw 0x11 ;Step Up (Normal)
#raw 0xFE ;End of Movements

#org 0x812688
#raw 0x10 ;Step Down (Normal)
#raw 0xFE ;End of Movements

What could be causing the problem?
Checkflags don't need compare LASTRESULT because the command would be checking what's in LASTRESULT and not what the flag value is.

Fixed in script~
Pokémon Stardrop

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
I did, but now I have a problem. When I talk to Brock, he says. "I'm Brock, the Gym leader of..." then it goes blank for four or so more blank lines, we battle, I won, but be doesn't give the badge.
It's because badge string practically doesn't exist...
There's nothing what could make that string activate.

Try this.

Spoiler:
#dynamic 0x800000
#org @start
trainerbattle 0x1 0x19E 0x0 @intro @defeat @after
msgbox @msg2 0x2
end

#org @after
setflag 0x820
msgbox @msg 0x2
end

#org @intro
= I'm Brock, the Gym Leader\nof\nPewter City! If you want to\learn\lthe Boulder Badge, you need\lto battle me!

#org @defeat
= For your honor of winning, I\npresent you, the Boulder Badge!

#org @msg
= Good luck on your POKéMON journey!\nYou will face more powerful gym\lleaders than me.

#org @msg2
= Good luck young trainer.
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List

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
@Ash493,

you can't put two \n next to each other. Leader\nof\nPewter change one of the \n to \p or \l, or simply remove one.
You don't have to tell me I'm aware of it, I just copied the strings from his script.
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List
Seen December 27th, 2014
Posted November 12th, 2014
979 posts
15.1 Years
You don't have to tell me I'm aware of it, I just copied the strings from his script.
I actually was speaking with kacqn. Sorry if it meant you..

Anyways, I have a question. In Ruby, what are the vars I can use? (stupid/lazy question, but I forgot..)

KotovSyndrome_

Consumer of many asparagus.

Male
Wales
Seen July 8th, 2012
Posted August 20th, 2010
57 posts
14.9 Years
I have a question..

If I were to make my own Pokecenter script, how do you make Nurse Joy operate the machine? (eg. put the pokeballs on there)

Thanks

Time out, let's stop and think this through,
We've all got better things to do,
Than talk in circles, run in place,
Answers inches from our face.

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
I have a question..

If I were to make my own Pokecenter script, how do you make Nurse Joy operate the machine? (eg. put the pokeballs on there)

Thanks
You can check it into your ROM ;)
If I remember correctly there's should be some doanimation command.
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List

KotovSyndrome_

Consumer of many asparagus.

Male
Wales
Seen July 8th, 2012
Posted August 20th, 2010
57 posts
14.9 Years
You can check it into your ROM ;)
If I remember correctly there's should be some doanimation command.
Okay thanks, I'll have a look later :D

Time out, let's stop and think this through,
We've all got better things to do,
Than talk in circles, run in place,
Answers inches from our face.
Seen May 14th, 2010
Posted May 9th, 2010
53 posts
14.2 Years
Apparently this script is too big. whats wrong with it
Spoiler:

#dynamic 0xE3CF64

#org @start
lock
faceplayer
checkflag 0x89Z
if 0x0 goto @wierd
msgbox @confused 0x5
if 0x0 goto @cheers
if 0x1 goto @tanks
release
end

#org @wierd
msgbox @thanks 0x6
release
end

#org @confused
= Hi there!\nI'm from Moe Retail Outlet.\lI'm here to ask a few questions!\lDo you mind?\l...\lNo? Okay sure, I'll only take 30\lseconds of your time.\lDo you like the new and improved\lLittleroot Town?

#org @cheers
= Thanks! I'll get this over to\nMr. Moe as soon as possible. I'm\lsure he'll be pleased.

#org @tanks
= Okay! Well I'll take this to\nMr. Moe and see what he thinks.\lThanks a lot buddy!

#org @thanks
= Thanks for taking your time in\nanswering the questions.\lYour answer has provided us with\lgreat information for future\lprojects.
To be or not to be is a question asked by many... But many do not know what the answer is to this question.



75% of Pokemon gamers use cheats and specially made codes to make their pokemon battle-worthy. If you are one of the 25% percent that level their Pokemon up legally, put this in your signature.

Co500

Nostalgia Edition

Male
Far Awayyyyyyy
Seen December 14th, 2021
Posted August 23rd, 2015
563 posts
14.9 Years
for some reason when debuging this
Spoiler:

dynamic 0x800000

#org @start
showsprite 0x5
msgbox @1 0x6
applymovement 0x0F @move
applymovement 0x07 @move2
waitmovement 0x0
msgbox @2 0x6
applymovement 0x0F @move3
applymovement 0x07 @move4
waitmovement 0x0
hisesprite 0x0C
hidesprite 0x05
release
end

#org @1
= Misty: Ah!\nA Bug Pokemon!

#org @2
= Jenny: WAIT! \nIs my Spinarak, we use them \pfor capturing theives instead \pof growlithe its an old \ptradition.Years ago we used Spinarak \pto captue the Balck Arachnid. \pAnd now someone is repeating \pthe past. If you want to help \pwe'll be at the base.

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

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

#org @move3
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0xFE

#org @move4
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0xFE

it says, no #org/#seek directories were found. cannot compile,
this appears when i debug it or click compile could you please point out the problem
It can't end now. Not like this.


I hope you’ll remember, there is something good in goodbye.



Seen December 27th, 2014
Posted November 12th, 2014
979 posts
15.1 Years
for some reason when debuging this
Spoiler:

dynamic 0x800000

#org @start
showsprite 0x5
msgbox @1 0x6
applymovement 0x0F @move
applymovement 0x07 @move2
waitmovement 0x0
msgbox @2 0x6
applymovement 0x0F @move3
applymovement 0x07 @move4
waitmovement 0x0
hisesprite 0x0C
hidesprite 0x05
release
end

#org @1
= Misty: Ah!\nA Bug Pokemon!

#org @2
= Jenny: WAIT! \nIs my Spinarak, we use them \pfor capturing theives instead \pof growlithe its an old \ptradition.Years ago we used Spinarak \pto captue the Balck Arachnid. \pAnd now someone is repeating \pthe past. If you want to help \pwe'll be at the base.

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

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

#org @move3
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0xFE

#org @move4
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0xFE

it says, no #org/#seek directories were found. cannot compile,
this appears when i debug it or click compile could you please point out the problem
You forgot a # before the dynamic. Maybe that's your problem. Re-post if that did not work.

destinedjagold

You can contact me in PC's discord server...

Age 32
Male
Seen 3 Days Ago
Posted March 24th, 2023
8,579 posts
16 Years
Apparently this script is too big. whats wrong with it
checkflag 0x89Z
Um......
There's no 'Z' in hex.
num - hex
0 - 0
1 - 1
2 - 2
3 - 3
4 - 4
5 - 5
6 - 6
7 - 7
8 - 8
9 - 9
10 - A
11 - B
12 - C
13 - D
14 - E
15 - F
16 - 10
...etc

Pokepal17

More cowbell~

Age 28
Male
Steeltown
Seen July 7th, 2011
Posted May 22nd, 2011
1,517 posts
14.6 Years
Apparently this script is too big. whats wrong with it
Spoiler:

#dynamic 0xE3CF64

#org @start
lock
faceplayer
checkflag 0x1000
if 0x0 goto @wierd
msgbox @confused 0x5
compare 0x800D 0x1
if 0x0 goto @msg2
msgbox @tanks 0x2
end

#org @msg2
msgbox @cheers 0x2
end

#org @wierd
msgbox @thanks 0x2
end

#org @confused
= Hi there!\nI'm from Moe Retail Outlet.\lI'm here to ask a few questions!\lDo you mind?\l...\lNo? Okay sure, I'll only take 30\lseconds of your time.\lDo you like the new and improved\lLittleroot Town?

#org @cheers
= Thanks! I'll get this over to\nMr. Moe as soon as possible. I'm\lsure he'll be pleased.

#org @tanks
= Okay! Well I'll take this to\nMr. Moe and see what he thinks.\lThanks a lot buddy!

#org @thanks
= Thanks for taking your time in\nanswering the questions.\lYour answer has provided us with\lgreat information for future\lprojects.
There's a lot more stuff screwed up. For example, you don't have a compare LASTRESULT after the msgbox 0x5 and you can't send ba pointer to text without the msg box command. Also, Destinedjagold is right too. But only use flags 0x1000 and above please.

Fixes in bold.
Pokémon Stardrop
Seen December 27th, 2014
Posted November 12th, 2014
979 posts
15.1 Years
Is there any script that can check to see if you have a certain Pokemon? For example, something like checkpokemon 0xPokemon#?

Yes, there is. (Only works in FireRed)
setvar 0x8004 0x[pokemon number in hex]
special2 0x800D 0x17C
compare 0x800D 0x1
if 0x1 goto @youHaveThePokemon
For information on what the codes do, go to diegoisawesome's XSE tutorial.
Seen July 31st, 2010
Posted March 1st, 2010
5 posts
13.2 Years
Hi,

I am kind of new to this and I need some help. I started out with small scripts first, but now I am trying something new. It complies fine and stuff, but it just wont run when I step on the script square.

#org $start
checkflag 0x829
if 0x1 goto $script
if 0x0 goto $script2

#org $script
jingle
message $Gfirst
$Gfirst 1 = GREEN: Hey you!
boxset 6
clearflag 0x1215
showsprite 7
applymovement 7 $walk
$walk 1 ; #binary 0x13 0x13 0x13 0x13 0x13 0x13 0x13
pausemove 0
applymovement 0xFF $look
$look 1 ; #binary 0x02 0xFE
pausemove 0
message $2
$2 1 = GREEN: ...........
boxset 6
lock
faceplayer
trainerbattle 0x03 0x203 $win
$win 1 = ...........
message $after
$after 1 = Impressive!
boxset 6
applymovement 7 $walk2
$walk2 1 ; #binary 0x03 0x03 0x03 0x03 0x03 0x01 0x01 0x01 0x01
pausemove 0
removesprite 7
setflag 0x1215
setvar 0x6000 0x0001
release
end

#org $script2
release
end

Any ideas?