11 horas atrás, ExplondServer disse:Salve, rapaziada!
Vim convocar os scripter's para um trampo, se é que já existe ou se queiram fazer. NÃO SEI se é o lugar certo, se não for, peço que mudem, por favor.
Seguinte, eu estava procurando e não achei o script para mim ver as minhas informações, achei apenas isto: (FINAL DO TOPICO)
O que eu quero é o seguinte, eu digitar algo como: !myinfo e aparecer algo parecido ou exatamente estas informações.
O problema é que, este script (CITADO À BAIXO) só funciona se eu escrever: !info + NICK DO PLAYER, e o que eu quero é apenas !myinfo e puxar ÀS MINHAS informações, deu para entender? sem precisar digitar nick algum, no caso, vou fazer um MOD no OTC, colocar um Button com o onClick e ao clicar, o player vai abrir ÀS SUAS INFORMAÇÕES, ao invés de abrir À DOS OUTROS PLAYER'S.
Faz um tempo que estou atrás e não acho! ^^
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
endlocal pid = getPlayerByNameWildcard(param)
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.")
return true
endlocal tmp = {accountId = getPlayerAccountId(pid), ip = getPlayerIp(pid)}
local pos = getCreaturePosition(pid)
doPlayerPopupFYI(cid, "Minhas INFORMAÇÕES" ..
"\n[Nome]: ." .. getCreatureName(pid) ..
"\n[Level]: ." .. getPlayerLevel(pid) ..
"\n[Grupo]: ." .. getPlayerGroupName(pid) ..
"\n[Access]: ." .. getPlayerAccess(pid) ..
"\n[Vocação]: ." .. getVocationInfo(getPlayerVocation(pid)).name ..
"\n[Velocidade]: ." .. getCreatureSpeed(pid) ..
"\n[Vitalidade]: ." .. getCreatureHealth(pid) ..
"\n[Clube]: ." .. getPlayerSkillLevel(pid, SKILL_CLUB) ..
"\n[Fishing]: ." .. getPlayerSkillLevel(pid, SKILL_FISHING) ..
"\n[Dinheiro]: ." .. getPlayerItemCount(pid, 2160) ..
"\n[Shiny Stone]: ." .. getPlayerItemCount(pid, 13088) ..
"\n[Scarab]: ." .. getPlayerItemCount(pid, 2159) ..
"\n[Posição]: [X: " .. pos.x .. "][Y: " .. pos.y .. "][Z: " .. pos.z .. "]" ..
"\n\n____Informações adcionais____" ..
"\nName: ." .. getPlayerAccount(pid) ..
"\n[Notations]: ." .. getNotationsCount(tmp.accountId) ..
"\n[Premium Point]: ." .. getPlayerPremiumPoint(pid) ..
"\nIP: " .. doConvertIntegerToIp(tmp.ip) .. " (" .. tmp.ip .. ")")
return true
end
Este só funciona se o player digitar !info + nick do player.
É bem simples, crie um arquivo na pasta do seu servidor data/talkactions/script/ com o nome myinfo.lua e coloque o seguinte codigo:
function onSay(cid, words, param, channel) local tmp = {accountId = getPlayerAccountId(cid), ip = getPlayerIp(cid)} local pos = getCreaturePosition(cid) doPlayerPopupFYI(cid, "Minhas INFORMAÇÕES" .. "\n[Nome]: ." .. getCreatureName(cid) .. "\n[Level]: ." .. getPlayerLevel(cid) .. "\n[Grupo]: ." .. getPlayerGroupName(cid) .. "\n[Access]: ." .. getPlayerAccess(cid) .. "\n[Vocação]: ." .. getVocationInfo(getPlayerVocation(cid)).name .. "\n[Velocidade]: ." .. getCreatureSpeed(cid) .. "\n[Vitalidade]: ." .. getCreatureHealth(cid) .. "\n[Clube]: ." .. getPlayerSkillLevel(cid, SKILL_CLUB) .. "\n[Fishing]: ." .. getPlayerSkillLevel(cid, SKILL_FISHING) .. "\n[Dinheiro]: ." .. getPlayerItemCount(cid, 2160) .. "\n[Shiny Stone]: ." .. getPlayerItemCount(cid, 13088) .. "\n[Scarab]: ." .. getPlayerItemCount(cid, 2159) .. "\n[Posição]: [X: " .. pos.x .. "][Y: " .. pos.y .. "][Z: " .. pos.z .. "]" .. "\n\n____Informações adcionais____" .. "\nName: ." .. getPlayerAccount(cid) .. "\n[Notations]: ." .. getNotationsCount(tmp.accountId) .. "\n[Premium Point]: ." .. getPlayerPremiumPoint(cid) .. "\nIP: " .. doConvertIntegerToIp(tmp.ip) .. " (" .. tmp.ip .. ")") return true end
Depois no arquivo talkactions.xml coloque a tag:
<talkaction words="!myinfo" event="script" value="myinfo.lua"/>





