Ir para conteúdo

XGaduX

Membro
  • Registro em

  • Última visita

Tudo que XGaduX postou

  1. Myaac, alguém sabe como faço para limitar quantidade de player na guild no myaac?
  2. Otx || Quando qualquer tipo de monstro/npc passa sobre o "piso" acontece esse tipo de erro. Alguém sabe como posso resolver? -- Creditos: Breno Neves (KotZletY) = Criador do Script! function onStepIn(cid, item, position, fromPosition) if getPlayerPremiumDays(cid) >= 1 then doSendMagicEffect(getThingPos(cid), 12) doPlayerSendTextMessage(cid, 25, "Seja Bem-vindo ".. getPlayerName(cid) .." !") else doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getThingPos(cid), 2) doPlayerSendTextMessage(cid, 25, "Apenas Players Vip's podem passa.") end return true end
  3. Sim pow e? Quando o player der Look vai fica o nome e descrição do item registrado. Tipo 21:14 You see Test testando Quero algo que o player consiga ver o look do item, mas uma opção que ele não consiga mover esse item.
  4. Tu tá falando que para por a descrição do item e por ele por cima?
  5. Como faz para o brilho não interferir no look do item? porque o daqui não deixa ver o look das peças que contem ele por cima.
  6. Como que faz para tornar o item imóvel? Exemplo: adiciono uma espada na banca e não quero que o player consiga mover ela, como que faz sem ter que marcar a opção "imóvel" no item editor.
  7. .Qual servidor ou website você utiliza como base? OTX 2.12 Qual o motivo deste tópico? Como resolvo esse erro? ao usar a máquina da o seguinte erro abaixo. Está surgindo algum erro? Se sim coloque-o aqui. [1:1:31.786] [Error - Action Interface] [1:1:31.787] data/actions/scripts/heldFusion.lua:onUse [1:1:31.788] Description: [1:1:31.788] (LuaInterface::luaDoPlayerAddItem) Item not found Você tem o código disponível? Se tiver publique-o aqui: -- Held Fusion 0.1 by Marcot -- Se encontrou algum erro no script, favor enviar PM explicando os erros -- http://www.tibiaking.com/forum/profile/120572-marcot/ -- Configuracoes necessarias para o script local config = { quest = { -- Precisa fazer quest? (Nao mexa caso negativo) necessaria = false, -- Eh necessario fazer uma quest para liberar o sistema? storageID = 10001, -- Qual o storageID dessa quest? (caso true, anteriormente) }, chestPos = {x = 107, y = 174, z = 5, stackpos = 1}, -- Posicao do Bau (certifique-se que nao tenha nada encima dele) -- Tenha atencao para que a soma das chances dos helds em cada tier seja igual a 100 helds = { -- Item IDs e chance de vir o held [1] = { -- Array Tier 1 {ID = 2143, chance = 100}, }, [2] = { -- Array Tier 2 {ID = 2301, chance = 1}, -- Force Critic Chance {ID = 2302, chance = 2}, -- Force Critic Damage {ID = 2303, chance = 3}, -- Force Life Leech {ID = 2304, chance = 4}, -- Force Ki Leech {ID = 2305, chance = 5}, -- Force Damage {ID = 2306, chance = 6}, -- Force Skills {ID = 2307, chance = 7}, -- Force Magic {ID = 2308, chance = 8}, -- Force Protection All {ID = 2309, chance = 9}, -- Force Health {ID = 2310, chance = 10}, -- Force Ki {ID = 2311, chance = 11}, -- Force Health Regeneratio {ID = 2312, chance = 12}, -- Force Ki Regeneration }, [3] = { -- Array Tier 3 }, [4] = { -- Array Tier 4 }, [5] = { -- Array Tier 5 }, [6] = { -- Array Tier 6 }, [7] = { -- Array Tier 7 }, }, } function onUse(cid, item, fromPosition, itemEx, toPosition) if config.quest.necessaria and getPlayerStorageValue (cid, config.quest.storageID) == 0 then -- Erro caso a pessoa use a maquina sem ter feito a quest -- Valido apenas quando a opcao esta ativada doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don\'t have permission to use this machine.") return false end items = {nil, nil, nil} container = getThingFromPos(config.chestPos) for i = 0, 2 do items[i + 1] = getContainerItem (container.uid, i) if items [i + 1].itemid == 0 or items [i + 1].itemid == nil then -- Erro quando tem menos de 3 itens no bau doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de 3 card's vázios para fundir.") return false end end heldType = {nil, nil, nil} for j=1, 3 do for i=1, 7 do for k = 1, #config.helds[i] do if config.helds[i][k].ID == items[j].itemid then heldType[j] = i end end end if heldType [j] == nil then -- Erro a ser exibido caso o jogador coloque algum item que nao seja um held na maquina doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Esta máquina funciona apenas com card's vázios.") return false end end if heldType[1] ~= heldType[2] or heldType[2] ~= heldType[3] then -- Erro a ser exibido caso o jogador coloque helds de tiers diferentes doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de card's com os mesmos atributos.") return false elseif heldType[1] == 3 or heldType[2] == 3 or heldType[3] == 3 then -- elseif heldType[1] == 7 or heldType[2] == 7 or heldType[3] == 7 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não pode fundir esses cards.") return false end -- Sortear qual held vira for i = 1, 3 do doRemoveItem(items[i].uid, 1) end tierSorteado = heldType[1] + 1 numeroSorte = math.random(1, 100) itemIDSorteado = sorteiaValor (tierSorteado, numeroSorte) doPlayerAddItem(cid, itemIDSorteado, 1) -- Mensagem exibida ao fundir com sucesso doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você recebeu seu novo card.") return true end -- Função retirada de https://pt.stackoverflow.com/questions/147884/sorteio-aleat%C3%B3rio-mas-com-diferentes-probabilidades function sorteiaValor (tierSorteado, numeroSorte) x = numeroSorte for i = 1, #config.helds[tierSorteado] do x = x - config.helds[tierSorteado][i].chance if x <= 0 then return config.helds[tierSorteado][i].ID end end end
  8. Funciona no padrão que foi postado. Desejo que ela faça exatamente oque está fazendo, mas acho que está com erro pois toda vez que é executada ela congela o server
  9. Alguém me ajuda a otimizar essa function para otx 2.12, ela funciona porém ao roda a function o servidor "congela" e após a function completar sua verificação o servidor "descongela" Você tem o código disponível? Se tiver publique-o aqui: addEvent(function (removeMonsterInArea) if not isCreature(cid) then return end local positionsCheck = {} for i = config.from.x, config.to.x do positionsCheck[#positionsCheck+1] = {x=i, y = config.from.y, z = config.from.z, stackpos = 0} for j = config.from.y+1, config.to.y do positionsCheck[#positionsCheck+1] = {x=i, y = j, z = config.from.z, stackpos = 0} end end for j=1, #positionsCheck do for i = 0, 255 do positionsCheck[j].stackpos = i local tile = getTileThingByPos(positionsCheck[j]) if isMonster(tile.uid) then doRemoveCreature(tile.uid) end end end return true end, config.time*60*1000, cid) Script utilizado foi do tópico [0.3.6] Quest Anihi 8.54 100% configuravel - Otimizado - Action, MoveEvent, TalkAction & Spell - Tibia King - Tudo sobre Tibia, OTServ e Bots!
  10. XGaduX postou uma resposta no tópico em Suporte Tibia OTServer
    Como que faz a instalação desse sistema, há mais arquivos??
  11. Como faz para em vez de sair no doBroadcastMessage sai no chat de algum canal?
  12. E para resolver como faço? ?
  13. .Qual servidor ou website você utiliza como base? OTX Está surgindo algum erro? Se sim coloque-o aqui. Você tem o código disponível? Se tiver publique-o aqui: local config = { [9500] = { newItem = 15910, requiredItems = { {16031, 1}, {5909, 1}, {5893, 1} } }, [98898] = { newItem = 98898, requiredItems = { {16031, 10}, {5909, 15}, {5893, 1} } } } local item = local itemId = item:getId() if config[itemId] then local items = config[itemId].requiredItems local hasItems = true for i = 1, #items do if player:getItemCount(items[i][1]) < items[i][2] then hasItems = false break end end if hasItems then for i = 1, #items do player:removeItem(items[i][1], items[i][2]) end item:remove(1) player:addItem(config[itemId].newItem, 1) end end Como soluciono esse erro?
  14. Website MyAAC v0.7.10 Qual o motivo deste tópico? Ao tentar criar um nova guild aparece o seguinte erro Está surgindo algum erro? Se sim coloque-o aqui. Qual séria a solução?
  15. XGaduX postou uma resposta no tópico em Suporte OTServer Derivados
    Mano, suas sprites estão "transparentes"?
  16. Uso esse npc para da recompensa aos player, gostaria de um função que não entregasse para player com mesmo IP. Alguém ajuda ae!!! local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid msg = string.lower(msg) local storage = 5665465 local item = { {name = "caixa", id = 15999, quantidade = 1}, } local effect = 763 --------------------------------- CÓDIGO -------------------------------- if msgcontains(msg, 'box') then if getPlayerStorageValue(cid, storage) <= os.time() then selfSay("Would you like to receive: {" .. item[1].name .. "}? You can come here again to get it", cid) talkState[talkUser] = 1 return true else selfSay("You need to wait days to get new items in the quest.", cid) talkState[talkUser] = 0 return true end elseif msgcontains(msg, string.lower(item[1].name)) and talkState[talkUser] == 1 then doPlayerAddItem(cid, item[1].id, item[1].quantidade) doSendMagicEffect(getThingPos(cid), effect) doPlayerSendTextMessage(cid, 27, "Congratulation, you won " .. item[1].name .. ".") setPlayerStorageValue(cid, storage, os.time() + (dias * 24 * 60 * 60)) talkState[talkUser] = 0 return true elseif (not msgcontains(msg, string.lower(item[1].name))) and talkState[talkUser] == 1 then selfSay("Please write correctly, I don't understand what you said", cid) return true elseif (msgcontains(msg, 'bye') or msgcontains(msg, 'goodbye')) and talkState[talkUser] == 1 then selfSay("Goodbye!", cid) talkState[talkUser] = 0 return true end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  17. Tem com fazer com que essa spell funcione assim? tipo ela como está reduz por %, então daria para transformar ela em coletar X% dos player no campo da magia e fazer com que o player que usou a habilidade ficasse com esses X% no status por Y segundos? 3 player X foram atingidos pela spell, logo o player Y que usou a spell vai fica com Fist, Axe, Club Percent desses player por alguns segundos e eles serão negativados X% por segundos?
  18. local atk1 = createCombatObject() local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_RED) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) function kiaiho(cid, level, maglevel) local min = -(level * 100.0+ maglevel * 100 +0) local max = -(level * 500.0+ maglevel * 500 +0) return min, max end setCombatCallback(combat1, CALLBACK_PARAM_LEVELMAGICVALUE, "kiaiho") arr1 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) setCombatArea(atk1, area1) function onTargetTile(cid, pos) doCombat(cid,combat1,positionToVariant(pos)) end setCombatCallback(atk1, CALLBACK_PARAM_TARGETTILE, "onTargetTile") local function onCastSpell1(parameters) doCombat(parameters.cid, atk1, parameters.var) end function onCastSpell(cid, var) if exhaustion.get(cid, 100) then doPlayerSendCancel(cid, "Wait "..exhaustion.get(cid, 100).." seconds.") return true end exhaustion.set(cid, 100, 15.0) local parameters = { cid = cid, var = var} addEvent(onCastSpell1, 100, parameters) return true end function onCastSpell(cid, var) local pos1 = {x = getPlayerPosition(cid).x + 2, y = getPlayerPosition(cid).y + 2, z = getPlayerPosition(cid).z} local parameters = { cid = cid, var = var, combat1 = combat1} addEvent(onCastSpell1, 250, parameters) doSendMagicEffect(pos1, 979) return true end Da um help aqui, tentei encaixa essa função na spell, mas não conseguir! function onCastSpell(cid, var) local waittime = 1 -- Tempo de exhaustion em segundos local storage = 2 if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "You are exhausted.") doSendMagicEffect(getCreaturePosition(cid), 2) return false end No caso é para o player fica com exhaustion já que na spell atual o exhaustion não está funcionando.
  19. alguém ai tem algum link ou poderia fazer para mim os npc que são seguidos de quest? exemplo; npc 1 pede ao player para trazer x itens quando ele trazer esses itens ganha x storage npc 2 só inicia a quest caso o player tenha feito a quest do npc 1, caso não ele comunica ao player que tem que fazer a do npc 1. E assim consecutivamente.
  20. Versão 8.60 local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) local from,to = {x = 126, y = 296, z = 10},{x = 148, y = 315, z = 10} if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, 'exit') or msgcontains(msg, 'sair') or msgcontains(msg, 'quit') or msgcontains(msg, 'desistir') or msgcontains(msg, 'deixar') then if isInRange(getCreaturePosition(cid), from, to) then selfSay('Do you really want to give up the tournament?', cid) talkState[talkUser] = 3 else selfSay('You must be in the waiting room to perform this command.', cid) talkState[talkUser] = 0 end end if talkState[talkUser] == 3 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') or msgcontains(msg, 's') or msgcontains(msg, 'si') then doTeleportThing(cid, torneio.playerTemple) if getPlayerItemCount(cid, torneio.revivePoke) >= 6 then doPlayerRemoveItem(cid,torneio.revivePoke,6) doPlayerRemoveItem(cid,torneio.revivePoke1,6) end elseif msgcontains(msg, 'no') or msgcontains(msg, 'nao') or msgcontains(msg, 'não') or msgcontains(msg, 'n') or msgcontains(msg, 'ñ') or msgcontains(msg, 'nn') then selfSay('You made the right decision, stay and fight with all your strength!', cid) end end if msgcontains(msg, 'tourney') or msgcontains(msg, 'enter') then if getPlayerItemCount(cid, torneio.revivePoke) >= 1 or getPlayerItemCount(cid, torneio.revivePoke2) >= 1 or getPlayerItemCount(cid, torneio.revivePoke3) >= 1 then selfSay('You cannot go to the tournament with any kind of {seed of the gods} or {senzus}, this is irregular, please save them and then talk to me again.', cid) return true end if getPlayerLevel(cid) <= 250 then selfSay('You cannot go to the tournament with a level equal to or below 250.', cid) return true end selfSay('Would you like to participate in the tournament? just have a tournament ticket.', cid) talkState[talkUser] = 2 elseif talkState[talkUser] == 2 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then if getPlayerItemCount(cid, torneio.revivePoke) >= 1 or getPlayerItemCount(cid, torneio.revivePoke2) >= 1 or getPlayerItemCount(cid, torneio.revivePoke3) >= 1 then selfSay('You cannot go to the tournament with any kind of {seed of the gods} or {senzus}, this is irregular, please save them and then talk to me again.', cid) return true end if os.date("%X") < torneio.startHour1 or os.date("%X") > torneio.endHour1 then if os.date("%X") < torneio.startHour2 or os.date("%X") > torneio.endHour2 then if os.date("%X") < torneio.startHour3 or os.date("%X") > torneio.endHour3 then if os.date("%X") < torneio.startHour4 or os.date("%X") > torneio.endHour4 then selfSay('Desculpe, mas o torneio ainda não abriu, volte em 07:50 AM, 11:50 AM, 17:50 AM ou 22:50 PM', cid) return true end end end end if doPlayerRemoveItem(cid, torneio.id, torneio.qntt) then doTeleportThing(cid, torneio.waitPlace) doPlayerSendTextMessage(cid, 21, "Welcome to the waiting room, you wait here while we select the other players.") doPlayerAddItem(cid,torneio.revivePoke,6) doPlayerAddItem(cid,torneio.revivePoke1,6) else selfSay('Voce não tem o bilhete do torneio.', cid) end else selfSay('Certeza que voce nao quer participar? Ok!', cid) talkState[talkUser] = 0 end end end
  21. local scom1 = createCombatObject() local scom2 = createCombatObject() local scom3 = createCombatObject() local scom4 = createCombatObject() local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTGREEN) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 850) function kiaiho(cid, level, maglevel) local min = -(level * 1.0 + maglevel * 1 + 0) local max = -(level * 1.0 + maglevel * 1 + 0) return min, max end setCombatCallback(combat1, CALLBACK_PARAM_LEVELMAGICVALUE, "kiaiho") local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTGREEN) setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 850) function kiaiho(cid, level, maglevel) local min = -(level * 1.0 + maglevel * 1 + 0) local max = -(level * 1.0 + maglevel * 1 + 0) return min, max end setCombatCallback(combat2, CALLBACK_PARAM_LEVELMAGICVALUE, "kiaiho") local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTGREEN) setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat3, COMBAT_PARAM_EFFECT, 850) function kiaiho(cid, level, maglevel) local min = -(level * 1.0 + maglevel * 1 + 0) local max = -(level * 1.0 + maglevel * 1 + 0) return min, max end setCombatCallback(combat3, CALLBACK_PARAM_LEVELMAGICVALUE, "kiaiho") local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTGREEN) setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat4, COMBAT_PARAM_EFFECT, 850) function kiaiho(cid, level, maglevel) local min = -(level * 1.0 + maglevel * 1 + 0) local max = -(level * 1.0 + maglevel * 1 + 0) return min, max end setCombatCallback(combat4, CALLBACK_PARAM_LEVELMAGICVALUE, "kiaiho") arr1 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } arr2 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } arr3 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } arr4 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) local area3 = createCombatArea(arr2) local area4 = createCombatArea(arr2) setCombatArea(scom1, area1) setCombatArea(scom2, area2) setCombatArea(scom3, area3) setCombatArea(scom4, area4) function onTargetTile(cid, pos) local p = getThingPos(cid) local basep = {x = p.x + 5, y = p.y - 5, z = p.z} doSendDistanceShoot(basep, pos, 55) doCombat(cid,combat1,positionToVariant(pos)) end function onTargetTile2(cid, pos) local p1 = getThingPos(cid) local basep1 = {x = p1.x - 5, y = p1.y + 5, z = p1.z} doSendDistanceShoot(basep1, pos, 55) doCombat(cid,combat2,positionToVariant(pos)) end function onTargetTile3(cid, pos) local p2 = getThingPos(cid) local basep2 = {x = p2.x - 5, y = p2.y + 5, z = p2.z} local baseep2 = {x = p2.x + 5, y = p2.y - 5, z = p2.z} doSendDistanceShoot(basep2, pos, 112) doSendDistanceShoot(baseep2, pos, 112) doCombat(cid,combat3,positionToVariant(pos)) end function onTargetTile4(cid, pos) local p3 = getThingPos(cid) local basep3 = {x = p3.x - 5, y = p3.y - 5, z = p3.z} local baseep3 = {x = p3.x + 5, y = p3.y + 5, z = p3.z} doSendDistanceShoot(basep3, pos, 112) doSendDistanceShoot(baseep3, pos, 112) doCombat(cid,combat4,positionToVariant(pos)) end setCombatCallback(scom1, CALLBACK_PARAM_TARGETTILE, "onTargetTile") setCombatCallback(scom2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2") setCombatCallback(scom3, CALLBACK_PARAM_TARGETTILE, "onTargetTile3") setCombatCallback(scom4, CALLBACK_PARAM_TARGETTILE, "onTargetTile4") local function onCastSpell1(parameters) doCombat(parameters.cid, scom1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, scom2, parameters.var) end local function onCastSpell3(parameters) doCombat(parameters.cid, scom3, parameters.var) end local function onCastSpell4(parameters) doCombat(parameters.cid, scom4, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var} addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 100, parameters) addEvent(onCastSpell3, 1200, parameters) addEvent(onCastSpell4, 1200, parameters) return TRUE end Como insiro essa função na spell? \/ function onCastSpell(cid, var) local parameters = { cid = cid, var = var} if exhaustion.get(cid, 5) then doPlayerSendCancel(cid, "Wait "..exhaustion.get(cid, 5).." seconds.") return false end

Informação Importante

Confirmação de Termo