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

Hermes Quest System problem

Serevius

New Member
Joined
Aug 19, 2007
Messages
23
Reaction score
0
Hello, I can open my serv without problems, but when I open a quest chest in the game.. look:




jmm.png


:confused:
 
Sorry xD

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(getPlayerCustomFlagValue(cid, PlayerCustomFlag_GamemasterPrivileges) == TRUE) then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are not allowed to get rewards from quests.")
		return TRUE
	end
	if isInArray({1990, 2400, 2431, 2494}, item.uid) == TRUE then
		if getPlayerStorageValue(cid, 30015) < 0 then
			if getPlayerFreeCap(cid) >= getItemWeightById(item.uid, 1, FALSE) then
				if item.uid == 1990 then
					local container = doPlayerAddItem(cid, 1987, 1)
					doAddContainerItem(container, 2326, 1)
				else
					doPlayerAddItem(cid, item.uid, 1)
				end
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(item.uid) .. '.')
				setPlayerStorageValue(cid, 30015, 1)
			else
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(item.uid) .. ' weighing ' .. getItemWeightById(item.uid, 1, FALSE) .. ' oz it\'s too heavy.')
			end
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
		end
	end
	for _, questTable in pairs(questList) do
		if(isInArray({questTable.uniqueId}, item.uid) == TRUE) then
			if(getPlayerStorageValue(cid, questTable.uniqueId) < 0) then
				if(getPlayerLevel(cid) < questTable.neededLevel) then
					doPlayerSendCancel(cid, "You need to have " .. questTable.neededLevel .. " level to open this chest")
					return TRUE
				end
				local itemWeight = getItemWeightById(questTable.itemReward, 1, FALSE)
				if(getPlayerFreeCap(cid) < itemWeight) then
					doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(questTable.itemReward) .. ' weighing ' .. itemWeight .. ' oz it\'s too heavy.')
					return TRUE
				end
				if(questTable.experience > 0 and questTable.itemReward > 0) then
					doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found " .. getItemArticleById(questTable.itemReward) .. " " .. getItemNameById(questTable.itemReward) .. " and gained " .. questTable.experience .. " experience points.")
					doPlayerAddItem(cid, questTable.itemReward, 1)
					doPlayerAddExp(cid, questTable.experience)
					doSendAnimatedText(getPlayerPosition(cid), '' .. questTable.experience .. '', 215)
				elseif(questTable.experience == 0) then
					doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found " .. getItemArticleById(questTable.itemReward) .. " " .. getItemNameById(questTable.itemReward) .. ".")
					doPlayerAddItem(cid, questTable.itemReward, 1)
				elseif(questTable.itemReward == 0) then
					doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have gained " .. questTable.experience .. " experience points.")
					doPlayerAddExp(cid, questTable.experience)
					doSendAnimatedText(getPlayerPosition(cid), '' .. questTable.experience .. '', 215)
				end
				setPlayerStorageValue(cid, questTable.uniqueId, 1)
				return TRUE
			else
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
			end
		else
			return FALSE
		end
	end
	return TRUE
end
 
try this
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Hermes Quest System" version="1.0" author="Unknown" contact="Unknown" enabled="yes">
	<action itemid="UNKNOWN" event="buffer"><![CDATA[
		if getPlayerCustomFlagValue(cid, PlayerCustomFlag_GamemasterPrivileges) then
			doPlayerSendCancel(cid, "You are not allowed to get rewards from quests.")
		end
		if isInArray({1990, 2400, 2431, 2494}, item.uid) then
			if getPlayerStorageValue(cid, 30015) < 0 then
				if getPlayerFreeCap(cid) >= getItemWeightById(item.uid, 1, false) then
					if item.uid == 1990 then
						local container = doPlayerAddItem(cid, 1987, 1)
						doAddContainerItem(container, 2326, 1)
					else
						doPlayerAddItem(cid, item.uid, 1)
					end
					doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(item.uid) .. '.')
					setPlayerStorageValue(cid, 30015, 1)
				else
					doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(item.uid) .. ' weighing ' .. getItemWeightById(item.uid, 1, FALSE) .. ' oz it is too heavy.')
				end
			else
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
			end
		end
		for _, questTable in ipairs(questList) do
			if(isInArray({questTable.uniqueId}, item.uid) == true) then
				if(getPlayerStorageValue(cid, questTable.uniqueId) < 0) then
					if(getPlayerLevel(cid) < questTable.neededLevel) then
						doPlayerSendCancel(cid, "You need to have " .. questTable.neededLevel .. " level to open this chest")
						return true
					end
					local itemWeight = getItemWeightById(questTable.itemReward, 1, FALSE)
					if(getPlayerFreeCap(cid) < itemWeight) then
						doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(questTable.itemReward) .. ' weighing ' .. itemWeight .. ' oz it\'s too heavy.')
						return true
					end
					if(questTable.experience > 0 and questTable.itemReward > 0) then
						doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found " .. getItemArticleById(questTable.itemReward) .. " " .. getItemNameById(questTable.itemReward) .. " and gained " .. questTable.experience .. " experience points.")
						doPlayerAddItem(cid, questTable.itemReward, 1)
						doPlayerAddExp(cid, questTable.experience)
						doSendAnimatedText(getPlayerPosition(cid), '' .. questTable.experience .. '', 215)
					elseif(questTable.experience == 0) then
						doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found " .. getItemArticleById(questTable.itemReward) .. " " .. getItemNameById(questTable.itemReward) .. ".")
						doPlayerAddItem(cid, questTable.itemReward, 1)
					elseif(questTable.itemReward == 0) then
						doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have gained " .. questTable.experience .. " experience points.")
						doPlayerAddExp(cid, questTable.experience)
						doSendAnimatedText(getPlayerPosition(cid), '' .. questTable.experience .. '', 215)
					end
					setPlayerStorageValue(cid, questTable.uniqueId, 1)
				else
					doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
				end
			else
				return true
			end
			break
		end
		return true
	]]></action>
