• 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] Whats wrong on Last Level Banuta Quest ?

Bulet

Knight of Apocalypse
Joined
Jul 12, 2009
Messages
183
Reaction score
9
Location
Brazil
TFS 0.3.5 server
That code will open a wall if that player had open anothers levers and get their storages ...
Hes work and open wall but i want the wall close last than 3 min i try use a Cyko script with few changes but dont work ...
Any one can help me
Will rep ++


Code:
  local config = {

    -- Wall position 1
    wall1 = {x=32864, y=32556, z=11, stackpos=1}, 
	
    -- Wall position 2
    wall2 = {x=32865, y=32556, z=11, stackpos=1}, 
	
    -- Lever position
    leverpos = {x=32800, y=32559, z=11},

	-- Time to remove teleport in Seconds
    timeToRemove = 20,
			
    }
		

	function onUse(cid, item, fromPos, item2, toPos)	
	if getPlayerStorageValue(cid,60106) == 1 and getPlayerStorageValue(cid,60107) == 1 and getPlayerStorageValue(cid,60108) == 1 and getPlayerStorageValue(cid,60109) == 1 and getPlayerStorageValue(cid,60110) == 1 and getPlayerStorageValue(cid,60111) == 1 then
	 if item.itemid == 1945 then
	 local getwall1 = getThingfromPos(config.wall1)
	 local getwall2 = getThingfromPos(config.wall2)
	        doTransformItem(item.uid,item.itemid+1)
		    doRemoveItem(getwall1.uid)
			doRemoveItem(getwall2.uid)
            doCreatureSay(cid, "The wall has been removed! Run you have 3 minutes to enter on room.", TALKTYPE_ORANGE_1)
			setPlayerStorageValue(cid,60106, -1)
            setPlayerStorageValue(cid,60107, -1)			
            setPlayerStorageValue(cid,60108, -1)	
            setPlayerStorageValue(cid,60109, -1)	
            setPlayerStorageValue(cid,60110, -1)	
            setPlayerStorageValue(cid,60111, -1)	
            addEvent(doRemoveWallE, config.timeToRemove * 1000)
			addEvent(doRemoveWallD, config.timeToRemove * 1000)
	 else
	   doCreatureSay(cid, "Maybe the lever has already been pulled or you dont pulled another levers.", TALKTYPE_ORANGE_1)
		        end
            else
            doPlayerSendCancel(cid,"Sorry, not possible.")
	end
 
    return TRUE
end 

function doRemoveWallE()
local walle = getTileItemById(config.wall1, 3474)
    if walle.uid > 0 then
        doRemoveItem(walle.uid)
        doSendMagicEffect(config.wall1, CONST_ME_POFF)
    end
end
function doRemoveWallD()
local walld = getTileItemById(config.wall2, 3475)
    if walld.uid > 0 then
        doRemoveItem(walld.uid)
        doSendMagicEffect(config.wall2, CONST_ME_POFF)
    end
end
 
addEvent(doRemoveItem, config.timeToRemove * 1000, uid, count)
else

Something like this, Ill check that later because I need that script also.
 
Sorry, I've made a mistake
That's working - checked.
addEvent(doCreateItem, config.timeToRemove * 1000, 3474, 1, config.wall1)
addEvent(doCreateItem, config.timeToRemove * 1000, 3475, 1, config.wall2)
 
Back
Top