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

Lua Please help me with my Boss event script!

kaspertje100

Member
Joined
May 8, 2008
Messages
236
Reaction score
7
Hi guys please help me with my script:

Code:
function onDeath(cid, corpse, deathList)
		doRemoveItem(getTileItemById({x=1235, y=1173, z=12}, 1304).uid)
		doCreatureSay(cid, "A huge stone have been removed, you have 3 minutes before the stone comes back!", TALKTYPE_ORANGE_1)
		local s = getStorage(2)
		doSetStorage(2, os.time() + 3 * 20)
		if os.time() > s then
        doCreateItem(1304, 1, {x = 1235, y = 1173, z = 12})
	end
	end

So the problem is when the the massacre dies the stone doesn't remove? (and yes the pos and ID are correct) and it doesn't create the stone after 3 minutes again:S
I would rlly appreciatie some help with this script!

Yours,
Kasper
 
Lua:
local pos = {x = 1235, y = 1173, z = 12, stackpos = 255}
local pos2 = {x = 1235, y = 1173, z = 12}-- Cause im not sure if it will create item with stackpos xD
function onDeath(cid, corpse, deathList)
		doRemoveItem(getThingFromPos(pos).uid)
		doCreatureSay(cid, "A huge stone have been removed, you have 3 minutes before the stone comes back!", TALKTYPE_ORANGE_1)
		local s = getPlayerStorageValue(cid, 2)
		doPlayerSetStorageValue(cid, 2, (os.time() + 3 * 20))
		if(os.time() > s) then
			doCreateItem(1304, 1, pos2)
		end
end

Are you using TFS btw? i don't recognize ur functions x)
 
ye im using tfs 0.3.6 crying damson. But im not that good scripter so might be my fault haha (testing ur script now)



Code:
[Error - CreatureScript Interface]
data/creaturescripts/scripts/mass.lua:onDeath
Description:
(luaDoRemoveItem) Item not found

got this error when using ur scripts :S

Edit2: chaned stackpos to 1 since you have to delete a stone (itemid: 1304) which isnt moveable. And I thought it was a TOP item:p but ehm not the stone doesn't move;s
 
Last edited:
Back
Top