PHO - Pokémon Hackers Online

PHO - Pokémon Hackers Online (http://pokemonhackersonline.com/index.php)
-   Ideas, Concepts & WIP (http://pokemonhackersonline.com/forumdisplay.php?f=106)
-   -   Simple Script Help! (http://pokemonhackersonline.com/showthread.php?t=80)

tajaros 10th October 2012 10:26 AM

Simple Script Help!
 
This is a thread concerning in helping hackers out there who are having problems with their scripts!

Rules:
-You must search before asking.
-Make sure you read some tutorials first before posting.
-Make sure to input your scripts in Spoilers for better look.
-Make sure to mention what ROM are you using.
-Make sure you mention the script editor you used.
-Post your question/problem.
-You must quote the script that you are answering.
-Don't answer if your not sure about it.
-Try and give every detail about the problems of the asker's script.
- Make sure to have fun!

When posting a Script help question it should be like this.

Example:
Quote:

ROM: FireRed
Script Editor: XSE
Problem: It crashes when the after the movement script is finished.
Script:
Spoiler:
#dynamic 0x800000

#org @start
lock
msgbox @help 0x6
sound 0x15
applymovement 0xff @move
waitmovement 0x0
msgbox @kidding 0x6
end

#org @help
= ???: HELP!\pHHHH-HHEEEELLLLPPPP!\pSOMEBODY!

#org @move
#raw 0x62
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11

#org @kidding
= ???: JUST KIDDING!\pHAHAHA!

And must be like this when answered.

Quote:

Quote:

Originally Posted by tajaros
ROM: FireRed
Script Editor: XSE
Problem: It crashes when the after the movement script is finished.
Script:
Spoiler:
#dynamic 0x800000

#org @start
lock
msgbox @help 0x6
sound 0x15
applymovement 0xff @move
waitmovement 0x0
msgbox @kidding 0x6
end

#org @help
= ???: HELP!\pHHHH-HHEEEELLLLPPPP!\pSOMEBODY!

#org @move
#raw 0x62
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11

#org @kidding
= ???: JUST KIDDING!\pHAHAHA!

You forgot to put in #raw 0xfe in the end of the movement script, try putting it and it should work properly.
Remember to quote the script that you are answering.

Naruto200 24th October 2012 03:49 AM

Okay I want to make a trainer only battle someone if they answer yes to a question.

would this script work properly (Person number will be fixed when the trainer is made) I want to be able to talk to the person again if I win and if I lose I want to be able to challenge the person again at a later time.

Spoiler:
#org $script
lock
faceplayer
message $question
$question 1 = Do you like Mysteries?
boxset 5
compare 0x800D 0x001
if 0x01 goto $yes
message $no
$no 1 = I see, come back later then...
box set 6
release
end

#org $yes
#org $script
trainerbattle 0x03 0x00 $win
$win 1 = dang you're tough!
message $after
$after 1 = good thing I'm just a spirit thanks to her.
boxset 6
release
end

Clacla 24th October 2012 04:17 AM

Quote:

Originally Posted by Naruto200 (Post 106227)
Okay I want to make a trainer only battle someone if they answer yes to a question.

would this script work properly (Person number will be fixed when the trainer is made) I want to be able to talk to the person again if I win and if I lose I want to be able to challenge the person again at a later time.

Spoiler:
#org $script
lock
faceplayer
message $question
$question 1 = Do you like Mysteries?
boxset 5
compare 0x800D 0x001
if 0x01 goto $yes
message $no
$no 1 = I see, come back later then...
box set 6
release
end

#org $yes
#org $script
trainerbattle 0x03 0x00 $win
$win 1 = dang you're tough!
message $after
$after 1 = good thing I'm just a spirit thanks to her.
boxset 6
release
end

Was this written with Pokescript? If so, I'm useless to you, I havent used it in two years.

BlackNekos 24th October 2012 09:38 AM

Quote:

Originally Posted by Naruto200 (Post 106227)
Okay I want to make a trainer only battle someone if they answer yes to a question.

would this script work properly (Person number will be fixed when the trainer is made) I want to be able to talk to the person again if I win and if I lose I want to be able to challenge the person again at a later time.

Spoiler:
#org $script
lock
faceplayer
message $question
$question 1 = Do you like Mysteries?
boxset 5
compare 0x800D 0x001
if 0x01 goto $yes
message $no
$no 1 = I see, come back later then...
box set 6
release
end

#org $yes
#org $script
trainerbattle 0x03 0x00 $win
$win 1 = dang you're tough!
message $after
$after 1 = good thing I'm just a spirit thanks to her.
boxset 6
release
end

remove the #org $script which I made bold in the script.

Naruto200 24th October 2012 02:49 PM

Quote:

Originally Posted by Delta (Post 106228)
Was this written with Pokescript? If so, I'm useless to you, I havent used it in two years.

Nope it was written in notepad :)
by following the youtube tutorials by the guy named foullump :3

Quote:

Originally Posted by BlackNekos (Post 106233)
remove the #org $script which I made bold in the script.

Thanks! :D

Is it possible to make this person re-challenge you at a later time?
Like how the breeders do in pokemon black 2 / white 2?

BlackNekos 24th October 2012 03:39 PM

Enable flag and clear flags I think.

Naruto200 24th October 2012 03:47 PM

Hmm...I think I want this to happen with a trainer I'm putting in the players bedroom.
1: Person asks "do you have a strong pokemon"
2: If Yes the person responds "I am a ghost!" and battle begins.
3: If No then the person responds "oh...too bad, come back later then."
4: If the player wins the battle the person moves up one square allowing the player to move offscreen to a hidden warp panel.

Naruto200 26th October 2012 09:21 PM

Okay! FINALLY got the script to work in game :D
However there's one small problem, it's supposed to make the person (the script person not the player) move to an area of the map and then vanish. It applies the first set of movement but not the second one. any idea what could be causing it?

Spoiler:
#dynamic 0x80013E
#org @start
lock
faceplayer
applymovement 11 @movement1
msgbox @yesno 0x5
compare lastresult 0x1
if 0x1 goto @yespart
msgbox @no 0x2
release
end

#org @yespart
msgbox @yes 0x2
applymovement 11 @movementyes
release
end

#org @yesno
= ah! You can see me?

#org @yes
= Oh! Um m--meet me outside!\nOak will catch us!

#org @no
= I see I must've imagined you then.\nnow back to work

#org @movement1
#raw 0x62 0x0
#raw 0xFE 0x0

#org @movementyes
#raw 0x20 0x0
#raw 0x20 0x0
#raw 0x20 0x0
#raw 0x20 0x0
#raw 0x20 0x0
#raw 0x1D 0x0
#raw 0x1D 0x0
#raw 0x1D 0x0
#raw 0x1D 0x0
#raw 0x1D 0x0
#raw 0x60 0x0
#raw 0xFE 0x0


I'm glad I finally got it to work properly :3 (with the exception of the un-working second part of the movement script)
Half of my problem was I was opening XSE as a seperate program. I started working with it by opening it through advanced map and now it works :)

Hopefully my scripting ventures will go more smoothly now :)

