I'm a big beginner to scripting and I can only do yes and no boxes -.- and I was wondering if anyone could help me build a script or give send me in the direction of a tutorial that includes the parts I need.
ROM:Fire Red
Program: XSE
Script details: First off ,there will be two guys facing eachother seemingly locked in a battle(I can do this part) and then I need it so when you talk to the person, he asks you to help him, and then the option for Yes or No to help him comes up and if you press yes it gives you a pokemon(use any pokemon you want) and induces a battle with a pokemon trainer. It doesnt matter what the trainer says before or after the win because I'll edit it to whatever I need afterwards. If you say No, then it just ends the conversation, this I can do by myself but it's the trainer part and give pokemon thats getting to me.
Any help is welcome.
Okay, probably the best thing for you to do--for any script--is use
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial. I've used it for pretty much everything, and it answers both of your questions.
To give a Pokémon, you use this command:
givepokemon 0x(PKMN) 0x(LVL) 0x(ITEM) 0x0 0x0 0x0
fanfare 0x13E
msgbox @(insert your pointer to your you-got-a-Pokémon dialogue) 0x4
waitfanfare
closeonkeypress
Replace "(PKMN)" with the number of the Pokémon in hexadecimal. I think a Pokémon's hexadecimal number is simply its Pokédex number converted to hex, and you can convert normal numbers into hex with
this site really easily. "(LVL)" is replaced with the level you want the Pokémon to be--I think you have to convert it to hex, too, but I haven't tried this myself because I've never made a givepokemon script that gives a Pokémon over level 5. "(ITEM)" is any held item you want the Pokémon to have; each item also has a number assigned to it, and you need to convert that number into hex as well. A list of what number corresponds with what item can be found in diegoisawesome's tutorial. I don't know what the last three "0x0"s do, I think you're just supposed to leave them blank and I've never heard of a script that requires you to do anything else with them. The "fanfare 0x13E" and "waitfanfare" makes the little dinging you hear whenever you get a Pokémon or receive an item. It's not necessary for the script to work, but it makes it more convincing. You have to do something else in the script to give the Pokémon a nickname, but you'll have to ask someone else about that because I keep messing that script up...
There are two different ways to do trainer battles. One of them is just for plain old every day battles, the trainers that "catch your eye," walk up to you, battle, and then it's done. The other way is for "special" battles, like gym battles where you have to go up to the OW and talk to it to start the battle, or battles that are part of a longer script--like yours. Here's how the second type works:
trainerbattle 0x1 0x(TRAINER) 0x0 @before (or any other pointer you want, "before" isn't necessary) @after @later
"0x1" means it's a special battle, instead of a normal battle; a normal battle would just be "0x0". The "(TRAINER)" needs to be replaced with a number that will tell the game what the battle will be like: the name of the trainer your battling, what Pokémon it has and what levels... That number is basically the enemy trainer's "Trainer ID" number. You can create trainers and their teams using the tool A-Trainer, and then the number that A-Trainer assigns to the trainer you just made will be the number you put in "(TRAINER)". The 0x0 at the end is also supposed to be blank. @before is a msgbox the trainer will say right before the battle begins, @after is their dialogue--while still in the battle screen--when they're defeated, and @later is where you will continue the actual script, not just a msgbox.
Hope that helps. In the future, you probably want to check diegoisawesome's or someone else's tutorial before asking a question, because oftentimes questions like yours have already been answered. Generally, if it's something that everybody needs to do if they're making a hack--like make a battle, give out Pokémon or items, heal their Pokémon, etc.--then it's already been explained in a tutorial somewhere.