beeki

Training offline

Sep 5th, 2012
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. local statue = {
  2.     [18488] = SKILL_SWORD,
  3.     [18489] = SKILL_AXE,
  4.     [18490] = SKILL_CLUB,
  5.     [18491] = SKILL_DISTANCE,
  6.     [18492] = SKILL_MAGLEVEL
  7.     }
  8.  
  9. function onUse(cid, item, fromPosition, itemEx, toPosition)
  10. local premiumDays = getPlayerPremiumDays(cid)
  11.  
  12.     if premiumDays > 0 then
  13.         doPlayerSetOfflineTrainingSkill(cid, statue[item.itemid])
  14.         doRemoveCreature(cid)
  15.     else
  16.         doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUNEEDPREMIUMACCOUNT)
  17.     end
  18.     return true
  19. end
Advertisement
Add Comment
Please, Sign In to add comment