Script Help Thread (DO NOT REQUEST SCRIPTS) Page 123

Started by HackMew December 20th, 2008 5:10 AM
  • 625760 views
  • 9682 replies
Age 30
Male
Seen July 22nd, 2012
Posted June 10th, 2012
516 posts
13.8 Years
Okay, I'm creating a trainer battle script, and it works perfectly fine when I talk to the trainer, but when I try to make him see my player the screen turns red....

help?

Script:
Spoiler:
#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x820
if 0x1 goto @done
msgbox @say 0x06
trainerbattle 0x1 0x001 0x0 @before @after @later
end


#org @before
= Show me what ya got \v\h01!

#org @after
= What the-?

#org @later
msgbox @3 0x6
setflag 0x820
fadescreen 0x01
hidesprite 0x01
fadescreen 0x00
release
end

#org @done
msgbox @1 0x6
release
end

#org @1
= You shouldn't be seeing me.

#org @say
= Hey, \v\h01. I got a Pokémon from\nmy Grandpa. Lets fight!

#org @3
= Holy crap...\pNext time you won't be so lucky!


Pictures:
Spoiler:



I'm an idiot.
Sorry, I didn't even really look at your script before I said that... your problem is that you've got a trainerbattle value of 0x1, which doesn't work with a view radius. So, if you just wanted a normal trainer, you'd have the following:
Spoiler:

#org @normal
trainerbattle 0x0 0x1 0x0 @before @after
msgbox @done 0x6
release
end

#org @done
= I'm done

That's what I thought you were aiming for. For the script you've got, you'll need an actual script tile :\
Sorry about that. Hope this helps!
Credit for my avatar goes to the Lego company. :)
Male
Seen December 7th, 2010
Posted November 30th, 2010
60 posts
13.6 Years
I'm an idiot.
Sorry, I didn't even really look at your script before I said that... your problem is that you've got a trainerbattle value of 0x1, which doesn't work with a view radius. So, if you just wanted a normal trainer, you'd have the following:
Spoiler:

#org @normal
trainerbattle 0x0 0x1 0x0 @before @after
msgbox @done 0x6
release
end

#org @done
= I'm done

That's what I thought you were aiming for. For the script you've got, you'll need an actual script tile :\
Sorry about that. Hope this helps!

Oh man seriously? dang ><
I guess I will have to set it up as a script tile, no biggie though.
thanks for the help!


Age 30
Male
Seen July 22nd, 2012
Posted June 10th, 2012
516 posts
13.8 Years
Oh man seriously? dang ><
I guess I will have to set it up as a script tile, no biggie though.
thanks for the help!
Np, sorry I didn't catch it sooner. Btw, you don't need to check the trainer box either, for an 0x1 trainerbattle.

Now, anyone have an answer to my braille issue? Just trying to keep from being buried :P
Credit for my avatar goes to the Lego company. :)

HackMew

Mewtwo Strikes Back

Seen October 26th, 2011
Posted October 15th, 2010
1,314 posts
16.9 Years
Np, sorry I didn't catch it sooner. Btw, you don't need to check the trainer box either, for an 0x1 trainerbattle.
Yeah. Besides, the 0x1 is meant for gym leaders.
Age 30
Male
Seen July 22nd, 2012
Posted June 10th, 2012
516 posts
13.8 Years
0x1 will work fine for a rival battle too, it's what I used. Gym battles are just the primary use in the games, but I'm fairly sure that they were also used for the Gary scripts.
Long and short of it is, 0x1 will be fine for a rival battle.

I'm going to repost my problem script, just so nobody has to go digging to find it:
Spoiler:

#dynamic 0x800000
#org @arnahint
lockall
braille @arnatos
closeonkeypress
releaseall
end
#org @arnatos
= Two there are.\nFirst Arceus, champion of life.\lSecond Arnatos, bringer of death.\lHe who befriends Arceus shall\lrecieve its blessing.\lHe who enslaves Arnatos shall\lrecieve its service.\lSuch is the doctrine of the\lopposed twins of creation and\lentropy.

This is my first time trying to use the braille command, and the textbox appears as gibberish. What'd I do wrong?
EDIT: Nvm, I just found instructions on how to use this command, and I'll try to fix it myself before I ask for help.
Credit for my avatar goes to the Lego company. :)
Age 27
Male
Slovenia
Seen March 30th, 2015
Posted July 24th, 2013
3,475 posts
15.2 Years
Base ROM: FireRed English (BPRE)
Script type: Trigger
Script:
Spoiler:
;---------------
#org 0x8120B2

lock
compare 0x7040 0x0
if 0x0 goto 0x8812126
compare 0x7040 0x1
if 0x1 goto 0x8812145
checkflag 0x1234
if 0x0 goto 0x881211B
goto 0x88120DB
;---------------

