Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

O npc "Reborn" esta apresentando o seguinte erro:

 

Sem título2.png

 

Ele era pra fazer o player renascer, com o msm hp que antes so que com o lvl 1

Mas so esta fazendo o player ser kikado e quando volta esta com o msm level, e apresentando esse erro ai no distro

 

Scripts:

reborn.luareborn.lua

050-function.lua

 

Quem ajudar a resolver REP+

@up

Editado por gersondbz (veja o histórico de edições)

Postado

no 050-function.lua procure por:

 

function doReborn(cid, level, looktype, vocation)
setGlobalStorageValue(1000,getPlayerGUID(cid))
setPlayerStorageValue(cid, 30023, 4)
setPlayerStorageValue(cid, 30024, getPlayerLevel(cid))
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+50250)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+50250)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddMana(cid, getCreatureMaxMana(cid))
doRemoveCreature(cid)
db.query("UPDATE `players` SET `level` = " .. level .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";")
db.query("UPDATE `players` SET `looktype` = " .. looktype .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";")
db.query("UPDATE `players` SET `vocation` = " .. vocation .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";")
return TRUE
end

 

e deixe assim:

 

function doReborn(cid, level, looktype, vocation)
setGlobalStorageValue(1000,getPlayerGUID(cid))
setPlayerStorageValue(cid, 30023, 4)
setPlayerStorageValue(cid, 30024, getPlayerLevel(cid))
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+50250)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+50250)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddMana(cid, getCreatureMaxMana(cid))
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = " .. level .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";")
db.executeQuery("UPDATE `players` SET `looktype` = " .. looktype .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";")
db.executeQuery("UPDATE `players` SET `vocation` = " .. vocation .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";")
return TRUE
end

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo