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

Need script.

yanger

Banned User
Joined
Aug 28, 2009
Messages
740
Reaction score
7
Location
Stalowa Wola, Poland
Hey all,
I need one simple script.
Automatically removing stone from positions XYZ, and when stone is removed, it make broadcast

Anyone?;) repp+++
 
Make the globalevent happen every 10 minutes. It will remove the item and put a new stone in 9 minutes.

Code:
function onThink(cid, interval)
    local stone = [COLOR="red"]xxxx[/COLOR]
    local pos = {[COLOR="red"]x = 100, y = 100, z = 7[/COLOR]}
    local type, message = MESSAGE_STATUS_EVENT, "[COLOR="red"]Type your message here![/COLOR]"
    return doRemoveItem(getThingFromPos(pos, false).uid) and doBroadcastMessage(message, type) and addEvent(function() doCreateItem(stone, 1, pos) end, 9 * 60 * 1000)
end
 
Code:
[10:7:56.425] [Error - GlobalEvent Interface] 
[10:7:56.425] data/globalevents/scripts/najazd.lua:onThink
[10:7:56.425] Description: 
[10:7:56.425] (luaDoRemoveItem) Item not found
[10:7:56.425] [Error - GlobalEvents::think] Couldn't execute event: najazd

Code:
function onThink(cid, interval)
    local stone = 1304
    local pos = {x = 837, y = 1027, z = 7}
    local type, message = MESSAGE_STATUS_EVENT, "Orshabaal just ruined a stones which was blocking him at Banshee Room, at the west of city!!"
    return doRemoveItem(getThingFromPos(pos, false).uid) and doBroadcastMessage(message, type) and addEvent(function() doCreateItem(stone, 1, pos) end, 9 * 60 * 1000)
end

Code:
	<globalevent name="najazd" interval ="200" script="najazd.lua"/>
Srry, but i am not good at scripts.

#maybe interval.. hum
 
Last edited:
Back
Top