Muito bom, daria para fazer um mini-game ou algum outro evento bem interessante, parabens pela criatividade xD.
- Forums
- OTServ
- Recursos
- Scripting
- Actions e Talkactions
- Hunting Arrow/Ballista
TA
action
Hunting Arrow/Ballista
By TaaG, 16 de nov. de 2015 in Actions e Talkactions
ballista
script
system
sistema
6
2k
info
Group: Marquês
Joined: 18/05/11
Posts: 1.1k
Reputation: +333
Gender: Masculino
Tibia Character: Kyuzen

16 de novembro de 2015 às 15:08
info
Group: Artesão
Joined: 19/11/12
Posts: 113
Reputation: +63

16 de novembro de 2015 às 15:09
Claro, aí vem da criatividade da pessoa!
16 de novembro de 2015 às 18:49
Teria como usar essa action, para exemplo.
O paladin conjura essa ballista ela aparecer , ele usar para atacar e ela sumir depois de 10 segundos ? caso sim, me ajude com isso? obrigado!
info
Group: Artesão
Joined: 19/11/12
Posts: 113
Reputation: +63

16 de novembro de 2015 às 19:15
Teria como usar essa action, para exemplo.
O paladin conjura essa ballista ela aparecer , ele usar para atacar e ela sumir depois de 10 segundos ? caso sim, me ajude com isso? obrigado!
Creio que spell não (se sim, não sei) porém Runa é mais fácil



info
Group: Artesão
Joined: 19/11/12
Posts: 113
Reputation: +63
O script consiste em, ao clicar, lançar uma flecha que, ao chegar no target, dará certo dano. Sendo assim, um bom script para Paladino.
SS:
ballista.lua (data/actions/scripts)
local config = { shootRange = 7, damage = {50, 100}, -- dano minimo/maximo shootEffect = CONST_ANI_HUNTINGSPEAR, impactEffect = CONST_ME_HITAREA, exhaustOnUse = 300, -- tempo de recarga em segundos direction = { [5692] = DIRECTION_NORTH, [5701] = DIRECTION_EAST, [5698] = DIRECTION_WEST, [5695] = DIRECTION_SOUTH } } local exhaust = Condition(CONDITION_EXHAUST_WEAPON) exhaust:setParameter(CONDITION_PARAM_TICKS, config.exhaustOnUse) function onUse(player, item, fromPosition, target, toPosition, isHotkey) if player:getCondition(CONDITION_EXHAUST_WEAPON) then player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_YOUAREEXHAUSTED)) return true end player:addCondition(exhaust) for i = 1, config.shootRange do local nextPosition = item:getPosition() nextPosition:getNextPosition(config.direction[item.itemid], i) local tile = Tile(nextPosition) if tile then local topCreature = tile:getTopCreature() if topCreature then toPosition:sendDistanceEffect(topCreature:getPosition(), config.shootEffect) doTargetCombatHealth(player, topCreature, COMBAT_PHYSICALDAMAGE, -config.damage[1] * i, -config.damage[2] * i, config.impactEffect) return true end end end local nextPosition = item:getPosition() nextPosition:getNextPosition(config.direction[item.itemid], config.shootRange) toPosition:sendDistanceEffect(nextPosition, config.shootEffect) return true endactions.xml (data/actions)
Créditos: Printer
Edited Novembro 16 by TaaG