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

Windows [TFS] Some problems

Teddy

SweStream.se
Joined
Oct 2, 2008
Messages
3,797
Reaction score
10
Location
Sweden 172
6o0nz51.gif
Problem 1 FIXED !! GO DOWN FOR PROBLEM 2 AND HELP ME PLZZ
How To Fix : Change getItemName to getItemNameById in quest script
My Quest's/all quest box Dont Work ..
13:56 You have found a chest.
But i get my item like fire sword , beholder shield and that , i also get a error in console every time i loot in a quest chest
Code:
[25/02/2009 13:56:52] Lua Script Error: [Action Interface] 
[25/02/2009 13:56:52] data/actions/scripts/quests/quests.lua:onUse
[IMG]http://i555.photobucket.com/albums/jj479/POKEALEXIS/6o0nz51.gif[/IMG]
[25/02/2009 13:56:52] luaGetItemWeight(). Item not found
Here is mine action add for quests.lua
<action itemid="1740" script="quests/quests.lua"/>
<action fromid="1747" toid="1749" script="quests/quests.lua"/>
and here is the quests.lua file
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 = getItemWeight(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 ' .. getItemName(item.uid) .. '.')
					setPlayerStorageValue(cid, 30015, 1)
				else
					doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemName(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 ' .. getItemName(item.uid) .. '.')
				doPlayerAddItem(cid, item.uid, 1)
				setPlayerStorageValue(cid, item.uid, 1)
			else
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a ' .. getItemName(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
6o0nz51.gif

IMAGE
[http://img90.imageshack.us/img90/3530/stormotland.jpg]

Same Problem Whit all my quest box...
stormotland.jpg

6o0nz51.gif

Problem 2
my second problem is that I can make an acc in Geiser ACC but I can not log into it?
then when I connect to localhost / phpmyadmin, I noticed that my acc as I did at Geiser has not come to my database accounts .. (can not log in with the acc on geisor / homesite or in-game)

______________________________________
translated by google BETA
translate_beta_res.gif
 
Last edited:
I think you shall update it to the newest TFS as i can see your using a older version from Ates.tr (dunno but i think it is , havent worked with servers a lot of time) .
Or script the chest's.

Over all you shall update it to the newest TFS.
 
it is the new TFS, but not quest system for all my old quest was on old verison so I have no time to make all quest 1 more time, do not want to do all the quest , is over 200 + quest
 
try some of this to chests
PHP:
-- simple quests based on uniqueId
-- to make quest create chest on map and set its uniqueId to id of quest item

function onUse(cid, item, frompos, item2, topos)
	prize = item.uid
	count = item.actionid

	if prize > 0 and prize < 7000 then
		queststatus = getPlayerStorageValue(cid,prize)

		if queststatus == -1 then
			if count > 1 then
				doPlayerSendTextMessage(cid,22,'You have found '.. count ..' of ' .. getItemName(prize) .. '.')
				doPlayerAddItem(cid,prize,count)
				setPlayerStorageValue(cid,prize,1)
			else
				doPlayerSendTextMessage(cid,22,'You have found a ' .. getItemName(prize) .. '.')
				doPlayerAddItem(cid,prize,1)
				setPlayerStorageValue(cid,prize,1)
			end
		else
			doPlayerSendTextMessage(cid,22,"It is empty.")
		end

		return 1
	else
		return 0
	end
end
paste it in actions/scripts/quest.lua
 
Try using this script. It's a bit modified version of the original script, so some things are different:

Chest's Action ID = ID of the Item you get (this is to make it possible to use multiple rewards of same ID on a single server, which was not possible with Unique IDs

Chest's Unique ID - Storage Value of the quest. Note that it has to be unique and not used for anything else.

The script:
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.actionid > 1000 and item.actionid < 10000 then
		local itemWeight = getItemWeight(item.actionid, 1, FALSE)
		local playerCap = getPlayerFreeCap(cid)
		if isInArray(annihilatorReward, item.actionid) == FALSE then
			if getPlayerStorageValue(cid, 30015) == -1 then
				if playerCap >= itemWeight then
					doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found ' .. getItemDescriptions(item.actionid).article .. ' ' .. getItemName(item.actionid) .. '.')
					setPlayerStorageValue(cid, 30015, 1)
				else
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found ' .. getItemDescriptions(item.actionid).article .. ' ' .. getItemName(item.actionid) .. '. Weighing ' .. itemWeight .. ' oz. is 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 ' .. getItemDescriptions(item.actionid).article .. ' ' .. getItemName(item.actionid) .. '.')
				doPlayerAddItem(cid, item.actionid, 1)
				setPlayerStorageValue(cid, item.uid, 1)
			else
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found ' .. getItemDescriptions(item.actionid).article .. ' ' .. getItemName(item.actionid) .. '. Weighing ' .. itemWeight .. ' oz. it is too heavy.')
			end
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
		end
	else
		return FALSE
	end
	return TRUE
end
 
i also got some problem whit newest TFS i dont know how to make quests whit the new quest system can anyone tell me how to make a quest, actionid:2000 and what to do then? i did add the item to the chest but i wont get any item when pressing it
 
i had both problems to but i fixed the you found a chest bug

i think you just have to download elf's tfs crying damson and take the system.lua script from the actions folder (dont forget to also copy the line in actions.xml) paste it in your actions/script folder. also add the following stuff on the quest chest/body of whatever.

action id: 2000
unique id: (id of reward)

in your map editor.

next make sure you dont test it with your gm character.

i think that should work....for the second problem i dont really know how to fix that because i still have that problem to...(im forced to use the ingame account maker).

if this helped you then plz rep me! :)

yours, jaroen2
 
i had both problems to but i fixed the you found a chest bug

i think you just have to download elf's tfs crying damson and take the system.lua script from the actions folder (dont forget to also copy the line in actions.xml) paste it in your actions/script folder. also add the following stuff on the quest chest/body of whatever.

action id: 2000
unique id: (id of reward)

in your map editor.

next make sure you dont test it with your gm character.

i think that should work....for the second problem i dont really know how to fix that because i still have that problem to...(im forced to use the ingame account maker).

if this helped you then plz rep me! :)

yours, jaroen2

ok i did not add the reward in unique id i did add the reward "in the chest" so im sure that is the problem
 
Back
Top