The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Script Help Thread (DO NOT REQUEST SCRIPTS) (https://www.pokecommunity.com/showthread.php?t=163576)

Quickster January 27th, 2009 5:30 PM

Quote:

Originally Posted by Ninja Caterpie (Post 4315340)
-sigh-

In AMap, on the script tile, put "0003" as the top unknown and the "5040" as the thing underneath.

i have that,but it still doesnt work.

Ki77y666 January 27th, 2009 8:01 PM

Quickster try 4050 instead of 5040

now can i have help with mine. Because.......
Quote:

Originally Posted by Nosman (Post 4292750)
i STILL need help bad!
i will edit this when i no longer need help
so pleaz help.

Game: Fire Red
System: XSE
Type: 1st: Script
2nd: Person event
3rd: Script

i need...

1st script:
my attempt...

'---------------
#org 0x17922E
lockall
msgbox 0x82E9217 MSG_NORMAL '"[grey_fr]Hang on a second\nI have ..."
closeonkeypress
applymovement MOVE_PLAYER 0x81E80DF
waitmovement 0x0
msgbox 0x81E8C07 MSG_NORMAL '"[grey_fr]Where was that again?"
closeonkeypress
releaseall
end


'---------
' Strings
'---------
#org 0x2E9217
= [grey_fr]Hang on a second\nI have to go see [rival].

#org 0x1E8C07
= [grey_fr]Where was that again?


'-----------
' Movements
'-----------
#org 0x1E80DF
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements

Problem:
Does do deactivate

What i want it to do: Bring up first message then move player down then bring up second message. but not do this after seeing rival.

2nd script: The rival
my attempt...

'---------------
#org 0x1C5BA1
lock
faceplayer
checkflag 0x1126
if 0x1 call 0x81792E8
checkflag 0x1127
if 0x1 call 0x81792E9
release
end

'---------------
#org 0x1792E8
msgbox 0x8E89217 0X6
end

#org 0xE89217
= Hi [player].\nWhat do you meen that\nevery thing looks different?\p...\pOh! I see well I will help\n you find out.

'---------------
#org 0x1792E9
msgbox 0xE99217 0X6
end

#org 0xE99217
= What have you found out\nso far\p...\pI see...\nI will keep an ear out\nand let you know if i hear\nany thing.

Problem: when you talk to him it freezes the game and the script dose not open

What i want it to do: The first message box opens the closes when you talk to him again the second message box opens. Then when you talk to him again the second message box opens. and so on

Help would be greatly appreciated. Thanx

3rd script:

What i want it to do: Not let me past until get a pokemon and the pokedex. By not letting me past i want i to move me back.


TB Pro January 28th, 2009 12:37 AM

Quote:

Originally Posted by Nosman (Post 4315580)
Quickster try 4050 instead of 5040

now can i have help with mine. Because.......

Use the first script. Add
Code:

checkflag 0x[Flag used in rival event]
if 0x1 goto @offset


And it should work.

12345 January 28th, 2009 1:02 AM

I have problem with showpokepic command in Ruby, the color of picture is not true.
And

I use this code to store Pokemon to pokedex in Ruby but it doesn't work
Code:

setvar 0x8004 0x5
special 0x163


i think event # (163) of special command is wrong.

Andryandrew January 28th, 2009 12:22 PM

Quote:

Originally Posted by 12345 (Post 4315930)
I have problem with showpokepic command in Ruby, the color of picture is not true.
And

I use this code to store Pokemon to pokedex in Ruby but it doesn't work
Code:

setvar 0x8004 0x5
special 0x163


i think event # (163) of special command is wrong.

the event semms to be correct... This construct add pokemon #5 to "seen" pokedex...

Hoshiko Aki January 29th, 2009 9:26 AM

how can i made a script that i can enter a house after the 7e gym?
But it there stands a NPC in the front of the entrance. that spirte must dissapear after the 7e gym.

can somebuddy help?

Pokepal17 January 29th, 2009 11:09 AM

Quote:

Originally Posted by Ichiro Kazuki (Post 4318735)
how can i made a script that i can enter a house after the 7e gym?
But it there stands a NPC in the front of the entrance. that spirte must dissapear after the 7e gym.

can somebuddy help?

Give the person an ID code which is the same value as the flag that activates the 7th badge on the trainer card and make sure you set that flag after the 7th gym leader is beaten.

Eternal Finality January 29th, 2009 12:48 PM

I have a question,

right now i have a script that let the player obtain an antidote. but when i walk away, the antidote reappears. What do I do to make it one time only?

Spoiler:

#dynamic 0x(offset)
#org @start
checkflag 0x200
if 0x1 goto @got
giveitem 0xE 0x1 0x1
setflag 0x200
end


#org @got
clearflag 0x200
end

Pokepal17 January 29th, 2009 12:53 PM

Quote:

Originally Posted by Eternal Finality (Post 4319067)
I have a question,

right now i have a script that let the player obtain an antidote. but when i walk away, the antidote reappears. What do I do to make it one time only?

Spoiler:

#dynamic 0x(offset)
#org @start
checkflag 0x200
if 0x1 goto @got
giveitem 0xE 0x1 0x1
setflag 0x200
end


#org @got
clearflag 0x200
end

Well if it's in a Pokeball, then all you need is

Spoiler:

#dynamic 0x(offset)

#org @start
giveitem 0xE 0x1 0x1
end


And give the Pokeball any ID code which hasn't been used.

пзо January 29th, 2009 12:53 PM

Quote:

Originally Posted by Eternal Finality (Post 4319067)
I have a question,

right now i have a script that let the player obtain an antidote. but when i walk away, the antidote reappears. What do I do to make it one time only?

Spoiler:

#dynamic 0x(offset)
#org @start
checkflag 0x200
if 0x1 goto @got
giveitem 0xE 0x1 0x1
hidesprite 0x(Person number)
setflag 0x200
end


#org @got
clearflag 0x200
end

In Advanced map, goto, set Person Id, and write "200" as thats the setflag, and i edited it abit.

Eternal Finality January 29th, 2009 1:10 PM

Quote:

Originally Posted by Pokepal17 (Post 4319080)
Well if it's in a Pokeball, then all you need is

Spoiler:

#dynamic 0x(offset)

#org @start
giveitem 0xE 0x1 0x1
end


And give the Pokeball any ID code which hasn't been used.

thanks for the fast reply! Is there a list where I can see which ID numbers are already used? Thanks.

Also, Im new to scripting, I understand bits of it, but how do I make it so that a person gives the player an item, (without giving the player an option to refuse it).

TB Pro January 29th, 2009 2:06 PM

Quote:

Originally Posted by Eternal Finality (Post 4319122)
thanks for the fast reply! Is there a list where I can see which ID numbers are already used? Thanks.

Also, Im new to scripting, I understand bits of it, but how do I make it so that a person gives the player an item, (without giving the player an option to refuse it).

Giveitem does this automatically. Additem does too, and you can use a custom fanfare with it.

Ninja Caterpie January 29th, 2009 2:33 PM

Quote:

Originally Posted by Eternal Finality (Post 4319122)
thanks for the fast reply! Is there a list where I can see which ID numbers are already used? Thanks.

Also, Im new to scripting, I understand bits of it, but how do I make it so that a person gives the player an item, (without giving the player an option to refuse it).

Do you have XSE? The compiled guide has list of already used flags. Put any unused flag into the ID. Be warned, though. Once it's been used as some things ID, don't use it in a script.

Oh, and giving an item without a question...Well, you just remove the question part.

For example...

Code:

...
message @take 0x6 'this is the message it shows before giving the item. Maybe "Here, take this Potion" or something.
giveitem <item in hex> <amount> 0x0 'gives the item with the message "[PLAYER] recieved <ITEM>. Put [ITEM] in [BAG POCKET].
...


To not make it reset, you've got flags and stuff.

Eternal Finality January 29th, 2009 2:39 PM

Quote:

Originally Posted by Ninja Caterpie (Post 4319306)
Do you have XSE? The compiled guide has list of already used flags. Put any unused flag into the ID. Be warned, though. Once it's been used as some things ID, don't use it in a script.

Oh, and giving an item without a question...Well, you just remove the question part.

For example...

Code:

message @take 0x6
giveitem <item in hex> <amount> 0x0 'gives the item with the message "[PLAYER] recieved <ITEM>. Put [ITEM] in [BAG POCKET].


The rest you've learnt by means of flags. =P

yes Im using XSE, so the IDs are basically the same as flaggs, i see.
One more question though, i cant find the question part. (still dont understand all of XSE scripting) so i dont know what the script will look like.

Ninja Caterpie January 29th, 2009 2:43 PM

Quote:

Originally Posted by Eternal Finality (Post 4319325)
yes Im using XSE, so the IDs are basically the same as flaggs, i see.
One more question though, i cant find the question part. (still dont understand all of XSE scripting) so i dont know what the script will look like.

The, uh, flags ARE IDs. :\

I don't quite understand what you mean in that question.

Eternal Finality January 29th, 2009 2:50 PM

I meant that im too much of a beginner that i cant figure out the script, that a NPC will give me an item, without the box [accept yes/no].

I'd like it like:

NPC: i see that..blabla take this
*player recieved a potion*
NPC: good luck on your quest

now i have this, but XSE cant even compile it.

Spoiler:

#dynamic 0x2DD1F4
#org @start
lock
faceplayer
msgbox @hello 0x6
setflag 0x201
additem 0x0E 0x1 0x0
checkflag 0x201
if 0x1 goto @bye
release
end

#org @hello
= The outer world is dangerous.\nHere, take this.
release
end

#org @bye
= Good luck on your quest.
release
end

Lyzo January 29th, 2009 3:01 PM

Quote:

Originally Posted by Eternal Finality (Post 4319357)
I meant that im too much of a beginner that i cant figure out the script, that a NPC will give me an item, without the box [accept yes/no].

I'd like it like:

NPC: i see that..blabla take this
*player recieved a potion*
NPC: good luck on your quest

now i have this, but XSE cant even compile it.

Spoiler:

#dynamic 0x2DD1F4
#org @start
lock
faceplayer
msgbox @hello 0x6
setflag 0x201
additem 0x0E 0x1 0x0
checkflag 0x201
if 0x1 goto @bye
release
end

#org @hello
= The outer world is dangerous.\nHere, take this.
release
end

#org @bye
= Good luck on your quest.
release
end

I would get rid of the setflag and the checkflag
Make the script like this:

Spoiler:
#dynamic 0x2DD1F4

#org @start
lock
faceplayer
msgbox @hello 0x6
additem 0x0E 0x1 0x0
msgbox @bye 0x6
release
end

#org @hello
= The outer world is dangerous.\nHere, take this.

#org @bye
= Good luck on your quest.


When you're using a msgbox you don't need the release and end
The rest of the script is fine. Mabye you want to change the #dynamic 0x2DD1F4
to #dynamic 0x800000.

Eternal Finality January 29th, 2009 3:06 PM

when I try that script, i get the error
"too much parameters on line 7. The correct amount is 2"

line 7 is the line with the add item command.

I'm curious, why would I want to change the offset to 80000?

(im using Free Space finder to find offsets, also I wont use any original offsets for my hack, im planning to make my own world without any routes/towns from Kanto, if possible)

edit: i found that in the additem command, the last 0x0 must be removed.

Lyzo January 29th, 2009 3:12 PM

Quote:

Originally Posted by Eternal Finality (Post 4319395)
when I try that script, i get the error
"too much parameters on line 7. The correct amount is 2"

line 7 is the line with the add item command.

I'm curious, why would I want to change the offset to 80000?

(im using Free Space finder to find offsets, also I wont use any original offsets for my hack, im planning to make my own world without any routes/towns from Kanto, if possible)

edit: i found that in the additem command, the last 0x0 must be removed.

If you're using a free space finder then don't change it ;)

