Free items from one charecter to another. (SOLVED)

Started by ty3194, Sat 25/10/2008 04:29:42

Previous topic - Next topic

ty3194

I have a merchant with a drink, and i want to give the drink for free to my main character. when the player clicks the option text "What type of drink is it" in the dialogue dWares, the merchant says "It is a very tasty beverage, have a sample!" and at that point i want to add the drink to the players inventory. This is what i have in my globalscript.asc:

function dialog_request;
{
if cMerchant.Say("It is a very tasty beverage, have a sample!");
cEgo.AddInventory(iDrink);
}

RickJ

Quote
dialog_request (int parameter)
Called when a dialog script line "run-script" is processed. PARAMETER is the value of the number following the "run-script" on that line of the dialog script.
So you would probably put something like this in somewhere the dialog script ..
Code: ags

run-script 1


and in the global scri[pt something like this ...
Code: ags

function dialog_request(int data) {

     if (data==1) {
          cEgo.AddInventory(iDrink);
     }
}


ty3194


SMF spam blocked by CleanTalk