Advertisement
Skymagnum

Untitled

Apr 27th, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. function onUse(cid, item, fromPosition, itemEx, toPosition)
  2.  
  3. local newVocation = 8
  4. local newArmor = 2222
  5. local slotArm = getPlayerSlotItem(cid, CONST_SLOTARMOR)
  6.  
  7.     if getPlayerStorageValue(cid, 8343) < 0 then
  8.        setPlayerStorageValue(cid, 93829, 1)
  9.        setPlayerStorageValue(cid, 93830, newVocation)
  10.        doPlayerSetVocation(cid, newVocation)
  11.        doPlayerAddItem(cid, slotArm.itemitemid, 1)
  12.        doTransformItem(slotArm.uid, newArmor)
  13.             else
  14.        doPlayerSendCancel(cid, "Sorry, you can't do it.")
  15.     end
  16.  
  17.     return true
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement