getiteminfo.txt 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //===== rAthena Script =======================================
  2. //= Sample: Getiteminfo
  3. //===== By: ==================================================
  4. //= Lupus
  5. //===== Last Updated: ========================================
  6. //= 20140208
  7. //===== Description: =========================================
  8. //= Demonstrates the 'getiteminfo' command.
  9. //============================================================
  10. prontera,156,179,6 script test_getiteminfo 117,{
  11. switch( select( "item ID", "aegis item name", "english item name" ) ) {
  12. case 1:
  13. mes "Please enter an item ID.";
  14. input .@value;
  15. // This line uses an INTERNAL function of your client to show item name by its ID!
  16. // ^nItemID^XXXX -> Item Name
  17. mes "Item ID: " + .@value + " ^nItemID^" + .@value;
  18. mes "Current item info:";
  19. for(.@id = 0; .@id <= 18; .@id++)
  20. mes " getiteminfo(" + .@value + "," + .@id + ") = " + getiteminfo(.@value,.@id);
  21. close;
  22. case 2:
  23. mes "Please enter an english item name.";
  24. input .@value$;
  25. mes "english item name: " + .@value$;
  26. break;
  27. case 3:
  28. mes "Please enter an aegis item name.";
  29. input .@value$;
  30. mes "aegis item name: " + .@value$;
  31. break;
  32. }
  33. mes "Current item info:";
  34. for(.@id = 0; .@id <= 18; .@id++)
  35. mes " getiteminfo(" + .@value$ + "," + .@id + ") = " + getiteminfo(.@value$,.@id);
  36. close;
  37. }