tajaros 27th October 2012 06:12 AM

Quote:

Originally Posted by Naruto200 (Post 106364)
Okay! FINALLY got the script to work in game :D
However there's one small problem, it's supposed to make the person (the script person not the player) move to an area of the map and then vanish. It applies the first set of movement but not the second one. any idea what could be causing it?

Spoiler:
#dynamic 0x80013E
#org @start
lock
faceplayer
applymovement 11 @movement1
msgbox @yesno 0x5
compare lastresult 0x1
if 0x1 goto @yespart
msgbox @no 0x2
release
end

#org @yespart
msgbox @yes 0x2
applymovement 11 @movementyes
release
end

#org @yesno
= ah! You can see me?

#org @yes
= Oh! Um m--meet me outside!\nOak will catch us!

#org @no
= I see I must've imagined you then.\nnow back to work

#org @movement1
#raw 0x62 0x0
#raw 0xFE 0x0

#org @movementyes
#raw 0x20 0x0
#raw 0x20 0x0
#raw 0x20 0x0
#raw 0x20 0x0
#raw 0x20 0x0
#raw 0x1D 0x0
#raw 0x1D 0x0
#raw 0x1D 0x0
#raw 0x1D 0x0
#raw 0x1D 0x0
#raw 0x60 0x0
#raw 0xFE 0x0


I'm glad I finally got it to work properly :3 (with the exception of the un-working second part of the movement script)
Half of my problem was I was opening XSE as a seperate program. I started working with it by opening it through advanced map and now it works :)

Hopefully my scripting ventures will go more smoothly now :)

Your scripting will definitely be better this time when using XSE. :P

Here's the problem instead of making #raw 0x60 as your command to hide the sprite. Use the hidesprite command. It goes like this hidesprite 0x(person event no.). In your case you are using 11 so input hidesprite 0x11. :) And remember to d0 everything in hex ok?

And you should update the XSE that you have LASTRESULT Doesn't work anymore for the latest XSE. Instead it's 0x800D. I'll post a better script, you also don't have to put 0x0 next tot he raw movements.

Quote:

#dynamic 0x800000

#org @start
lock
faceplayer
applymovement 0x11 @movement1
msgbox @yesno 0x5
compare 0x800D 0x1
if 0x1 goto @yespart
msgbox @no 0x2
release
end

#org @yespart
msgbox @yes 0x2
applymovement 0x11 @movementyes
hidesprite 0x11
setflag 0x1000
release
end

#org @yesno
= Ah! You can see me?

#org @yes
= Oh! Um m--meet me outside!\nOak will catch us!

#org @no
= I see I must've imagined you then.\nnow back to work

#org @movement1
#raw 0x62
#raw 0xFE

#org @movementyes
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0xFE
You can replace 0x800D with LASTRESULT if you don't have any plans on using a newer version. :) Remember to put 1000 to the person ID in A-map so the event won't happen again. :)

Naruto200 27th October 2012 06:31 AM

ah that might be the problem :)
I'll give that a try tomorrow.
Also does it matter if the sprite is something not normally animated in-game?
the particular overworld sprite I picked is one that doesn't move/walk.


All times are GMT. The time now is 07:43 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo.
Pokémon Hackers Online (PHO) is in no way affiliated with or endorsed by Nintendo LLC, Creatures, GAMEFREAK inc,
The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast.
All forum/site content (unless noted otherwise) and site designs are © 2006-2013 Pokémon Hackers Online (PHO).

Green Charizard Christos TreeckoLv100