</mod>
 
I don't have that folder :S
lol wat?
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(getPlayerCustomFlagValue(cid, PlayerCustomFlag_GamemasterPrivileges) == TRUE) then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are not allowed to get rewards from quests.")
		return TRUE
	end
	if isInArray({1990, 2400, 2431, 2494}, item.uid) == TRUE then
		if getPlayerStorageValue(cid, 30015) < 0 then
			if getPlayerFreeCap(cid) >= getItemWeightById(item.uid, 1, FALSE) then
				if item.uid == 1990 then
					local container = doPlayerAddItem(cid, 1987, 1)
					doAddContainerItem(container, 2326, 1)
				else
					doPlayerAddItem(cid, item.uid, 1)
				end
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(item.uid) .. '.')
				setPlayerStorageValue(cid, 30015, 1)
			else
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(item.uid) .. ' weighing ' .. getItemWeightById(item.uid, 1, FALSE) .. ' oz it\'s too heavy.')
			end
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
		end
	end
	for _, questTable in ipairs(questList) do
		if(isInArray({questTable.uniqueId}, item.uid) == TRUE) then
			if(getPlayerStorageValue(cid, questTable.uniqueId) < 0) then
				if(getPlayerLevel(cid) < questTable.neededLevel) then
					doPlayerSendCancel(cid, "You need to have " .. questTable.neededLevel .. " level to open this chest")
					return TRUE
				end
				local itemWeight = getItemWeightById(questTable.itemReward, 1, FALSE)
				if(getPlayerFreeCap(cid) < itemWeight) then
					doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(questTable.itemReward) .. ' weighing ' .. itemWeight .. ' oz it\'s too heavy.')
					return TRUE
				end
				if(questTable.experience > 0 and questTable.itemReward > 0) then
					doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found " .. getItemArticleById(questTable.itemReward) .. " " .. getItemNameById(questTable.itemReward) .. " and gained " .. questTable.experience .. " experience points.")
					doPlayerAddItem(cid, questTable.itemReward, 1)
					doPlayerAddExp(cid, questTable.experience)
					doSendAnimatedText(getPlayerPosition(cid), '' .. questTable.experience .. '', 215)
				elseif(questTable.experience == 0) then
					doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found " .. getItemArticleById(questTable.itemReward) .. " " .. getItemNameById(questTable.itemReward) .. ".")
					doPlayerAddItem(cid, questTable.itemReward, 1)
				elseif(questTable.itemReward == 0) then
					doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have gained " .. questTable.experience .. " experience points.")
					doPlayerAddExp(cid, questTable.experience)
					doSendAnimatedText(getPlayerPosition(cid), '' .. questTable.experience .. '', 215)
				end
				setPlayerStorageValue(cid, questTable.uniqueId, 1)
				return TRUE
			else
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
			end
		else
			return FALSE
		end
		break
	end
	return TRUE
end
replace
 
Doesn't work..

also I have the folder XML with the quest.xml
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerCustomFlagValue(cid, PlayerCustomFlag_GamemasterPrivileges) then
		return doPlayerSendCancel(cid, "You may not open this chest.")
	end
	local v = {
		[1990] = {storage = 30015},
		[2400] = {storage = 30015},
		[2431] = {storage = 30015},
		[2494] = {storage = 30015}
	}
	local t = v[item.uid]
	if t then
		if getPlayerStorageValue(cid, t.storage) == -1 then
			if getPlayerFreeCap(cid) >= getItemWeightById(t, 1, FALSE) then
				if item.uid == 1990 then
					local container = doPlayerAddItem(cid, 1987, 1)
					doAddContainerItem(container, 2326, 1)
				else
					doPlayerAddItem(cid, t, 1)
				end
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(item.uid) .. '.')
				setPlayerStorageValue(cid, t.storage, 1)
			else
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(item.uid) .. ' weighing ' .. getItemWeightById(item.uid, 1, FALSE) .. ' oz it\'s too heavy.')
			end
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
		end
	end
	return true
end
i still dont get wats it for ;S
 
Well, easy and you don't need script =D

1- make action ID = 2000
2- make unque ID = XXX number which not used on server so mmm make it 20k
so it will be 20000
okay?

now go to blank spaces and add what ever item u want so we will put in search id 2275.

and now save and go to game it will be working fine :D

Rep++ if I help =p
 
Well, it's my old questsystem :p. You have a file: quests.lua in data/lib. All quests are stored there. If you don't have this file, copy from The End server.

If you think it's not your fault, then please wait for the new version of The End server, which will include my newest QS.
 
Thank all for answering.

I did what told me Hermes and now the server don't show me any error, but the character opens the chest and there's nothing inside.
 
Well, it's my old questsystem :p. You have a file: quests.lua in data/lib. All quests are stored there. If you don't have this file, copy from The End server.

If you think it's not your fault, then please wait for the new version of The End server, which will include my newest QS.

when will the new version of the end server come out? :p
 
Back
Top