Sttorm 18 Posted May 16, 2018 Report Share Posted May 16, 2018 Fala pessoal , vi muita galera com problema no look (principalmente em narutibias). Então resolvi refazer o sistema de look Crie um novo arquivo em Creaturescripts e cole isso ( Tem que registrar na XML e no login.lua, ambas tags estão na script) -- <event type="look" name="showVoc" event="script" value="showvoc.lua"/> -- registerCreatureEvent(cid, showVoc) local t = { [-1] = "Estudante", [0] = "Estudante", [1] = "Genin", [2] = "Chunnin", [3] = "Jounin", [4] = "Anbu", [5] = "Sennin" } function onLook(cid, thing, position, lookDistance) local storage = 35461 local get_description = t[getPlayerStorageValue(thing.uid, storage)] local get_sex = (getPlayerSex(thing.uid) == 0 and "She" or "He") local get_town = getTownName(getPlayerTown(thing.uid)) if isPlayer(thing.uid) and thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid, "\n ".. get_sex .." are ".. get_description ..". \n ".. get_sex .." is the resident of ".. get_town ..".") end return true end Como o sistema funciona ? como eu configuro ? Primeiramente , a script pega o valor que o player tem de uma storage e a identifica na tabela , onde o que está entre "[]" é o valor da storageExemplo : O player tem a storage 35461 e 3 como o value dela , então no look retornará Jounin Para configurar , mecha aqui local t = { [-1] = "Estudante", [0] = "Estudante", [1] = "Genin", [2] = "Chunnin", [3] = "Jounin", [4] = "Anbu", [5] = "Sennin" } Lembrando que a ultima parte não deverá conter virgula , ficando assim local t = { [-1] = "Estudante", [0] = "Estudante", [1] = "Genin" } A script não funciona se você der look em si mesmo.Chars com group maior que 2 retornarão erro ao dar look. Link to comment https://xtibia.com/forum/topic/247490-tfs-0x-new-look-system/ Share on other sites More sharing options...
shadowzim 2 Posted June 5, 2019 Report Share Posted June 5, 2019 local t = { [-1] = "Estudante", [0] = "Estudante", [1] = "Genin", [2] = "Chunnin", [3] = "Jounin", [4] = "Anbu", [5] = "Sennin" } function onLook(cid, thing, position, lookDistance) local storage = 35461 local get_description = t[getPlayerStorageValue(thing.uid, storage)] if thing.uid == cid then get_sex = "You" else get_sex = (getPlayerSex(thing.uid) == 0 and "She" or "He") End local get_town = getTownName(getPlayerTown(thing.uid)) if isPlayer(thing.uid) and thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid, "\n ".. get_sex .." are ".. get_description ..". \n ".. get_sex .." is the resident of ".. get_town ..".") end return true end Com Isso, resolve o problema de dar look em si mesmo, já a parte dos groups, eu precisaria saber como funciona e como eles estão distribuidos no seu servidor pra que eu possa mudar... Link to comment https://xtibia.com/forum/topic/247490-tfs-0x-new-look-system/#findComment-1751866 Share on other sites More sharing options...
leozinpbb 7 Posted June 12, 2019 Report Share Posted June 12, 2019 @Sttorm PODERIA ME AJUDAR, NO MEU EU INSTALEI TUDO CERTO , POREM QUANDO VAI DAR LOOK NAO APARECE NADA . USO TFS. 0.4 ( 8.6) Link to comment https://xtibia.com/forum/topic/247490-tfs-0x-new-look-system/#findComment-1751992 Share on other sites More sharing options...
Recommended Posts