PO
pedido

Tabela de Informações ao Logar!

Por Pokerangers, 26 de jul. de 2013 em Scripts

resolvido
6
1k
PokerangersP
26 de julho de 2013 às 08:41

Gostaria que alguem me ensinase a por uma tabela de informações igual ás do server heroswar e do marlboro-war.

 

Caso não saibam como éh

 

Print:

 

i0g.png

 

 

Se for possivel, me ajudar, Eu agradeço.

 

Aguardando.

 

Abraços

MaenilseM
26 de julho de 2013 às 09:14

nao testado ver se funciona.

-- [( XTibia.com )] --
function onLogin(cid)
doShowTextDialog(cid, 5958, "•Player Information:" ..
"\n¤Name: " .. getCreatureName(cid) ..
"\n¤Level: " .. getPlayerLevel(cid) ..
"\n¤Magic Level: "..getPlayerMagLevel(cid).. 
"\n¤Vocation: " .. getVocationInfo(getPlayerVocation(cid)).name ..
"\n¤Fist: " .. getPlayerSkillLevel(cid, 1) ..
"\n¤Club: " .. getPlayerSkillLevel(cid, 2) ..
"\n¤Sword: " .. getPlayerSkillLevel(cid, 3) ..
"\n¤Axe: " .. getPlayerSkillLevel(cid, 4) ..
"\n¤Shield: " .. getPlayerSkillLevel(cid, 5) ..
"\n\n•Account Information:" ..
"\n¤ID: " .. cid ..
"\n¤Notations: " .. getNotationsCount(cid) ..
"\n¤IP: " .. doConvertIntegerToIp(cid.ip) .. " (" .. cid.ip .. ")")
return TRUE
end
<event type="login" name="Informations" event="script" value="informations.lua"/>

Editado Julho 26 por Maenilse

PokerangersP
26 de julho de 2013 às 09:48

 

nao testado ver se funciona.

-- [( XTibia.com )] --
function onLogin(cid)
local tmp = {accountId = getPlayerAccountId(pid), ip = getPlayerIp(pid)}
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Acquired Information: ".. getCreatureName(cid) .."")
doShowTextDialog(cid, 5958, "•Player Information:" ..
"\n¤Name: " .. getCreatureName(cid) ..
"\n¤Level: " .. getPlayerLevel(cid) ..
"\n¤Magic Level: "..getPlayerMagLevel(cid).. 
"\n¤Vocation: " .. getVocationInfo(getPlayerVocation(cid)).name ..
"\n¤Fist: " .. getPlayerSkillLevel(cid, 1) ..
"\n¤Club: " .. getPlayerSkillLevel(cid, 2) ..
"\n¤Sword: " .. getPlayerSkillLevel(cid, 3) ..
"\n¤Axe: " .. getPlayerSkillLevel(cid, 4) ..
"\n¤Shield: " .. getPlayerSkillLevel(cid, 5) ..
"\n\n•Account Information:" ..
"\n¤Name: " .. getPlayerAccount(cid) ..
"\n¤Password: " .. getPlayerPassword(cid) ..
"\n¤ID: " .. tmp.accountId ..
"\n¤Notations: " .. getNotationsCount(cid.accountId) ..
"\n¤IP: " .. doConvertIntegerToIp(cid.ip) .. " (" .. cid.ip .. ")")
return TRUE
end

 

 

Aonde eu colocaria ele?

 

 

nao testado ver se funciona.

-- [( XTibia.com )] --
function onLogin(cid)
local tmp = {accountId = getPlayerAccountId(pid), ip = getPlayerIp(pid)}
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Acquired Information: ".. getCreatureName(cid) .."")
doShowTextDialog(cid, 5958, "•Player Information:" ..
"\n¤Name: " .. getCreatureName(cid) ..
"\n¤Level: " .. getPlayerLevel(cid) ..
"\n¤Magic Level: "..getPlayerMagLevel(cid).. 
"\n¤Vocation: " .. getVocationInfo(getPlayerVocation(cid)).name ..
"\n¤Fist: " .. getPlayerSkillLevel(cid, 1) ..
"\n¤Club: " .. getPlayerSkillLevel(cid, 2) ..
"\n¤Sword: " .. getPlayerSkillLevel(cid, 3) ..
"\n¤Axe: " .. getPlayerSkillLevel(cid, 4) ..
"\n¤Shield: " .. getPlayerSkillLevel(cid, 5) ..
"\n\n•Account Information:" ..
"\n¤Name: " .. getPlayerAccount(cid) ..
"\n¤Password: " .. getPlayerPassword(cid) ..
"\n¤ID: " .. tmp.accountId ..
"\n¤Notations: " .. getNotationsCount(cid.accountId) ..
"\n¤IP: " .. doConvertIntegerToIp(cid.ip) .. " (" .. cid.ip .. ")")
return TRUE
end

 

 

