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

Tfs 0.2 to 0.3

ScorpiOOn93

etherno.net
Joined
Jun 19, 2008
Messages
662
Reaction score
1
Location
CookieLand :DDD
Hello
I have problem with updating tfs 0.2 to 0.3
All is fine without doors and quests. It's beacouse tfs 0.2 have quests in map editor + chest.lua, but tfs 0.3 have quests only in map editor, and now what i must to do, beacouse my quests don't work (they work, but they give the wrong item ^^).
My questions are:
-What i should to do with the chests? I must change something in source? :/
-What i must to do with doors, beacouse normal doors are working, but lvl doors like in 0.2 (1000 + lvl as action.id) don't work :|
 
Replace newest quest system with old quest system.

actions
Code:
	<!-- Old quest system-->
	<action itemid="1740" script="quests/old_system.lua"/>
	<action fromid="1747" toid="1749" script="quests/old_system.lua"/>

old_system
Code:
local annihilatorReward = {1990, 2400, 2431, 2494}
function onUse (cid, item, fromPosition, itemEx, toPosition)
	if item.uid > 1000 and item.uid < 10000 then
		local itemWeight = getItemWeightById(item.uid, 1, FALSE)
		local playerCap = getPlayerFreeCap(cid)
		if isInArray(annihilatorReward, item.uid) == TRUE then
			if getPlayerStorageValue(cid, 30015) == -1 then
				if playerCap >= itemWeight then
					if item.uid == 1990 then
						local container = doPlayerAddItem(cid, 1990, 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 ' .. itemWeight .. ' oz it\'s too heavy.')
				end
			else
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
			end
		elseif getPlayerStorageValue(cid, item.uid) == -1 then
			if playerCap >= itemWeight then
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(item.uid) .. '.')
				doPlayerAddItem(cid, item.uid, 1)
				setPlayerStorageValue(cid, item.uid, 1)
			else
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemNameById(item.uid) .. ' weighing ' .. itemWeight .. ' oz it\'s too heavy.')
			end
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
		end
	else
		return FALSE
	end
	return TRUE
end


Doors are working fine for me.

Btw. If you are changing from 0.2 to 0.3, download 0.3 from repository or where do you want, and then, make changes which you have made in 0.2 (copy your scripts, additional modifications etc.) it's better to make changes to 0.3 than replace just exe file and relair errors.

Regards,
Hermes
 
I was thinking about changing the files, but you know...
I don't have in 0.2 something like quests/system.lua
Quests files are data/scripts/quests.lua and data/scripts/chest.lua

#Edit
Ok with doors i didn't have problems and they are working, but still I have problem with chests :|
 
Last edited:
Back
Top