For the item command. Try changing it to giveitem and change the last part (0x0) to 0x6.

Change:

Code:

additem 0x0E 0x1 0x0

Change to:

giveitem 0x0E 0x1 0x6



Eternal Finality January 29th, 2009 3:15 PM

i tried the give item command, but now he just says his first line and then nothing happens.

Ninja Caterpie January 29th, 2009 3:37 PM

Give item 0x0 at the end. >_>

Eternal Finality January 29th, 2009 3:44 PM

I meant that when using the above script, the man says his first line once, and then nothing happens, i get no item.

Ninja Caterpie January 29th, 2009 4:11 PM

Have you changed 0x6 to 0x0 yet?

Austinia January 30th, 2009 12:31 AM

Quote:

Originally Posted by Austinia (Post 4313144)
Ok, so I made a quiz script... and theres several things I've found wrong with it...
>If you get a question wrong, she does not let you retake the quiz (though the setflag should only activate if you get it right) and when you beat the quiz, she repeats the '@winner' message twice and does not give you the prize. Then when you try to talk to her, she says nothing.

Anyways, I took out the messages but hopefully it's still fixable :/ I'll be trying to fix it. Thanks for any help!
Spoiler:
#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x109
compare LASTRESULT 0x1
if 0x1 goto @alreadytookquiz
msgbox @liketotakequiz 0x5
compare LASTRESULT 0x1
if 0x1 goto @takequizandquestion
msgbox @noquiz 0x2
release
end

