Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 29th, 2012  |  syntax: None  |  size: 2.19 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function onUse(cid, item, fromPosition, itemEx, toPosition)
  2.  
  3. local Randomize = math.random(1, 20)
  4. local id = 0
  5. local count = 0
  6. local text = ""
  7.  
  8. if (Randomize == 1) then
  9.         id = 8891
  10.         count = 1
  11.         text = "You have found paladin armor."
  12. end
  13.  
  14. if (Randomize == 2) then
  15.         id = 2474
  16.         count = 1
  17.         text = "You have found Winged Helmet!"
  18. end
  19.  
  20. if (Randomize == 3) then
  21.         id = 2520
  22.         count = 1
  23.         text = "You have found pro demon shield!"
  24. end
  25.  
  26. if (Randomize == 4) then
  27.         id = 7367
  28.         count = 1
  29.         text = "You have found nub spear!"
  30. end
  31.  
  32. if (Randomize == 5) then
  33.         id = 9778
  34.         count = 1
  35.         text = "You have found yalahari mask!"
  36. end
  37.  
  38. if (Randomize == 6) then
  39.         id = 2495
  40.         count = 1
  41.         text = "You have found demon legs!"
  42. end
  43.  
  44. if (Randomize == 7) then
  45.         id = 2195
  46.         count = 1
  47.         text = "You have found boots of haste!"
  48. end
  49.  
  50. if (Randomize == 8) then
  51.         id = 2164
  52.         count = 1
  53.         text = "You have found pro ring!"
  54. end
  55.  
  56. if (Randomize == 9) then
  57.         id = 9776
  58.         count = 1
  59.         text = "You have found yalahari armor!"
  60. end
  61.  
  62. if (Randomize == 10) then
  63.         id = 8930
  64.         count = 1
  65.         text = "You have found nub sword!"
  66. end
  67.  
  68. if (Randomize == 11) then
  69.         id = 7591
  70.         count = 1
  71.         text = "You have found great health potion!"
  72. end
  73.  
  74. if (Randomize == 12) then
  75.         id = 7590
  76.         count = 1
  77.         text = "You have found great mana potion!"
  78. end
  79.  
  80. if (Randomize == 13) then
  81.         id = 9777
  82.         count = 1
  83.         text = "You have found yalahari legs!"
  84. end
  85.  
  86. if (Randomize == 14) then
  87.         id = 8472
  88.         count = 1
  89.         text = "You have found great spirit potion!"
  90. end
  91.  
  92. if (Randomize == 15) then
  93.         id = 2640
  94.         count = 1
  95.         text = "You have found soft boots!"
  96. end
  97.  
  98. if (Randomize == 16) then
  99.         id = 5785
  100.         count = 1
  101.         text = "You have found vip medal!"
  102. end
  103.  
  104. if (Randomize == 17) then
  105.         id = 8927
  106.         count = 1
  107.         text = "You have found nub club!"
  108. end
  109.  
  110. if (Randomize == 18) then
  111.         id = 8922
  112.         count = 1
  113.         text = "You have found nub wand!"
  114. end
  115.  
  116. if (Randomize == 19) then
  117.         id = 8925
  118.         count = 1
  119.         text = "You have found nub axe!"
  120. end
  121.  
  122. if (Randomize == 20) then
  123.         id = 8871
  124.         count = 1
  125.         text = "You have found focus cape!"
  126. end
  127.  
  128.  
  129.  
  130. doPlayerAddItem(cid, id, count)
  131. doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, text)
  132. doRemoveItem(item.uid, 1)
  133.  
  134. return TRUE
  135. end