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

magic wall rune

4Muki4

HOROHOROHORO
Joined
May 1, 2012
Messages
757
Reaction score
70
Hello,

i have zombie event where player can shoot magic walls so it gets buggy and zombies can go to players
so is it possible you can't use it in x pos to other pos? here is the code ofc and im using 0.4 3777
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497)

function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end
[CODE]
 
use this
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

function onCastSpell(cid, var)
local fromPosition = {x = xxxx, y = xxxx, z = x} -- top left cornor of the playground
local toPosition = {x = xxxx, y = xxxx, z = x} -- bottom right cornor of the playground
  if isInArea(getThingPosition(cid), fromPosition, toPosition) then
          return false, doPlayerSendCancel(cid, "You cannot use any runes in here.")
end
    return doCombat(cid, combat, var)
end

Use this function on all the runes that should not be usable.
 
ahh yeah I tried it, I thought it was gonna take a long time for anyone to reply so I tried and it worked.

another question though, if I wanted to add another location beside the one I have already, what do I need to do?

thanks.
 
Back
Top