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

Quest list command

breadmaker

New Member
Joined
Jul 16, 2010
Messages
160
Reaction score
3
Hello
I need quest list commands by command: !quests

When i dont have any quest done i see the list on red color like that:

Annihilator - uncompleted
DHQ - uncompleted
Yalahar Service - uncompleted
blabla - uncompleted

When i got 1 quest complete i see something about that:
Annihilator - uncompleted
DHQ - completed
Yalahar Service - uncompleted
blabla - uncompleted

When i got all quests completed i see it like that:

Annihilator - completed
DHQ - completed
Yalahar Service - completed
blabla - completed

Anyone could make that ?
Ofc the storages needed for quests :) I can write it myself to script.
 
LUA:
function onSay(cid, words, param)
	if getPlayerStorageValue(cid,1234) == 1 then
		doPlayerSendTextMessage(cid, 20,"DHQ - completed.")
	else
		doPlayerSendTextMessage(cid, 20,"DHQ - uncompleted.")
	end

	if getPlayerStorageValue(cid,1235) == 1 then
		doPlayerSendTextMessage(cid, 20,"INQ - completed.")
	else
		doPlayerSendTextMessage(cid, 20,"INQ - uncompleted.")
	end
end

Some kind of this.
At end of quest (np when taking reward from DHQ) u must add a line:
LUA:
setPlayerStorageValue(cid,1234,1)

:)
 
LUA:
local quest =
{
	[3002] = { start = 1 , eNd = 5, name = "a F.. quest name"},
	[3003] = { start = 1, eNd = 1, name = "a F.. quest name"},
}

function onSay(cid, words, param)
	str = "Quests: "
	
	for i,x in pairs (quest) do 
		local st = getPlayerStorageValue(cid, i)
		str = str.."\n ".. x.name .. " ["..(st >= x.start and st == eNd and "Completed" or "Uncompleted").. "]"
	end
	
	doPlayerPopupFYI(cid, str)
end
How to edit the quests?, you can add more lines like this to the quest table
Code:
[COLOR="#0000FF"][3002][/COLOR] = { [COLOR="#00FFFF"]start = 1[/COLOR] , [COLOR="#000080"]eNd = 5[/COLOR],[COLOR="#FF0000"] name = "a F.. quest name"[/COLOR]},

Storage of the quest
Start storage of the quest
End storage of the quest
Name of the quest
 
Last edited:
Hah
doPlayerPopupFYI(cid, str)
bad idea, because if u have many lines, u will be debuged ;]

better use this one:
doShowTextDialog(cid, itemid, text)

in your script will be:
doShowTextDialog(cid, 1111, str)

itemid is icon which u see in dialog box
 
Back
Top