Postado Janeiro 8, 2015 10 anos Autor <globalevent name="fogos" time="00:00" event="script" value="fogos.lua"/> local function finale(uid, msg) if isCreature(uid) then pos = getCreaturePosition(uid) effectIni = 28 for i = -3, 3 do for j = -3, 3 do rangex, rangey = math.abs(i), math.abs(j) kdist = rangex+rangey position = {x = pos.x + i, y = pos.y + j, z = pos.z} l = effectIni - 1 + kdist if l > (effectIni + 2) then l = 255 end if isWalkable(position, false, true, true) then doSendMagicEffect(position, l) end end end doPlayerSendTextMessage(uid, MESSAGE_INFO_DESCR, msg) end return true end local function newYear(uid, delay, time, min, max) if isCreature(uid) then n = time or 2 pos = getCreaturePosition(uid) local fogos = math.random(min, max) for i = 1, fogos do position = {x = pos.x + math.random(-7,7), y = pos.y + math.random(-5,5), z = pos.z} if isWalkable(position, false, true, true) then doSendMagicEffect(position, math.random(28,30)) end end if n > 1 then addEvent(newYear, delay, uid, delay, (n-1), min, max) else end end return true end local config = { delay = 300, -- tempo entre uma wave de fogos e outra vezes = 45, -- numero de waves msgDur = "Uma chuva de fogos começou...", --- msg ao começar os fogos msgAfter = "FELIZ 2015!", -- msg ao terminar os fogos minfogos = 5, -- minimo de fogos por wave maxfogos = 7 -- maximo de fogos por wave. } function onThink(interval, lastExecution) if os.date("%d.%m") == "01.01" then for _, k in ipairs (getPlayersOnline()) do newYear(k, config.delay, config.vezes, config.minfogos, config.maxfogos) doPlayerSendTextMessage(k, MESSAGE_EVENT_DEFAULT, config.msgDur) addEvent(finale, config.delay * config.vezes, k, config.msgAfter) end end return true end Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá! "Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda (obg ao @Beeny por fazer essa linda sign <3)
Postado Janeiro 10, 2015 10 anos Deixa que eu uso esse Globalevent, em 2016 :v Nem todo loop infinito é ruim ;P User *eu = new User("otteN"); RepSystem<User> *myRep = new RepSystem<User>("jóinha"); myRep->setAlvo(eu); /* só por ser criado já sou o melhor membro */ while(eu->isMelhorMembro()){ myRep->reputar(); }
Postado Janeiro 18, 2015 10 anos Rep + gatinho AHAH Actions; Vip door Systema By Mock Movements; Piso que TELEPORTA apenas players PREMIUM
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.