#org @alreadytookquiz
msgbox @done 0x2
release
end

#org @takequizandquestion
msgbox @question1 0x5
compare LASTRESULT 0x1
if 0x1 goto @correct1
msgbox @wrong1 0x2
release
end

#org @correct1
msgbox @question2 0x5
compare LASTRESULT 0x1
if 0x1 goto @correct2
msgbox @wrong2 0x2
release
end

#org @correct2
msgbox @question3 0x5
compare LASTRESULT 0x1
if 0x0 goto @correct3
msgbox @wrong3 0x2
release
end

#org @correct3
msgbox @question4 0x5
compare LASTRESULT 0x1
if 0x1 goto @correct4
msgbox @wrong4 0x2
release
end

#org @correct4
msgbox @question5 0x5
compare LASTRESULT 0x1
if 0x1 goto @correct5
msgbox @wrong5 0x2
release
end

#org @correct5
msgbox @winner 0x2
setflag 0x109
giveitem 0xCD 0x1 0x6
release
end

#org @question1
=

#org @wrong1
=

#org @question2
=

#org @wrong2
=

#org @question3
=

#org @wrong3
=

#org @question4
=

#org @wrong4
=

#org @question5
=

#org @wrong5
=

#org @winner
=

#org @done
=

#org @liketotakequiz
=

#org @noquiz
=
still need help :(

still need help with this script :/

Eternal Finality January 30th, 2009 4:25 AM

Spoiler:

#dynamic 0x2DD1F4

#org @start
lock
faceplayer
msgbox @hello 0x6
additem 0x0E 0x1 0x0
msgbox @bye 0x6
release
end

#org @hello
= The outer world is dangerous.\nHere, take this.

#org @bye
= Good luck on your quest.


This works as in that the player obtaines an item, but when i speak to the man again. i get the item again.


All times are GMT -8. The time now is 2:55 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.