Ir para conteúdo

Roksas

Herói
  • Total de itens

    3611
  • Registro em

  • Última visita

  • Dias Ganhos

    60

Histórico de Reputação

  1. Upvote
    Roksas recebeu reputação de M4TH3U5 em [Idle-System] 1.0   
    Idle-System 1.0
     
    Hello guys, só deboua na lagoua é? Pensei em criar um sisteminha bem legal para OTServ, nele, os jogadores podem se distanciar [ficar AFK] quanto tempo quiserem, sem ser kikados pelo Idle do config.lua. Nenhum jogador gosta de ir comer e quando voltar estar deslogado rsrs.
     

    Vá em (data/talkactions/scripts), crie um arquivo chamado idleSys.lua e adicione dentro:
    --[[ Idle-System 1.0 Criado por Roksas Acesse já - XTibia.com. ]]-- function onSay(cid, words, param) if not param or param == "" then return doPlayerSendCancel(cid, "[Idle-System] Você deve informar o status desejado, [on/off].") and true end if getCreatureCondition(cid, CONDITION_INFIGHT) then return doPlayerSendCancel(cid, "[Idle-System] Você não pode utilizar este recurso caso esteja em batalha.") and true end if param == "on" then if getPlayerStorageValue(cid, 154490) >= 1 then return doPlayerSendCancel(cid, "[Idle-System] O seu idle já havia sido ativado, favor desativar.") and true end doCreatureSetNoMove(cid, true) setPlayerStorageValue(cid, 154490, 1) idleStart(cid) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Idle-System] Você ativou o seu idle.") elseif param == "off" then if getPlayerStorageValue(cid, 154490) < 1 then return doPlayerSendCancel(cid, "[Idle-System] O seu idle já havia sido desativado.") and true end doCreatureSetNoMove(cid, false) setPlayerStorageValue(cid, 154490, -1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Idle-System] Você desativou o seu idle.") return true end return true end --//--// function idleStart(uid) local txts = {"Ausente", "AFK!", "Já volto!", "Aguarde..."} if not isPlayer(uid) then return true end if getPlayerStorageValue(uid, 154490) < 1 then return true end doCreatureSetLookDir(uid, math.random(1, 4)) doSendAnimatedText(getThingPos(uid), txts[math.random(#txts)], math.random(1, 255)) return addEvent(idleStart, 10 * 1000, uid) end Logo em seguida, volte para a pasta (data/talkactions), abra com algum editor de texto o arquivo talkactions.xml e adicione esta seguinte tag:
    <talkaction words="/afk;!afk;!ausente;/ausente" event="script" value="idleSys.lua"/> É só isto meus anjos, façam bom proveito haha. Obrigado por acessar a comunidade
     


  2. Upvote
    Roksas recebeu reputação de AlphaLove em [PVP-System] Changer 1.0   
    [PVP-System] Changer 1.0
    Versão testada: 8.60 e 9.60 Distro utilizado: TFS 0.4 e TFS 0.2 Comandos: /pvp guild, on/off e /pvp level, 300 Saudações marmanjada, firmeza na tereza? Vim apresentar hoje á vocês um sistema criado por mim, uma ideia bem legal, que seria o jogador escolher quem ele pode atacar, isso por guild e/ou level. Uma solução muito prática para quem não quer atacar amigos ou newbies na war


    Vá em (data/talkactions/scripts), crie um arquivo cujo nome seja pvpSys.lua e adicione dentro:
    --[[ PVP-System Changer 1.0, criado por Roksas! Acesse já XTIBIA.COM ]]-- function onSay(cid, words, param) local s = string.explode(param, ",") if not s[1] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. É necessário que informe o tipo de PVP.") and true end --//--// if s[1] == "guild" then if not s[2] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Favor informar os parâmetros {on} ou {off}.") and true end if (getPlayerGuildId(cid) < 1) or (not getPlayerGuildId(cid)) then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Você não pode utilizar este comando, pois não percente á nenhuma guild.") and true end if s[2] == "on" then if getPlayerStorageValue(cid, 21400) >= 1 then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Já está ativado o seu Guild PVP.") and true end setPlayerStorageValue(cid, 21400, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Você ativou o Guild PVP, agora não pode atacar players da sua guild.") elseif s[2] == "off" then if getPlayerStorageValue(cid, 21400) < 1 then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Já está desativado o seu Guild PVP.") and true end setPlayerStorageValue(cid, 21400, -1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Você desativou o Guild PVP, pode atacar os players de sua guild.") return true end return true end --//--// if s[1] == "level" then if not s[2] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Favor informar o level mínimo para atacar.") and true end if tonumber(s[2]) > getPlayerLevel(cid) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Você não pode determinar leveis maiores que o seu.") and true end if getPlayerStorageValue(cid, 21401) == tonumber(s[2]) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Este level já foi determinado antes.") and true end setPlayerStorageValue(cid, 21401, tonumber(s[2])) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Você determinou o level mínimo para atacar ["..s[2].."].") return true end --//--// return true end No arquivo talkactions.xml da pasta (data/talkactions), você deve adicionar a seguinte tag:
    <talkaction words="/pvp" event="script" value="pvpSys.lua"/> Muito bem, esta parte foi a instalação do comando utilizado, agora iremos adicionar ao nosso servidor a parte de hits e target.
     
    Em (creaturescripts/scripts), devemos criar um arquivo com o mesmo nome, no caso, pvpSys.lua e nele, adicionar isto dentro:
    function onTarget(cid, target) --//--// if getPlayerStorageValue(cid, 21400) >= 1 then if getPlayerGuildId(cid) == getPlayerGuildId(target) then return doPlayerSendCancel(cid, "[PVP-System] Você não pode atacar jogadores da mesma guild com este PVP ativado.") and false end return false end --//--// if getPlayerStorageValue(cid, 21401) >= getPlayerLevel(target) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Não é possível atacar jogadores com level menor que ["..getPlayerStorageValue(cid, 21401).."].") and false end return true end --//--// function onStatsChange(cid, attacker, type, combat, value) --//--// if type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(attacker, 21400) >= 1 then if getPlayerGuildId(attacker) == getPlayerGuildId(cid) then return false end return false end --//--// if getPlayerStorageValue(attacker, 21401) >= getPlayerLevel(cid) then return false end end return true end --//--// Na mesma pasta, podemos encontrar o arquivo login.lua, no qual adicionamos estas linhas:
    registerCreatureEvent(cid, "pvpAtt") registerCreatureEvent(cid, "pvpStats") Voltando uma pasta (data/creaturescripts), abriremos o arquivo creaturescripts.xml com algum editor de texto e dentro coloquemos estas tags:
    <event type="target" name="pvpAtt" event="script" value="pvpSys.lua"/> <event type="statschange" name="pvpStats" event="script" value="pvpSys.lua"/> É isto aêe galerinha, espero que tenham gostado e que funcione, qualquer dúvida estou aqui para respondê-los haha.
     
    #Perfect, #GoodLuck.
     
     

  3. Upvote
    Roksas recebeu reputação de supernetoo em [Idle-System] 1.0   
    Idle-System 1.0
     
    Hello guys, só deboua na lagoua é? Pensei em criar um sisteminha bem legal para OTServ, nele, os jogadores podem se distanciar [ficar AFK] quanto tempo quiserem, sem ser kikados pelo Idle do config.lua. Nenhum jogador gosta de ir comer e quando voltar estar deslogado rsrs.
     

    Vá em (data/talkactions/scripts), crie um arquivo chamado idleSys.lua e adicione dentro:
    --[[ Idle-System 1.0 Criado por Roksas Acesse já - XTibia.com. ]]-- function onSay(cid, words, param) if not param or param == "" then return doPlayerSendCancel(cid, "[Idle-System] Você deve informar o status desejado, [on/off].") and true end if getCreatureCondition(cid, CONDITION_INFIGHT) then return doPlayerSendCancel(cid, "[Idle-System] Você não pode utilizar este recurso caso esteja em batalha.") and true end if param == "on" then if getPlayerStorageValue(cid, 154490) >= 1 then return doPlayerSendCancel(cid, "[Idle-System] O seu idle já havia sido ativado, favor desativar.") and true end doCreatureSetNoMove(cid, true) setPlayerStorageValue(cid, 154490, 1) idleStart(cid) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Idle-System] Você ativou o seu idle.") elseif param == "off" then if getPlayerStorageValue(cid, 154490) < 1 then return doPlayerSendCancel(cid, "[Idle-System] O seu idle já havia sido desativado.") and true end doCreatureSetNoMove(cid, false) setPlayerStorageValue(cid, 154490, -1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Idle-System] Você desativou o seu idle.") return true end return true end --//--// function idleStart(uid) local txts = {"Ausente", "AFK!", "Já volto!", "Aguarde..."} if not isPlayer(uid) then return true end if getPlayerStorageValue(uid, 154490) < 1 then return true end doCreatureSetLookDir(uid, math.random(1, 4)) doSendAnimatedText(getThingPos(uid), txts[math.random(#txts)], math.random(1, 255)) return addEvent(idleStart, 10 * 1000, uid) end Logo em seguida, volte para a pasta (data/talkactions), abra com algum editor de texto o arquivo talkactions.xml e adicione esta seguinte tag:
    <talkaction words="/afk;!afk;!ausente;/ausente" event="script" value="idleSys.lua"/> É só isto meus anjos, façam bom proveito haha. Obrigado por acessar a comunidade
     


  4. Upvote
    Roksas recebeu reputação de WillOliveira em [Idle-System] 1.0   
    Idle-System 1.0
     
    Hello guys, só deboua na lagoua é? Pensei em criar um sisteminha bem legal para OTServ, nele, os jogadores podem se distanciar [ficar AFK] quanto tempo quiserem, sem ser kikados pelo Idle do config.lua. Nenhum jogador gosta de ir comer e quando voltar estar deslogado rsrs.
     

    Vá em (data/talkactions/scripts), crie um arquivo chamado idleSys.lua e adicione dentro:
    --[[ Idle-System 1.0 Criado por Roksas Acesse já - XTibia.com. ]]-- function onSay(cid, words, param) if not param or param == "" then return doPlayerSendCancel(cid, "[Idle-System] Você deve informar o status desejado, [on/off].") and true end if getCreatureCondition(cid, CONDITION_INFIGHT) then return doPlayerSendCancel(cid, "[Idle-System] Você não pode utilizar este recurso caso esteja em batalha.") and true end if param == "on" then if getPlayerStorageValue(cid, 154490) >= 1 then return doPlayerSendCancel(cid, "[Idle-System] O seu idle já havia sido ativado, favor desativar.") and true end doCreatureSetNoMove(cid, true) setPlayerStorageValue(cid, 154490, 1) idleStart(cid) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Idle-System] Você ativou o seu idle.") elseif param == "off" then if getPlayerStorageValue(cid, 154490) < 1 then return doPlayerSendCancel(cid, "[Idle-System] O seu idle já havia sido desativado.") and true end doCreatureSetNoMove(cid, false) setPlayerStorageValue(cid, 154490, -1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Idle-System] Você desativou o seu idle.") return true end return true end --//--// function idleStart(uid) local txts = {"Ausente", "AFK!", "Já volto!", "Aguarde..."} if not isPlayer(uid) then return true end if getPlayerStorageValue(uid, 154490) < 1 then return true end doCreatureSetLookDir(uid, math.random(1, 4)) doSendAnimatedText(getThingPos(uid), txts[math.random(#txts)], math.random(1, 255)) return addEvent(idleStart, 10 * 1000, uid) end Logo em seguida, volte para a pasta (data/talkactions), abra com algum editor de texto o arquivo talkactions.xml e adicione esta seguinte tag:
    <talkaction words="/afk;!afk;!ausente;/ausente" event="script" value="idleSys.lua"/> É só isto meus anjos, façam bom proveito haha. Obrigado por acessar a comunidade
     


  5. Upvote
    Roksas recebeu reputação de supernetoo em [PVP-System] Changer 1.0   
    [PVP-System] Changer 1.0
    Versão testada: 8.60 e 9.60 Distro utilizado: TFS 0.4 e TFS 0.2 Comandos: /pvp guild, on/off e /pvp level, 300 Saudações marmanjada, firmeza na tereza? Vim apresentar hoje á vocês um sistema criado por mim, uma ideia bem legal, que seria o jogador escolher quem ele pode atacar, isso por guild e/ou level. Uma solução muito prática para quem não quer atacar amigos ou newbies na war


    Vá em (data/talkactions/scripts), crie um arquivo cujo nome seja pvpSys.lua e adicione dentro:
    --[[ PVP-System Changer 1.0, criado por Roksas! Acesse já XTIBIA.COM ]]-- function onSay(cid, words, param) local s = string.explode(param, ",") if not s[1] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. É necessário que informe o tipo de PVP.") and true end --//--// if s[1] == "guild" then if not s[2] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Favor informar os parâmetros {on} ou {off}.") and true end if (getPlayerGuildId(cid) < 1) or (not getPlayerGuildId(cid)) then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Você não pode utilizar este comando, pois não percente á nenhuma guild.") and true end if s[2] == "on" then if getPlayerStorageValue(cid, 21400) >= 1 then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Já está ativado o seu Guild PVP.") and true end setPlayerStorageValue(cid, 21400, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Você ativou o Guild PVP, agora não pode atacar players da sua guild.") elseif s[2] == "off" then if getPlayerStorageValue(cid, 21400) < 1 then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Já está desativado o seu Guild PVP.") and true end setPlayerStorageValue(cid, 21400, -1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Você desativou o Guild PVP, pode atacar os players de sua guild.") return true end return true end --//--// if s[1] == "level" then if not s[2] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Favor informar o level mínimo para atacar.") and true end if tonumber(s[2]) > getPlayerLevel(cid) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Você não pode determinar leveis maiores que o seu.") and true end if getPlayerStorageValue(cid, 21401) == tonumber(s[2]) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Este level já foi determinado antes.") and true end setPlayerStorageValue(cid, 21401, tonumber(s[2])) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Você determinou o level mínimo para atacar ["..s[2].."].") return true end --//--// return true end No arquivo talkactions.xml da pasta (data/talkactions), você deve adicionar a seguinte tag:
    <talkaction words="/pvp" event="script" value="pvpSys.lua"/> Muito bem, esta parte foi a instalação do comando utilizado, agora iremos adicionar ao nosso servidor a parte de hits e target.
     
    Em (creaturescripts/scripts), devemos criar um arquivo com o mesmo nome, no caso, pvpSys.lua e nele, adicionar isto dentro:
    function onTarget(cid, target) --//--// if getPlayerStorageValue(cid, 21400) >= 1 then if getPlayerGuildId(cid) == getPlayerGuildId(target) then return doPlayerSendCancel(cid, "[PVP-System] Você não pode atacar jogadores da mesma guild com este PVP ativado.") and false end return false end --//--// if getPlayerStorageValue(cid, 21401) >= getPlayerLevel(target) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Não é possível atacar jogadores com level menor que ["..getPlayerStorageValue(cid, 21401).."].") and false end return true end --//--// function onStatsChange(cid, attacker, type, combat, value) --//--// if type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(attacker, 21400) >= 1 then if getPlayerGuildId(attacker) == getPlayerGuildId(cid) then return false end return false end --//--// if getPlayerStorageValue(attacker, 21401) >= getPlayerLevel(cid) then return false end end return true end --//--// Na mesma pasta, podemos encontrar o arquivo login.lua, no qual adicionamos estas linhas:
    registerCreatureEvent(cid, "pvpAtt") registerCreatureEvent(cid, "pvpStats") Voltando uma pasta (data/creaturescripts), abriremos o arquivo creaturescripts.xml com algum editor de texto e dentro coloquemos estas tags:
    <event type="target" name="pvpAtt" event="script" value="pvpSys.lua"/> <event type="statschange" name="pvpStats" event="script" value="pvpSys.lua"/> É isto aêe galerinha, espero que tenham gostado e que funcione, qualquer dúvida estou aqui para respondê-los haha.
     
    #Perfect, #GoodLuck.
     
     

  6. Upvote
    Roksas recebeu reputação de vital900 em [PVP-System] Changer 1.0   
    [PVP-System] Changer 1.0
    Versão testada: 8.60 e 9.60 Distro utilizado: TFS 0.4 e TFS 0.2 Comandos: /pvp guild, on/off e /pvp level, 300 Saudações marmanjada, firmeza na tereza? Vim apresentar hoje á vocês um sistema criado por mim, uma ideia bem legal, que seria o jogador escolher quem ele pode atacar, isso por guild e/ou level. Uma solução muito prática para quem não quer atacar amigos ou newbies na war


    Vá em (data/talkactions/scripts), crie um arquivo cujo nome seja pvpSys.lua e adicione dentro:
    --[[ PVP-System Changer 1.0, criado por Roksas! Acesse já XTIBIA.COM ]]-- function onSay(cid, words, param) local s = string.explode(param, ",") if not s[1] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. É necessário que informe o tipo de PVP.") and true end --//--// if s[1] == "guild" then if not s[2] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Favor informar os parâmetros {on} ou {off}.") and true end if (getPlayerGuildId(cid) < 1) or (not getPlayerGuildId(cid)) then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Você não pode utilizar este comando, pois não percente á nenhuma guild.") and true end if s[2] == "on" then if getPlayerStorageValue(cid, 21400) >= 1 then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Já está ativado o seu Guild PVP.") and true end setPlayerStorageValue(cid, 21400, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Você ativou o Guild PVP, agora não pode atacar players da sua guild.") elseif s[2] == "off" then if getPlayerStorageValue(cid, 21400) < 1 then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Já está desativado o seu Guild PVP.") and true end setPlayerStorageValue(cid, 21400, -1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Você desativou o Guild PVP, pode atacar os players de sua guild.") return true end return true end --//--// if s[1] == "level" then if not s[2] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Favor informar o level mínimo para atacar.") and true end if tonumber(s[2]) > getPlayerLevel(cid) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Você não pode determinar leveis maiores que o seu.") and true end if getPlayerStorageValue(cid, 21401) == tonumber(s[2]) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Este level já foi determinado antes.") and true end setPlayerStorageValue(cid, 21401, tonumber(s[2])) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Você determinou o level mínimo para atacar ["..s[2].."].") return true end --//--// return true end No arquivo talkactions.xml da pasta (data/talkactions), você deve adicionar a seguinte tag:
    <talkaction words="/pvp" event="script" value="pvpSys.lua"/> Muito bem, esta parte foi a instalação do comando utilizado, agora iremos adicionar ao nosso servidor a parte de hits e target.
     
    Em (creaturescripts/scripts), devemos criar um arquivo com o mesmo nome, no caso, pvpSys.lua e nele, adicionar isto dentro:
    function onTarget(cid, target) --//--// if getPlayerStorageValue(cid, 21400) >= 1 then if getPlayerGuildId(cid) == getPlayerGuildId(target) then return doPlayerSendCancel(cid, "[PVP-System] Você não pode atacar jogadores da mesma guild com este PVP ativado.") and false end return false end --//--// if getPlayerStorageValue(cid, 21401) >= getPlayerLevel(target) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Não é possível atacar jogadores com level menor que ["..getPlayerStorageValue(cid, 21401).."].") and false end return true end --//--// function onStatsChange(cid, attacker, type, combat, value) --//--// if type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(attacker, 21400) >= 1 then if getPlayerGuildId(attacker) == getPlayerGuildId(cid) then return false end return false end --//--// if getPlayerStorageValue(attacker, 21401) >= getPlayerLevel(cid) then return false end end return true end --//--// Na mesma pasta, podemos encontrar o arquivo login.lua, no qual adicionamos estas linhas:
    registerCreatureEvent(cid, "pvpAtt") registerCreatureEvent(cid, "pvpStats") Voltando uma pasta (data/creaturescripts), abriremos o arquivo creaturescripts.xml com algum editor de texto e dentro coloquemos estas tags:
    <event type="target" name="pvpAtt" event="script" value="pvpSys.lua"/> <event type="statschange" name="pvpStats" event="script" value="pvpSys.lua"/> É isto aêe galerinha, espero que tenham gostado e que funcione, qualquer dúvida estou aqui para respondê-los haha.
     
    #Perfect, #GoodLuck.
     
     

  7. Upvote
    Roksas recebeu reputação de Alexclusive em [PVP-System] Changer 1.0   
    [PVP-System] Changer 1.0
    Versão testada: 8.60 e 9.60 Distro utilizado: TFS 0.4 e TFS 0.2 Comandos: /pvp guild, on/off e /pvp level, 300 Saudações marmanjada, firmeza na tereza? Vim apresentar hoje á vocês um sistema criado por mim, uma ideia bem legal, que seria o jogador escolher quem ele pode atacar, isso por guild e/ou level. Uma solução muito prática para quem não quer atacar amigos ou newbies na war


    Vá em (data/talkactions/scripts), crie um arquivo cujo nome seja pvpSys.lua e adicione dentro:
    --[[ PVP-System Changer 1.0, criado por Roksas! Acesse já XTIBIA.COM ]]-- function onSay(cid, words, param) local s = string.explode(param, ",") if not s[1] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. É necessário que informe o tipo de PVP.") and true end --//--// if s[1] == "guild" then if not s[2] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Favor informar os parâmetros {on} ou {off}.") and true end if (getPlayerGuildId(cid) < 1) or (not getPlayerGuildId(cid)) then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Você não pode utilizar este comando, pois não percente á nenhuma guild.") and true end if s[2] == "on" then if getPlayerStorageValue(cid, 21400) >= 1 then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Já está ativado o seu Guild PVP.") and true end setPlayerStorageValue(cid, 21400, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Você ativou o Guild PVP, agora não pode atacar players da sua guild.") elseif s[2] == "off" then if getPlayerStorageValue(cid, 21400) < 1 then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Já está desativado o seu Guild PVP.") and true end setPlayerStorageValue(cid, 21400, -1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Você desativou o Guild PVP, pode atacar os players de sua guild.") return true end return true end --//--// if s[1] == "level" then if not s[2] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Favor informar o level mínimo para atacar.") and true end if tonumber(s[2]) > getPlayerLevel(cid) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Você não pode determinar leveis maiores que o seu.") and true end if getPlayerStorageValue(cid, 21401) == tonumber(s[2]) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Este level já foi determinado antes.") and true end setPlayerStorageValue(cid, 21401, tonumber(s[2])) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Você determinou o level mínimo para atacar ["..s[2].."].") return true end --//--// return true end No arquivo talkactions.xml da pasta (data/talkactions), você deve adicionar a seguinte tag:
    <talkaction words="/pvp" event="script" value="pvpSys.lua"/> Muito bem, esta parte foi a instalação do comando utilizado, agora iremos adicionar ao nosso servidor a parte de hits e target.
     
    Em (creaturescripts/scripts), devemos criar um arquivo com o mesmo nome, no caso, pvpSys.lua e nele, adicionar isto dentro:
    function onTarget(cid, target) --//--// if getPlayerStorageValue(cid, 21400) >= 1 then if getPlayerGuildId(cid) == getPlayerGuildId(target) then return doPlayerSendCancel(cid, "[PVP-System] Você não pode atacar jogadores da mesma guild com este PVP ativado.") and false end return false end --//--// if getPlayerStorageValue(cid, 21401) >= getPlayerLevel(target) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Não é possível atacar jogadores com level menor que ["..getPlayerStorageValue(cid, 21401).."].") and false end return true end --//--// function onStatsChange(cid, attacker, type, combat, value) --//--// if type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(attacker, 21400) >= 1 then if getPlayerGuildId(attacker) == getPlayerGuildId(cid) then return false end return false end --//--// if getPlayerStorageValue(attacker, 21401) >= getPlayerLevel(cid) then return false end end return true end --//--// Na mesma pasta, podemos encontrar o arquivo login.lua, no qual adicionamos estas linhas:
    registerCreatureEvent(cid, "pvpAtt") registerCreatureEvent(cid, "pvpStats") Voltando uma pasta (data/creaturescripts), abriremos o arquivo creaturescripts.xml com algum editor de texto e dentro coloquemos estas tags:
    <event type="target" name="pvpAtt" event="script" value="pvpSys.lua"/> <event type="statschange" name="pvpStats" event="script" value="pvpSys.lua"/> É isto aêe galerinha, espero que tenham gostado e que funcione, qualquer dúvida estou aqui para respondê-los haha.
     
    #Perfect, #GoodLuck.
     
     

  8. Upvote
    Roksas recebeu reputação de DragonElement em [PVP-System] Changer 1.0   
    [PVP-System] Changer 1.0
    Versão testada: 8.60 e 9.60 Distro utilizado: TFS 0.4 e TFS 0.2 Comandos: /pvp guild, on/off e /pvp level, 300 Saudações marmanjada, firmeza na tereza? Vim apresentar hoje á vocês um sistema criado por mim, uma ideia bem legal, que seria o jogador escolher quem ele pode atacar, isso por guild e/ou level. Uma solução muito prática para quem não quer atacar amigos ou newbies na war


    Vá em (data/talkactions/scripts), crie um arquivo cujo nome seja pvpSys.lua e adicione dentro:
    --[[ PVP-System Changer 1.0, criado por Roksas! Acesse já XTIBIA.COM ]]-- function onSay(cid, words, param) local s = string.explode(param, ",") if not s[1] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. É necessário que informe o tipo de PVP.") and true end --//--// if s[1] == "guild" then if not s[2] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Favor informar os parâmetros {on} ou {off}.") and true end if (getPlayerGuildId(cid) < 1) or (not getPlayerGuildId(cid)) then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Você não pode utilizar este comando, pois não percente á nenhuma guild.") and true end if s[2] == "on" then if getPlayerStorageValue(cid, 21400) >= 1 then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Já está ativado o seu Guild PVP.") and true end setPlayerStorageValue(cid, 21400, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Você ativou o Guild PVP, agora não pode atacar players da sua guild.") elseif s[2] == "off" then if getPlayerStorageValue(cid, 21400) < 1 then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Já está desativado o seu Guild PVP.") and true end setPlayerStorageValue(cid, 21400, -1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Você desativou o Guild PVP, pode atacar os players de sua guild.") return true end return true end --//--// if s[1] == "level" then if not s[2] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Favor informar o level mínimo para atacar.") and true end if tonumber(s[2]) > getPlayerLevel(cid) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Você não pode determinar leveis maiores que o seu.") and true end if getPlayerStorageValue(cid, 21401) == tonumber(s[2]) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Este level já foi determinado antes.") and true end setPlayerStorageValue(cid, 21401, tonumber(s[2])) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Você determinou o level mínimo para atacar ["..s[2].."].") return true end --//--// return true end No arquivo talkactions.xml da pasta (data/talkactions), você deve adicionar a seguinte tag:
    <talkaction words="/pvp" event="script" value="pvpSys.lua"/> Muito bem, esta parte foi a instalação do comando utilizado, agora iremos adicionar ao nosso servidor a parte de hits e target.
     
    Em (creaturescripts/scripts), devemos criar um arquivo com o mesmo nome, no caso, pvpSys.lua e nele, adicionar isto dentro:
    function onTarget(cid, target) --//--// if getPlayerStorageValue(cid, 21400) >= 1 then if getPlayerGuildId(cid) == getPlayerGuildId(target) then return doPlayerSendCancel(cid, "[PVP-System] Você não pode atacar jogadores da mesma guild com este PVP ativado.") and false end return false end --//--// if getPlayerStorageValue(cid, 21401) >= getPlayerLevel(target) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Não é possível atacar jogadores com level menor que ["..getPlayerStorageValue(cid, 21401).."].") and false end return true end --//--// function onStatsChange(cid, attacker, type, combat, value) --//--// if type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(attacker, 21400) >= 1 then if getPlayerGuildId(attacker) == getPlayerGuildId(cid) then return false end return false end --//--// if getPlayerStorageValue(attacker, 21401) >= getPlayerLevel(cid) then return false end end return true end --//--// Na mesma pasta, podemos encontrar o arquivo login.lua, no qual adicionamos estas linhas:
    registerCreatureEvent(cid, "pvpAtt") registerCreatureEvent(cid, "pvpStats") Voltando uma pasta (data/creaturescripts), abriremos o arquivo creaturescripts.xml com algum editor de texto e dentro coloquemos estas tags:
    <event type="target" name="pvpAtt" event="script" value="pvpSys.lua"/> <event type="statschange" name="pvpStats" event="script" value="pvpSys.lua"/> É isto aêe galerinha, espero que tenham gostado e que funcione, qualquer dúvida estou aqui para respondê-los haha.
     
    #Perfect, #GoodLuck.
     
     

  9. Upvote
    Roksas recebeu reputação de M4TH3U5 em [PVP-System] Changer 1.0   
    [PVP-System] Changer 1.0
    Versão testada: 8.60 e 9.60 Distro utilizado: TFS 0.4 e TFS 0.2 Comandos: /pvp guild, on/off e /pvp level, 300 Saudações marmanjada, firmeza na tereza? Vim apresentar hoje á vocês um sistema criado por mim, uma ideia bem legal, que seria o jogador escolher quem ele pode atacar, isso por guild e/ou level. Uma solução muito prática para quem não quer atacar amigos ou newbies na war


    Vá em (data/talkactions/scripts), crie um arquivo cujo nome seja pvpSys.lua e adicione dentro:
    --[[ PVP-System Changer 1.0, criado por Roksas! Acesse já XTIBIA.COM ]]-- function onSay(cid, words, param) local s = string.explode(param, ",") if not s[1] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. É necessário que informe o tipo de PVP.") and true end --//--// if s[1] == "guild" then if not s[2] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Favor informar os parâmetros {on} ou {off}.") and true end if (getPlayerGuildId(cid) < 1) or (not getPlayerGuildId(cid)) then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Você não pode utilizar este comando, pois não percente á nenhuma guild.") and true end if s[2] == "on" then if getPlayerStorageValue(cid, 21400) >= 1 then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Já está ativado o seu Guild PVP.") and true end setPlayerStorageValue(cid, 21400, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Você ativou o Guild PVP, agora não pode atacar players da sua guild.") elseif s[2] == "off" then if getPlayerStorageValue(cid, 21400) < 1 then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Já está desativado o seu Guild PVP.") and true end setPlayerStorageValue(cid, 21400, -1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Você desativou o Guild PVP, pode atacar os players de sua guild.") return true end return true end --//--// if s[1] == "level" then if not s[2] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Favor informar o level mínimo para atacar.") and true end if tonumber(s[2]) > getPlayerLevel(cid) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Você não pode determinar leveis maiores que o seu.") and true end if getPlayerStorageValue(cid, 21401) == tonumber(s[2]) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Este level já foi determinado antes.") and true end setPlayerStorageValue(cid, 21401, tonumber(s[2])) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Você determinou o level mínimo para atacar ["..s[2].."].") return true end --//--// return true end No arquivo talkactions.xml da pasta (data/talkactions), você deve adicionar a seguinte tag:
    <talkaction words="/pvp" event="script" value="pvpSys.lua"/> Muito bem, esta parte foi a instalação do comando utilizado, agora iremos adicionar ao nosso servidor a parte de hits e target.
     
    Em (creaturescripts/scripts), devemos criar um arquivo com o mesmo nome, no caso, pvpSys.lua e nele, adicionar isto dentro:
    function onTarget(cid, target) --//--// if getPlayerStorageValue(cid, 21400) >= 1 then if getPlayerGuildId(cid) == getPlayerGuildId(target) then return doPlayerSendCancel(cid, "[PVP-System] Você não pode atacar jogadores da mesma guild com este PVP ativado.") and false end return false end --//--// if getPlayerStorageValue(cid, 21401) >= getPlayerLevel(target) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Não é possível atacar jogadores com level menor que ["..getPlayerStorageValue(cid, 21401).."].") and false end return true end --//--// function onStatsChange(cid, attacker, type, combat, value) --//--// if type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(attacker, 21400) >= 1 then if getPlayerGuildId(attacker) == getPlayerGuildId(cid) then return false end return false end --//--// if getPlayerStorageValue(attacker, 21401) >= getPlayerLevel(cid) then return false end end return true end --//--// Na mesma pasta, podemos encontrar o arquivo login.lua, no qual adicionamos estas linhas:
    registerCreatureEvent(cid, "pvpAtt") registerCreatureEvent(cid, "pvpStats") Voltando uma pasta (data/creaturescripts), abriremos o arquivo creaturescripts.xml com algum editor de texto e dentro coloquemos estas tags:
    <event type="target" name="pvpAtt" event="script" value="pvpSys.lua"/> <event type="statschange" name="pvpStats" event="script" value="pvpSys.lua"/> É isto aêe galerinha, espero que tenham gostado e que funcione, qualquer dúvida estou aqui para respondê-los haha.
     
    #Perfect, #GoodLuck.
     
     

  10. Upvote
    Roksas recebeu reputação de Lucasmml em [PVP-System] Changer 1.0   
    [PVP-System] Changer 1.0
    Versão testada: 8.60 e 9.60 Distro utilizado: TFS 0.4 e TFS 0.2 Comandos: /pvp guild, on/off e /pvp level, 300 Saudações marmanjada, firmeza na tereza? Vim apresentar hoje á vocês um sistema criado por mim, uma ideia bem legal, que seria o jogador escolher quem ele pode atacar, isso por guild e/ou level. Uma solução muito prática para quem não quer atacar amigos ou newbies na war


    Vá em (data/talkactions/scripts), crie um arquivo cujo nome seja pvpSys.lua e adicione dentro:
    --[[ PVP-System Changer 1.0, criado por Roksas! Acesse já XTIBIA.COM ]]-- function onSay(cid, words, param) local s = string.explode(param, ",") if not s[1] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. É necessário que informe o tipo de PVP.") and true end --//--// if s[1] == "guild" then if not s[2] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Favor informar os parâmetros {on} ou {off}.") and true end if (getPlayerGuildId(cid) < 1) or (not getPlayerGuildId(cid)) then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Você não pode utilizar este comando, pois não percente á nenhuma guild.") and true end if s[2] == "on" then if getPlayerStorageValue(cid, 21400) >= 1 then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Já está ativado o seu Guild PVP.") and true end setPlayerStorageValue(cid, 21400, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Você ativou o Guild PVP, agora não pode atacar players da sua guild.") elseif s[2] == "off" then if getPlayerStorageValue(cid, 21400) < 1 then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Já está desativado o seu Guild PVP.") and true end setPlayerStorageValue(cid, 21400, -1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Você desativou o Guild PVP, pode atacar os players de sua guild.") return true end return true end --//--// if s[1] == "level" then if not s[2] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Favor informar o level mínimo para atacar.") and true end if tonumber(s[2]) > getPlayerLevel(cid) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Você não pode determinar leveis maiores que o seu.") and true end if getPlayerStorageValue(cid, 21401) == tonumber(s[2]) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Este level já foi determinado antes.") and true end setPlayerStorageValue(cid, 21401, tonumber(s[2])) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Você determinou o level mínimo para atacar ["..s[2].."].") return true end --//--// return true end No arquivo talkactions.xml da pasta (data/talkactions), você deve adicionar a seguinte tag:
    <talkaction words="/pvp" event="script" value="pvpSys.lua"/> Muito bem, esta parte foi a instalação do comando utilizado, agora iremos adicionar ao nosso servidor a parte de hits e target.
     
    Em (creaturescripts/scripts), devemos criar um arquivo com o mesmo nome, no caso, pvpSys.lua e nele, adicionar isto dentro:
    function onTarget(cid, target) --//--// if getPlayerStorageValue(cid, 21400) >= 1 then if getPlayerGuildId(cid) == getPlayerGuildId(target) then return doPlayerSendCancel(cid, "[PVP-System] Você não pode atacar jogadores da mesma guild com este PVP ativado.") and false end return false end --//--// if getPlayerStorageValue(cid, 21401) >= getPlayerLevel(target) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Não é possível atacar jogadores com level menor que ["..getPlayerStorageValue(cid, 21401).."].") and false end return true end --//--// function onStatsChange(cid, attacker, type, combat, value) --//--// if type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(attacker, 21400) >= 1 then if getPlayerGuildId(attacker) == getPlayerGuildId(cid) then return false end return false end --//--// if getPlayerStorageValue(attacker, 21401) >= getPlayerLevel(cid) then return false end end return true end --//--// Na mesma pasta, podemos encontrar o arquivo login.lua, no qual adicionamos estas linhas:
    registerCreatureEvent(cid, "pvpAtt") registerCreatureEvent(cid, "pvpStats") Voltando uma pasta (data/creaturescripts), abriremos o arquivo creaturescripts.xml com algum editor de texto e dentro coloquemos estas tags:
    <event type="target" name="pvpAtt" event="script" value="pvpSys.lua"/> <event type="statschange" name="pvpStats" event="script" value="pvpSys.lua"/> É isto aêe galerinha, espero que tenham gostado e que funcione, qualquer dúvida estou aqui para respondê-los haha.
     
    #Perfect, #GoodLuck.
     
     

  11. Upvote
    Roksas recebeu reputação de Slyton em [PVP-System] Changer 1.0   
    [PVP-System] Changer 1.0
    Versão testada: 8.60 e 9.60 Distro utilizado: TFS 0.4 e TFS 0.2 Comandos: /pvp guild, on/off e /pvp level, 300 Saudações marmanjada, firmeza na tereza? Vim apresentar hoje á vocês um sistema criado por mim, uma ideia bem legal, que seria o jogador escolher quem ele pode atacar, isso por guild e/ou level. Uma solução muito prática para quem não quer atacar amigos ou newbies na war


    Vá em (data/talkactions/scripts), crie um arquivo cujo nome seja pvpSys.lua e adicione dentro:
    --[[ PVP-System Changer 1.0, criado por Roksas! Acesse já XTIBIA.COM ]]-- function onSay(cid, words, param) local s = string.explode(param, ",") if not s[1] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. É necessário que informe o tipo de PVP.") and true end --//--// if s[1] == "guild" then if not s[2] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Favor informar os parâmetros {on} ou {off}.") and true end if (getPlayerGuildId(cid) < 1) or (not getPlayerGuildId(cid)) then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Você não pode utilizar este comando, pois não percente á nenhuma guild.") and true end if s[2] == "on" then if getPlayerStorageValue(cid, 21400) >= 1 then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Já está ativado o seu Guild PVP.") and true end setPlayerStorageValue(cid, 21400, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Você ativou o Guild PVP, agora não pode atacar players da sua guild.") elseif s[2] == "off" then if getPlayerStorageValue(cid, 21400) < 1 then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Já está desativado o seu Guild PVP.") and true end setPlayerStorageValue(cid, 21400, -1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Você desativou o Guild PVP, pode atacar os players de sua guild.") return true end return true end --//--// if s[1] == "level" then if not s[2] then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Favor informar o level mínimo para atacar.") and true end if tonumber(s[2]) > getPlayerLevel(cid) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Você não pode determinar leveis maiores que o seu.") and true end if getPlayerStorageValue(cid, 21401) == tonumber(s[2]) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Este level já foi determinado antes.") and true end setPlayerStorageValue(cid, 21401, tonumber(s[2])) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[PVP-System] Acesso negado. Você determinou o level mínimo para atacar ["..s[2].."].") return true end --//--// return true end No arquivo talkactions.xml da pasta (data/talkactions), você deve adicionar a seguinte tag:
    <talkaction words="/pvp" event="script" value="pvpSys.lua"/> Muito bem, esta parte foi a instalação do comando utilizado, agora iremos adicionar ao nosso servidor a parte de hits e target.
     
    Em (creaturescripts/scripts), devemos criar um arquivo com o mesmo nome, no caso, pvpSys.lua e nele, adicionar isto dentro:
    function onTarget(cid, target) --//--// if getPlayerStorageValue(cid, 21400) >= 1 then if getPlayerGuildId(cid) == getPlayerGuildId(target) then return doPlayerSendCancel(cid, "[PVP-System] Você não pode atacar jogadores da mesma guild com este PVP ativado.") and false end return false end --//--// if getPlayerStorageValue(cid, 21401) >= getPlayerLevel(target) then return doPlayerSendCancel(cid, "[PVP-System] Acesso negado. Não é possível atacar jogadores com level menor que ["..getPlayerStorageValue(cid, 21401).."].") and false end return true end --//--// function onStatsChange(cid, attacker, type, combat, value) --//--// if type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(attacker, 21400) >= 1 then if getPlayerGuildId(attacker) == getPlayerGuildId(cid) then return false end return false end --//--// if getPlayerStorageValue(attacker, 21401) >= getPlayerLevel(cid) then return false end end return true end --//--// Na mesma pasta, podemos encontrar o arquivo login.lua, no qual adicionamos estas linhas:
    registerCreatureEvent(cid, "pvpAtt") registerCreatureEvent(cid, "pvpStats") Voltando uma pasta (data/creaturescripts), abriremos o arquivo creaturescripts.xml com algum editor de texto e dentro coloquemos estas tags:
    <event type="target" name="pvpAtt" event="script" value="pvpSys.lua"/> <event type="statschange" name="pvpStats" event="script" value="pvpSys.lua"/> É isto aêe galerinha, espero que tenham gostado e que funcione, qualquer dúvida estou aqui para respondê-los haha.
     
    #Perfect, #GoodLuck.
     
     

  12. Upvote
    Roksas recebeu reputação de ChockerrGamer em Simple Pet System   
    Simple Pet System
     
    Saudações galerinha, bão? Tive uma ideia bem simples e vim trazer para vocês, é um PET para ele te ajudar nas batalhas.







    Instalação
     
    Vá em data/actions/scripts, copie algum arquivo da pasta e cole, renomeie para simple_pet e adicione isso dentro:




    Muito bem, agora sigamos para actions.xml e adicione essa tag:


    <action itemid="11256;11207;11144;9019" event="script" value="simple_pet.lua"/>



    Configuração
     
    Nesta parte do código:


    local dolls = { [11256] = {pet = "Crystal Spider"}, [11207] = {pet = "Ashmunrah"}, [11144] = {pet = "Demon"}, [9019] = {pet = "Vampire"}, } Oque está entre [ e ] nós colocamos os Item ID dos items que vão chamar o PET. Já entre { e } aonde está entre aspas, colocamos o nome do PET.

    E na tag do actions.xml adicionamos estes MESMOS Item Ids, separando-os por ; ficando:


    <action itemid="ID;ID;ID;ID" event="script" value="simple_pet.lua"/> Para o PET teleportar para você quando subir escadas, ou ficar muito longe, vá em config.lua e procure por:


    teleportPlayerSummons Se estiver false coloque true, se estiver "no", coloque "yes"




    Demonstração
     

     
     
    Finalizações
     
    Obrigado pela atenção galera, espero que tenham gostado, e qualquer dúvida estou aqui para respondê-los
  13. Upvote
    Roksas deu reputação a Kluivert em ajuda Woe plx   
    1- Isso e duvida de website !
     
    2- Esta na área errada !
     
    3- O nome do tópico tem que esta relacionado com sua duvida/pedido !
  14. Upvote
    Roksas recebeu reputação de WillOliveira em Função addEvent   
    addEvent(callback, time, parameters)  
    Saudações, esta função agenda um evento, ou seja, marca um tempo para acontecer X coisa.
     
     
    callback = Nome da função que irá se passar, time = Em quanto tempo, parameters = Os parâmetros da função.  
    Exemplo:
     
     
    addEvent(doPlayerSendCancel, 5 * 1000, cid, "Sorry, not is possible.")  
    Isso agendaria um evento, mandaria um cancel para o player em 5 segundos, dizendo: "Sorry, not is possible".
  15. Upvote
    Roksas recebeu reputação de warotserv em Como mudar as skills iniciais de todas as vocações 8.60?   
    Vá na pasta data/creaturescripts/scripts crie um arquivo chamado startskills.lua, adicione isso dentro:
     

    function onLogin(cid) local playerVoc = getPlayerVocation(cid) local reqTries = getPlayerRequiredSkillTries local skillStor = 56364 local gotSkills = getPlayerStorageValue(cid, 56364) if playerVoc == 1 or 5 and gotSkills == -1 then doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 80)) doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,80))) setPlayerStorageValue(cid, skillStor, 1) elseif playerVoc == 2 or 6 and gotSkills == -1 then doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 80)) doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,80))) setPlayerStorageValue(cid, skillStor, 1) elseif playerVoc == 3 or 7 and gotSkills == -1 then doPlayerAddSkillTry(cid, SKILL_DISTANCE, reqTries(cid, SKILL_DISTANCE, 115)) doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 90)) doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,30))) setPlayerStorageValue(cid, skillStor, 1) elseif playerVoc == 4 or 8 and gotSkills == -1 then doPlayerAddSkillTry(cid, SKILL_AXE, reqTries(cid, SKILL_AXE, 100)) doPlayerAddSkillTry(cid, SKILL_SWORD, reqTries(cid, SKILL_SWORD, 100)) doPlayerAddSkillTry(cid, SKILL_CLUB, reqTries(cid, SKILL_CLUB, 100)) doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 100)) doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,10))) setPlayerStorageValue(cid, skillStor, 1) end return TRUE end
     
    Agora adicione essa tag no arquivo creaturescripts.xml:
     

    <event type="login" name="StartSkills" event="script" value="startskills.lua"/>
     
    HidekiTy, oque você postou não seria para balancear as vocations? Seria os rates do Skill UP creio eu!
  16. Upvote
    Roksas deu reputação a KuchikiKenpachi em Houses commands (buy e tal)   
    Talkactions.xml cola essas tags:
     
     
     
  17. Upvote
    Roksas recebeu reputação de Seagull em [Encerrado] [Dúvida] Simples = Loot   
    O número situado em chance, você divide por 1000 e dará o resultado que seria a porcentagem de chance para dropar o item.
  18. Upvote
    Roksas deu reputação a BananaFight em [Arquivado]Level System   
    Level System

    Fala galerinha, eu terminei hoje de criar as formulas de experiencia por level, e de experiencia por monstro.

    Exp por monstro

    Diferente de outros pokemons, Cada pokemon terá sua base de exp, e quando você matar um pokemon, você recebera a xp que for calculada.

    Formula de exp :


    er = 1,0 para Pokemon selvagens ou 1.5 para pokemon de npcs. eb = Exp base do pokemon que você derrotou. lvl = nível do pokemon que você derrotou. pc = 1 ( Esta parte foi removida ). wlvl = nivel do seu pokemon. wr = 1.5 caso seu pokemon tenha desvantagem contra o inimigo, e 1.0 caso você tenha vantagem ou seja do mesmo tipo.  
    O Resultado desta formula sera a xp que você irá ganhar.

    Exp por level

    Cada level tera uma quantidade diferente para que se possa evoluir de level.

    Formula do Level:
    math.floor((((2*maxlevel/(maxlevel-level))^4+ level^3)*(baseexp/20))) maxlevel = O maximo de level que o seu pokemon pode chegar level = Level do seu pokemon baseexp = a base da exp que o seu pokemon tem Bom pessoal, estas serão as formulas do sistema de up level, espero que gostem, estar formulas foram tiradas do site "pokemon world online wiki", para que consigamos nos aproximas das formulas reais.

    http://iblamelee.co.uk/pwo/wiki/index.php?title=Base_Experience
  19. Upvote
    Roksas recebeu reputação de weslwy10 em [Tutorial] Dicas Para Um Bom Ot   
    Dicas para um bom OT !
     
    Ola galera, hoje vou postar algumas dicas para voces nao se darem mal com 20 players com um OT durando 1 semana!
    1º Dica: Muitas pessoas pensam que as rates de Magic Level e Skill tem que ser iguais, isso é o maior erro! As rates de Magic Level tem que ser 5x menos do que a de skill, exemplo:
    Rates: Skills:25x - ml:5x.
     
    2º Dica: Ots bons não sao Ots com 99999xp e nem o essencial seria de 50x para baixo, geralmente seu OT duarará nem 2 meses com uns Rates altos assim, OTS com Rates de EXP 12x abaixo, esses sim sao OTS bons e que vão durar bastante, pelo menos eh oque eu e meus amigos pensamos a respeito!
     
    3º Dica: Ots sempre com rates baixas para ter um bom números de player e em competição em skills.
     
    4º Dica: Seu server precisa ter uma economia, entao não bote npc vendendo runas de 100x, bote vendendo runas de 1x e caras, para que tenhu uma economia bem equilibrada e assim sorcerer e druids venderão bps.
    5º Dica: Ter seu proprio mapa, com várias quests (mais não de armas fortes, so algumas e que não tenhu quests de todos os itens) ou se você preferir pode por um MAP pronto mais é sempre bom fazer modificações. Dar tempo para os players explorarem o mapa e gostarem tambem e uma boa.
     
    6º Dica: Quando um player começar a jogar não o ponha com os itens como um Plate Set e uma Serpent Sword (se preferir deixe assim), ponha ele com Equipes medios e que não dê para vender. Pense nisso, tambem pode ler o Tutorial de Planejamento do "tibiaa4e", eu gostei!
     
    7º Dica: Bom, dependendo do OT que voce criar, nao coloque runas e bolts infinitos, isto estraga a jogabilidade e nao dara uma boa qualidade para o RPG do jogo, na opniao de muitas pessoas!
     
    8º Dica: Sempre e bom colocar um fast attack, apenas um pouco, tem OTS que em 3 segundos voce mata um Demon, gente isso e muito ruim, estraga totalmente a jogabilidade, o jogo fica muito facil, se fosse para ter rates altas, jogo facil de mao beijada nao seria RPG.
     
    9º Dica: NÃO fazer evento a cada 5 em 5 minutos um evento em 1 em 1 mes ou em 2 e 2 messes ate vai, mais tem que ser dificeis. Como por exemplo Bless Castle, Castle of Honour, muitos OTS tem, eu pelo menos gosto. A cada 1 semana/1 mes, eles fazem esses eventos de War em um castelo, no final a Guild que sobrar ganha. Muito bom isso tambem!
     
    10º Dica: Sempre ver se os player estão de bot ou macro, e na área de trainer coloque bastante food.
     
    Obrigado e pense nisso. Abraço e boa sorte com seu OT!
     
    Atensiosamente,
    Roksas.
  20. Upvote
    Roksas deu reputação a Kluivert em [Encerrado] Alguem pode me ajuda a tirar level system   
    Pokemon né e mi complicado !
     
     
    @edit
    E meu caro amigo ta na área errada!
  21. Upvote
    Roksas recebeu reputação de KennyConrad em Alavanca que teleporta pra 8 lugares diferente.   
    Vá em data/actions/scripts, crie um arquivo chamado 8place.lua e adicione dentro:
    function onUse(cid) local places = {{x = 1, y = 2, z = 7}, {x = 1, y = 2, z = 7}, {x = 1, y = 2, z = 7}, {x = 1, y = 2, z = 7}, {x = 1, y = 2, z = 7}, {x = 1, y = 2, z = 7}, {x = 1, y = 2, z = 7}, {x = 1, y = 2, z = 7}} if not isInArray({x = 86, y = 1254, z = 7}, getThingPos(cid)) then return doPlayerSendCancel(cid, "Você não está na posição correta.") and true end doSendMagicEffect(getThingPos(cid), 14) doTeleportThing(cid, places[math.random(#places)]) return true end Em actions.xml adicione a seguinte tag:
    <action actionid="13139" event="script" value="8place.lua"/> Prontinho, basta adicionar "ACTIONID 13139" pelo RME nesta alavanca, boa sorte.
  22. Upvote
    Roksas recebeu reputação de KennyConrad em Pedido Npc que da storagem X se o player ja tiver a storagem Y   
    Tente desta seguinte forma abaixo:
    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, 'Emily Topson') then if getPlayerStorageValue(cid, 15000) >= 1 then selfSay('Você já me ajudou.', cid) talkState[talkUser] = 0 return true end if getPlayerStorageValue(cid, 15001) <= 1 then selfSay('Emily Topson é o nome da minha esposa que sumiu após caminhar aqui próximo. Não tenho notícia dela a muito tempo.', cid) talkState[talkUser] = 0 else selfSay('Obrigado grande guerreiro por solucionar o mistério da minha esposa. Você agora tem permissão para acessar o lado sul da ilha..', cid) talkState[talkUser] = 0 setPlayerStorageValue(cid, 15000, 1) return true end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) #Obrigado por acessar a comunidade.
  23. Upvote
    Roksas recebeu reputação de Heitor123456 em [Encerrado] Comando desbug?   
    Sim, editei o script, pega ele de novo e cria um arquivo chamado desbug.lua na pasta data/talkactions/scripts e cola ele.
     
    Aí você vai em talkactions.xml e cola:
     
     
    <talkaction words="!desbug" event="script" value="desbug.lua"/>  
    Boa sorte.
  24. Upvote
    Roksas recebeu reputação de Hudsin em Broadcast de Conquistas   
    Basta adicionar isto na parte da premiação da quest:
     
     
    for _, t in ipairs(getPlayersOnline()) do doPlayerSendTextMessage(t, 20, "O jogador "..getCreatureName(cid).." completou a quest [NOME DA QUEST].") end
  25. Upvote
    Roksas recebeu reputação de Lorrag em [Encerrado]Pokemon Novo Inicio Equipe   
    #Lorrang, muito boa sua iniciativa, mas peço para que não crie dezenas de tópicos com o mesmo assunto, você criou 1 em cada seção praticamente. Na próxima será alertado, favor não repetir este erro.
     
    Obrigado por acessar a comunidade.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...