Ir para conteúdo

Admin Resetando.


SnakevL

Posts Recomendados

Amigos, preciso de ajuda, eu preciso de um script, que o admin possa resetar o player(access:5), baseando-se no Script do Marcryzius, Segue Link:

!reset

 

Como no meu OT, é cobrada uma taxa de 10 reais, para resetar o player, eu preciso desse script, só que só o admin possa executá-lo, exemplo:

O admin irá falar:

!reset "Fulano

 

Aí, o player Fulano, se estiver sem fight, ou pk, ou outras coisas(detalhadas no script do Marcryzius), é resetado na hora.

Eu preciso urgente disso, pois já tenho o HOST pronto, com o server lá, e, isso, me pouparia um trabalho.

 

Obrigado, Espero Respostas desde já.

Link para o comentário
Compartilhar em outros sites

E só adicionei um parametro e direcionei todas as informações a serem

pegas e setadas a esse parametro, eu nao testei por isso nao sei se ira funciona

 

Qualquer erro poste aqui.

-- script by Marcryzius D'evil. --
function onSay(cid, words, param)
target = getPlayerByNameWildcard(param)
config = {
level=100, -- level necessario pra reseta.
RemainingLvl=8, -- level que ficará depois de ser resetado.
exper=4200, -- experiencia que ficará depois de ser resetado.
pid=getPlayerGUID(target), -- não mecha
skull="yes", -- players com white skull podem resetar? ("yes" or "no").
redskull="yes", -- players com red skull podem resetar? ("yes" or "no").
prot="yes", -- players precisam estar em protection zone pra resetar? ("yes" or "no").
bat="yes" --players precisam estar sem fight pra resetarem? ("yes" or "no").
}

function getResets(target)
reset = getPlayerStorageValue(target,1020)
if reset < 0 then
reset = 0
end
return reset
end

if(config.skull == "no") and (getCreatureSkullType(target) == 3) then
doPlayerSendTextMessage(cid,22,"apenas players sem white skull podem resetar.")
return TRUE
end

if(config.redskull == "no") and (getCreatureSkullType(target) == 4) then
doPlayerSendTextMessage(cid,22,"apenas player sem red skull podem resetar.")
return TRUE
end

if(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(target)) == FALSE) then
doPlayerSendTextMessage(cid,22,"você precisa estar em protection zone pra poder resetar.")
return TRUE
end

if(config.bat == "yes") and (getCreatureCondition(target, CONDITION_INFIGHT) == TRUE) then
doPlayerSendTextMessage(cid,22,"você precisa estar sem battler pra poder resetar.")
return TRUE
end

if getPlayerLevel(target) >= config.level then
setPlayerStorageValue(target,1020,getResets(target)+1)
doPlayerSetNameDescription(target, " Have a "..getResets(cid)+(1).." reset\'s.")
doPlayerPopupFYI(target,"You now was reset, you have "..getResets(cid)+(1).." reset\'s.")
doTeleportThing(target, getTownTemplePosition(getPlayerTown(target)))
doRemoveCreature(target)
db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)
else
doPlayerSendCancel(target, "You need to have level "..config.level.." or more you may be reset.")
doSendMagicEffect(getPlayerPosition(target), CONST_ME_POFF)
end

return TRUE
end

Link para o comentário
Compartilhar em outros sites

Qual é versão do seu OT? Ele tem talkactions?

 

Adicione essa tag no talkactions.xml

<talkaction log="yes" words="/reset" access="5" event="script" value="reset.lua"/>

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...