Guest User

sKYlIGH

a guest
Apr 8th, 2013
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.93 KB | None | 0 0
  1.     function onStepIn(cid, item, pos, frompos)
  2.      
  3.     local config = {
  4.           vocation = 4, -- Needed vocation
  5.           storage = 13820 -- No change!
  6.     }
  7.      
  8.           if getPlayerVocation(cid) == config.vocation then
  9.              if getPlayerStorageValue(cid, config.storage) <= -1 then
  10.                 doPlayerSendTextMessage(cid, 22, "You are not Knight, if you pass here again lose 10k!")
  11.                   doTeleportThing(cid, frompos, true)
  12.                     setPlayerStorageValue(cid, config.storage , 1)
  13.              end
  14.           end
  15.          
  16.           if getPlayerStorageValue(cid, config.storage) >= 1 then
  17.              if doPlayerRemoveMoney(cid, 10000) == TRUE then
  18.                 doPlayerSendTextMessage(cid,22,"You lose 10k!")
  19.                    setPlayerStorageValue(cid, config.storage, -1)
  20.             return true
  21.                 end
  22.              end
  23.                 return true
  24.              end
Advertisement
Add Comment
Please, Sign In to add comment