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

Quest Log - Killing In The Name of... Help me...

Seminari

Banned User
Joined
Dec 13, 2009
Messages
1,496
Reaction score
34
Location
Poland
I have a little problem with Quest Log for Killing In The Name of quest... I have a script killinginthenameof (creaturescript), script send to player number of killed monster of task... And my questions is how to "paste" this script to quest log... (quests.xml)

<mission name="Minotaurs" storageid="65001" startvalue="0" endvalue="5001">
<missionstate id="0" description="Kill 5000 minotaurs"/>
<missionstate id="1" description="You have now killed 1/5000 minotaurs"/>
<missionstate id="2" description="You have now killed 2/5000 minosow"/>
<missionstate id="3" description="You have now killed 3/5000 minotaurs"/>
<missionstate id="4" description="You have now killed 4/5000 minotaurs"/>
</mission>

So how to make this /\ short?

Sorry for my english.
 
Nah as told above there is no way to do it shorter.

I made a small lua script you can easily genarate these files with..
PHP:
function onSay(cid, words, param, channel)
	local config = {name="Minotaur",count=5000}
	
	local f,t = io.open("questlog.txt","w+"),""
	for i = 1, config.count do
		t = t .. "\n<missionstate id=\""..i.."\" description=\"You have now killed "..i.."/"..config.count.." "..(i==1 and config.name or config.name.."s").."\"/>"
	end
	f:write(t)
	f:close()
	return true
end
Just set the monster name and how many need to be killed. Then save it in talkactions/script and use the talkaction.
Now there will be a file called "questlog.txt" in your server's folder.

I also uploaded the file for minotaurs.
here: questlog.txt
 
Nah as told above there is no way to do it shorter.

I made a small lua script you can easily genarate these files with..
Code:
function onSay(cid, words, param, channel)
	local config = {name="Minotaur",count=5000}
	
	local f,t = io.open("questlog.txt","[B][COLOR="Red"]w+[/COLOR][/B]"),""
	for i = 1, config.count do
		t = t .. "\n<missionstate id=\""..i.."\" description=\"You have now killed "..i.."/"..config.count.." "..(i==1 and config.name or config.name.."s").."\"/>"
	end
	f:write(t)
	f:close()
	return true
end
Just set the monster name and how many need to be killed. Then save it in talkactions/script and use the talkaction.
Now there will be a file called "questlog.txt" in your server's folder.

I also uploaded the file for minotaurs.
here: questlog.txt
this will tottaly delete all the lines in the file then write what u wanted it to,
use;
a
or
a+
 
I can't understand your sentence..
I wanted it to erase the file when I execute it twice, because you can use the talkaction and then you copy it.
If you change the config and use it for other mobs you don't need to delete it manually.

//edit nsanee - please do not address users with 'stfu', it's offensive and might get you an infraction.
 
Last edited by a moderator:
I should use what I used w+, because I always use it in script which generate text for me and it is the easiest way.

---
 
Back
Top