View Single Post
  #3802    
Old May 9th, 2010 (11:20 AM).
PeregrineFig's Avatar
PeregrineFig PeregrineFig is offline
Starting Pokémon Obsidian
 
Join Date: Feb 2010
Location: Michigan, USA
Age: 20
Gender: Male
Nature: Hardy
Posts: 202
Quote originally posted by Nikolai Fox:
This next one has me completely stumped...

Spoiler:
#dynamic 0x100000
#org @start
lock
faceplayer
checkflag 0x104
if 0x1 goto @question
msgbox @hello 0x6
setflag 0x104
goto @question

#org @question
checkflag 0x105
if 0x1 goto @welldone
lock
msgbox @fightornot 0x5
if 0x1 goto @yes
if 0x0 goto @no

#org @yes
trainerbattle 0x0 0x004 0x0 @choseyes @after
msgbox @youwon 0x6
givepokemon 0xF 0x8 0x0 0x0 0x0 0x0
setflag 0x105
preparemsg @gotpokemon
waitmsg
fanfare 0x13E
waitfanfare
msgbox @nickname MSG_YESNO
compare LASTRESULT 0x1
if 0x1 goto @nicknameyes
compare LASTRESULT 0x0
if 0x1 goto @nicknameno
release
end

#org @welldone
msgbox @goodbye 0x6
release
end

#org @nicknameyes
call @special
end

#org @nicknameno
release
end

#org @special
fadescreen 0x1
special 0x9E
waitstate
return

#org @no
msgbox @choseno 0x6
release
end

#org @hello
= My name is Samurai.\nI once lived in Viridian Forest,\lgathering information on Beedrill\land catching them.\lNow I have retired here, and am\lwilling to give anyone who beats\lme one of the Beedrill I have\lcaught.

#org @fightornot
= My Beedrill is very tough, and I\ndon't recommend fighting it until\lyou have at least a full team of\lPokémon with you.\pDo you accept my challenge?

#org @choseno
= Come back when you think you are\nready.

#org @choseyes
= Then give me everything you've\ngot!

#org @after
= You beat me, unbelievable.

#org @youwon
= Congratulations, you beat me. You\nare a very tough trainer, and\ldeserving of one of my prized\lBeedrill. Here, take it.

#org @gotpokemon
= Congratulations, you earned a\nBeedrill for beating Samurai.

#org @goodbye
= Congratulations again on beating\nme and my Beequeen.

#org @nickname
= Do you want to give a nickname to\nyour new Beedrill?


When it gets to:
msgbox @fightornot 0x5
if 0x1 goto @yes
if 0x0 goto @no

In-game, if you choose yes it goes to no. So saying both yes and no sends the script to @no, saying "Come back when you are think you are read". I don't understand how choosing yes can send it to no when the script says the complete opposite :/

When I choose yes, I'm supposed to be sent to @yes and start that trainer battle.
I didn't even need to open the spoiler tag to spot your problem. You need to precede each of those if commands with a "compare 0x800D 0x1".
__________________
Current Projects:
POKéMON AQUA SAPPHIRE
POKéMON OBSIDIAN