Postado Junho 7, 2015 9 anos Este é um post popular. Como o título do tópico já diz, o script a seguir serve como uma ferramenta para auxiliar o player a fazer uma busca por outro player. A partir de uma letra, é gerada uma lista dos players online cujo o nome começa com a inicial escolhida.searchplayers.lua (data\talkactions\scripts): function onSay(cid, words, param) -- Developed by Wise ~ TibiaKing.com local pnames, list = {}, '' for _, pid in ipairs(getPlayersOnline()) do table.insert(pnames, getCreatureName(pid)) end if not tostring(param) or param:len() > 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Type the first letter of the name of online players you want to view on the list.\nEx: !searchplayers K') end for _, n in pairs(pnames) do if n:sub(1, 1):lower() == param:lower() then if list ~= '' then list = list..', '..n else list = n end end end return list ~= '' and doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Players whose first name begins with '..param..': '..list) or doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'There are no players whose first name begins with '..param) end talkactions.xml (data\talkactions): <talkaction words="!searchplayers" event="script" value="searchplayers.lua"/> Uso da talkaction: !searchplayers letra ~ !searchplayers k > Players whose first name begins with k: Kharsek, Krohm, Kawaka Espero que gostem (;
Postado Junho 7, 2015 9 anos Autor @Caronte obrigado, coruja homossexual. @Ceos obrigado, mas acho que não tem necessidade de imagens..é apenas uma mensagem haha@Hadagalberto obrigado, meu caro.
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.