summaryrefslogblamecommitdiff
path: root/npc/001-1/rewards.txt
blob: 34f591e2cf9ceecbe944b6090d9864d7336f494d (plain) (tree)
































                                                                                                              
                                                                      
                                   




                                                                    

















                                                                          
// TMW2 Script
// Author:
//  Jesusalva
// Description:
//  Trades Strange Coins for useful items

001-1,243,26,0	script	Aeros Trader	NPC_M_SHOPKEEPER,0,0,{
    mesn;
    mesq l("Oh, hello there! Welcome to the Mana Plain Of Existence!");
    next;
    mesn;
    mesq l("In this wonderful realm, you can find and earn many @@, our currency!", getitemlink(StrangeCoin));
    next;
    mesn;
    mesq l("You can then trade these coins for items with me!");
    next;
    openshop;
    close;

OnInit:
    .@npcId = getnpcid(0, .name$);
    setunitdata(.@npcId, UDT_HEADTOP, 2935);
    setunitdata(.@npcId, UDT_HEADMIDDLE, 1329);
    setunitdata(.@npcId, UDT_WEAPON, 2204);
    setunitdata(.@npcId, UDT_HEADBOTTOM, 1801);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 25);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 4);

    .sex = G_MALE;
    .distance = 5;

	tradertype(NST_CUSTOM);

	//sellitem GoldenWarlordPlate,2500; // Item still not balanced
	sellitem ThunderStaff,2000;
	sellitem PiouEgg,500;
	sellitem Googles,80;
	sellitem PetcaringGuide,5; // I needed to add this somewhere
	sellitem ElixirOfLife,3;
	sellitem Grenade,2;
	sellitem Curshroom,1;
	end;

/* set currency to be item 828 */
OnCountFunds:
	setcurrency(countitem(StrangeCoin));
	end;

/* @price is total cost. @points is if we accept two items as currency. */
OnPayFunds:
	//dispbottom "Hi: price="+@price+" and points="+@points;
	if( countitem(StrangeCoin) < @price )
		end;
	delitem StrangeCoin,@price;
	purchaseok();
	end;

}