• 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!

monster flag targetdistance

mmheo

New Member
Joined
Sep 14, 2017
Messages
157
Reaction score
1
how to change flag targetdistance with spell exeta res
example when player use exeta res in monster <flag targetdistance="7"/> change to <flag targetdistance="1"/>
tfs 0.4

anyone can help me ??

this is impossible?? anyone can help me please

??
 
Since you are adamant about doing this & no one wants to help you (myself included beyond this). I heavily commented the challenge script so that you can update it yourself I even included the lib file that allows you to change the target distance.
Lua:
-- this section here although initially important
-- handles creating the combat object
local combat = createCombatObject()
-- and the effect in this case magic blue
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)

-- this is an area object the AREA_SQUARE1X1 is the region to cast the spell
-- it is a table defined in data/spells/lib/spells.lua
local area = createCombatArea(AREA_SQUARE1X1)
-- this part of the script registers the area object to the combat object
setCombatArea(combat, area)

-- here we have the definition of the callback function
function onTargetCreature(cid, target) return doChallengeCreature(cid, target) end

-- here we are registering the callback function to the combat object so that
-- when the spell successfully executes it executes the callback function causing the effect
-- of challenging the creature
setCombatCallback(combat, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature")

-- this is pretty obvious and needs no explanation
function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end
 
Back
Top