• 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 Leaver script witch turns you into skeleton outfit.

Swansoft

New Member
Joined
Apr 13, 2013
Messages
49
Reaction score
0
Hi Otland

I have this script and ive tried this

I tried this and kept getting kicks when i click the leaver

Actions.XML
PHP:
<action itemid="1496" event="script" value="skeletonchanger.lua"/>

and then i tried this and kept getting the same kicks when i click the leaver.

Actions.XML
PHP:
<action actionid="6669" event="script" value="skeletonchanger.lua"/>

actions/scripts/skeletonchanger.lua
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local cratureSpeed = getCreatureSpeed
        if item.itemid == 1945 then
	        	doPlayerSendTextMessage(cid,251,"We have warned you to enter this room. and now we cursed you !")
	            doSetCreatureOutfit(cid,33, 36000)
				doChangeSpeed(cid,154, 36000)
				doTransformItem(item.uid, item.itemid + 1)
		elseif item.itemid == 1946 then
	        	doPlayerSendTextMessage(cid,251,"Seems this switch is only one-way !")
				doTransformItem(item.uid, item.itemid - 1)
        end
		return TRUE
end



Please help OTLAND REP+
 
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local creatureSpeed = getCreatureSpeed
        if item.itemid == 1945 then
                doPlayerSendTextMessage(cid,251,"We have warned you to enter this room. and now we cursed you !")
                doSetCreatureOutfit(cid,33, 36000)
                doChangeSpeed(cid,154, 36000)
                doTransformItem(item.uid, item.itemid + 1)
        elseif item.itemid == 1946 then
                doPlayerSendTextMessage(cid,251,"Seems this switch is only one-way !")
                doTransformItem(item.uid, item.itemid - 1)
        end
        return TRUE
end

try this.
 
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local creatureSpeed = getCreatureSpeed
        if item.itemid == 1945 then
                doPlayerSendTextMessage(cid,251,"We have warned you to enter this room. and now we cursed you !")
                doSetCreatureOutfit(cid,33, 36000)
                doChangeSpeed(cid,154, 36000)
                doTransformItem(item.uid, item.itemid + 1)
        elseif item.itemid == 1946 then
                doPlayerSendTextMessage(cid,251,"Seems this switch is only one-way !")
                doTransformItem(item.uid, item.itemid - 1)
        end
        return TRUE
end

try this.


I tried two times with two different action lines as u will see them in first post in actions.xml

and then your script in skeletonchanger.lua i can move the switch but nothing happens.

Thanks ill rep for the script.
 
Last edited:
The only problem with this script is that you can stack Movement Speed, I didn't change that because I don't really know for what you want it.

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local extraSpeed = 154

        if (item.itemid == 1945) then
		doPlayerSendTextMessage(cid,19,"We have warned you to enter this room. and now we cursed you!")		
		doSetCreatureOutfit(cid, {lookType=33}, 36000)
                doChangeSpeed(cid, extraSpeed)				
		addEvent(doChangeSpeed, 36000, cid, -extraSpeed)
                doTransformItem(item.uid, item.itemid + 1)
        elseif item.itemid == 1946 then
                doPlayerSendTextMessage(cid,19,"Seems this switch is only one-way !")
                doTransformItem(item.uid, item.itemid - 1)
        end
        return TRUE
end
 
Back
Top