#org 0x812126
applymovement 0x8 0x8812392
waitmovement 0x0
msgbox 0x8812357 MSG_NORMAL ;"Go to EGGNEST TOWN, dear!\nYou'll ..."
applymovement 0x8 0x881239D
waitmovement 0x0
release
end
;---------------

#org 0x812145
msgbox 0x881215B MSG_NORMAL ;"Why, thank you, dear!\pI shall be ..."
hidesprite 0x8
setflag 0x1ABC
setvar 0x6070 0x1
release
end

;---------------
#org 0x81211B
end

;---------------
#org 0x8120DB
playsong 0x112 0x0
applymovement 0x8 0x88123A8
applymovement 0x9 0x88123C9
waitmovement 0x0
msgbox 0x88121BC MSG_NORMAL ;"N-no! P-p-please!\nNot my AMULET C..."
applymovement 0x9 0x88123EA
waitmovement 0x0
applymovement 0x8 0x88123F3
waitmovement 0x0
msgbox 0x88121EF MSG_NORMAL ;"Oh, that pesky little POKéMON!\nI'..."
fadedefault
setvar 0x7040 0x1
release
end

;---------
; Strings
;---------
#org 0x812357
= Go to EGGNEST TOWN, dear!\nYou'll find my grandson there!

#org 0x81215B
= Why, thank you, dear!\pI shall be grateful to you for my\nwhole life!

#org 0x8121BC
= N-no! P-p-please!\nNot my AMULET COIN, I need it!

#org 0x8121EF
= Oh, that pesky little POKéMON!\nI'll get you someday!\pDear child, you will help me, now,\lwould you?\pOf course you would!\pThat little MURKROW is very angry\nat present. We'll need something\lfor it to calm down.\pI know!\pMy grandson, who lives in EGGNEST\nTOWN, will be willing to help!\pPlease go meet him, I've already\ninformed my grandson about our\llittle task.

;-----------
; Movements
;-----------
#org 0x812392
#raw 0x10 ;Step Down (Normal)
#raw 0x10 ;Step Down (Normal)
#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 0xFE ;End of Movements

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

#org 0x8123A8
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0xFE ;End of Movements

#org 0x8123C9
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0xFE ;End of Movements

#org 0x8123EA
#raw 0x20 ;Step Right (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0xFE ;End of Movements

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

HackMew

Mewtwo Strikes Back

Seen October 26th, 2011
Posted October 15th, 2010
1,314 posts
16.9 Years
Base ROM: FireRed English (BPRE)
Script type: Trigger
Script:
Spoiler:
;---------------
#org 0x8120B2

lock
compare 0x7040 0x0
if 0x0 goto 0x8812126
compare 0x7040 0x1
if 0x1 goto 0x8812145
checkflag 0x1234
if 0x0 goto 0x881211B
goto 0x88120DB
;---------------

#org 0x812126
applymovement 0x8 0x8812392
waitmovement 0x0
msgbox 0x8812357 MSG_NORMAL ;"Go to EGGNEST TOWN, dear!\nYou'll ..."
applymovement 0x8 0x881239D
waitmovement 0x0
release
end
;---------------

#org 0x812145
msgbox 0x881215B MSG_NORMAL ;"Why, thank you, dear!\pI shall be ..."
hidesprite 0x8
setflag 0x1ABC
setvar 0x6070 0x1
release
end

;---------------
#org 0x81211B
end

;---------------
#org 0x8120DB
playsong 0x112 0x0
applymovement 0x8 0x88123A8
applymovement 0x9 0x88123C9
waitmovement 0x0
msgbox 0x88121BC MSG_NORMAL ;"N-no! P-p-please!\nNot my AMULET C..."
applymovement 0x9 0x88123EA
waitmovement 0x0
applymovement 0x8 0x88123F3
waitmovement 0x0
msgbox 0x88121EF MSG_NORMAL ;"Oh, that pesky little POKéMON!\nI'..."
fadedefault
setvar 0x7040 0x1
release
end

;---------
; Strings
;---------
#org 0x812357
= Go to EGGNEST TOWN, dear!\nYou'll find my grandson there!

#org 0x81215B
= Why, thank you, dear!\pI shall be grateful to you for my\nwhole life!

#org 0x8121BC
= N-no! P-p-please!\nNot my AMULET COIN, I need it!

#org 0x8121EF
= Oh, that pesky little POKéMON!\nI'll get you someday!\pDear child, you will help me, now,\lwould you?\pOf course you would!\pThat little MURKROW is very angry\nat present. We'll need something\lfor it to calm down.\pI know!\pMy grandson, who lives in EGGNEST\nTOWN, will be willing to help!\pPlease go meet him, I've already\ninformed my grandson about our\llittle task.

