kito2
www.masteria.net
Hi, I need an script that does not allow you to use runes on a certain area.
PM me with the script and your e-mail address to pay you.
PM me with the script and your e-mail address to pay you.
local fromPosition = {x = 32009, y = 32158, z = 7}
local toPosition = {x = 32119, y = 32208, z = 7}
function onCast(cid, target)
return not (target and isInRange(getThingPosition(cid), fromPosition, toPosition) and not isCreature(target))
end
local fromPosition = {x = 32009, y = 32158, z = 7}
local toPosition = {x = 32119, y = 32208, z = 7}
function onCast(cid, target)
if isInArea(getThingPos(cid), fromPosition, toPosition) then
return false, doPlayerSendCancel(cid, "You're not allowed to use any rune here.")
end
return true
end
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 = 32368, y = 31873, z = 7} -- top left cornor of the playground
local toPosition = {x = 32394, y = 31895, z = 7 } -- bottom right cornor of the playground
if isInArea(getThingPosition(cid), fromPosition, toPosition) then
return false, doPlayerSendCancel(cid, "You're not allowed to use any rune here.")
end
return doCombat(cid, combat, var)
end
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1499)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
function onCastSpell(cid, var)
local fromPosition = {x = 32368, y = 31873, z = 7} -- top left cornor of the playground
local toPosition = {x = 32394, y = 31895, z = 7 } -- bottom right cornor of the playground
if isInArea(getThingPosition(cid), fromPosition, toPosition) then
return false, doPlayerSendCancel(cid, "You're not allowed to use any rune here.")
end
return doCombat(cid, combat, var)
end
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIRE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.2, 0, -2.0, 0)
local area = createCombatArea(AREA_CROSS5X5)
setCombatArea(combat, area)
local lock = {
Position(1145, 815, 7), -- Nw Pos.
Position(1180, 850, 7) -- Se Pos.
}
function onCastSpell(cid, var)
if isInRange(getCreaturePosition(cid), lock[1], lock[2]) then
doPlayerSendCancel(cid, 'You can\'t use this spell here.')
return false
end
return doCombat(cid, combat, var)
end