skydangerous

Untitled

Nov 16th, 2011
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.43 KB | None | 0 0
  1. local sky = {
  2.       level = 50, -- Level necessario que pode usar
  3.       preco = 10000, -- Preco para salvar o waypoint
  4.       battle = true,   -- Se pode salvar com battle ou não
  5.       skull = true,
  6.       premmy = true
  7.      
  8. }
  9.  
  10. --Comeco da talkaction
  11. function onSay(cid, words, param)
  12.   if getPlayerLevel(cid) < sky.level then
  13.                 return doPlayerSendCancel(cid, "Para usar o comando voce precissa"..configs.minLvL.." para usar.")
  14.     elseif not isPremium(cid) and sky.premmy then
  15.                 return doPlayerSendCancel(cid, "Apenas premmium account pode utilizar..")
  16.      elseif (sky.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
  17.                 return doPlayerSendCancel(cid,"Voce nao pode estar battle para usar o comando")      
  18.   end
  19.  
  20. local pos = getCreaturePosition(cid)
  21.  
  22.  if words == "!waypoint" then
  23.         if getPlayerMoney(cid) >= sky.preco then            
  24.              doPlayerRemoveMoney(cid, sky.preco)  
  25.              setWaypointPosition(getCreatureName(cid))
  26.              doPlayerSendTextMessage(cid, 4, "Você salvou posicao no mapa.")
  27.     else
  28.          doPlayerSendCancel(cid, "Voce nao tem dinheiro falta "..getPlayerMoney(cid) - sky.preco.." de dinheiro.")
  29.  end
  30.  
  31.     elseif words == "!back" then
  32.            doTeleportThing(cid, getWaypointPosition(getCreatureName(cid)))    
  33.         else
  34.             doPlayerSendCancel(cid, "Você não gravou uma posição.")
  35. end
  36.    
  37.  return TRUE
  38.  end
  39.  
  40.  
  41.    
  42.  
Advertisement
Add Comment
Please, Sign In to add comment