info
Grupo: Campones
Registrado: 10/04/18
Posts: 8
Reputação: 0
Gênero: Masculino
Char no Tibia: Leogod
Salve, rapaziada!
Vim convocar os scripter's para um trampo, se é que já existe ou se queiram fazer. NÃO SEI se é o lugar certo, se não for, peço que mudem, por favor.
Seguinte, eu estava procurando e não achei o script para mim ver as minhas informações, achei apenas isto: (FINAL DO TOPICO)
O que eu quero é o seguinte, eu digitar algo como: !myinfo e aparecer algo parecido ou exatamente estas informações.
O problema é que, este script (CITADO À BAIXO) só funciona se eu escrever: !info + NICK DO PLAYER, e o que eu quero é apenas !myinfo e puxar ÀS MINHAS informações, deu para entender? sem precisar digitar nick algum, no caso, vou fazer um MOD no OTC, colocar um Button com o onClick e ao clicar, o player vai abrir ÀS SUAS INFORMAÇÕES, ao invés de abrir À DOS OUTROS PLAYER'S.
Faz um tempo que estou atrás e não acho! ^^
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
local pid = getPlayerByNameWildcard(param)
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.")
return true
end
local tmp = {accountId = getPlayerAccountId(pid), ip = getPlayerIp(pid)}
local pos = getCreaturePosition(pid)
doPlayerPopupFYI(cid, "Minhas INFORMAÇÕES" ..
"\n[Nome]: ." .. getCreatureName(pid) ..
"\n[Level]: ." .. getPlayerLevel(pid) ..
"\n[Grupo]: ." .. getPlayerGroupName(pid) ..
"\n[Access]: ." .. getPlayerAccess(pid) ..
"\n[Vocação]: ." .. getVocationInfo(getPlayerVocation(pid)).name ..
"\n[Velocidade]: ." .. getCreatureSpeed(pid) ..
"\n[Vitalidade]: ." .. getCreatureHealth(pid) ..
"\n[Clube]: ." .. getPlayerSkillLevel(pid, SKILL_CLUB) ..
"\n[Fishing]: ." .. getPlayerSkillLevel(pid, SKILL_FISHING) ..
"\n[Dinheiro]: ." .. getPlayerItemCount(pid, 2160) ..
"\n[Shiny Stone]: ." .. getPlayerItemCount(pid, 13088) ..
"\n[Scarab]: ." .. getPlayerItemCount(pid, 2159) ..
"\n[Posição]: [X: " .. pos.x .. "][Y: " .. pos.y .. "][Z: " .. pos.z .. "]" ..
"\n\n____Informações adcionais____" ..
"\nName: ." .. getPlayerAccount(pid) ..
"\n[Notations]: ." .. getNotationsCount(tmp.accountId) ..
"\n[Premium Point]: ." .. getPlayerPremiumPoint(pid) ..
"\nIP: " .. doConvertIntegerToIp(tmp.ip) .. " (" .. tmp.ip .. ")")
return true
end
Este só funciona se o player digitar !info + nick do player.