Postado Fevereiro 11, 2018 7 anos GOSTARIA QUE ALGUÉM EDITASSE ESSE SCRIPT PRA MIN PARA FUNCIONAR NO SERVE OTX DO MALUCOO, PARA APARECER ALGUM EFEITO E ESCRITO TOP LEVEL NO PLAYER QUE FOR TOP LEVEL DO SERVIDOR, LEMBRANDO ESSE SERVE NÃO TEM A LOGIN.LUA, SO TEM EM OTHERS. Em data/creaturescripts/creaturescripts.xml adicione: <event type="login" name="TopEffect" event="script" value="topeffect.lua"/> Em data/creaturescripts/scripts/login.lua adicione no fim: registerCreatureEvent(cid, "TopEffect") Agora crie um arquivo em data/creaturescripts/scripts com o nome topeffect.lua e adicione: local tempo = 10 --tempo em segundos function onLogin(cid) query = db.getResult("SELECT `name`, `level` FROM `players` WHERE `group_id` < 2 ORDER BY `level` DESC LIMIT 1") if (query:getID() ~= -1) then name = query:getDataString("name") if getPlayerName(cid) == name then TopEffect(cid) end end return true end function TopEffect(cid) if isPlayer(cid) then doSendAnimatedText(getCreaturePosition(cid), "[TOP]", TEXTCOLOR_LIGHTBLUE) doSendMagicEffect(getCreaturePosition(cid), 30) addEvent(TopEffect, tempo*1000, cid) end return true end
Postado Fevereiro 13, 2018 7 anos Este tópico foi movido para a área correta. Esta é uma mensagem automática!Pedimos que leia as regras do fórum! Spoiler This topic has been moved to the correct area. This is an automated message!Please read the forum rules. https://github.com/Cjaker/ , _ , ( o o ) /'` ' `'\ ESTOU TE OBSERVANDO O_O |'''''''| |\\'''//| """
Postado Fevereiro 14, 2018 7 anos local time = 10 -- Time in seconds function TopEffect(cid) local player = Player(cid) if not player then return true end player:say("[TOP]", TALKTYPE_MONSTER_SAY, false, creature, fromPosition) player:sendMagicEffect(CONST_ME_FIREWORK_RED) addEvent(TopEffect, time * 1000, player.uid) return true end function onLogin(player) query = db.storeQuery("SELECT `name`, `level` FROM `players` WHERE `group_id` < 2 ORDER BY `level` DESC LIMIT 1") if query:getID() ~= -1 then name = query:getString("name") if player:getName() == name then player:registerEvent("TopEffect") TopEffect(player.uid) end end return true end
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.