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

(Action) Need use more of one switch for remove a rock

Albert José

Rambocop Infernus
Joined
Jun 10, 2008
Messages
88
Solutions
1
Reaction score
13
Location
Portugal
I need one script of the actions is execute for more of one switch!

\/
The Player go to 5 switch and use in order! (Use the bad order and action no is executed) Later of all they had been pulled remove the 2 rocks and later of 20 minutes the switchs back for first stage and the rocks they will reappear...

Sorry for my very, strong, ultimate bad english! :D
Thansk for your help...
 
zednem post this for me:
local UIDS = {5100, 5101, 5102}
local MISSION_STORE = 5795
local STONE_POSITION = {x = 1148, y = 1243, z = 8, stackpos = 1}
local TIME = 5 ---time in minutes the stones stay away for
local STONE_ID = 1497 --- the ID of the stones
local nice_done = "Nice! Keep that way."
local done = "You may proceed now!"

function onUse(cid, item, frompos, item2, topos)
local MISSION_STATUS = math.max(getGlobalStorageValue(MISSION_STORE),0)


if item.itemid == 1945 and MISSION_STATUS < 0 then
setGlobalStorageValue(MISSION_STORE, 0)
end
if item.itemid == 1945 and MISSION_STATUS >= 0 then
doTransformItem(item.uid, 1946, 1)
setGlobalStorageValue(MISSION_STORE, MISSION_STATUS + 1)
MISSION_STATUS = getGlobalStorageValue(MISSION_STORE)
doCreatureSay(cid, nice_done, TALKTYPE_ORANGE_1)

else
doTransformItem(item.uid, 1945, 1)
setGlobalStorageValue(MISSION_STORE, MISSION_STATUS - 1)
MISSION_STATUS = getGlobalStorageValue(MISSION_STORE)
doCreatureSay(cid, "Bad Move!", TALKTYPE_ORANGE_1)
end

if MISSION_STATUS == 3 then ------- number of levers
doCreatureSay(cid, done, TALKTYPE_ORANGE_1)
local STONE1 = getThingfromPos(STONE_POSITION)
doRemoveItem(STONE1.uid, 1)
doTransformItem(UIDS, 1945, 1)
addEvent(doReplaceStones, TIME * 1000 * 60, STONE_POSITION)
setGlobalStorageValue(MISSION_STORE, 0)
end
return 1
end


function doResetSwitches()
for u = 1, #UIDS do
doTransformItem(UIDS, 1945, 1)
end
end

function doReplaceStones(p)
doResetSwitches()
doCreateItem(STONE_ID, 1, STONE_POSITION)

end

I am thankful if it will be able to explain as I make to configure script if in the case they will be seven Switch!

local UIDS = {5100, 5101, 5102}
/\ Where I must for this?
And please post the tag for action.xml!?

Thanks for all and sorry for my bad english
 
Back
Top