- Forums
- OTServ
- Recursos
- Scripting
- Globalevents e Spells
- [Spell] Scorpion MK ( Get Over Here )
KA
spell
[Spell] Scorpion MK ( Get Over Here )
By KarlKalvin, 21 de mai. de 2013 in Globalevents e Spells
otserv
tibia
script
1
1.1k
By KarlKalvin, 21 de mai. de 2013 in Globalevents e Spells
info
Group: Visconde
Joined: 07/02/12
Posts: 427
Reputation: +112
Eaê xTibia como vai vocês ... vim mostrar agora, uma spell que eu andei pesquisando que tira dano mais não pucha, ou pucha mais não tira dano então criei um script que eu fiz com bastante dor de cabeça, mais consegui e agora to postando ae para quem quiser usar de outro jeito mais a spell funciona assim...
Simples né ?! bom vamos ao script.
Data/Spells/Scripts crie um arquivo chamado scorpion.lua e adicione isso dentro.
-- Script Criado por Kalvin Karl.
-- Se for posta em algum outro fórum não retirar os créditos
-- Obrigado e bom uso do script
local function doPullCreature(target, cid)
if target > 0 then
if not isNpc(target) then
local position = getThingPosition(cid)
local fromPosition = getThingPosition(target)
local x = ((fromPosition.x - position.x) < 0 and 1 or ((fromPosition.x - position.x) == 0 and 0 or -1))
local y = ((fromPosition.y - position.y) < 0 and 1 or ((fromPosition.y - position.y) == 0 and 0 or -1))
local toPosition = {x = fromPosition.x + x, y = fromPosition.y + y, z = fromPosition.z}
if doTileQueryAdd(target, toPosition) == 1 and getTileInfo(toPosition).house == false then
doTeleportThing(target, toPosition, true)
end
end
end
end
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -- Efeito
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) -- Efeito
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 4, 7) -- Dano
function onTargetCreature(cid, target) -- Função de pucha
doPullCreature(target, cid)
end
local area = createCombatArea(AREA_BEAM7, AREADIAGONAL_BEAM7)
setCombatCallback(combat, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature")
setCombatArea(combat, area)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Agora a tag no spells.xml é essa..
é isso aê pessoal, qualquer dúvida posta aê
Edited Maio 21 by KarlKalvin