• 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!

HELP PLZ (rep++)

hisoka the soldier

New Member
Joined
Nov 11, 2007
Messages
6
Reaction score
0
help plz
when i run the server it get crashed i know the problem why
but i dont know how to fix it
it's an action script here is it:
Code:
local config = {
	position = { x = 1113, y = 902, z = 8 },
	itemid = 10210
}
local pos1 = {x=1083, y=849, z=8}
local pos2 = {x=1084, y=849, z=8}
local pos3 = {x=1085, y=849, z=8}
local pos4 = {x=1086, y=849, z=8}
local LeverPos1 = { x = 1055, y = 795, z = 8} -- Lever Position
local LeverPos2 = { x = 990, y = 794, z = 8} -- Lever Position
local LeverPos3 = { x = 989, y = 916, z = 8} -- Lever Position
local LeverPos4 = { x = 1036, y = 912, z = 8} -- Lever Position
local Lever1 = getTileItemById(LeverPos1, 1946)
local Lever2 = getTileItemById(LeverPos2, 1946)
local Lever3 = getTileItemById(LeverPos3, 1946)
local Lever4 = getTileItemById(LeverPos4, 1946)
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1945 then
		doRemoveItem(getTileItemById(config.position, config.itemid).uid)
        doCreateItem(1304, 1, pos1)
        doCreateItem(1353, 1, pos2)
        doCreateItem(1354, 1, pos3)
        doCreateItem(1355, 1, pos4)
        doTransformItem(Lever1.uid, 1945)
        doTransformItem(Lever2.uid, 1945)
        doTransformItem(Lever3.uid, 1945)
        doTransformItem(Lever4.uid, 1945)
	elseif item.itemid == 1946 then
        doPlayerSendCancel(cid,"Sorry, not possible.") -- message if the lever is pulled again.
    return TRUE
	end 
end
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1945 then
		doRemoveItem(getTileItemById({x = 1113, y = 902, z = 8}, 10210).uid)
		doCreateItem(1304, 1, {x=1083, y=849, z=8})
		doCreateItem(1353, 1, {x=1084, y=849, z=8})
		doCreateItem(1354, 1, {x=1085, y=849, z=8})
		doCreateItem(1355, 1, {x=1086, y=849, z=8})
		doTransformItem(getTileItemById({x = 1055, y = 795, z = 8}, 1946).uid, 1945)
		doTransformItem(getTileItemById({x = 990, y = 794, z = 8}, 1946).uid, 1945)
		doTransformItem(getTileItemById({x = 989, y = 916, z = 8}, 1946).uid, 1945)
		doTransformItem(getTileItemById({x = 1036, y = 912, z = 8}, 1946).uid, 1945)
		doTransformItem(item.uid, 1946)
	elseif item.itemid == 1946 then
		doPlayerSendCancel(cid, "Sorry, not possible.")
	end
	return true
end
 
Back
Top