<globalevent name="removesigninpz" interval="500" event="script" value="removesigninpz.lua"/>
local function cancelConditions(cid)
doRemoveCondition(cid, CONDITION_INFIGHT)
doRemoveCondition(cid, CONDITION_FIRE)
doRemoveCondition(cid, CONDITION_ENERGY)
doRemoveCondition(cid, CONDITION_DRUNK)
doRemoveCondition(cid, CONDITION_PARALYZE)
doRemoveCondition(cid, CONDITION_CURSED)
doRemoveCondition(cid, CONDITION_HUNTING)
doRemoveCondition(cid, CONDITION_BLEEDING)
doRemoveCondition(cid, CONDITION_POISON)
return false
end
function onThink(interval)
for _, cid in ipairs(getPlayersOnline()) do
local pos, tile = getThingPos(cid), getTileThingByPos(getThingPos(cid))
if getTilePzInfo(pos) == true then
cancelConditions(cid)
end
end
end
@zuma the Op asked for a movevent
not global events, just trolling
Well, if you had the knowledge to notice that you can't do it using move events (unless you use action ids on each PZ sqm or you edit the source to add an onMove function), you'd realize that using global events is the best way to do what OP requested, just trolling.
Well, there are many ways to do this. MANY. I'll give you a simple one though, it should work fine for your needs.
1- Go to "datapack/globalevents/" and open "globalevents.xml", then add this line to it:
XML:<globalevent name="removesigninpz" interval="500" event="script" value="removesigninpz.lua"/>
2- Go to "datapack/globalevents/scripts/" and create a new file, name it "removesigninpz.lua", then add this script to it:
LUA:local function cancelConditions(cid) doRemoveCondition(cid, CONDITION_INFIGHT) doRemoveCondition(cid, CONDITION_FIRE) doRemoveCondition(cid, CONDITION_ENERGY) doRemoveCondition(cid, CONDITION_DRUNK) doRemoveCondition(cid, CONDITION_PARALYZE) doRemoveCondition(cid, CONDITION_CURSED) doRemoveCondition(cid, CONDITION_HUNTING) doRemoveCondition(cid, CONDITION_BLEEDING) doRemoveCondition(cid, CONDITION_POISON) return false end function onThink(interval) for _, cid in ipairs(getPlayersOnline()) do local pos, tile = getThingPos(cid), getTileThingByPos(getThingPos(cid)) if getTilePzInfo(pos) == true then cancelConditions(cid) end end end
AND YOUR DONE! CONGRATULATIONS!
Now tell me if it worked or not D:.
local function cancelConditions(cid)
doRemoveCondition(cid, CONDITION_INFIGHT)
doRemoveCondition(cid, CONDITION_FIRE)
doRemoveCondition(cid, CONDITION_ENERGY)
doRemoveCondition(cid, CONDITION_DRUNK)
doRemoveCondition(cid, CONDITION_PARALYZE)
doRemoveCondition(cid, CONDITION_CURSED)
doRemoveCondition(cid, CONDITION_HUNTING)
doRemoveCondition(cid, CONDITION_BLEEDING)
doRemoveCondition(cid, CONDITION_POISON)
return false
end
function onThink(interval)
for _, cid in ipairs(getPlayersOnline()) do
local pos, tile = getThingPos(cid), getTileThingByPos(getThingPos(cid))
if getTilePzInfo(pos) == true then
cancelConditions(cid)
end
end
return true
end