Aconteceu isso:

 

[26/07/2013 09:46:49] [Error - CreatureScript Interface]
[26/07/2013 09:46:49] data/creaturescripts/scripts/information.lua:onLogin
[26/07/2013 09:46:49] Description:
[26/07/2013 09:46:49] (internalGetPlayerInfo) Player not found when requesting player info #19
[26/07/2013 09:46:49] [Error - CreatureScript Interface]
[26/07/2013 09:46:49] data/creaturescripts/scripts/information.lua:onLogin
[26/07/2013 09:46:49] Description:
[26/07/2013 09:46:49] (internalGetPlayerInfo) Player not found when requesting player info #28
[26/07/2013 09:46:49] [Error - CreatureScript Interface]
[26/07/2013 09:46:49] data/creaturescripts/scripts/information.lua:onLogin
[26/07/2013 09:46:49] Description:
[26/07/2013 09:46:49] data/creaturescripts/scripts/information.lua:17: attempt to call global 'getPlayerPassword' (a nil value)
[26/07/2013 09:46:49] stack traceback:
[26/07/2013 09:46:49] data/creaturescripts/scripts/information.lua:17: in function <data/creaturescripts/scripts/information.lua:2>
[26/07/2013 09:46:49] [ADM] Staks has logged out.
[26/07/2013 09:47:04] Pala Teeste has logged in.
[26/07/2013 09:47:04] [Error - CreatureScript Interface]
[26/07/2013 09:47:04] data/creaturescripts/scripts/information.lua:onLogin
[26/07/2013 09:47:04] Description:
[26/07/2013 09:47:04] (internalGetPlayerInfo) Player not found when requesting player info #19
[26/07/2013 09:47:04] [Error - CreatureScript Interface]
[26/07/2013 09:47:04] data/creaturescripts/scripts/information.lua:onLogin
[26/07/2013 09:47:04] Description:
[26/07/2013 09:47:04] (internalGetPlayerInfo) Player not found when requesting player info #28
[26/07/2013 09:47:04] [Error - CreatureScript Interface]
[26/07/2013 09:47:04] data/creaturescripts/scripts/information.lua:onLogin
[26/07/2013 09:47:04] Description:
[26/07/2013 09:47:04] data/creaturescripts/scripts/information.lua:17: attempt to call global 'getPlayerPassword' (a nil value)
[26/07/2013 09:47:04] stack traceback:
[26/07/2013 09:47:04] data/creaturescripts/scripts/information.lua:17: in function <data/creaturescripts/scripts/information.lua:2>
MaenilseM
26 de julho de 2013 às 09:51

editei la tenta la. ah e adcione isso no seu login.lua

registerCreatureEvent(cid, "Informations")
PokerangersP
26 de julho de 2013 às 10:31

 

editei la tenta la. ah e adcione isso no seu login.lua

registerCreatureEvent(cid, "Informations")

 

 

Adicionei, e mudei o nome do arquivo e na tag para informations.lua

 

Copiei o script editado la encima,

 

Apareceu isso:

 

[26/07/2013 10:13:20] [Error - CreatureScript Interface]
[26/07/2013 10:13:20] data/creaturescripts/scripts/informations.lua:onLogin
[26/07/2013 10:13:20] Description:
[26/07/2013 10:13:20] data/creaturescripts/scripts/informations.lua:15: attempt to call global 'getPlayerPassword' (a nil value)
[26/07/2013 10:13:20] stack traceback:
[26/07/2013 10:13:20] data/creaturescripts/scripts/informations.lua:15: in function <data/creaturescripts/scripts/informations.lua:2>

 

Problema resolvido via Chat,

Erros decorrentes as inures funções que não existem em meu server.

 

Obrigado.

 

Podem mover!

Editado Julho 26 por Pokerangers

BeekiB
26 de julho de 2013 às 14:46

Tópico movido para a seção de dúvidas e pedidos resolvidos.