• 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 make quests?

LoLaye

Active Member
Joined
Dec 23, 2008
Messages
3,774
Solutions
1
Reaction score
44
Location
Sweden
Hello guys,

I need help to make quests on TFS 0.3.6 well i've tried all ways i found in otland / otfans / other forums , but nothing that works....

I've tried actionid 2000 and the uniqueid like 20001 and other things but its still not working,

Any help?i'll give rep++ for the one/ones that answer;)

Kind regards,

Lolaye
 
well i got a pic sec ill show ya

5dnqxz.jpg


butbut i dont write anything in actions.xml
 
Look, From my old server.

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


	if item.uid == 50020 then
		if getPlayerStorageValue(cid,50020) == -1 then
			doPlayerSendTextMessage(cid,25,"You have found a dragon lance.")
			doPlayerAddItem(cid,2414,1)
			setPlayerStorageValue(cid,50020,1)
		else
			doPlayerSendTextMessage(cid,25,"This chest is empty. You've already done this quest!")
		end
	
	end
	return TRUE
end

Try rechange ids reward msg and all ^^
 
Well what I do and what works is:

Go to \actions\actions.xml.

There I add the line
<action uniqueid="XXXX" script="XXXX.lua" />

Put at the uniqueid the same ID as you did in the editor at Unique ID. So not action ID!!
At script put the name of the .lua file you're gonna create. So if you have a file called Xiner and 1000 as your unique ID, it should be like this:
<action uniqueid="1000" script="xiner.lua" />

Then I make a new lua file and add this:
Lua:
function onUse(cid, item, frompos, item2, topos)

   	if item.uid == XXXX then
   		queststatus = getPlayerStorageValue(cid,XXXX)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,22,"You have found an Itemname.")
   			doPlayerAddItem(cid,YYYY,AA)
   			setPlayerStorageValue(cid,XXXX,1)
   		else
   			doPlayerSendTextMessage(cid,22,"It is empty.")   		
   		end
	else
		return 0
   	end

   	return 1
end

At the XXXX put the unique ID as you did in actions.xml and the editor.
At YYYY put the ID of the item you want to get out of the chest.
At AA put the amount you want to get of the item. So if you want 10 gold out of it, put 10 there. If you don't want to use an amount, just put 1.

I don't know if this is clear to you, but it works at me like this. BTW I'm using cryingdamson6pl-gui. ^^

If it still doesn't work, look how other quests are made. That's a great way to discover things in a server. Just copy and paste and fill your own content in. :)
 
Back
Top Bottom