• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction Create automatly quest log for tasks and other

The_Hide

Banned User
Joined
Dec 11, 2012
Messages
389
Reaction score
10
Hey i created simple talkaction, which is automatly creating quest log to my killing in the name of script

Lua:
function onSay(cid, words, param, channel)	
	local calosc = "Quest log to tasks by Seminari(The_Hide)(Iranimes)"
	for k,v in pairs(KITNO_Paw_and_Fur_tasks_tbl) do
		if k then
		task_name = k
		task_storage = v.task_started_stg
		counter_storage = v.task_counter_stg
		required_kills = v.task_required_kills
		if v.boss then
			boss_name = v.bossek_tbl.boss_name
		else 
			boss_name = 0
		end
		first_line = '<mission name="Paw and Fur - '.. task_name ..'" storageid="'.. task_storage ..'" startvalue="1" endvalue="2">'
		second_line = '\t <missionstate id="0" description="You already hunted |STORAGE:'.. counter_storage ..'|/'.. required_kills ..' '.. task_name ..'."/>'
		third_line = '\t <missionstate id="1" description="Report back to Grizzly Adams."/>'
		if boss_name ~= nil and boss_name ~= 0 then
			fourth_line = '\t <missionstate id="2" description="Find and kill '.. boss_name ..'"/>'
			fifth_line = '\t <missionstate id="3" description="Report back your task to Grizzly Adams."/>'
		end
		last_line = '</mission>'
		if fourth_line ~= nil and fifth_line ~= nil then
			calosc = ''.. first_line ..'\n'.. second_line ..'\n'.. third_line ..'\n'.. fourth_line ..'\n'.. fifth_line ..'\n'.. last_line ..'\n'
		else
			calosc = ''.. first_line ..'\n'.. second_line ..'\n'.. third_line ..'\n'.. last_line ..'\n'
		end
		f = assert(io.open("./data/logs/quests.txt", "a+"))
		f = io.open("./data/logs/quests.txt", "a+")
		f:write("\n"..calosc .."")
		f:close()
		end
	end
	return true
end



Just save it as talkaction, and then go log in to game and use command, after that u will see your quest log in logs/quests.txt

You can use this to generate your tasks if you have custom tasks, only u must change this line:
for k,v in pairs(KITNO_Paw_and_Fur_tasks_tbl) do

KITNO_Paw_and_Fur_tasks_tbl is a table in my LIB, you can find it here:
(my thread with killing in the name of quest)
http://otland.net/f81/the_hide-rl-quest-killing-name-like-rl-tibia-quest-log-dialogs-etc-176217/

in this link is LIB file:
Killing in the name of LIB by Seminari (The_Hide) - Pastebin.com
 
Back
Top