View Single Post
  #4912    
Old November 11th, 2010 (11:26 PM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
Crystal Tier
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,592
Quote originally posted by ASuch:
For some reason if you click yes, then it gives you the message you would get for no. No matter what I click whether its Yes or No, it always gives me the message for no. The script I'm using is this one from destinedjagold.
Try this (changes in blue):
Code:
#dynamic 0x18D300

#org @start
lock
faceplayer
checkflag 0x1210
if 0x01 goto @after
textcolor 0x00
msgbox @pie 0x5
compare LASTRESULT B_TRUE
if 0x1 goto @okay
compare LASTRESULT B_FALSE
if 0x1 goto @dont
release
end

#org @pie
= Do you want to know the operation?

#org @dont
textcolor 0x00
msgbox @idk 0x5
compare LASTRESULT B_TRUE
if 0x1 goto @sure
compare LASTRESULT B_FALSE
if 0x1 goto @out
release
end

#org @idk
= You already know? Then do you want\nto know how to leave from the\lnorth or east?

#org @sure
message @well 0x6
release
end

#org @well
= Well you can't leave from the\neast, but you can leave from the\lnorth if I give you an item to\lshow to the guard.

#org @out
message @good 0x6
release
end

#org @good
= Good you know everything. Now get\nback to work soldier!

#org @okay
message @op 0x6
release
end

#org @op
= Our Operation is to invade\nViridian City, but there's this\llittle punk that's stopping us.\lHer name is May and she defended\lagainst Magma and Aqua in Hoenn\land she's ready to defend Kanto.\pBeat her and I will allow you to\nleave this god forsaken place.

#org @after
msgbox @shoes1 0x6
fanfare 0x13E
textcolor 0x01
msgbox @shoes 0x4
waitfanfare
setflag 0x82F
textcolor 0x00
msgbox @sweet 0x2
end

#org @shoes1 
= Good job soldier!\pFor your service, I'll give you\n an item\lto show to the guard. They're\lspecially made from our crafter,\lColonel Raysie!

#org @shoes
= \v\h01 recieved the running shoes!

#org @sweet
= Now get your pokemon ready for\nPumpkin City!
Quote originally posted by Teh Blazer:
Quick question here: How does one use the [buffer] command? What is it used for and how do you personally use it?
Depends on what, exactly, you're buffering. You can buffer the names of pokémon, attacks, even your own custom strings. There are a number of commands associated with the buffers (such as bufferpokemon, bufferitem, bufferstring, etc.). The one that you use depends on the contents of the buffer. The commands exist to improve the efficiency of your scripts. For example, instead of the following code:

Code:
...
// 0x5000 contains the ID number of the player's starter
compare 0x5000 PKMN_BULBASAUR
if 0x1 goto @bulbasaur
compare 0x5000 PKMN_CHARMANDER
if 0x1 goto @charmander
compare 0x5000 PKMN_SQUIRTLE
if 0x1 goto @squirtle

...

#org @bulbasaur
msgbox @bulbatext 0x4

...

#org @charmander
msgbox @chartext 0x4

...

#org @squirtle
msgbox @squirtext 0x4

...

#org @bulbatext
= Your BULBASAUR is so cute!

#org @chartext
= Your CHARMANDER is so cute!

#org @squirtext
= Your SQUIRTLE is so cute!
...
... you could use something like this:

Code:
...
// 0x5000 contains the ID number of the player's starter
bufferpokemon 0x0 0x5000    // Stores the number in 0x5000 into buffer1
msgbox @text 0x4
...

#org @text
= Your [buffer1] is so cute!
...
Isn't that just so much easier? :)
__________________

Brother of Vrai