Blazera 8.60
blazera.net
SOBRE O BLAZERA
Um fresh start em um servidor 8.6 clássico, com real map, focado na experiência raiz do Tibia. | Classic Real Map • Fresh Start • Client 8.6 • Old School Gameplay • Active Community
Inicia em:
--
Participar
Solutions
-
Kolisium's post in (Resolvido)[Pedido] Talkaction !pvp was marked as the answercreaturescripts:
function onCombat(cid, target) if isPlayer(cid) and isPlayer(target) then if getPlayerStorageValue(cid, 123456) == 1 then return false end end return true end function onTarget(cid,target) if isPlayer(cid) and isPlayer(target) then if getPlayerStorageValue(cid,123456) == 1 then doPlayerSendCancel(cid, "Reative o PVP para atacar um jogador.") return false end end return true end function onLogin(cid) registerCreatureEvent(cid, "PVPTarget") registerCreatureEvent(cid, "PVPCombat") return true end .xml :
<event type="login" name="PVPLogin" event="script" value="script.lua"/> <event type="target" name="PVPTarget" event="script" value="script.lua"/> <event type="combat" name="PVPCombat" event="script" value="script.lua"/> talkactions:
function onSay(cid, words, param, channel) if param == "" then return doPlayerSendCancel(cid, "Escolha se quer deixar o PVP on ou off.") end if isInArray({"on","off"}, param) then local value = param == "on" and 1 or 0 local status = param == "on" and "ativou" or "desativou" doPlayerSetStorageValue(cid, 123456, value) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você "..status.." o PVP.") else doPlayerSendCancel(cid, "Escolha se quer deixar o PVP on ou off.") end return true end Tag coloque como quiser.
Creditos: Killua