I tried to add exhaustion in many ways, but no one seems to work.
I want the player to get exhausted when he uses the lever.
Thank's for help.
I want the player to get exhausted when he uses the lever.
Code:
--Script made by Empty
function onUse(cid, item, frompos, item2, topos)
local tile1 = {x=2840, y=2727, z=8, stackpos=1} --change tilepos
local tile2 = {x=2840, y=2728, z=8, stackpos=1} --change tilepos
local gettile1 = getThingfromPos(tile1)
local gettile2 = getThingfromPos(tile2)
local tile3 = {x=2840, y=2727, z=8, stackpos=0} --change tilepos
local tile4 = {x=2840, y=2728, z=8, stackpos=0} --change tilepos
local gettile1 = getThingfromPos(tile3)
local gettile2 = getThingfromPos(tile4)
if item.uid == 9950 and item.itemid == 1945 then
doRemoveItem(gettile1.uid,2)
doRemoveItem(gettile2.uid,2)
doCreateItem(3764,1,tile1)
doCreateItem(3764,1,tile2)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 9950 and item.itemid == 1946 then
doRemoveItem(gettile1.uid,1)
doRemoveItem(gettile2.uid,1)
doCreateItem(460,1,tile1) --change itemID
doCreateItem(460,1,tile2) --change itemID
doCreateItem(1548,1,tile3) --change itemID
doCreateItem(1548,1,tile4) --change itemID
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end
Thank's for help.
Last edited: