Ir para conteúdo

Featured Replies

Postado

[13/01/2017 14:02:35] [Error - CreatureScript Interface] 
[13/01/2017 14:02:35] data/creaturescripts/scripts/showvoc.lua:onLook
[13/01/2017 14:02:35] Description: 
[13/01/2017 14:02:35] data/creaturescripts/scripts/showvoc.lua:8: attempt to concatenate a boolean value
[13/01/2017 14:02:35] stack traceback:
[13/01/2017 14:02:35]     data/creaturescripts/scripts/showvoc.lua:8: in function <data/creaturescripts/scripts/showvoc.lua:1>

 

 

 

SCRIPT

 

function onLook(cid, thing, position, lookDistance)
    if isPlayer(thing.uid) and thing.uid ~= cid then
local type = getPlayerStorageValue(thing.uid, 89745)
        doPlayerSetSpecialDescription(thing.uid, "\n"..(getPlayerSex(cid) == 0 and "She" or "He").." are "..(type < 0 and "Shinobi" or type == 1 and "Genin" or type == 2 and "Chunin" or type == 3 and "Jounin" or type == 4 and "Anbu" or type == 5 and "Sennin" or type == 6 and "Kage"))
        return true
    elseif thing.uid == cid then
type = getPlayerStorageValue(cid, 89745)
        doPlayerSetSpecialDescription(cid, "\nYou are "..(type < 0 and "Shinobi" or type == 1 and "Genin" or type == 2 and "Chunin" or type == 3 and "Jounin" or type == 4 and "Anbu" or type == 5 and "Sennin" or type == 6 and "Kage")..".")
        local string = 'You see yourself.'
        if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then
            string = string..' You are '.. getPlayerGroupName(cid) ..'.'
        elseif getPlayerVocation(cid) ~= 0 then
            string = string..' You are '.. getPlayerVocationName(cid) ..'.'
        else
            string = string..' You have no vocation.'
        end
        string = string..getPlayerSpecialDescription(cid)..''

        if getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil then
            string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.'
        end

        if getPlayerGuildId(cid) > 0 then
            string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid)
            string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.'
        end

        if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then
            string = string..'\nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].'
        if isPlayerGhost(cid) then
            string = string..'\n*GhostMode*'
        end
            string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.'
        end

        if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then
            string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].'
        end
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string)  
        return false
    end
    return true
end


 

  • Respostas 7
  • Visualizações 719
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Postado

Esta é uma mensagem automática! Este tópico foi movido para a área correta.
Pedimos que você leia as regras do fórum.

Mostrar conteúdo oculto

 

                                                              ezgif-1-98aab239f3.gif.1a897c9c3225228909e7b356a5cfb8e4.gif

Postado
Mostrar conteúdo oculto

 

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.6k

Informação Importante

Confirmação de Termo