local t = {
serpent = {x=115, y=123, z=7},
serpentto = {x=151, y=159, z=7},
zombie = {x=100, y=179, z=6},
zombieto = {x=128, y=208, z=6},
pacman = {x=32282, y=32886, z=6},
pacmanto = {x=32289, y=32895, z=6},
bomber = {x=32156, y=32549, z=6},
bomberto = {x=32165, y=32570, z=6},
ping = {x=32521, y=32780, z=6},
pingto = {x=32539, y=32787, z=6}
}
function onSay(cid, words, param, channel)
if isPlayer(cid) and isInRange(getThingPos(cid), t.serpent, t.serpentto) or isPlayer(cid) and isInRange(getThingPos(cid), t.zombie, t.zombieto) or isPlayer(cid) and isInRange(getThingPos(cid), t.pacman, t.pacmanto) then
if(param == "utevo res") then
doPlayerSendCancel(cid, "You can't using this spell here.")
end
return true
end
end
local t = {
serpent = {x=115, y=123, z=7},
serpentto = {x=151, y=159, z=7},
zombie = {x=100, y=179, z=6},
zombieto = {x=128, y=208, z=6},
pacman = {x=32282, y=32886, z=6},
pacmanto = {x=32289, y=32895, z=6},
bomber = {x=32156, y=32549, z=6},
bomberto = {x=32165, y=32570, z=6},
ping = {x=32521, y=32780, z=6},
pingto = {x=32539, y=32787, z=6}
}
function onSay(cid, words, param, channel)
if isPlayer(cid) and isInRange(getThingPos(cid), t.serpent, t.serpentto) or isPlayer(cid) and isInRange(getThingPos(cid), t.zombie, t.zombieto) or isPlayer(cid) and isInRange(getThingPos(cid), t.pacman, t.pacmanto) then
doPlayerSendCancel(cid, "You can't using this spell here.")
return true
end
end
Yea, that's going to work too.U can put some storage on there too (insert when someone enter on TP of this event)... and check the same storage on spells.
ya I know, have other better ways to do it, but its a option for u do and learn how it works.
local event_areas = {
{{x = 999, y = 849, z = 7}, {x = 1029, y = 879, z = 7}}, -- {{from},{to}}
{{x = 906, y = 831, z = 7}, {x = 963, y = 888, z = 7}}
}
function onSay(cid, words, param, channel)
for i = 1, #event_areas do
local cid_pos = getThingPosition(cid)
if isPlayer(cid) and isInArea(cid_pos, event_areas[i][1], event_areas[i][2]) then
doPlayerSendCancel(cid, "You can't using this spell here.")
end
return true
end
end
Thanks, that’s better and shorter.@Zulfix
LUA:local event_areas = { {{x = 999, y = 849, z = 7}, {x = 1029, y = 879, z = 7}}, -- {{from},{to}} {{x = 906, y = 831, z = 7}, {x = 963, y = 888, z = 7}} } function onSay(cid, words, param, channel) for i = 1, #event_areas do local cid_pos = getThingPosition(cid) if isPlayer(cid) and isInArea(cid_pos, event_areas[i][1], event_areas[i][2]) then doPlayerSendCancel(cid, "You can't using this spell here.") end return true end end
Where do I put this script?@Zulfix
LUA:local event_areas = { {{x = 999, y = 849, z = 7}, {x = 1029, y = 879, z = 7}}, -- {{from},{to}} {{x = 906, y = 831, z = 7}, {x = 963, y = 888, z = 7}} } function onSay(cid, words, param, channel) for i = 1, #event_areas do local cid_pos = getThingPosition(cid) if isPlayer(cid) and isInArea(cid_pos, event_areas[i][1], event_areas[i][2]) then doPlayerSendCancel(cid, "You can't using this spell here.") end return true end end
<talkaction log="no" access="0-3" words="utevo res" filter="word-spaced" event="script" value="scriptname.lua"/>
Would you be able to add all the spells, not just utevo res?Talkactions
XML:<talkaction log="no" access="0-3" words="utevo res" filter="word-spaced" event="script" value="scriptname.lua"/>