
-
[SPELL] METEORO
Cara ficou muito legal! Parabéns! Visualmente ficou muito show. A unica coisa é que ela está dando dano em área mas não esta aparecendo o efeito de explosão.
-
-
[SPELL] METEORO
Estou tentando editar uma spell faz um tempo já e cheguei no meu limite. Quero que o player lance um projetil de fogo para o norte, e depois de X segundos, caiam X bolas de pedra ao redor do alvo dando dano em área 3x3 de explosão. No código atual o efeito de ir para o norte com fogo funciona, mas depois caem 3 efeitos de fogo (Const_ani_fire) e fire damage normal. Já mudei de tudo e nada faz com que saia o efeito de fogo no final. Além da spell estar dando um dano absurdo. E outra coisa que não está funcionando é a funcao final do codigo, eu cheguei a deletar ela por completo e o codigo continua funcionando. E sempre com o efeito de fogo. local area = createCombatArea(AREA_SQUARE1X1) local initialArrowEffect = CONST_ANI_FIRE local meteorAttackEffect = CONST_ANI_LARGEROCK local numberOfAttacks = 3 local attackInterval = 1000 -- Intervalo de 1000 milissegundos (1 segundo) entre os ataques function onCastSpell(cid, var) local target = getCreatureTarget(cid) local playerPos = getCreaturePosition(cid) -- Envia a flecha inicial do jogador para o alvo doSendDistanceShoot(playerPos, {x = playerPos.x - math.random(4, 6), y = playerPos.y - 5, z = playerPos.z}, initialArrowEffect) -- Limita a `numberOfAttacks` meteoros caindo aleatoriamente for x = 1, numberOfAttacks do addEvent(furyAttackTarget, x * attackInterval, cid, target, {x = getCreaturePosition(target).x + math.random(-1, 1), y = getCreaturePosition(target).y + math.random(-1, 1), z = getCreaturePosition(target).z}) end end function furyAttackTarget(cid, target, pos) if isCreature(cid) and isCreature(target) then local areaPos = {x = pos.x - math.random(4, 6), y = pos.y - 5, z = pos.z} doSendDistanceShoot({x = getCreaturePosition(target).x - math.random(4, 6), y = getCreaturePosition(target).y - 5, z = getCreaturePosition(target).z}, areaPos, meteorAttackEffect) doAreaCombatHealth(cid, COMBAT_FIREDAMAGE, areaPos, area, (-(getPlayerLevel(cid) * getPlayerMagLevel(cid)) / 5) + 50, (-(getPlayerLevel(cid) * getPlayerMagLevel(cid)) / 5) - 50, CONST_ME_EXPLOSIONHIT) end end
-
[AJUDA] Summon que explode
Poise... Pessoal estou pensando em alterar então. Fazer uma magia que cria um objeto e explode depois de 3 segundos. Vai ter que ser assim até achar outra solução.
-
[AJUDA] Summon que explode
É por magia. Poisé to tentando pensar algo que faça isso!
-
[AJUDA] Summon que explode
Caramba mano! Essa eu não sabia. Vou pensar em algo aqui. Muito obrigado por esclarecer. É impossível um monstro dar dano em outro? Esse meu summon seria imovel e não da dano. A unica coisa é que quando ele morre ele explodiria. Poderia fazer o player criar um monstro normal. Ia dar dano no player junto, mas não sei se é possivel dar dano em monstros dessa forma.
-
-
[AJUDA] Summon que explode
Valeu pessoal. Mas ainda não ta funcionando, o summon morre e não acontece nadinha. Talvez eu crie uma magia que crie um objeto, e depois de alguns segundos exploda.
-
-
-
NPC - Por Storage / Vocation
Puts pior que não deu. O NPC nao respondeu ao Hi agora.
-
[AJUDA] Summon que explode
Puts pior que não adiantou. Quando summono ele morre e não aparece nada, e como monstro normal ele chega a explodir, mas não causa dano. Não consigo imaginar o que possa ser.
-
[AJUDA] Summon que explode
Obrigado pela resposta. Mas ainda nada. O monstro barrel aparece efeito e explode, mas quando ele é summon não ta explodindo. Imagino que teria que trocar if isMonster para algo que identifique summon
-
[AJUDA] Summon que explode
Estou querendo fazer um summon que explode quando morre. Só estou conseguindo fazer monstro explodir e summon não aparece nada. Ja mudei para if isSummon(cid) mas nada. local explosion = createConditionObject(CONDITION_FIRE) setConditionParam(explosion, CONDITION_PARAM_DELAYED, 1) local damageTable = { {4, -3}, -- Quantidade / dano {9, -2}, {20, -1} } for i = 1, #damageTable do local t = damageTable[i] addDamageCondition(explosion, t[1], 1000, t[2]) -- tempo end local arr = { {1, 1, 1}, {1, 3, 1}, {1, 1, 1} } local area = createCombatArea(arr) function onDeath(cid) if isMonster(cid) then doAreaCombatHealth(cid, 1, getThingPos(cid), area, -1, -30, 5) doAreaCombatCondition(cid, getThingPos(cid), area, explosion, 255) doSendMagicEffect(getThingPos(cid), 2) end return true end
-
NPC - Por Storage / Vocation
Quero criar um NPC que verifica o storage ou vocation do player, se tiver a storage abre a loja A, do contrario abre a B. Onde está o erro do código? 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 if getPlayerStorageValue(cid, 10036) == 1 then local shopModule = ShopModule:new() npcHandler:addModule(shopModule) shopModule:addBuyableItem({'spellbook'}, 2175, 150, 'spellbook') shopModule:addBuyableItem({'magic lightwand'}, 2163, 100, 'magic lightwand') else local shopModule = ShopModule:new() npcHandler:addModule(shopModule) shopModule:addBuyableItem({'small health'}, 8704, 20, 1, 'small health potion') shopModule:addBuyableItem({'health potion'}, 7618, 45, 1, 'health potion') end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Magia - League of Legends Gangplank
Queria solicitar duas magias que nem do personagem gangplank do league of legends. 1) Criar um barrio no chão que exploda em dano em área depois de alguns segundos. (Alternativo, será que da pra criar um summon que fica imovel, e quando ele morrer ele exploda e de o dano em área?) 2) Dano em área de pedras caindo, 3 vezes, e que cause lentidão.
-
-
[Ajuda] Magia Controlavel
Eu tenho esse script que cria walls de pedra controlando pelo ctrl. Eu quero deixar essa mesma função de controlar mas com uma magia que tire dano. --<Script by Jhon992>-- local stonesId = {8633,8634,8635,8636} -- ids dos diferente tipos de stones. local timeRemove = 10 -- tempo para dumir as pedras em segundos. function createObject(cid, position, stonesPosition) if (isPlayer(cid)) then if getPlayerLookDir(cid) == 0 then positions = {x=position.x, y=position.y-1, z=position.z} elseif getPlayerLookDir(cid) == 1 then positions = {x=position.x+1, y=position.y, z=position.z} elseif getPlayerLookDir(cid) == 2 then positions = {x=position.x, y=position.y+1, z=position.z} elseif getPlayerLookDir(cid) == 3 then positions = {x=position.x-1, y=position.y, z=position.z} end if isWalkable(positions) then createStone(stonesPosition, positions, stonesId[math.random(1,#stonesId)], cid) addEvent(createObject, 500, cid, positions, stonesPosition) else addEvent(removeStones, timeRemove*1000, stonesPosition) end end end function createStone(stonesPosition, positions, stone, cid) doCreateItem(stone, 1, positions) stonesPosition[(#stonesPosition)+1] = {x=positions.x, y=positions.y, z=positions.z, stackpos=1} end function removeStones(stonesPosition) for i=1, #stonesPosition do for o=1, 2 do stonesPosition[i] = {x=stonesPosition[i].x, y=stonesPosition[i].y, z=stonesPosition[i].z, stackpos=o} if isInArray(stonesId, getThingfromPos(stonesPosition[i]).itemid) then doRemoveItem(getThingfromPos(stonesPosition[i]).uid) end end end end function isWalkable(pos, creature, pz, proj) -- nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end local creature = getTopCreature(pos) if creature.type > 0 then return false end if getTilePzInfo(pos) and not pz then return false end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function onCastSpell(cid, var) local stonesPosition = {} local position = getPlayerPosition(cid) createObject(cid, position, stonesPosition) return true end
-
NPC de barco que checa Addon
Esse codigo nao esta funcionando. O que tem de errado? local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 local function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end local player = Player(cid) if not player:isPlayer() then return false end if msgcontains(msg, "sail") then if player:hasOutfit(153) and player:hasOutfit(157) then npcHandler:say("Voce não pode, voce é da classe X.", cid) return false end if player:removeMoney(50) then npcHandler:say("Good luck.", cid) npcHandler:releaseFocus(cid) player:teleportTo(Position(144, 1252, 6)) end end return true end npcHandler:setMessage(MESSAGE_GREET, 'Olá, com meu barco você pode {sail} para x.') npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
(Resolvido)NPC Barco
Onde ta o sistema do Ghost Ship dele? Queria por no meu ot