• 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 Modifiable quest

KylerXX

Active Member
Joined
Jun 24, 2010
Messages
439
Reaction score
30
The function of this script is: There are 12 levers and exists another one that is the lever 13, and if you use all 12 leverrs and you go to the 13 lever you get a reward, but, if you go to lever 13 and you dont use the 12 levers one message informing will be appeared :>
Sorry for bad english.
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local storage = 67675 -- Storage to use on levers.
local storagequest = 6667 -- Storage of quest
--actionids 1-12 levers[xxx] .
local aid = {
[5555] = {1},
[5556] = {2},
[5557] = {3},
[5558] = {4},
[5559] = {5},
[5560] = {6},
[5561] = {7},
[5562] = {8},
[5563] = {9},
[5564] = {10},
[5565] = {11},
[5566] = {12}
}
-- Action id 13lever[xxx]--
local oid = {
[5567] = {}
}
local oids = oid[item.actionid]
-- dnt touch
local stors = {[1] = {},[2] = {},[3] = {},[4] = {},[5] = {},
[6] = {},[7] = {},[8] = {},[9] = {},[10] = {},[11] = {},[12] = {}
}
local stor = stors[getPlayerStorageValue(cid, storage)]
local aids = aid[item.actionid]
-----------
--dont touch please :>
if item.itemid > 0 then
	if aids then
		setPlayerStorageValue(cid, storage, aids[1])
		end
	end
if item.itemid > 0 then
	if oids then
		if stor then
			if getPlayerStorageValue(cid,storagequest) ~= 1 then 
			doPlayerAddItem(cid, 2160, 100)
			doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, "You found the 12 levers take your reward: 100 cc.")
				setPlayerStorageValue(cid, storagequest, 1)
				else
				doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, "You have finished this quest.")
 
			end
		else
		doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, "You need to find all levers!")
 
			end
		end
	end
return true
end

actions.xml:
Code:
<action actionid="5555;5567" event="script" value="name.lua"/>


i hope you like it :$
 
Last edited:
thats pretty much the 16poi levers. i mean its slightly different but still nothing special. but at least your trying stuff your self and releasing it. so nice work!
 
Could be improved, and fix the "You have founded" it should be "You have found". Nothing special, just wanted to let you know. :)
 
thanks, but this is why my lenguage is spanish and i dont have good english
 
Nice effective script. It could have alot of functions on different tasks so well done
 
Back
Top