Advertisement
Guest User

Untitled

a guest
Aug 1st, 2014
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. function onUse(cid, item, fromPosition, itemEx, toPosition)
  2.     local useItem = Item(item.uid)
  3.     local targetItem = Item(itemEx.uid)
  4.     local player = Player(cid)
  5.    
  6.     if useItem:getId() == 21426 then
  7.         if not targetItem:isItem() then
  8.             return true
  9.         end
  10.        
  11.         if bit.band(targetItem:getType():getSlotPosition(), slots[CONST_SLOT_ARMOR]) == slots[CONST_SLOT_ARMOR] then
  12.             targetItem:setAttribute(ITEM_ATTRIBUTE_TEXT, "|hmReg:10|")
  13.         end
  14.     elseif useItem:getId() == 21425 then
  15.         if not targetItem:isItem() then
  16.             return true
  17.         end
  18.        
  19.         print(fetchAttr(targetItem:getAttribute(ITEM_ATTRIBUTE_TEXT)))
  20.     end
  21.    
  22.     return true
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement