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

Lua Error in setting actionID for an item

zajacmp3

New Member
Joined
Jan 5, 2009
Messages
35
Reaction score
0
Location
Poland, Gdansk
Hello!
I am running TFS 0.3.6pl1 and trying to modify quest system to read another variable.

I made some progress on my own but there must be some error in my thinking.

I added ['prize_actionid'] = {XXX} to my script with NPC's for quest but I can't get it to set actionID. Instead it is giving me a item with ID XXX not actionID.

PHP:
--------for-finish-------
		if quest['prize_exp'] ~= 0 then
			doPlayerAddExperience(cid, quest['prize_exp'])
			quest_gain_exp(cid, quest)
		end
		if quest['prize_money'] ~= 0 then
			doPlayerAddMoney(cid, quest['prize_money'])
			quest_gain_money(cid, quest)
		end
		if quest['prize_items'][1] then
			for i, v in ipairs(quest['prize_items'] and quest['prize_actionid']) do
				doPlayerAddItem(cid, v, quest['prize_items_value'][i])
					for i, v in ipairs(quest['prize_actionid']) do
						doSetItemActionId(uid, quest['prize_actionid'][v])
					end
			end
		end
--------for-finish-------

Any ideas please? I am thinking on it in like 2 weeks now :/
 
Back
Top