//===== rAthena Script =======================================
//= Sample: Setiteminfo & Setitemscript
//===== By: ==================================================
//= Lupus
//===== Current Version: =====================================
//= 20121003
//===== Description: =========================================
//= Demonstrates 'setiteminfo' and 'setitemscript' commands.
//============================================================
prontera,164,161,5 script Lupus 1013,{
menu
"Make Knife[3] Edible",M_1,
"Make Apple Equippable",M_2,
"Edible Knife = Full SP",M_3,
"Knife = Weapon + 3 Notes",M_4;
close;
M_1:
mes "Ok. We made Knife[3] edible.";
setiteminfo(1201,2,0); //type = 0 : potion
setitemscript(1201,"{dispbottom \"* You used Knife[3]\";}");
close;
M_2:
mes "Ok. We made Apple equippable.";
setiteminfo(512,2,5); //item type -> headgear (type = 5)
setiteminfo(512,5,512); //where to equip to (equip = 512)
setiteminfo(512,11,256); //set as headgear location (loc = 256)
setiteminfo(512,14,85); //set Headgear Sprite ID (view id = 85)
setitemscript(512,"{dispbottom \"* Other item's changed\";}",0);
setitemscript(512,"{dispbottom \"* Equipped\";}",1);
setitemscript(512,"{dispbottom \"* Unequipped\";}",2);
close;
M_3:
mes "Ok. Now edible Knife[3] restores your SP.";
setitemscript(1201,2,0);
setitemscript(1201,"{dispbottom \"* You ate Knife[3] + Full SP\"; percentheal 0,100;}");
close;
M_4:
mes "Ok. We made Knife a weapon, but added 3 notes.";
setiteminfo(1201,2,4); //type = 4 : weapon again
setitemscript(1201,"{dispbottom \"* 1 Used\";}",0);
setitemscript(1201,"{dispbottom \"* 2 Equipped\";}",1);
setitemscript(1201,"{dispbottom \"* 3 Unequipped\";}",2);
close;
}