Ir para conteúdo

DonaTello

Membro
  • Registro em

  • Última visita

Tudo que DonaTello postou

  1. achei bacana a ideia. @WooX
  2. Não funcionou maninho, o colega de baixo conseguiu resolver, tmj. obrigado a todos que tentaram ajudar @Fabi Marzan funcionou meu brother, obrigado.
  3. Você testou matando 1 bixo ? esse erro que mandei acima só aparece ao matar 1 target. O scripts ta igual o teu. so copiei e colei pra testar.
  4. desculpe a demora pra responder, estava sem computador. está tudo certo, porém está com esse erro.
  5. tem esse detalhe mesmo, achei perfeito o script. Mas está faltando o primeiro HIT, que seria a bola de energy (missile) que o conjurador lança no alvo, antes de começar a dar dano com os effects. @Fabi Marzan Consegue por isso ?
  6. *** o feitiço funcionaria da seguinte forma, o lançador lançaria uma bola de energia e, em sequência, o alvo levaria 8 acertos com 8 efeitos diferentes, cada acerto 1 efeito diferente em sequência. dando a aparência de que o lançador está controlando a bola de energia cada efeito com função para mudar a posição x.y *** tibiaking_933.obd tibiaking_934.obd tibiaking_935.obd tibiaking_936.obd tibiaking_937.obd tibiaking_938.obd tibiaking_939.obd tibiaking_940.obd
  7. gostaria de transformar essa script de runa de congelamento em 1 spell, podem me ajudar comunidade demostração de como queria +/- a spell, TEMPO NO video >>> 1:12 até 1:20 << local freezetime = 6 local cooldown = 15 -- time to use again local storage = 19002 local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_SUBID, 1) setConditionParam(exhaust, CONDITION_PARAM_TICKS, -1) setCombatCondition(combat, exhaust) local exhaustt = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaustt, CONDITION_PARAM_SUBID, 2) setConditionParam(exhaustt, CONDITION_PARAM_TICKS, -1) setCombatCondition(combat, exhaustt) function countDown(number, pos, effect, msgonend, effectonend) local n = number for i = 1, number do addEvent(doSendAnimatedText,i* 1000, pos, n > 1 and n.."" or msgonend .."", n < 6 and TEXTCOLOR_RED or TEXTCOLOR_GREEN) addEvent(doSendMagicEffect,i* 1000, pos, n > 1 and effect or effectonend ) n = n -1 end n = number return true end function removed(cid) doCreatureSetNoMove(cid, 0) doRemoveCondition(cid,CONDITION_EXHAUST,1) doRemoveCondition(cid,CONDITION_EXHAUST,2) end function onUse(cid, item, fromPosition, itemEx, toPosition) if exhaustion.get(cid,storage) then return doPlayerSendCancel(cid,"You can't use this yet.") end if not isPlayer(itemEx.uid) or cid == itemEx.uid then return doPlayerSendCancel(cid,"You can only use this on another players.") end if getTilePzInfo(toPosition) == true then return doPlayerSendCancel(cid, "You cannot use this in a PZ!.") end doSendAnimatedText(getThingPos(itemEx.uid),"Freezed!", TEXTCOLOR_BLUE) doCreatureSay(cid, "Freez Rune!", TALKTYPE_ORANGE_1) exhaustion.set(cid,storage,cooldown) doCombat(cid, combat, numberToVariant(itemEx.uid)) doCreatureSetNoMove(itemEx.uid, 1) countDown(freezetime , toPosition, 0, "melted", 5) addEvent(removed,freezetime*1000,itemEx.uid) return true end Obs: a spells ia prender o alvo por ''x'' segundos, e enquanto ele estivesse preso no ''stun'', ele virasse uma outra '''outfic'' ou ''effect'', ao acabar o tempo do stun, voltaria a sua forma normal.
  8. Sim, 8.60 otx. Vou adicionar o script.
  9. 1- empurra alvo 2- se o alvo estiver perto de paredes, fica atordoado por alguns segundos. <instant group="attack" name="Shove" words="shove" lvl="30" mana="200" exhaustion="6000" groupcooldown="2000" script="custom/shove.lua"> <vocation name="..." /> </instant> -- Damaging Area local hitArea = { {1, 1, 1}, {1, 2, 1}, {1, 1, 1} } -- Animation Frames local animationArea = { { {0, 0, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 1, 2, 1, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 0, 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, 1, 1, 1, 0}, {1, 0, 0, 0, 1}, {1, 0, 0, 0, 1}, {1, 0, 0, 0, 1}, {0, 1, 1, 1, 0} } } -- Get position behind target function Position:getBehindPos(direction, steps) local offset = Position.directionOffset[direction] if offset then steps = steps or 1 self.x = self.x + offset.x * steps self.y = self.y + offset.y * steps end return self end -- For shuffling the secondaryPosition table function shuffle(t) local rand = math.random assert(t, "table.shuffle() expected a table, got nil") local iterations = #t local j for i = iterations, 2, -1 do j = rand(i) t[i], t[j] = t[j], t[i] end end -- Get 8-Axis direction of fromPos -> toPos function Position:getDirectionTo(toPosition) local dir = DIRECTION_NORTH if(self.x > toPosition.x) then dir = DIRECTION_WEST if(self.y > toPosition.y) then dir = DIRECTION_NORTHWEST elseif(self.y < toPosition.y) then dir = DIRECTION_SOUTHWEST end elseif(self.x < toPosition.x) then dir = DIRECTION_EAST if(self.y > toPosition.y) then dir = DIRECTION_NORTHEAST elseif(self.y < toPosition.y) then dir = DIRECTION_SOUTHEAST end else if(self.y > toPosition.y) then dir = DIRECTION_NORTH elseif(self.y < toPosition.y) then dir = DIRECTION_SOUTH end end return dir end -- Animation frame magic effect function animation(pos, playerpos, animationType) if not Tile(Position(pos)):hasProperty(CONST_PROP_BLOCKPROJECTILE) then if Position(pos):isSightClear(playerpos) then if animationType == 0 then Position(pos):sendMagicEffect(CONST_ME_POFF) end Position(pos):sendMagicEffect(CONST_ME_GROUNDSHAKER) end end end -- Stun animation magic effect function stunAnimation(stunnedcreature, stunnedpos, counter) if counter ~= 0 and Creature(stunnedcreature) then stunnedpos:sendMagicEffect(CONST_ME_STUN) counter = counter - 1 addEvent(stunAnimation, 500, stunnedcreature, stunnedpos, counter) end return true end -- Damage Formula function onGetFormulaValues(player, skill, attack, factor) local skillTotal = skill * attack local levelTotal = player:getLevel() / 5 return -(((skillTotal * 0.06) + 13) + (levelTotal)), -(((skillTotal * 0.11) + 27) + (levelTotal)) end local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) combat:setArea(createCombatArea(hitArea)) combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") function onCastSpell(creature, var) -- Defaults local centre = {} local damageArea = {} local pushTargets = {} local blockedPos = {} local playerPos = creature:getPosition() local delay = 100 local stunDuration = 2000 -- Get creatures in squares around caster local getTargets = Game.getSpectators(playerPos, false, false, 1, 1, 1, 1) -- Shuffle targets so its random who prioritizes which squares/positions shuffle(getTargets) for _,target in pairs(getTargets) do if target.uid ~= creature.uid then -- If target is not the caster if not target:isNpc() then -- only target Players and Monsters local targetPos = target:getPosition() local playerDir = playerPos:getDirectionTo(targetPos) if playerDir then local nextPos = Position(targetPos):getBehindPos(playerDir, 1) -- Tile to push to if Tile(nextPos):hasProperty(CONST_PROP_BLOCKSOLID) or Tile(nextPos):hasFlag(TILESTATE_FLOORCHANGE) or Tile(nextPos):getCreatureCount() > 0 then -- If tile to push to is invalid/blocked -- Alternative push positions local secondaryPositions = {} -- Get alternative push positions if playerDir == DIRECTION_NORTH then table.insert(secondaryPositions, Position(targetPos):getBehindPos(DIRECTION_NORTHEAST, 1)) table.insert(secondaryPositions, Position(targetPos):getBehindPos(DIRECTION_NORTHWEST, 1)) elseif playerDir == DIRECTION_NORTHEAST then table.insert(secondaryPositions, Position(targetPos):getBehindPos(DIRECTION_NORTH, 1)) table.insert(secondaryPositions, Position(targetPos):getBehindPos(DIRECTION_EAST, 1)) elseif playerDir == DIRECTION_EAST then table.insert(secondaryPositions, Position(targetPos):getBehindPos(DIRECTION_NORTHEAST, 1)) table.insert(secondaryPositions, Position(targetPos):getBehindPos(DIRECTION_SOUTHEAST, 1)) elseif playerDir == DIRECTION_SOUTHEAST then table.insert(secondaryPositions, Position(targetPos):getBehindPos(DIRECTION_EAST, 1)) table.insert(secondaryPositions, Position(targetPos):getBehindPos(DIRECTION_SOUTH, 1)) elseif playerDir == DIRECTION_SOUTH then table.insert(secondaryPositions, Position(targetPos):getBehindPos(DIRECTION_SOUTHEAST, 1)) table.insert(secondaryPositions, Position(targetPos):getBehindPos(DIRECTION_SOUTHWEST, 1)) elseif playerDir == DIRECTION_SOUTHWEST then table.insert(secondaryPositions, Position(targetPos):getBehindPos(DIRECTION_SOUTH, 1)) table.insert(secondaryPositions, Position(targetPos):getBehindPos(DIRECTION_WEST, 1)) elseif playerDir == DIRECTION_WEST then table.insert(secondaryPositions, Position(targetPos):getBehindPos(DIRECTION_SOUTHWEST, 1)) table.insert(secondaryPositions, Position(targetPos):getBehindPos(DIRECTION_NORTHWEST, 1)) elseif playerDir == DIRECTION_NORTHWEST then table.insert(secondaryPositions, Position(targetPos):getBehindPos(DIRECTION_WEST, 1)) table.insert(secondaryPositions, Position(targetPos):getBehindPos(DIRECTION_NORTH, 1)) end -- Shuffle alternative push positions shuffle(secondaryPositions) -- Check for valid positions local validSecondary = false for i = 1, #secondaryPositions do if not validSecondary then local position = secondaryPositions[i] local creatureCheck = Tile(nextPos):getCreatureCount() if not Tile(position):hasFlag(TILESTATE_FLOORCHANGE) then if not Tile(position):hasProperty(CONST_PROP_BLOCKSOLID) and Tile(position):getCreatureCount() < 1 then -- Ensure alternative push position is valid nextPos = secondaryPositions[i] validSecondary = true end end end end -- If valid alternative push position if validSecondary and not isInArray(blockedPos, nextPos) then table.insert(blockedPos, nextPos) table.insert(pushTargets, {target.uid, nextPos}) else -- Monster is stuck, stun them against wall if target:isPlayer() then stunDuration = stunDuration / 2 end -- Headbutt the wall fam target:setDirection(playerDir) nextPos:sendMagicEffect(CONST_ME_DRAWBLOOD) -- Stun local stun = Condition(CONDITION_STUN) stun:setParameter(CONDITION_PARAM_TICKS, stunDuration) target:addCondition(stun) -- Mute local mute = Condition(CONDITION_MUTED) mute:setParameter(CONDITION_PARAM_TICKS, stunDuration) target:addCondition(mute) addEvent(stunAnimation, 0, target.uid, target:getPosition(), (stunDuration / 1000) * 2) end else -- Regular push position is valid if not isInArray(blockedPos, nextPos) then table.insert(blockedPos, nextPos) table.insert(pushTargets, {target.uid, nextPos}) end end end end end end -- Push targets for i = 1, #pushTargets do local target = Creature(pushTargets[i][1]) target:teleportTo(pushTargets[i][2], true) end -- animation local animationType = 0 for j = 1, #animationArea do if j > 2 then animationType = 1 end for k,v in ipairs(animationArea[j]) do for i = 1, #v do if v[i] == 3 or v[i] == 2 then centre.Row = k centre.Column = i elseif v[i] == 1 then local darea = {} darea.Row = k darea.Column = i darea.Delay = math.random(j * delay, (j * delay) + delay) darea.Animation = animationType table.insert(damageArea, darea) end end end end for i = 1,#damageArea do local modifierx = damageArea[i].Column - centre.Column local modifiery = damageArea[i].Row - centre.Row local animationPos = Position(playerPos) animationPos.x = animationPos.x + modifierx animationPos.y = animationPos.y + modifiery local animationDelay = damageArea[i].Delay or 0 addEvent(animation, animationDelay, animationPos, playerPos, damageArea[i].Animation) end -- Execute Damage return combat:execute(creature, var) end
  10. Alguém poderia transformar essa ideia minha em 1 spell fazendo um favor ?, procurei no fórum e não encontrei. 1 Spell que deixasse o target imóvel por 3segundos, e durante esses 3 segundos ficasse uma animação (effect) em cima do player imóvel. Obrigado pela atenção galerinha do tk.

Informação Importante

Confirmação de Termo