• 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: Lever+Corpses+RemoveItem&AddItem+Delay+RestoreAllI tems

krotus

New Member
Joined
Jul 15, 2009
Messages
65
Reaction score
3
Request: Lever+Corpses+RemoveItem&AddItem+Delay+Res tore AllI tems

I'd like to have a code LUA Action that you will have to remove a statue putting a gargolye corpse on some tile using a lever, but in the same time another pedastal in other position, it'll transforms to gargolyie statue. All that will have a 60 seconds of delay and everything come back like was before.

Greetings!

- - - Updated - - -

I get 80% of this script but i need the part of one pedastal transforms yourself to gargoyle statue.

This is my actual script:
Code:
local config = {
	tile = {x=32360, y=32187, z=7}, 
	corpse_id = 6027,
	wall_pos = {x=32356, y=32189, z=7},
	wall_id = 8422,
	delay = 30,
	message = "You have 30 seconds to enter the teleport before the gate closes."
}
function leaverBack(pos, id, new)
	return doTransformItem(getTileItemById(pos, id).uid, new)
end
 
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local corpse = getTileItemById(config.tile, config.corpse_id)
	if item.itemid ~= 1945 then return doPlayerSendCancel(cid, "Sorry not possible.") end
	if not(corpse.uid > 0) then
		return doPlayerSendCancel(cid, "Place the Gargoyle corpse on the right tile.")
	end
	local wall = getTileItemById(config.wall_pos, config.wall_id)	
	doRemoveItem(wall.uid)
	doRemoveItem(corpse.uid,1)
	doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)	
	doTransformItem(item.uid, 1946)
	addEvent(doCreateItem, config.delay*1000, config.wall_id, 1, config.wall_pos)
	addEvent(leaverBack, config.delay*1000, getThingPos(item.uid), 1946, 1945)
	return true
end

- - - Updated - - -

Nobody can help me with this script?
 
Back
Top