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

[Request] Item deleting and summoning monster

Kinos

New Member
Joined
Nov 9, 2008
Messages
10
Reaction score
0
Hello all.
I need a script for this:

When you put a boots of haste on a coal basin [1485] and pull a swich, boh dissappear, player receives a msg [Sign warned about it!] and it summons a demon.

Maybe someone can help me? ^_^
 
Not sure about lever item ids :)
Code:
local config = {
	bohPos = { x = 1314, y = 1313, z = 7, stackpos = 255 },
        demonPos = { x = 1232, y = 12421, z = 7 },
	leverAction = 1234
	}
function onUse(cid, item)
	if item.actionid == config.leverAction then
		if item.itemid == 1995 then
			local boh = getThingfromPos(config.bohPos)
			if boh.itemid == bohitemidhereokey? then
				doRemoveItem(boh.uid)
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "GUARD HAS BEEN WARNED, YOU IS GO DED!")
				doSummonCreature("Demon", config.demonPos)
				doTransformItem(item.uid, item.itemid + 1)
			else
				return FALSE
			end
		elseif item.itemid == 1996 then
			doTransformItem(item.uid, item.itemid - 1)
			-- maybe something more?
		end
	end
	return TRUE
end
 
Back
Top