;-----------
; Movements
;-----------
#org 0x812392
#raw 0x10 ;Step Down (Normal)
#raw 0x10 ;Step Down (Normal)
#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 0xFE ;End of Movements

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

#org 0x8123A8
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0xFE ;End of Movements

#org 0x8123C9
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1D ;Step Down (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0x1F ;Step Left (Fast)
#raw 0xFE ;End of Movements

#org 0x8123EA
#raw 0x20 ;Step Right (Fast)
#raw 0x20 ;Step Right (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0x1E ;Step Up (Fast)
#raw 0xFE ;End of Movements

#org 0x8123F3
#raw 0x12 ;Step Left (Normal)
#raw 0x10 ;Step Down (Normal)
#raw 0xFE ;End of Movements
And? What happens? What should happen instead?

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
Just a random guess 'cause like HM said you really hadn't said anything about your script, but the movement strings might be too long.
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List

HackMew

Mewtwo Strikes Back

Seen October 26th, 2011
Posted October 15th, 2010
1,314 posts
16.9 Years
Okay, how do I make a sprite stay hidden like the leaving town script with oak from the original firered?
You need to use a setflag together with the hidesprite command. The setflag value being the People ID of the person you want to hide.
Male
Seen December 7th, 2010
Posted November 30th, 2010
60 posts
13.6 Years
You need to use a setflag together with the hidesprite command. The setflag value being the People ID of the person you want to hide.
worked fine, i just put scripts around every possible move away from the door (3 spots) that hid the sprite immediately before you could even see him, and then the new script pops him up and he walks on screen afterwards.

Or is there a more efficient way to do this?


HackMew

Mewtwo Strikes Back

Seen October 26th, 2011
Posted October 15th, 2010
1,314 posts
16.9 Years
worked fine, i just put scripts around every possible move away from the door (3 spots) that hid the sprite immediately before you could even see him, and then the new script pops him up and he walks on screen afterwards.

Or is there a more efficient way to do this?
Have you considered using a level script, eventually?
Male
Seen December 7th, 2010
Posted November 30th, 2010
60 posts
13.6 Years
Have you considered using a level script, eventually?
I've looked into those, but I can't ever find any tutorials that go into great detail on them.

If you know of any guides that can help me with those, I'd appreciate it, because every time I mess with those I usually do something wrong and the script freezes.


Age 30
Male
Seen July 22nd, 2012
Posted June 10th, 2012
516 posts
13.8 Years
I've looked into those, but I can't ever find any tutorials that go into great detail on them.

If you know of any guides that can help me with those, I'd appreciate it, because every time I mess with those I usually do something wrong and the script freezes.
Cooley did a fantastic tut on that, here's the link: http://www.pokecommunity.com/showthread.php?t=191500
And don't get discouraged, freezing is actually to be expected with level scripts.
Credit for my avatar goes to the Lego company. :)
Male
Seen December 7th, 2010
Posted November 30th, 2010
60 posts
13.6 Years
Cooley did a fantastic tut on that, here's the link: http://www.pokecommunity.com/showthread.php?t=191500
And don't get discouraged, freezing is actually to be expected with level scripts.
bookmarked it, and going to check it out tomorrow or the day after.
thank you very much for the link :)

and I don't feel as bad with level scripts then ha ha.


Xatoku

Game Developer

Male
Canada
Seen April 16th, 2013
Posted February 23rd, 2013
451 posts
14.2 Years
Alright, on this rainy weather map, I have about 8 trainers. All 8 work except for 1. What happened is, after you beat him, the rain turns into his sprite and an arrow (both pink), and the camera becomes movable instead of the player. Here's the script:

#dynamic 0x800000

#org @start
trainerbattle 0x0 0x1D 0x0 @challenge @defeat
msgbox @beaten 0x6
release
end
Age 30
Male
Seen July 22nd, 2012
Posted June 10th, 2012
516 posts
13.8 Years
Alright, on this rainy weather map, I have about 8 trainers. All 8 work except for 1. What happened is, after you beat him, the rain turns into his sprite and an arrow (both pink), and the camera becomes movable instead of the player. Here's the script:

#dynamic 0x800000

#org @start
trainerbattle 0x0 0x1D 0x0 @challenge @defeat
msgbox @beaten 0x6
release
end
0.o
You know what we need? A bug of the week thread. And you win.
Have you tried changing his Person ID/sprite/both? Frankly, I think you should just delete that particular trainer and insert a new one, if you need eight.
Credit for my avatar goes to the Lego company. :)

Xatoku

Game Developer

Male
Canada
Seen April 16th, 2013
Posted February 23rd, 2013
451 posts
14.2 Years
0.o
You know what we need? A bug of the week thread. And you win.
Have you tried changing his Person ID/sprite/both? Frankly, I think you should just delete that particular trainer and insert a new one, if you need eight.
I've tried all of that lol.