Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sky = {
- level = 50, -- Level necessario que pode usar
- preco = 10000, -- Preco para salvar o waypoint
- battle = true, -- Se pode salvar com battle ou não
- skull = true,
- premmy = true
- }
- --Comeco da talkaction
- function onSay(cid, words, param)
- if getPlayerLevel(cid) < sky.level then
- return doPlayerSendCancel(cid, "Para usar o comando voce precissa"..configs.minLvL.." para usar.")
- elseif not isPremium(cid) and sky.premmy then
- return doPlayerSendCancel(cid, "Apenas premmium account pode utilizar..")
- elseif (sky.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
- return doPlayerSendCancel(cid,"Voce nao pode estar battle para usar o comando")
- end
- local pos = getCreaturePosition(cid)
- if words == "!waypoint" then
- if getPlayerMoney(cid) >= sky.preco then
- doPlayerRemoveMoney(cid, sky.preco)
- setWaypointPosition(getCreatureName(cid))
- doPlayerSendTextMessage(cid, 4, "Você salvou posicao no mapa.")
- else
- doPlayerSendCancel(cid, "Voce nao tem dinheiro falta "..getPlayerMoney(cid) - sky.preco.." de dinheiro.")
- end
- elseif words == "!back" then
- doTeleportThing(cid, getWaypointPosition(getCreatureName(cid)))
- else
- doPlayerSendCancel(cid, "Você não gravou uma posição.")
- end
- return TRUE
- end
Advertisement
Add Comment
Please, Sign In to add comment