• 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 Change from use statue to item.

Potar

SocialWorld
Senator
Joined
Mar 1, 2009
Messages
1,661
Reaction score
125
Location
Warsaw, Poland
Hello i cant change it for item id :2500 (example).
When you use it then it will be removed.

Code:
function onUse(cid, item, frompos, item2, topos)
local storage = 89523
local x = getPlayerStorageValue(cid, storage)
local y = getPlayerStorageValue(cid, storage+1)
local z = getPlayerStorageValue(cid, storage+2)
if(x > -1 and y > -1) then
	doTeleportThing(cid, {x=x, y=y, z=z})
	doSendMagicEffect({x=x, y=y, z=z}, CONST_ME_TELEPORT)
else
	doPlayerSendCancel(cid,"Sorry, it's not possible.")
end
return TRUE
end
 
I wrote it wrong.

This is script to use a statue, i need to change it for rune (2296) and when you use it will be removed.
Do you think that this is correct (not all script, only items and remove)?
function onUse(cid, item, frompos, item2, topos)
local storage = 89523
local x = getPlayerStorageValue(cid, storage)
local y = getPlayerStorageValue(cid, storage+1)
local z = getPlayerStorageValue(cid, storage+2)
if(x > -1 and y > -1) then
if(getPlayerItemCount(cid, 2296) > 0) then
doPlayerRemoveItem(cid, 2296, 1)
doTeleportThing(cid, {x=x, y=y, z=z})
doSendMagicEffect({x=x, y=y, z=z}, CONST_ME_TELEPORT)
else
end
else
doPlayerSendCancel(cid,"You need to death first.")
end
return TRUE
end
 
Last edited:
Back
Top