• 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 Is it possible?

tosse12

Panchira Project Member
Joined
Jun 10, 2007
Messages
864
Reaction score
9
Location
Sweden
Is it possible to have a script that create a item with a uniqueid. Like this:

When you use a lever it transform some items, and then creates a new lever at a other pos, and that created lever have that uniqueid.

If it is possible to do that could you help me to do that script? have tried everything that I know (Don't forgett to read "that I know") :p

Just found out that it isn't possible to do exacly like that, but I can do something like this:
Code:
local leverpos = {x=511, y=371, z=7, stackpos=1}
local check = {x=516, y=369, z=7, stackpos=1}
local fi = 414
local l = 1945
local la = 30004

function onUse(cid, item, frompos, item2, topos)
	if getthingfrompos(check) and item.itemid == 8549 then

		doremoveitem(getThingFromPos(leverpos).uid)
		docreateitem(fi, 1, leverpos)
		docreateitem(l, 1 , leverpos) 
		doSetItemActionId(l, la)
	ifelse
		doremoveitem(gethingfrompos(leverpos).uid)
		docreateitem(floorid, 1, fi)
	end
	return 1
end

Correct me if this is wrong
 
Last edited:
Back
Top