This was my first script ever, and you saying that it wasn't bad was really boosting to my confidence in my game. Now onto the serious stuff.
With the first four things you listed, should the opening of the script look like this instead? I changed some stuff to make it less confusing for myself.
Now for the variable, I haven't figured out to do that yet. Can you give me an example of the "check starter" variable? I'm sure I could adapt that to my own script in no time if I just knew what I was doing. If you wanna see the entire Draft 2 script, with ALOT of changing and it's not fully complete, here it is below:
Feel free to add whatever is needed, preferably in a different color, to help check a starter and then give a specific item to specific Pokemon. (Ex. Bulbasaur gets the Miracle Seed, Charmander gets Charcoal, etc.)
Well people tend to give less credit than what they're do and your script was waaay better than my first script by far. :P
Before I go into details, I'd like to point you to this thread (
http://www.pokecommunity.com/showthread.php?t=302347) as it is very helpful in showing new hackers what flags are safe to use and what flags the game uses beforehand so messing with them would be catastrophic to the game.
Second, I know you know that when you ask a yes or no question, you're going to be using the "msgbox @[blahblah]
0x5" command, not the 0x6 one. Since yo're using the 0x5 command, you know that you're gonna have to be using the "compare 0x800D 0x1/if 0x1 goto @yes" thing for at least one of the answers (if you still don't understand why you don't need it the second time, feel free to ask).
Thirdly, the dynamic at the top is where the game starts to find free space to put your script in and so when you put "dynamic 0xFFFFFF" you're telling XSE to start insterting your script starting at the space "0xFFFFFF" which is at the very end of the ROM. Free space starts at 0x800000 for Fire Red, so you can just use that instead.
Fourthly, you placed the setflag 0x1 so that when you activate the script in-game, the NPC will face you, the game will check that the flag was set and since it wasn't it won't do the "goto", the NPC will ask the question, then the game will set the flag and then the script will end. Then once you talk to the NPC again, it will read the flag that you set and then do the goto, but clearly that's not optimal.
Fifthly, and finally, the setvar for the starters is a bit of a complicated thing because it requires two scripts to get it done, but easy once you see how simple it is. The link I showed you also provided a list of the variables that can be used safely with a few exceptions, so for this demonstration I'll use the first safe var, 4012. Say the player picks a Bulbasaur, then after you do the givepokemon command write "setvar 0x4012 0x1" so now you know that the variable 4012 has been given the number 1 because of the Bulbasaur. If they chose Charmander, then use "setvar 0x4012 0x2" so the number 2 is associated with Charmander. Same with Squirtle, "setvar 0x4012 0x3" right after the givepokemon command and know in your mind that if 4012 is 3 if and only if Squirtle was chosen--as the number would be different for every pokemon.
(Sorry, had to break this into two paragraphs because one big chunk can be daunting to read)
Now right after the NPC asks the player what pokemon they got in your script right now, If the player chooses yes (compare 0x800D 0x1/if 0x1 goto @yes) then at the beginning of your new "org @yes" string put the "compare 0x4012 0x1 (or whatever it is, depending on the pokemon the player claims of having) and the "if 0x0 goto @lying" where the "#org @lying" string is the NPC saying they don't believe the player and ending the script. I know I'm not the best at explaining, so I went ahead and fixed the first part of your script for you, but only for Bulbasaur so you can get a feel.
#dynamic 0xFFFFFF0x800000
#org @start
lock
faceplayer
checkflag 0x1(anything here that is safe on the thread I showed you)
if 0x1 goto @starters@finished
msgbox @1 0x60x5
setflag 0x1
compare 0x800D 0x1
if 0x1 goto @yes
msgbox @no 0x6
release
end
#org @starters@finished
msgbox @[talks about you already got your item] 0x6
clearflag 0x1
release
end
#org @item@yes
giveitem 0x[item] 0x[amount] MSG_OBTAIN
msgbox @bulbasaur 0x5
compare 0x800D 0x1
if 0x1 goto @yesbulba
...(These are the same for
...Charmander and Squirtle)
goto @yes (This makes sure that if the player said no to all of them, the script would loop back to the beginning so they'd have to answer yes sometime)
end
#org @yesbulba
compare 0x4012 0x1
if 0x0 goto @notbulba
giveitem 0x[item] 0x1 MSG_OBTAIN
msgbox @1 0x6
setflag 0x(Whatever flag you plan to use, just make sure it's the same one you check in the beginning)
release
end
#org @notbulba
msgbox @bulbanotstarter 0x6
release
end
#org @1
= Mind if I check your starter?
#org @6
= You’re not going to tell me your starter? Shame on you!
#org @bulbasaur
= Was Bulbasaur your starter?
#org @1
= Enjoy your (insert item here)!
#org @bulbanotstarter
= Wait a second, I don't think Bulbasaur was your starter. Go away! I have no time for liars!
Now this edit combined most of what I was talking about, including the right starter check. Things could be done differently, but hopefully you'll understand through all that chaos. One final note I'd like to leave is that the game won't automatically fit your text into the textboxes and if your line is too long it will just run through the text box and look unprofessional. There is a text box adjuster or something like that in XSE that you can put in your words and it will automatically add in the necessary commands to make the words fit in the box, so I'd recommend using that. As usual, if you have any questions, don't hesitate to respond to this thread! Happy hacking!