Ir para conteúdo

Rofl

Membro
  • Registro em

  • Última visita

  1. yamulle reagiu a uma resposta no tópico: (Resolvido)Criar quest com 4 baús
  2. nerdz reagiu a uma resposta no tópico: Gran Castle Event (8.54+)
  3. Rofl postou uma resposta no tópico em Suporte Tibia OTServer
    up
  4. Rofl postou uma resposta no tópico em Suporte Tibia OTServer
    PS: Não deu erro no console. local function Teleport(cid) doSendAnimatedText(getPlayerPosition(cid), "Aaaaah...", TEXTCOLOR_BLUE) local templo = {x=442, y=549, z=7} for j = 0, 60 do starting = {x=839 + j, y=952, z=7, stackpos=253} for i = 0, 60 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid, templo) end end end for j = 0, 61 do starting = {x=1128 + j, y=1120, z=6, stackpos=253} for i = 0, 6 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid,templo) end end end for j = 0, 14 do starting = {x=1151 + j, y=1115, z=6, stackpos=253} for i = 0, 5 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid,templo) end end end for j = 0, 14 do starting = {x=1151 + j, y=1127, z=6, stackpos=253} for i = 0, 5 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid,templo) end end end for j = 0, 49 do starting = {x=1134 + j, y=1120, z=5, stackpos=253} for i = 0, 6 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid,templo) end end end for j = 0, 14 do starting = {x=1151 + j, y=1115, z=5, stackpos=253} for i = 0, 5 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid,templo) end end end for j = 0, 14 do starting = {x=1151 + j, y=1127, z=5, stackpos=253} for i = 0, 5 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid,templo) end end end return TRUE end function onKill(cid, target, lastHit) local monstros ={"Gran Tower","gran tower"} if getCreatureTarget(cid) ~= 0 then if isMonster(target) == TRUE then for i = 1, 2 do nome = getCreatureName(getCreatureTarget(cid)) if (nome == monstros[i]) then if getPlayerStorageValue(cid, 13340) ~= 1 then setGlobalStorageValue(13340, getPlayerGuildId(cid)) granEffect(cid) if getPlayerStorageValue(cid, 13340) == 0 then stopEvent(events[cid]) doSendMagicEffect(getCreaturePosition(cid), 47) broadcastMessage("O player ".. getPlayerName(cid) .." conquistou o Gran Castle, e todos membros da guild ".. getPlayerGuildName(cid) .." acabam de receber a Gran Aura.") end addEvent(Teleport, 1000, cid) end end end end end return TRUE end
  5. Rofl postou uma resposta no tópico em Suporte Tibia OTServer
    Não funcionou Elwyn Quando o player mata a boss não está mandando a mensagem pro server e tambem não retirou o granEffect do player que era pra perder. Será que o erro não está nesta linha: if getPlayerStorageValue(cid, 13340) == 0 then ? Quando uma guild mata a boss e outra guild que tinha a storage 13340 fica realmente zerada?
  6. Rofl postou uma resposta no tópico em Suporte Tibia OTServer
    Elwyn Data/lib/granAura.lua: local events = {} local function getPositions(cid) local pos = getCreaturePosition(cid) local ret = { [1] = {x = pos.x + 1, y = pos.y, z = pos.z}, [2] = {x = pos.x, y = pos.y + 1, z = pos.z}, [3] = {x = pos.x - 1, y = pos.y, z = pos.z}, [4] = {x = pos.x, y = pos.y - 1, z = pos.z}, } return ret end function granEffect(cid, last) local sec = 200 if (isPlayer(cid) == FALSE) then return false end local positions = getPositions(cid) local last = last or 1 local last = (positions[last] and last) or 1 local next = (last == #positions) and 1 or last + 1 doSendDistanceShoot(positions[last], positions[next], 18) local event = addEvent(granEffect, sec, cid, last + 1) events[cid] = event return true end Data/ib/constant.lua: dofile('data/lib/granAura.lua') Data/lib/function.lua: dofile('data/lib/granAura.lua')
  7. Rofl postou uma resposta no tópico em Playground (Off-topic)
  8. Rofl postou uma resposta no tópico em Playground (Off-topic)
  9. Rofl postou uma resposta no tópico em Playground (Off-topic)
    uat
  10. Rofl postou uma resposta no tópico em Playground (Off-topic)
    Like kd
  11. Rofl postou uma resposta no tópico em Playground (Off-topic)
    :angry2: Beleza.
  12. Rofl postou uma resposta no tópico em Suporte Tibia OTServer
    Opa valeu por responder. Então eu alterei como você disse, coloquei: stopEvent(granEffect(cid)) Continua mesma coisa, peguei um char de outra guild e matei mas a guild que tinha a granEffect ainda continuou.
  13. Rofl postou uma resposta no tópico em Suporte Tibia OTServer
    Hi Tenho um script aqui que o player mata um boss, toda guild daquele player que matou ganha o granEffect, porem quando outra guild mata o boss, a que tinha antes tem que perder o granEffect na hora que outra guild matasse só que não está perdendo, perde só depois que reloga o character. Script: local function Teleport(cid) doSendAnimatedText(getPlayerPosition(cid), "Aaaaah...", TEXTCOLOR_BLUE) local templo = {x=442, y=549, z=7} for j = 0, 60 do starting = {x=839 + j, y=952, z=7, stackpos=253} for i = 0, 60 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid, templo) end end end for j = 0, 61 do starting = {x=1128 + j, y=1120, z=6, stackpos=253} for i = 0, 6 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid,templo) end end end for j = 0, 14 do starting = {x=1151 + j, y=1115, z=6, stackpos=253} for i = 0, 5 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid,templo) end end end for j = 0, 14 do starting = {x=1151 + j, y=1127, z=6, stackpos=253} for i = 0, 5 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid,templo) end end end for j = 0, 49 do starting = {x=1134 + j, y=1120, z=5, stackpos=253} for i = 0, 6 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid,templo) end end end for j = 0, 14 do starting = {x=1151 + j, y=1115, z=5, stackpos=253} for i = 0, 5 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid,templo) end end end for j = 0, 14 do starting = {x=1151 + j, y=1127, z=5, stackpos=253} for i = 0, 5 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid,templo) end end end return TRUE end function onKill(cid, target, lastHit) local monstros ={"Gran Tower","gran tower"} if getCreatureTarget(cid) ~= 0 then if isMonster(target) == TRUE then for i = 1, 2 do nome = getCreatureName(getCreatureTarget(cid)) if (nome == monstros[i]) then if getPlayerStorageValue(cid, 13340) ~= 1 then setGlobalStorageValue(13340, getPlayerGuildId(cid)) granEffect(cid) if getPlayerStorageValue(cid, 13340) == 0 then stopEvent(granEffect[cid]) doSendMagicEffect(getCreaturePosition(cid), 47) broadcastMessage("O player ".. getPlayerName(cid) .." conquistou o Gran Castle, e todos membros da guild ".. getPlayerGuildName(cid) .." acabam de receber a Gran Aura.") end addEvent(Teleport, 1000, cid) end end end end end return TRUE end A parte que eu adicionei foi essa pra parar o granEffect: if getPlayerStorageValue(cid, 13340) == 0 then stopEvent(granEffect[cid]) Só que mesmo assim continua o efeito nos chares, se alguem pudesse me ajudar pois ja tentei de tudo :x
  14. Rofl postou uma resposta no tópico em Playground (Off-topic)
    HAUIahIHAIiha
  15. Obrigado Sobre o tópico direto na área não está dando, veja:
  16. xWhiteWolf reagiu a uma resposta no tópico: [GlobalEvent] Invasão simples
  17. Trata-se de um script que cria um monster no local, data e hora que configurar. vamos lá! OTserv/data/globalevents Invasion.lua function onThink(interval, lastExecution) local position = {x = 652, y = 974, z = 7} -- Posição onde irá summonar monster = "Orshabaal" -- Monster que irá summonar if os.date("%A") == "Thursday" then -- Dia (em inglês) if (os.date("%X") == "22:18:00") or (os.date("%X") == "22:18:05") then -- Horário function One(cid) broadcastMessage("One boss is giving the guys in town", MESSAGE_EVENT_ADVANCE) end function Two(cid) broadcastMessage("Residents say they have seen an angry monster destroying everything ahead", MESSAGE_EVENT_ADVANCE) end function Three(cid) broadcastMessage("Bzzzz... I will kill all", MESSAGE_EVENT_ADVANCE) end doCreateMonster(monster, position) addEvent(One, 10000) addEvent(Two, 50000) addEvent(Three, 60000) end end return TRUE end Globalevents.xml <globalevent name="Invasion" interval="5" script="Invasion.lua"/> Bom, é isso valeu.
  18. xWhiteWolf Eu consegui fazer sozinho ontem porem de outra maneira, eu criei esse código no creaturescripts: granaura.lua function onLogin(cid) local storage = getGlobalStorageValue(13340) if storage == getPlayerGuildId(cid) then granEffect(cid) end return TRUE end Registrei no creaturescripts.xml e login.lua E no boss.lua eu deixei como estava: if getCreatureTarget(cid) ~= 0 then if isMonster(target) == TRUE then for i = 1, 2 do nome = getCreatureName(getCreatureTarget(cid)) if (nome == monstros[i]) then if getPlayerStorageValue(cid, 13340) ~= 1 then setGlobalStorageValue(13340, getPlayerGuildId(cid)) granEffect(cid) doSendMagicEffect(getCreaturePosition(cid), 47) broadcastMessage("O player ".. getPlayerName(cid) .." conquistou o Gran Castle, e todos membros da guild ".. getPlayerGuildName(cid) .." acabam de receber a Gran Aura.") end addEvent(Teleport, 1000, cid) end end end end return TRUE end Funcionou certinho da minha forma iUAHuhaiu Só que não consegui fazer com que a guild que tinha a gran aura perdesse o efeito sem precisar deslogar.

Informação Importante

Confirmação de Termo