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

how to creat a advance quest,

nystrom

New Member
Joined
Nov 17, 2009
Messages
269
Reaction score
0
hello i have bein trying all evning to make a quest like anni, and after many fails i tryed to find a guide, yes i found some but not how i creat the chests..
(its only the chests that i have problem with) i dont know how to make them and add them with the map editor. and yes i know that there is a script for each chest :P
Does some one know a good guide for this sort of quests? please let me know.

* i am using TFS 0.3.6
 
Last edited:
put the chests as actionid 2000 and unique ID something random below 65535 like 62348 and same on all of them, same uID means you can only take one of them :)
And put the item(s) inside the chest
 
put the chests as actionid 2000 and unique ID something random below 65535 like 62348 and same on all of them, same uID means you can only take one of them :)
And put the item(s) inside the chest

i got this script, isnt this one needed? :P

PHP:
function onUse(cid, item, frompos, item2, topos)

   	if item.uid == 5006 then
   		queststatus = getPlayerStorageValue(cid,5010)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,22,"You have found a Demon Armor.")
   			doPlayerAddItem(cid,2494,1)
   			setPlayerStorageValue(cid,5010,1)
   		else
   			doPlayerSendTextMessage(cid,22,"It is empty.")
   		end
   	elseif item.uid == 5007 then
   		queststatus = getPlayerStorageValue(cid,5010)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,22,"You have found a Magic Sword.")
   			doPlayerAddItem(cid,2400,1)
   			setPlayerStorageValue(cid,5010,1)
   		else
   			doPlayerSendTextMessage(cid,22,"It is empty.")
   		end
   	elseif item.uid == 5008 then
   		queststatus = getPlayerStorageValue(cid,5010)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,22,"You have found a Stonecutter Axe.")
   			doPlayerAddItem(cid,2431,1)
   			setPlayerStorageValue(cid,5010,1)
   		else
   			doPlayerSendTextMessage(cid,22,"It is empty.")
   		end
   	elseif item.uid == 5009 then
   		queststatus = getPlayerStorageValue(cid,5010)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,22,"You have found a Blessed Sceptre.")
   			doPlayerAddItem(cid,7429,1)
   			setPlayerStorageValue(cid,5010,1)
   		else
   			doPlayerSendTextMessage(cid,22,"It is empty.")
   		end
	else
		return 0
   	end

   	return 1
end
 
LUA:
local t = {
        [2266] = itemid ,
        [2255] = itemid,
        [2244] = itemid,
		--[action id] = item id
        s = 12312 
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local v = t[getItemAttribute(item.uid, 'aid')]
        if getPlayerStorageValue(cid, t.s) == -1 then
                doPlayerAddItem(cid, v, 1)
                doPlayerSendTextMessage(cid, 21, "You received your reward!")
                setPlayerStorageValue(cid, t.s, 1)
        else
                doPlayerSendCancel(cid, "This chest is empty")
        end
return TRUE
end
then on the map editor, create a chest or use a chest that is there already, and change its actionid, and set any uniqueid
 
LUA:
local t = {
        [2266] = itemid ,
        [2255] = itemid,
        [2244] = itemid,
		--[action id] = item id
        s = 12312 
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local v = t[getItemAttribute(item.uid, 'aid')]
        if getPlayerStorageValue(cid, t.s) == -1 then
                doPlayerAddItem(cid, v, 1)
                doPlayerSendTextMessage(cid, 21, "You received your reward!")
                setPlayerStorageValue(cid, t.s, 1)
        else
                doPlayerSendCancel(cid, "This chest is empty")
        end
return TRUE
end
then on the map editor, create a chest or use a chest that is there already, and change its actionid, and set any uniqueid

that does not work for me, or maybe i dont understand what you mean. =(
 
Back
Top