Thread: [Tutorial] Scripting Tutorial - PokeScript
View Single Post
  #11    
Old January 25th, 2008 (04:02 PM).
/Circa's Avatar
/Circa
a face in the clouds.
 
Join Date: Nov 2007
Location: Melbourne, Victoria
Gender: Male
Nature: Quiet
Alright, thanks thethethethe.

Someone asked me today, how would they make one event cancel out two, it is actually fairly simple, such as in a starter script.

When you receive the Pokemon you add a setflag, the same for all three.
But for the one you get you add a raw 53 to remove it, so it cant be interacted with.

So in a starter script we would add a question, if you wanted the Pokemon, and then send it to a pointer if they want it. They would receive the Pokemon and the Pokeball would dissapear, (Using #raw 0x53)

Then we would add a setflag. The script would be exactly the same for all three starters, just a different Pokemon Number and Pokemon name in the textbox. So infact, it is fairly simple, i'll write an example.

This will be for Pokemon Yellow, you choose a Pikachu or an Eevee.

Code:
#org $begin
lock
faceplayer
checkflag 0x200
if b_true goto $alreadygot
message $wantpikachu
$wantpikachu 1 =Would you like this Pikachu?
boxset 5
compare LASTRESULT 1
if 1 goto $getpika
message $toobad
$toobad 1 =Too bad,\nit would be a good choice.
boxset 6
release
end

#org $getpika
lock
givepokemon 0x19 0x5 0x0
message $received
$received 1 =\v\h01 Received a PIKACHU!
boxset 6
#raw 0x53
#raw 0x<PEOPLE NUMBER>
#raw 0x00
setflag 0x200
release
end

#org $alreadygot
lock
faceplayer
message $got
$got 1 =You already got a Pokemon!
boxset 6
release
end
When we add #raw 0x53 that person can no longer be interacted with.
Be aware though, I wrote that script in a hurry.

Now you can use that script as a base for the others.
Just change the Pokemon number and your done.