Showing Visitor Messages 1 to 12 of 12
-
June 15th, 2012 3:22 AMMana#org @Talk
= Congratulations! You earned a Bulbasaur!
Goes before the Givepokemon command.
Then:
#org @Talk2
= [PLAYER] received a Bulbasaur!
Goes between the fanfare and waitfanfare :) -
June 14th, 2012 9:17 PMzovaI really appreciate this, I lack patience and would probably be annoyed by now.
And the text , Congratz! etc..... where would I put that and why? -
June 14th, 2012 2:31 PMManaSure!
Spoiler:msgbox @Talk1 0x6
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0 [
First number is the species number, in hex. Bulbsaur is easy as it is #1, so 0x1 is used. Pikachu is #25, so we would use 0x19. Second number is the level (also in hex), 3rd number is the hold item it comes with - you can find the values for items and Pokémon here.
fanfare 0x13E
msgbox @Talk2 0x4
waitfanfare
closeonkeypress
fanfare plays a tune, the values of which can be found in the 'header' section of Advance-Map. Msgbox number 0x4 means that the box stays open until closeonkeypress happens, and the player presses A. waitfanfare just means that the box can only be closed after the jingle plays fully.
setflag 0x828
msgbox @Talk3 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
setflag 0x828 is the Pokémon Menu flag (as that is needed to view your Pokémon). Msgbox number 0x5 gives a Yes/No choice box.
compare LASTRESULT 0x1 is a way of saying "Did the player say yes?", if they did then the script gosubs to @name, which calls the Pokémon naming routine call 0x1A74EB. Which automatically comes back with the return command. If the player answers no then the script just continues.
msgbox @Talk4 0x6
applymovement 0x[PERSON_EVENT_NUM] @Move
waitmovement 0x0
hidesprite 0x[PERSON_EVENT_NUM]
setflag 0x[PERSON_ID]
applymovement is used if you want a person event to walk around, turn around, or show [!] [?][:D] emote things. All you need is the event number and a pointer to which movements you want. waitmovement 0x0 then means the script will not continue until the movement is completed. hidesprite makes the sprite disappear and the flag is to make the disappearance permanent.
This is how you organise movements:
#org @Move
#raw 0x11 0x11 0x11 0x11 0xFE
In this example 0x11 happens 4 times, 0x11 means 'Move up 1'. Always remember to include '0xFE' to the end as that signifies the end of the movement.
You can find a list of movements here.
Hope that helped! -
June 14th, 2012 1:31 PMzovaSorry if it seems tedious, but an you explain each line of what you told me?
-
June 14th, 2012 3:45 AMManaSo you would have this, basically:
Spoiler:...
msgbox @Talk1 0x6
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @Talk2 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @Talk3 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @Talk4 0x6
applymovement 0x[PERSON_EVENT_NUM] @Move
waitmovement 0x0
hidesprite 0x[PERSON_EVENT_NUM]
setflag 0x[PERSON_ID]
release
end
#org @name
call 0x1A74EB
return
#org @Talk
= Congratulations! You earned a Bulbasaur!
#org @Talk2
= [PLAYER] received a Bulbasaur!
#org @Talk3
= Would you like to give a nickname to Bulbasaur?
#org @Talk4
= Take good care of it, bye for now.
#org @Move
#raw 0x11 0x11 0x11 0x11 0xFE
Person Event Number and Person ID can both be found in A-Map, when you click on the event.
If this is for your first Pokémon it's a good idea to use the flag 0x828 - that way you also activate the Pokémon menu as well and kill two birds with one stone! -
June 13th, 2012 5:54 PMzovaSo if I wanted a man to say,
Congratulations!
You earned a Bulbasaur!
And then he gives you bulbasaur, then walks away, How could I do that? -
June 13th, 2012 11:31 AMManaFlags are areas of the ROM which store yes/no kind of information - they are either set, or clear.
In scripting you use the commands: setflag 0xFLAG, clearflag 0xFLAG and checkflag 0xFLAG (where flag is a unique number, normally 400-1000).
Some flags have special properties when set, and activate menus, badges, etc.
(For Emerald, Ruby/Sapphire flags see here)Originally Posted by FireRed flags0x820 – Activates First Badge
0x821 - Activates Second Badge
0x822 - Activates Third Badge
0x823 - Activates Fourth Badge
0x824 - Activates Fifth Badge
0x825 - Activates Sixth Badge
0x826 - Activates Seventh Badge
0x827 - Activates Eighth Badge
0x828 - Activates Pokemon Menu
0x829 - Activates Pokedex Menu
0x82F - Activates Running Shoes
For simplicity imagine that 'setflag' changes the value from 0 -> 1. 'clearflag' changes the value from 1 -> 0.
Here is a script to demonstrate flag use in changing what happens:
Spoiler:#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x500
if 0x1 goto @FlagIsSet
msgbox @Talk1 0x6
setflag 0x500
release
end
#org @FlagIsSet
msgbox @Talk2 0x6
clearflag 0x500
release
end
#org @Talk1
= Let's set the flag!
#org @Talk2
= The flag is set, let's clear it!
The line under 'checkflag 0x500' is important, it means that when 0x500 is set (value = 1) then the script shoulg to to @FlagIsSet rather than carry on. This script should therefore alternate between the two messages every time you talk to the person event.
I hope that made flags clearer! :) -
June 13th, 2012 10:48 AMzovaDo you think you can simplify what a flag is?
-
June 13th, 2012 2:37 AMManaAh that's a problem that crops up a lot, the issue is that 'hidesprite' is only temporary, to make it permanent you need to also set a flag, somewhere in the script (there might be one already), then you use that as the event's "Person ID" in Advancemap.
Script:
...
hidesprite 0x
setflag 0x800
...
Person ID: 800 -
June 12th, 2012 3:55 PMzovaOh well, Ive read most of the tutorials, but they just dont seem clear to me, Im having trouble with 1 thing first, My item events are respawning, how do i stop that?
-
June 12th, 2012 3:26 PMManaHi Nova! I see you need a hand with scripting, hopefully I can help! Unfortunately I don't use skype, however I am often on VMs/PMs quite often here (GMT timezone).
How much do you know about scripting so far? I can link you to some tutorials to get you started or help you with specific things if you've tried them and gotten stuck :) -
June 12th, 2012 1:30 PMzovaapparently, you might be my mentor? Do you have a skype?


