Help]Scripts

GMnetinhu
em Lixeira Pública

GMnetinhu

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 04/01/11Posts: 2

Tipo do script:!reset,!aol

Protocolo (versão do Tibia):8.40

Servidor utilizado:slayer

Nível de experiência:0

 

Ateciosamente, GM Netinhu (:

 

tek4ec2c354e86743723181.png

joao33

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 24/01/11Posts: 254Char no Tibia: Zemekiz

Rlx ja te ajudo to aki arrumando o script e edito o post jaja xtibianos pode deixar q eu respondo

 

!AOL

 

va em seu ot/data/talkactions/script e cri e arquivo xamado aol.lua e ponha isso dentro!

function onSay(cid, words, param)

 

if doPlayerRemoveMoney(cid, 20000) == TRUE then

local bp = doPlayerAddItem(cid, 2173, 1)

doSendMagicEffect(getCreaturePosition(cid),13)

doCreatureSay(cid, "Voce comprou um AOL", TALKTYPE_ORANGE_1)

else

doCreatureSay(cid, "Voce nao tem dinheiro suficiente", TALKTYPE_ORANGE_1)

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

end

end

 

Depois va em seu ot/data/talkactions.xml em players add

<talkaction words="!aol" event="script" value="aol.lua"/>

 

EXPLICAÇÃO CLIQUE EM SPOILER

 

 

local bp = doPlayerAddItem(cid, 2173, 1)

2173 id da aol nao mexa ,1 quantidade de aols que o player ira receber

 

doCreatureSay(cid, "Voce comprou um AOL", TALKTYPE_ORANGE_1)

oque diz quando player compra 1 aol

 

doCreatureSay(cid, "Voce nao tem dinheiro suficiente", TALKTYPE_ORANGE_1)

oque diz quando o player nao tem dinheiro para comprar

 

<talkaction words="!aol" event="script" value="aol.lua"/>

Words="oque o player ira dizer para comprar/value="nomeda pasta no caso aol.lua"/>

 

 

 

!Reset

 

va em seu ot/data/talkactions/script e crie 1 arquivo xamado reset.lua

e ponha isso dentro

function onSay(cid, words, param)

 

config = {

RemainingLvl=8, -- level que ficará depois de ser resetado.

exper=4200, -- experiencia que ficará depois de ser resetado.

pid=getPlayerGUID(cid), -- não mecha

redskull="yes", -- players com red skull podem resetar? ("yes" or "no").

bat="yes" --players precisam estar sem fight pra resetarem? ("yes" or "no").

}

 

function getResets(cid)

reset = getPlayerStorageValue(cid,1020)

if reset < 0 then

reset = 0

end

return reset

end

 

if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then

doPlayerSendTextMessage(cid,22,"Apenas player sem red skull podem resetar.")

return true

end

 

if(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == false) then

doPlayerSendTextMessage(cid,22,"Você precisa estar em protection zone pra poder resetar.")

return true

end

 

if(config.bat == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == true) then

doPlayerSendTextMessage(cid,22,"Você precisa estar sem battle pra poder resetar.")

return true

end

 

 

if getPlayerStorageValue(cid,1020) > 24 then

if getPlayerLevel(cid) >= 500 then

setPlayerStorageValue(cid,1020,getResets(cid)+1)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid, "You need to have level 500 or more you may be reset.")

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

end

else

doPlayerSendCancel(cid, "You need to have 24 reset or more you may be reset.")

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

end

 

if getPlayerStorageValue(cid,1020) > 14 then

if getPlayerLevel(cid) >= 450 then

setPlayerStorageValue(cid,1020,getResets(cid)+1)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid, "You need to have level 450 or more you may be reset.")

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

end

else

doPlayerSendCancel(cid, "You need to have 14 resets or more you may be reset.")

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

end

 

if getPlayerLevel(cid) >= 350 then

setPlayerStorageValue(cid,1020,getResets(cid)+1)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid, "You need to have level 350 or more you may be reset.")

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

end

return TRUE

end

 

va em seu ot/data/talkactions.xml e add em players essa linha

<talkaction words="!reset" event="script" value="reset.lua"/>

 

EXPLICAÇÃO Clique EM SPOILER PARA VERA EXPLICAÇÃO

 

 

words=oque o player ira dizer pra resetar value=o nome da pasta no caso reset.lua

 

 

 

 

Plx mereço rep+ tive trabalho pakas pra fazer esses scripts vlw

douguera

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 25/05/08Posts: 69

nao foi tu quem feiz eu ja vi esses scripts =D voce pod pedir rep mas poste os creditos