Ir para conteúdo
Entre para seguir isso  
Roku 3

Roku Optional PVP System

Recommended Posts

Roku 3    0
Roku 3
Nome: Roku Optional PVP System

Autor: Roku

Versão: ~

Descrição: opte por matar ou morrer. Esse script, cuja é minha ultima contribuição com este "forum", lhe permite uma interação opcional de luta.

 

+ SCRIPT:

TALKACTION

--[[ Roku Optional PVP System (Part I)
Develped by Roku
2010 - OTBR]]
local info = "-> Roku PVP System\n  This system gives you the possibility to chose if you can kill or die by players.\n You have these options:\n /pvp on\n /pvp of\n/pvp stat"
local pvp = 15391

function onSay(cid, words, param)
        if(param == nil) then return doPlayerSendCancel(cid, "Chose a mode.") end
         param = param:lower()
               if(param == "info") then doShowTextDialog(cid, 2384, info)
               return TRUE
               end
                  if(getTilePzInfo(getCreaturePosition(cid)) or isPlayerPzLocked(cid)) then
               if(param == "on") then
                        if(getPlayerStorageValue(cid, pvp) == 0) then
                        setPlayerStorageValue(cid, pvp, 1)
                        doPlayerSendCancel(cid, "PVP TURNED ON.")
                             else
                          doPlayerSendCancel(cid, "PVP is already turned ON.")
                        return FALSE
                        end
               elseif(param == "of") then
                      if(getPlayerStorageValue(cid, pvp, 1)) then
                         setPlayerStorageValue(cid, pvp, 0)
                        doPlayerSendCancel(cid, "PVP TURNED OFF.")
                     else
                      doPlayerSendCancel(cid, "PVP is already turned OFF.")
                        return FALSE
                        end
                      elseif param == "stat" then
               local color, stat = {[1] = 21, [0] = 25}, {[1] = "PVP ON", [0] = "PVP OFF"}
               doPlayerSendTextMessage(cid, color[getPlayerStorageValue(cid, pvp)], stat[getPlayerStorageValue(cid, pvp)])
               return TRUE
                end
                else doPlayerSendCancel(cid, "Come\'on, man, you cant change your mode during a battle or out a pz zone.")
               end
    return TRUE
end

 

CREATURE SCRIPT

--[[ Roku Optional PVP System (Part II)
Develped by Roku
2010 - OTBR]]
function onAttack(cid, targetId, targetName)
   if isPlayer(cid) and isPlayer(targetId) then
   if(getPlayerStorageValue(cid, 15391) == 0 or getPlayerStorageValue(targetId, 15391) == 0) then
    doPlayerSendCancel(cid, "You cannot attack this player.")
       return FALSE
       end
       end
       return TRUE
       end

 

+ TAGS:

<event type="attack" name="optionalpvp" event="script" value=".lua"/>
e
<talkaction words="/pvp" hide="yes" event="script" value=".lua"/>

OBS: o script nao foi testado. Peço que alguem o faça, a partir do dia 20 estarei corrigindo os erros.

Editado por Mickfern

Compartilhar este post


Link para o post
Oneshot    24
Oneshot

Parece tudo ok.

 

APROVADO!

MOVIDO PARA SISTEMAS & BIBLIOTECAS

Editado por Garou

Compartilhar este post


Link para o post
EruaedhManwe    0
EruaedhManwe

muito interessante o script, abre uma nova poçibilidade de jogo nos mundos, com isso os servers podem fazer mundo optional, q nem o tibia

Compartilhar este post


Link para o post
R0ku1    0
R0ku1

nossa q foda mano..

fita de mil gral aguda....

pqp

 

vou uzar no meu srv

Compartilhar este post


Link para o post
chico1258    0
chico1258

Nossa muito bom esse scripte, funciono direito no meu server

Parabens pelo scripts =D

Compartilhar este post


Link para o post
VittinhoO    0
VittinhoO

kkkk muito doido

pelo oque eu vi ta td ok

Compartilhar este post


Link para o post
Visitante
Este tópico está impedido de receber novos posts.
Entre para seguir isso  
  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×