Ir para conteúdo

Bodak Reborn

Membro
  • Registro em

  • Última visita

Tudo que Bodak Reborn postou

  1. function onStepIn(cid, item, position, fromPosition) if item.actionid == 5436 then if getPlayerStorageValue(cid, CTF.storages.redFlag) == 1 then setGlobalStorageValue(CTF.storages.greenTeam, getStorageZero(CTF.storages.greenTeam) + 1) if getPlayerStorageValue(pid, 822066) == 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "O jogador "..getCreatureName(cid).." levou a Bandeira Vermelha até a base verde e marcou um ponto para o time verde!") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Placar:\n Time Verde -> "..getStorageZero(CTF.storages.greenTeam).." ponto(s).\n Time Vermelho: -> "..getStorageZero(CTF.storages.redTeam).." ponto(s).") doPlayerSetStorageValue(cid, CTF.storages.redFlag, -1) doSendMagicEffect(CTF.redFlagPos, 28) if getStorageZero(CTF.storages.greenTeam) == 10 then doPlayerSendTextMessage(cid, 25, "O Time Verde atingiu 10 pontos e venceu o evento! Os membros que ainda estão presentes receberam alguns prêmios!") CTF.removeFlags() for _, pid in pairs(getPlayersOnline()) do if getPlayerStorageValue(pid, CTF.storages.greenTeam) == 1 then local am = {8302, 8306, 8300, 5957} doPlayerAddItem(pid, 2157, 30) doPlayerAddItem(pid, am[math.random(1, 4)], 1) end end for _, pid in pairs(getPlayersOnline()) do if getPlayerStorageValue(pid, CTF.storages.greenFlag) == 1 or getPlayerStorageValue(pid, CTF.storages.redFlag) == 1 then doPlayerSetStorageValue(pid, CTF.storages.greenFlag, -1) doPlayerSetStorageValue(pid, CTF.storages.redFlag, -1) end doTeleportThing(pid, CTF.exit_) doPlayerSetStorageValue(pid, 822066, -1) doPlayerSetStorageValue(pid, CTF.storages.redTeam, -1) doPlayerSetStorageValue(pid, CTF.storages.greenTeam, -1) doRemoveCondition(pid, CONDITION_OUTFIT) end end else local flag = doCreateItem(CTF.redFlag, 1, CTF.redFlagPos) doItemSetAttribute(flag, 'aid', 5435) end end elseif item.actionid == 5437 then if getPlayerStorageValue(cid, CTF.storages.greenFlag) == 1 then setGlobalStorageValue(CTF.storages.redTeam, getStorageZero(CTF.storages.redTeam) + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "O jogador "..getCreatureName(cid).." levou a Bandeira Verde até a base vermelha e marcou um ponto para o time vermelho!") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Placar:\n Time Vermelho -> "..getStorageZero(CTF.storages.redTeam).." ponto(s).\n Time Verde: -> "..getStorageZero(CTF.storages.greenTeam).." ponto(s).") doPlayerSetStorageValue(cid, CTF.storages.greenFlag, -1) doSendMagicEffect(CTF.greenFlagPos, 28) if getStorageZero(CTF.storages.redTeam) == 10 then doPlayerSendTextMessage(cid, 25, "O Time Vermelho atingiu 10 pontos e venceu o evento! Os membros que ainda estão presentes receberam alguns prêmios!") CTF.removeFlags() for _, pid in pairs(getPlayersOnline()) do if getPlayerStorageValue(pid, CTF.storages.redTeam) == 1 then local am = {8302, 8306, 8300, 5957} doPlayerAddItem(pid, 2157, 30) doPlayerAddItem(pid, am[math.random(1, 4)], 1) end end for _, pid in pairs(getPlayersOnline()) do if getPlayerStorageValue(pid, 822066) == 1 then if getPlayerStorageValue(pid, CTF.storages.greenFlag) == 1 or getPlayerStorageValue(pid, CTF.storages.redFlag) == 1 then doPlayerSetStorageValue(pid, CTF.storages.greenFlag, -1) doPlayerSetStorageValue(pid, CTF.storages.redFlag, -1) end doTeleportThing(pid, CTF.exit_) doPlayerSetStorageValue(pid, 822066, -1) doPlayerSetStorageValue(pid, CTF.storages.redTeam, -1) doPlayerSetStorageValue(pid, CTF.storages.greenTeam, -1) doRemoveCondition(pid, CONDITION_OUTFIT) end end else local flag = doCreateItem(CTF.greenFlag, 1, CTF.greenFlagPos) doItemSetAttribute(flag, 'aid', 5434) end end end end return true end
  2. Passa o script inteiro, fui ver qual era a linha 26 e tentei achar o erro...
  3. Lol, isso não é erro, tu não especificou no tópico, fiz como eu achei que deveria ser. exhaust: function onUse(cid, item, frompos, item2, topos) local config = { item = 8977, -- ID do item. pos = {x = 160, y = 51, z = 7}, exaust = 48088, --storage do exhaust. tempo = 30, -- tempo de exhaust. } if getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendTextMessage(cid, 22, 'Voce so pode se teletransportar se estiver sem battle.') return false end if getPlayerStorageValue(cid, config.exaust) < os.time() then if item.itemid == config.item then doTeleportThing(cid, config.pos) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_BIGCLOUDS) setPlayerStorageValue(cid, config.exaust, config.tempo + os.time()) end else doPlayerSendTextMessage(cid, 22, 'Espere 30 segundos para usar o item novamente.') end return true end
  4. Troque doRemoveItem(item.uid, 1) por doPlayerRemoveItem(cid, item.uid, 1)
  5. data/actions nome_do_arquivo.lua XML:
  6. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    Continua dando erro?
  7. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    Como assim?
  8. Em data/XML/servers.xml Edita lá, é bem intuitivo, acho que não precisa de explicação.
  9. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    Hmm.. Cara, já tentei tudo que eu podia Se eu pensar em algo eu tento Sorry
  10. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    Esse é o script completo? Como está a tag?
  11. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    Perae... tenta isso function onDeath(cid, corpse, deathList, mostDamageKiller) local config = { createpos = { x = 571, y = 1009, z = 7}, fromPos = {x = 471, y = 1361, z = 7}, --canto superior esquerdo toPos = {x = 483, y = 1373, z = 7}, --canto inferior direito pos = {x = 578, y = 1014, z = 7}, --templo } if getCreatureName(cid) == "Tower Event" then doRemoveItem(getTileItemById(config.createpos, 1387).uid) doSendAnimatedText(createpos, "BOSS",130) addEvent(doSendAnimatedText,800, config.createpos, "MORTO",130) doSendMagicEffect(config.createpos, CONST_ME_POFF) doTeleportThing(cid, config.pos) end return true end
  12. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    Cara, se não imprimir 2, teremos um problema IAUSDHAUISDHAS function onDeath(cid, corpse, deathList, mostDamageKiller) local config = { createpos = { x = 571, y = 1009, z = 7}, fromPos = {x = 471, y = 1361, z = 7}, --canto superior esquerdo toPos = {x = 483, y = 1373, z = 7}, --canto inferior direito pos = {x = 578, y = 1014, z = 7}, --templo } if getCreatureName(cid) == "Tower Event" then doRemoveItem(getTileItemById(config.createpos, 1387).uid) doSendAnimatedText(createpos, "BOSS",130) addEvent(doSendAnimatedText,800, config.createpos, "MORTO",130) doSendMagicEffect(config.createpos, CONST_ME_POFF) print (1) if isPlayer(cid) and isInArea(getCreaturePosition(cid), config.fromPos, config.toPos) then doTeleportThing(cid, config.pos) print (2) end end return true end
  13. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    Cara, as coordenadas estão certas? Não consigo encontrar o erro.
  14. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    Tente de novo, me diga o que diz no chat function onDeath(cid, corpse, deathList, mostDamageKiller) local config = { createpos = { x = 571, y = 1009, z = 7}, fromPos = {x = 471, y = 1361, z = 7}, --canto superior esquerdo toPos = {x = 483, y = 1373, z = 7}, --canto inferior direito pos = {x = 578, y = 1014, z = 7}, --templo } local function getPlayersInArea(fromPos, toPos) local t = {} for _, cid in ipairs(getPlayersOnline()) do if isInRange(getThingPos(cid), fromPos, toPos) then table.insert(t, cid) end end return t end if getCreatureName(cid) == "Tower Event" then doRemoveItem(getTileItemById(config.createpos, 1387).uid) doSendAnimatedText(createpos, "BOSS",130) addEvent(doSendAnimatedText,800, config.createpos, "MORTO",130) doSendMagicEffect(config.createpos, CONST_ME_POFF) print (1) if isPlayer (cid) then if table.getn(getPlayersInArea (config.fromPos, config.toPos)) >= 1 then doTeleportThing(cid, config.pos) print (2) end end end return true end
  15. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    Isso apareceu depois que você matou o "Tower Event"?
  16. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    Execute e me informe o que apareceu no seu chat padrão. function onDeath(cid, corpse, deathList, mostDamageKiller) local config = { createpos = { x = 571, y = 1009, z = 7}, fromPos = {x = 471, y = 1361, z = 7}, --canto superior esquerdo toPos = {x = 483, y = 1373, z = 7}, --canto inferior direito pos = {x = 578, y = 1014, z = 7}, --templo } local function getPlayersInArea(fromPos, toPos) local t = {} for _, cid in ipairs(getPlayersOnline()) do if isInRange(getThingPos(cid), fromPos, toPos) then table.insert(t, cid) end end return t end if getCreatureName(cid) == "Tower Event" then doRemoveItem(getTileItemById(config.createpos, 1387).uid) doSendAnimatedText(createpos, "BOSS",130) addEvent(doSendAnimatedText,800, config.createpos, "MORTO",130) doSendMagicEffect(config.createpos, CONST_ME_POFF) doPlayerSendTextMessage(cid, 19, "a") if isPlayer (cid) then if table.getn(getPlayersInArea (config.fromPos, config.toPos)) >= 1 then doTeleportThing(cid, config.pos) doPlayerSendTextMessage(cid, 19, "b") end end end return true end
  17. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    Aconteceu algo? Bug na distro..?
  18. Explique melhor. É um teleport que leva para uma área? Como assim "prum mana e ele fique ali por 2-5 segundos"? Não conheço narutibia, poste o script das spells para eu dar uma olhada.
  19. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    function onDeath(cid, corpse, deathList, mostDamageKiller) local config = { createpos = { x = 571, y = 1009, z = 7}, fromPos = {x = 471, y = 1361, z = 7}, --canto superior esquerdo toPos = {x = 483, y = 1373, z = 7}, --canto inferior direito pos = {x = 578, y = 1014, z = 7}, --templo } local function getPlayersInArea(fromPos, toPos) local t = {} for _, cid in ipairs(getPlayersOnline()) do if isInRange(getThingPos(cid), fromPos, toPos) then table.insert(t, cid) end end return t end if getCreatureName(cid) == "Tower Event" then doRemoveItem(getTileItemById(config.createpos, 1387).uid) doSendAnimatedText(createpos, "BOSS",130) addEvent(doSendAnimatedText,800, config.createpos, "MORTO",130) doSendMagicEffect(config.createpos, CONST_ME_POFF) if isPlayer (cid) then if table.getn(getPlayersInArea (config.fromPos, config.toPos)) >= 1 then doTeleportThing(cid, config.pos) end end end return true end
  20. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    function onDeath(cid, corpse, deathList, mostDamageKiller) local config = { createpos = { x = 571, y = 1009, z = 7}, fromPos = {x = 471, y = 1361, z = 7}, --canto superior esquerdo toPos = {x = 483, y = 1373, z = 7}, --canto inferior direito pos = {x = 578, y = 1014, z = 7}, --templo } if getCreatureName(cid) == "Tower Event" then doRemoveItem(getTileItemById(config.createpos, 1387).uid) doSendAnimatedText(createpos, "BOSS",130) addEvent(doSendAnimatedText,800, config.createpos, "MORTO",130) doSendMagicEffect(config.createpos, CONST_ME_POFF) if getPlayersInArea (config.fromPos, config.toPos) >= 1 then doTeleportThing(cid, config.pos) end end return true end

Informação Importante

Confirmação de Termo