• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

-=TFS=- 0.4 8.60 Debug on Use Magic Voc Druid Me Use Gems Equal Fox World

samuel157

/root
Joined
Mar 19, 2010
Messages
447
Solutions
3
Reaction score
49
Location
São Paulo, Brazil
GitHub
Samuel10M
Code:
<instant name="Ops" words="Hyakka Ryouran" lvl="" mana="" prem="" needweapon="0" exhaustion="2000" needlearn="0" script="attack/gemadruid.lua">

Lua:
local water = {490, 491, 492, 493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625}

local combat = createCombatObject()

local meteor = createCombatObject()

setCombatParam(meteor, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)

setCombatParam(meteor, COMBAT_PARAM_USECHARGES, TRUE)

setCombatParam(meteor, COMBAT_PARAM_EFFECT, CONST_ME_BIGPLANTS)

setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, -99.5, -99975, -99.5, -99975)

local stun = createConditionObject(CONDITION_POISON)

setConditionParam(stun, CONDITION_PARAM_DELAYED, 1)

addDamageCondition(stun, 1, 3000, -700)

addDamageCondition(stun, 1, 3000, -700)

addDamageCondition(stun, 1, 3000, -700)

addDamageCondition(stun, 1, 3000, -700)

addDamageCondition(stun, 1, 3000, -700)

addDamageCondition(stun, 1, 3000, -700)

addDamageCondition(stun, 1, 3000, -700)

addDamageCondition(stun, 1, 3000, -700)

addDamageCondition(stun, 1, 3000, -700)

addDamageCondition(stun, 1, 3000, -700)

setCombatCondition(meteor, stun)

 

local meteor_water = createCombatObject()

setCombatParam(meteor_water, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)

setCombatParam(meteor_water, COMBAT_PARAM_USECHARGES, TRUE)

setCombatParam(meteor_water, COMBAT_PARAM_EFFECT, CONST_ME_BIGPLANTS)

setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, -99.5, -99975, -99.5, -99975)

combat_arr = {

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},

{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},

{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},

{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},

{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},

{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},

{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},

{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},

{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

}

local combat_area = createCombatArea(combat_arr)

setCombatArea(combat, combat_area)

local function meteorCast(p)

doCombat(p.cid, p.combat, positionToVariant(p.pos))

end

local function stunEffect(cid)

doSendMagicEffect(getThingPos(cid), CONST_ME_STUN)

end

function onTargetTile(cid, pos)

if (math.random(0, 1) == 1) then

local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0})

if (isInArray(water, ground.itemid) == TRUE) then

local newpos = {x = pos.x - 7, y = pos.y - 6, z = pos.z}

doSendDistanceShoot(newpos, pos, CONST_ANI_EARTH)

addEvent(meteorCast, 200, {cid = cid, pos = pos, combat = meteor_water})

else

local newpos = {x = pos.x - 7, y = pos.y - 6, z = pos.z}

doSendDistanceShoot(newpos, pos,CONST_ANI_EARTH)

addEvent(meteorCast, 200, {cid = cid,pos = pos, combat = meteor})

end

end

end

setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

function onCastSpell(cid, var)

local mana = 2400

local cmana = getCreatureMana(cid)

if cmana >= mana then

if isGemActivated(cid) == TRUE then

doCreatureAddMana(cid, mana * -1)

doPlayerAddSpentMana(cid, mana)

doPlayerSendCancel(cid, doRemoveGemEffect(cid))

return doCombat(cid, combat, var)

else

doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)

doPlayerSendCancel(cid, "Voce nao usou o Crystal de sua vocacao ainda!")

return FALSE

end

else

doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)

doPlayerSendCancel(cid, "Você não possui mana suficiente.")

return FALSE

end

end
 
Back
Top