[Rest]8.10 Talk Ou Npc

juanbrando
em Lixeira Pública

juanbrando

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 28/06/09Posts: 60

SIMPLES QUERIA UMA TALKACTION OU NPC DE RESET EM UM OT 8.10

LEVEL 800.000 RESETA E VOLTA PRO LEVEL 8 OBRIGADO POR FAVOR

REP+ POR ME AJUDAR

(OBRIGADO)button_ok.png

greenpro.jpg

 

 

Sou Fan Desse leke:

fanq.gif

GMRaphael

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 27/05/11Posts: 31Char no Tibia: [PS]Raphael

Ajudando

 

Vá em DATA/TALKACTIONS/SCRIPTS e Crie Um Arquivo Chamado reset.lua e Coloque isto Dentro:

 

function onSay(cid, words, param)
local level = 800000
local RemainingLvl = 8
local pid = getPlayerGUID(cid)

function addReset(cid)
resets = getResets(cid)
setPlayerStorageValue(cid,1020,resets+1)
return true
end

function getResets(cid)
resets = getPlayerStorageValue(cid,1020)
if resets < 0 then
resets = 0
end
return resets
end

if getPlayerLevel(cid) >= level then
addReset(cid)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doPlayerPopupFYI(cid,"Parabens Voce resetou agora, voce tem "..getResets(cid).." reset.")
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..RemainingLvl..", `experience` = 0 WHERE `id` = "..pid)

else
doPlayerSendCancel(cid, "voce precisa ter level "..level.." ou mais para resetar.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end

return TRUE
end

 

 

Agora Vá em DATA/TALKACTIONS Abra o Arquivo Talkactions.xml E Na Parte de Players Adcione Isto.

 

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

 

Para o Player Resetar ele Tem que Falar !resetar

 

 

Valeu Espero Ter Ajudado.

Equipe Pokemon Shiny.

 

fanbarv.jpg

 

É Meu Fan? Use Minha Fan Bar.

juanbrando

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 28/06/09Posts: 60

Ajudando

 

Vá em DATA/TALKACTIONS/SCRIPTS e Crie Um Arquivo Chamado reset.lua e Coloque isto Dentro:

 

function onSay(cid, words, param)
local level = 800000
local RemainingLvl = 8
local pid = getPlayerGUID(cid)

function addReset(cid)
resets = getResets(cid)
setPlayerStorageValue(cid,1020,resets+1)
return true
end

function getResets(cid)
resets = getPlayerStorageValue(cid,1020)
if resets < 0 then
resets = 0
end
return resets
end

if getPlayerLevel(cid) >= level then
addReset(cid)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doPlayerPopupFYI(cid,"Parabens Voce resetou agora, voce tem "..getResets(cid).." reset.")
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..RemainingLvl..", `experience` = 0 WHERE `id` = "..pid)

else
doPlayerSendCancel(cid, "voce precisa ter level "..level.." ou mais para resetar.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end

return TRUE
end

 

 

Agora Vá em DATA/TALKACTIONS Abra o Arquivo Talkactions.xml E Na Parte de Players Adcione Isto.

 

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

 

Para o Player Resetar ele Tem que Falar !resetar

 

 

Valeu Espero Ter Ajudado.

 

Não Rodou Amigo :9

A lembrando que em tibia 8.10 cada jogador tem uma pasta!!

greenpro.jpg

 

 

Sou Fan Desse leke:

fanq.gif

GMRaphael

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 27/05/11Posts: 31Char no Tibia: [PS]Raphael

Tente Isso Então.

 

 

function onSay(cid, words, param)
local level = 800000 --level pra ser resetado
local RemainingLvl = 8 --lvl que ele ficara depois do reset
local pid = getPlayerGUID(cid)

function addReset(cid)
resets = getResets(cid)
setPlayerStorageValue(cid,1020,resets+1)
return true
end

function getResets(cid)
resets = getPlayerStorageValue(cid,1020)
if resets < 0 then
resets = 0
end
return resets
end

 

 

E a Tag.

 

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

 

Ali o Player Tem Que Falar !reset Pra Resetar

Equipe Pokemon Shiny.

 

fanbarv.jpg

 

É Meu Fan? Use Minha Fan Bar.

juanbrando

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 28/06/09Posts: 60

ii amigo não foi memso assim :(dry.gif

greenpro.jpg

 

 

Sou Fan Desse leke:

fanq.gif