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

A turtorial about advanced quests?...

nystrom

New Member
Joined
Nov 17, 2009
Messages
269
Reaction score
0
Hello i have been looking for a sulotion to my anni quests chests, i know how to make the quest work with the lever and sutch but what i dont know is how to make the chest work in a good way.
Im using TFS 0.3.6 and the 8.54 protocol on the remeres map editor.
i have been looking for a turtorial that can help me but i cant find one that helps at all, so now i woundering if someone knows a good turtorial for this type off work?
thanks.
 
In mapeditor:

ActionID = 2000.
UniqueID can be any number, but has to be different from others.
Click on the black squares and select the items.
 
In mapeditor:

ActionID = 2000.
UniqueID can be any number, but has to be different from others.
Click on the black squares and select the items.

so you mean like:
Item One.
Aid= 2000
Uid= 50017
And then Select x Item in the black squers.

Item Two
Aid= 2000
Uid= 50018 or shoud this be the same as the one above?
And then Select x Item in the black squers.
 
Correct, it shouldn't be the same, it should be different.
If you want to do something like the annihilator, it's gonna take a little bit longer to do, I can't be arsed to make a tutorial on that.
 
one question how are your server suppose to know that you alredy have taken one of the 4 items? :P
do i maybe need any kind of script for the chests? :P
 
put this into data/actions/scripts/anni as annichests.lua
Code:
function onUse(cid, item, frompos, item2, topos)

   	if item.uid == 50017 then
   		queststatus = getPlayerStorageValue(cid,50017)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,22,"You have found a Demon Armor.")
   			doPlayerAddItem(cid,2494,1)
   			setPlayerStorageValue(cid,50017,1)
   		else
   			doPlayerSendTextMessage(cid,22,"It is empty.")
   		end
   	elseif item.uid == 50018 then
   		queststatus = getPlayerStorageValue(cid,50017)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,22,"You have found a Magic Sword.")
   			doPlayerAddItem(cid,2400,1)
   			setPlayerStorageValue(cid,50017,1)
   		else
   			doPlayerSendTextMessage(cid,22,"It is empty.")
   		end
   	elseif item.uid == 50019 then
   		queststatus = getPlayerStorageValue(cid,50017)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,22,"You have found a Stonecutter Axe.")
   			doPlayerAddItem(cid,2431,1)
   			setPlayerStorageValue(cid,50017,1)
   		else
   			doPlayerSendTextMessage(cid,22,"It is empty.")
   		end
   	elseif item.uid == 50020 then
   		queststatus = getPlayerStorageValue(cid,50017)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,22,"You have found a Thunder Hammer.")
   			doPlayerAddItem(cid,2421,1)
   			setPlayerStorageValue(cid,50017,1)
   		else
   			doPlayerSendTextMessage(cid,22,"It is empty.")
   		end
	else
		return 0
   	end

   	return 1
end

And add this line into data/actions actions.xml
Code:
	<action actionid="50017" script="anni/annichest.lua"/>
And use actionID 50017 on all the quest chests and UniqueID 50017-50020 on the chests ;)

No you don't, ugh, I guess I will make a tutorial on that.
Uno momentos.

Oh I can't wait, I would like to know an easier way then this ^^
 
Go to data/actions/quests/system.lua:

Look for something like this at the top:
LUA:
local specialQuests = {
	[2001] = 30015 --Annihilator
}
Add a new quest to it:
LUA:
local specialQuests = {
        [2001] = 30015 --Annihilator
	[2002] = 45010 --New quest
}
Note: the first number is the actionID, every quest like this must have different actionID,
the second number is the storage value, ofcourse like the actionID, every quest like this must have a different storage value.


Save and close system.lua

Now go to actions.xml and add:
LUA:
<action actionid="2002" event="script" value="quests/system.lua"/>
Note: The actionID must be the same as the actionID you set in system.lua

Save and close actions.xml

Now open your mapeditor and set all the chests in the quest to have the same actionID.
So, in this case, if the actionID you set in actions.xml and system.lua is 2002, then all the chests in the quest on the map must have actionID 2002.
Then you can select the items by clicking the black square. ALSO, leave the uniqueID space as 0 for all of them as well.

Then you're all done, it should work perfectly fine!

PS: This is MUCH easier and MUCH better than what freaked1 did.
 
Ah I see! I did like that on my server about a half year ago, but I never got to start the server :/ Thank you! Now you reminded me of that way, I had totally forgot it.
 

Similar threads

Replies
4
Views
534
Back
Top