Ir para conteúdo

joaohd

Visconde
  • Total de itens

    361
  • Registro em

  • Última visita

  • Dias Ganhos

    10

Tudo que joaohd postou

  1. O problema está em setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) Isso diz que vai ser somente melee que funcionará. flw
  2. Se não me engano não existe mod em 8.4. flw
  3. Essas ae acho que dá: ' alt=''> ' alt=''> ' alt=''> ' alt=''> ' alt=''> ' alt=''> flw
  4. Ve se esse da certo ae: function onStepIn(cid, item, toPosition) local config = { creatureName = "Training monk", summonPos = {x=getCreaturePosition(cid).x- 1 , y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z}, checkTile = getThingfromPos({x=getCreaturePosition(cid).x- 1, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z, stackpos=253}) } if not isMonster(config.checkTile.uid) or isPlayer(config.checkTile.uid) or isNpc(config.checkTile.uid) or isSummon(config.checkTile.uid) then doSummonCreature(config.creatureName, config.summonPos) doPlayerSendTextMessage(cid, 22, "For you to get another trainer, you have to step on the tile again.") doSendMagicEffect(config.summonPos, 12) else doPlayerSendCancel(cid, "You cannot summon a monster.") end return TRUE end Flw
  5. É o tema de Zao, a nova ilha do global 8.54. flw
  6. joaohd

    Anti Kick

    Substitua por isso: -- Limits idleWarningTime = 9 * 60 * 1000 -- 9 minutos ele manda alerta idleKickTime = 10 * 60 * 10000 -- 10 minutos ele kicka flw
  7. Pra mexer nas sources tem que saber c++. Caso queira mexer, recomendo que peça ajuda a algum programador ou leia tutoriais. flw
  8. Então aqui está: function doAddVipDays(cid, days) local Target = db.getResult("SELECT `name` FROM `players` WHERE `name` = " .. (db.escapeString(getPlayerName(cid))) .. ";") if (Target:getID() ~= -1) then if getVipTimeByName(getPlayerName(cid)) == 0 then db.executeQuery("UPDATE `accounts` SET `vip_time` = 86400 * days + ".. os.time() .." WHERE `accounts`.`id` = ".. getAccountIdByName(getPlayerName(cid)) ..";") else db.executeQuery("UPDATE `accounts` SET `vip_time` = `accounts`.`vip_time` + (86400 * days) WHERE `accounts`.`id` = ".. getAccountIdByName(getPlayerName(cid)) ..";") end db.executeQuery("UPDATE `accounts` SET `vip` = 1 WHERE `accounts`.`id` = ".. getAccountIdByName(getPlayerName(cid)) ..";") db.executeQuery("UPDATE `accounts` SET `vip_days` = `accounts`.`vip_days` + days WHERE `accounts`.`id` = ".. getAccountIdByName(getPlayerName(cid)) ..";") else print("Erro ao tentar adicionar vip para o jogador " .. getPlayerName(cid) .. ".") end return TRUE end local config = { moneyid = 2159, } function onUse(cid, fromPosition, itemEx, toPosition, moneyid) if doPlayerRemoveItem(cid, config.moneyid, 30) then doAddVipDays(cid, 30) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabéns! Foi adicionado 30 dias de vip ao player ".. getPlayerName(cid) ..". Digite !checkvip para checar os dias de VIP.") doSendMagicEffect(getCreaturePosition(cid), 27) doSendAnimatedText(getCreaturePosition(cid), "Vip!", 180) else doPlayerSendCancel(cid, "Você não possui moedas VIP suficiente.") end return TRUE end flw
  9. Acho que é isso que ele quer: function onEquip(cid, item, slot) return doPlayerLearnInstantSpell(cid, "Light Healing") end function onDeEquip(cid, item, slot) if getPlayerLearnedInstantSpell(cid, "Light Healing") then doPlayerUnlearnInstantSpell(cid, "Light healing") else return 0 end return TRUE end flw
  10. Eu não mexo com LuaSql mas acho que isso funciona: local config = { moneyid = 2159, } function onUse(cid, fromPosition, itemEx, toPosition, moneyid) if doPlayerRemoveItem(cid, config.moneyid, 5) == TRUE then local Target = db.getResult("SELECT `name` FROM `players` WHERE `name` = " .. db.escapeString(cid) .. ";") if (Target:getID() ~= -1) then if (getPlayerByName(getPlayerName(cid))) then doSendMagicEffect(getCreaturePosition(getPlayerByName(data1)), CONST_ME_MAGIC_GREEN) end if getVipTimeByName(getPlayerName(cid)) == 0 then db.executeQuery("UPDATE `accounts` SET `vip_time` = 86400 * 30 + ".. os.time() .." WHERE `accounts`.`id` = ".. getAccountIdByName(getPlayerName(cid)) ..";") else db.executeQuery("UPDATE `accounts` SET `vip_time` = `accounts`.`vip_time` + (86400 * 30) WHERE `accounts`.`id` = ".. getAccountIdByName(getPlayerName(cid)) ..";") end db.executeQuery("UPDATE `accounts` SET `vip` = 1 WHERE `accounts`.`id` = ".. getAccountIdByName(getPlayerName(cid)) ..";") db.executeQuery("UPDATE `accounts` SET `vip_days` = `accounts`.`vip_days` + 30 WHERE `accounts`.`id` = ".. getAccountIdByName(getPlayerName(cid)) ..";") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foi adicionado 30 dias de vip ao player ".. getPlayerName(cid) ..".") else doPlayerSendCancel(cid, "O player ".. getPlayerName(cid) .." não existe.") end return TRUE end end Você não tinha definido o que era "data1". Teste e veja se deu certo. flw
  11. @Marcryzius O erro não é somente este. Note que no primeiro status da conversação, ele checa se há storage ou não... Este é o erro maior. @Topic Estou tentando refazer seu npc. Caso consiga, postarei. @Edited Aqui está seu npc: 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 -------------------------------------------------------------------------------- local storage = 80150 if msgcontains(msg, 'quest') and getPlayerStorageValue(cid, storage) == -1 then selfSay("Hello, I am a fisherman, now my work is stopped because someone stole my {worms}", cid) talk_state = 1 elseif msgcontains(msg, 'worms') and talk_state == 1 then selfSay("Some days ago I went out to buy a new fishing rod, when I returned someone had taken all my worms, I have no money to buy more worms because I spent all the new rod, you can get some for me?", cid) talk_state = 2 elseif msgcontains(msg, 'yes') and talk_state == 3 then selfSay("Thank you young man, this task should not be difficult for you, I see that you carry weapons and shield, is an adventurer, killing rats is easy for you, I will reward you, I promise. Bring {200 worms} for me", cid) setPlayerStorageValue(cid,storage,1) talk_state = 0 elseif msgcontains(msg,'quest') and getPlayerStorageValue(cid, storage) == 1 then selfSay("Did you bring my worms?", cid) talk_state = 3 elseif msgcontains(msg, 'yes') and talk_state == 3 then if getPlayerItemCount(cid,3976) >= 200 then doPlayerRemoveItem(cid,3976,200) local cclub = doPlayerAddItem(cid,2448,1) doItemSetAttribute(cclub,"name","Studded Club of Sea") doItemSetAttribute(cclub,"attack",10) doItemSetAttribute(cclub,"defense",10) doItemSetAttribute(cclub,"description","A club forged by ancient pirates") doPlayerAddExp(cid,200) selfSay("Thank you young man, now I can go back to my work, take this club that I found on the seabed... {you received 300xp and a Studded club}") setPlayerStorageValue(cid,storage,2) talk_state = 0 else selfSay("You don't have the {worms} yet. come back when you have",cid) talk_state = 0 end elseif msgcontains(msg, 'quest') and getPlayerStorageValue(cid, storage) == 2 then selfSay("Oh, i am thankful, but i have no missions now.", cid) talk_state = 0 elseif msg == "no" and talk_state == 2 or msg == "no" and talk_state == 3 then selfSay("I will find someone who can help me.", cid) talk_state = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Não testei, porém acho que funciona. flw
  12. Vixi, pelo visto vai dar muuito trabalho, porque você vai ter que mexer no mapa, trocando tudo por actionId ao invés de itemId. Abra seu map editor e localize todas as quests que usam o id registrado e coloque um actionId ou uniqueId, para que n dê conflito. As tags para actionId e uniqueId são, respectivamente: <action actionid="ActionId" script="Nome Do Script.lua"/> <action uniqueid="UniqueId" script="Nome Do Script.lua"/> flw
  13. Se não me engano elas são spells agressivas, isso faz dar Infight Condition, como se você tivesse atacado alguém. Não sei se a solução é ajustar agressive para 0, porém, não custa tentar. Em spells.xml, procure as tags das suas runas "defeituosas" e localize [agressive=1], mude o valor para 0 e veja se deu certo. flw
  14. Storage values não somem quando loga... A não ser que exista algum creaturescripts fazendo isso ou as storages usadas sejam as mesmas da arena (alguns servidores vem configurados para resetar a arena quando loga-se). Talvez você esteja usando alguma função errada... A sintaxe do storage value pode ser: setPlayerStorageValue(cid, storage, value) ou getPlayerStorageValue(cid, storage) flw
  15. O erro é porque tem várias actions registradas para o mesmo id. Simples: abra o actions.xml e retire as actions repetidas/desnecessárias. Ou se preferir, coloque um code com seu action.xml para que eu verifique. flw
  16. Opa, até que enfim achei quem faça hunts. Boa iniciativa. Meu pedido é o seguinte: Estilo: Warmaster (novo tema lançado). Monstros: Lizards do warmaster theme. Andares: Quantos achar necessário. Se puder fazer, obrigado. flw
  17. Para criar os itens você só precisa do paint do windows. Você abre ele no tamanho desejado e começa a desenhar. Depois só fazer a spr nova e colocar no cliente e no seu OpenTibia. flw @edited: Um tutorial: http://www.xtibia.com/forum/topic/116903-criando-e-adicionando-seu-item-item-e-outfit/
  18. Eu tive uns problemas assim tbm. Tenta usar math.floor(). flw
  19. joaohd

    Spells

    Simplesmente coloque um return TRUE antes do último end: local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) setCombatParam(combat1, COMBAT_PARAM_CREATEITEM, 1499) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -2.0, -100, -2.1, -145) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat3, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -2.0, -100, -2.1, -145) local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat4, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -2.0, -100, -2.1, -145) local arr1 = { {0, 0, 0, 0, 0, 0, 0}, {0, 1, 1, 1, 1, 1, 0}, {0, 1, 0, 0, 0, 1, 0}, {0, 1, 0, 2, 0, 1, 0}, {0, 1, 0, 0, 0, 1, 0}, {0, 1, 1, 1, 1, 1, 0}, {0, 0, 0, 0, 0, 0, 0} } local arr2 = { {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 0, 1, 0, 0}, {0, 0, 1, 2, 1, 0, 0}, {0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0} } local arr3 = { {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0}, {0, 0, 1, 2, 1, 0, 0}, {0, 0, 1, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0} } local arr4 = { {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 0, 1, 0, 0}, {0, 0, 1, 2, 1, 0, 0}, {0, 0, 0, 1, 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(arr3) local area4 = createCombatArea(arr4) setCombatArea(combat1, area1) setCombatArea(combat2, area2) setCombatArea(combat3, area3) setCombatArea(combat4, area4) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, parameters.combat2, parameters.var) end local function onCastSpell3(parameters) doCombat(parameters.cid, parameters.combat3, parameters.var) end local function onCastSpell4(parameters) doCombat(parameters.cid, parameters.combat4, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat4, combat4 = combat4 } addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 500, parameters) addEvent(onCastSpell3, 900, parameters) addEvent(onCastSpell4, 1300, parameters) return TRUE end local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC , -3.5, -150, -2.5, -150) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC , -3.5, -100, -2.5, -150) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat3, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC , -3.5, -150, -2.5, -150) local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat4, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC , -3.5, -150, -2.5, -150) local combat5 = createCombatObject() setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat5, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC , -3.5, -150, -2.5, -150) local combat6 = createCombatObject() setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat6, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC , -3.5, -150, -2.5, -150) local combat7 = createCombatObject() setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat7, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC , -3.5, -150, -2.5, -150) local combat8 = createCombatObject() setCombatParam(combat8, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat8, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat8, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat8, COMBAT_FORMULA_LEVELMAGIC , -3.5, -150, -2.5, -150) local combat9 = createCombatObject() setCombatParam(combat9, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat9, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat9, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat9, COMBAT_FORMULA_LEVELMAGIC , -3.5, -150, -2.5, -150) local combat10 = createCombatObject() setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat10, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat10, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC , -3.5, -150, -2.5, -150) local combat11 = createCombatObject() setCombatParam(combat11, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat11, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat11, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat11, COMBAT_FORMULA_LEVELMAGIC , -3.5, -150, -2.5, -150) 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, 1, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0}, {0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 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}, } 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, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0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0, 0, 1, 0}, {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, } arr11 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0}, {1, 1, 1, 1, 0, 2, 0, 1, 1, 1, 1}, {0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) local area3 = createCombatArea(arr3) local area4 = createCombatArea(arr4) local area5 = createCombatArea(arr5) local area6 = createCombatArea(arr6) local area7 = createCombatArea(arr7) local area8 = createCombatArea(arr8) local area9 = createCombatArea(arr9) local area10 = createCombatArea(arr10) local area11 = createCombatArea(arr11) setCombatArea(combat1, area1) setCombatArea(combat2, area2) setCombatArea(combat3, area3) setCombatArea(combat4, area4) setCombatArea(combat5, area5) setCombatArea(combat6, area6) setCombatArea(combat7, area7) setCombatArea(combat8, area8) setCombatArea(combat9, area9) setCombatArea(combat10, area10) setCombatArea(combat11, area11) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, parameters.combat2, parameters.var) end local function onCastSpell3(parameters) doCombat(parameters.cid, parameters.combat3, parameters.var) end local function onCastSpell4(parameters) doCombat(parameters.cid, parameters.combat4, parameters.var) end local function onCastSpell5(parameters) doCombat(parameters.cid, parameters.combat5, parameters.var) end local function onCastSpell6(parameters) doCombat(parameters.cid, parameters.combat6, parameters.var) end local function onCastSpell7(parameters) doCombat(parameters.cid, parameters.combat7, parameters.var) end local function onCastSpell8(parameters) doCombat(parameters.cid, parameters.combat8, parameters.var) end local function onCastSpell9(parameters) doCombat(parameters.cid, parameters.combat9, parameters.var) end local function onCastSpell10(parameters) doCombat(parameters.cid, parameters.combat10, parameters.var) end local function onCastSpell11(parameters) doCombat(parameters.cid, parameters.combat11, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5, combat6 = combat6, combat7 = combat7, combat8 = combat8, combat9 = combat9, combat10 = combat10, combat11 = combat11 } addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 400, parameters) addEvent(onCastSpell3, 700, parameters) addEvent(onCastSpell4, 1000, parameters) addEvent(onCastSpell5, 1300, parameters) addEvent(onCastSpell6, 1600, parameters) addEvent(onCastSpell7, 1900, parameters) addEvent(onCastSpell8, 2200, parameters) addEvent(onCastSpell9, 2500, parameters) addEvent(onCastSpell10, 2900, parameters) addEvent(onCastSpell11, 3200, parameters) return TRUE end flw
  20. Isso já vem no config.lua: housesPerAccount = 1 flw
  21. Tenta usar isso: doAddBanishment(accId)
  22. joaohd

    [Resolvido]

    Dúvida respondida via msn. Pode fechar o tópico.
  23. Você encontra o servidor na seção Download de servidores/8.5x flw
  24. Demorei mas achei a solução: Executado de X em X minutos: function onThink(cid, interval, lastExecution) return addEvent(executeChuva, 200, 373, 375, 136, 138, 6, 36) -- edite os numeros, seguindo as variaveis da função end function executeChuva(Xpos1, Xpos2, Ypos1, Ypos2, Zpos, effect) for Xchuva = Xpos1, Xpos2 do for Ychuva = Ypos1, Ypos2 do chuvaArea = {x=Xchuva, y=Ychuva, z=Zpos} doSendMagicEffect(chuvaArea, effect) end end return TRUE end E em globalevents.xml: <globalevent name="chuva" interval="7200" event="script" value="chuva.lua"/> Agora com hora marcada: function executeChuva(pos1, pos2, pos3, pos4) for Xchuva1 = pos1, pos2 do for Ychuva1 = pos3, pos4 do areaChuva = {x=Xchuva1, y=Ychuva1, z=0} local efeito = { -- aqui voce coloca os efeitos que quer que mande 25, 40 } local sorte = math.random(1, #efeito) doSendMagicEffect(areaChuva, efeito[sorte]) end end return TRUE end function onTimer(time, lastExecution) return addEvent(executeChuva, 1000, 5084, 5098, 5047, 5063) -- edite as variáveis seguindo a função. Note que o "1000" é o tempo de execução end E em globalevents.xml: <globalevent name="chuva" time="24:00" event="script" value="chuva.lua"/> Acho que agora sim. flw
  25. Ps: Não repare nos meus dotes artísticos. flw
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...