I need help with this script below!
The This script removes a particular item, and to remove this item I only wanted players who were in a certain area received a message that it was removed!
Rep ++
The This script removes a particular item, and to remove this item I only wanted players who were in a certain area received a message that it was removed!
LUA:
function onThink(pos,interval)
addEvent(removestone,1000)
return addEvent(addstone,10*1000)
end
local p = {x=295, y=263, z=7}
function removestone()
local tile = getTileItemById(p, 1290).uid
doRemoveItem(tile)
local fromPos,toPos = {x=292,y=265,z=7},{x=299,y=200,z=7}
local players = getPlayersOnline()
for _,pid in ipairs(players) do
if isInRange(getThingPos(pid),fromPos,toPos) then
doBroadcastMessage("Stone Removed\n\nGo Outo Now", 22)
end
end
end
function addstone()
doCreateItem(1290,1,p)
doBroadcastMessage("Stone Adicionada", 22)
end
Rep ++