npc_test_setitemx.txt 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //by Lupus.
  2. // SVN TRUNK 9940+ only
  3. //setiteminfo(itemID,n,Value), where n
  4. // 0 value_buy;
  5. // 1 value_sell;
  6. // 2 type;
  7. // 3 maxchance = Max drop chance of this item e.g. 1 = 0.01% , etc..
  8. // if = 0, then monsters don't drop it at all (rare or a quest item)
  9. // if = 10000, then this item is sold in NPC shops only
  10. // 4 sex;
  11. // 5 equip;
  12. // 6 weight;
  13. // 7 atk;
  14. // 8 def;
  15. // 9 range;
  16. // 10 slot;
  17. // 11 look;
  18. // 12 elv;
  19. // 13 wlv;
  20. prontera.gat,164,161,5 script Lupus 1013,{
  21. menu "Make Knife[3] Edible",M_1,
  22. "Make Apple Equippable",M_2,
  23. "Edible Knife = Full SP",M_3,
  24. "Knife = Weapon + 3 Notes",M_4;
  25. close;
  26. M_1:
  27. //WORKS!
  28. mes "Ok. We Made Knife[3] Edible";
  29. setiteminfo(1201,2,0); //type = 0 : potion
  30. setitemscript(1201,"{dispbottom \"* You used Knife[3]\";}");
  31. close;
  32. M_2:
  33. //WORKS!
  34. mes "Ok. We Made Apple Equippable";
  35. //item type -> headgear
  36. setiteminfo(512,2,5); //type = 5
  37. //where to equip to
  38. setiteminfo(512,5,512); //equip = 512
  39. //set as headgear location
  40. setiteminfo(512,11,256); //loc = 256
  41. //set Headgear Sprite ID
  42. setiteminfo(512,14,85); //view id = 85
  43. setitemscript(512,"{dispbottom \"* Other item's changed\";}",0);
  44. setitemscript(512,"{dispbottom \"* Equipped\";}",1);
  45. setitemscript(512,"{dispbottom \"* Unequipped\";}",2);
  46. close;
  47. M_3:
  48. //WORKS!
  49. mes "Ok. Now Edible Knife[3] restores your SP";
  50. setitemscript(1201,2,0);
  51. setitemscript(1201,"{dispbottom \"* You ate Knife[3] + Full SP\"; percentheal 0,100;}");
  52. close;
  53. M_4:
  54. //WORKS!
  55. mes "Ok. We Made Knife... a weapon. But added 3 notes.";
  56. setiteminfo(1201,2,4); //type = 4 : weapon again
  57. setitemscript(1201,"{dispbottom \"* 1 Used\";}",0);
  58. setitemscript(1201,"{dispbottom \"* 2 Equipped\";}",1);
  59. setitemscript(1201,"{dispbottom \"* 3 Unequipped\";}",2);
  60. close;
  61. }