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

Inquisition quest

Dankoo

Active Member
Joined
Sep 4, 2010
Messages
1,007
Reaction score
27
I'm looking for a inquisition quest like global, with NPCs and stuff... Already searched forums but couldn't find an script the way I want u know

Is there a inqui just like this?

The Inquisition Quest/Spoiler - TibiaWiki - Quests, Items, Spells, and more

If not, I'm willing to create one, if someone wants to join, each do one part of the script etc

So... Starting...

00:39 Henricus: Greetings, fellow believer Doom! Want to know more about the inquisitors?
00:39 Doom [128]: inquisitor
00:39 Henricus: The churches of the gods entrusted me with the enormous and responsible task to lead the inquisition. I leave the field work to inquisitors who I recruit from fitting people that cross my way. We are currently looking for brave adventurers to join the inquisition.
00:39 Doom [128]: join
00:39 Henricus: Do you want to join the inquisition?
00:39 Doom [128]: yes
00:39 Henricus: So be it. Now you are a member of the inquisition. You might ask me for a mission to raise in my esteem.
00:39 Doom [128]: mission
00:39 Henricus: Let's see if you are worthy. Take an inquisitor's field guide from the box in the back room. ...
00:39 Henricus: Follow the instructions in the guide to talk to the Thaian guards that protect the walls and gates of the city and test their loyalty. Then report to me about your mission.
00:39 Doom [128]: yes
00:39 Doom [128]: mission
00:39 Henricus: Your current mission is to investigate the reliability of certain guards. Are you done with that mission?
00:39 Doom [128]: yes
00:40 Doom [128]: no
00:40 Henricus: Good Bye. Doom!
Next step: Inquisition Field Guide... Does anyone knows what is written on it?

Mission 1: The Interrogation [done]

Starting Mission 2: The Eclipse

Anyone willing to help build an perfect inquisition?

Further development... Gogo ppl let's do it ¬¬"

88631777.jpg


real:
c3fg6au0inquisition3.PNG

w91grxh7inquisition5.PNG

flz6d4nkinquisition4.PNG


Mission 2 complete

16:47 Doom [128]: hi
16:47 Henricus: Greetings, fellow believer Doom!
16:47 Doom [128]: mission
16:47 Henricus: Listen, we have information about a heretic coven that hides in a mountain called the Big Old One. The witches reach this cursedplace on flying brooms and think they are safe there. ...
16:47 Henricus: Use this vial of holy water to destroy the brew. Also steal their grimoire and bring it to me.
16:47 Henricus: I've arranged a flying carpet that will bring you to their hideout. Travel to Femor Hills and tell the carpet pilot the code word 'eclipse' ...
16:47 Henricus: He'll bring you to your destination. At their meeting place, you'll find a cauldron in which they cook some forbidden brew ...
16:47 Henricus: Use this vial of holy water to destroy the brew. Also steal their grimoire and bring it to me.
16:48 Doom [128]: mission
16:48 Henricus: Your current mission is to destroy this coven. Are you done with that mission?
16:48 Doom [128]: yes
16:48 Henricus: Fine, fine. You have proven that you can work efficiently. Still, only further missions will show if you're are truly capable. Ask mefor another mission if you're ready.
64413433.jpg


Starting mission 3... Still looking for ppl to help building this :]

crap, NPC Storku's conversation isn't available in the site

Does anyone knows what he was suppose to say?

chatlog:
You: Hi
Storkus:
You: Mission
Storkus:
You: Yes
Storkus:
You: Bye

¬¬"
 
Last edited by a moderator:
Ok, I'm in then, Idk much about LUA, still learning,but I will give my best and its a good practice too.
 
Ok, I'm in then, Idk much about LUA, still learning,but I will give my best and its a good practice too.

yeah, that's the spirit :]

good will to help is enough, lua scripting is consequence :]

I'm stuck at Mission 3: Vampire Hunt, I don't know the sentences of NPC Storkus =/
 
Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

local Topic, storage, sorrymessage = {}, 9020, "Sorry, ye' don't have enough tokens to progress in rank..."
local ranks = {
	[0] = "You don't have any rank yet.",
	[1] = "You are fluke rank now.",
	[2] = "You are lucky rank now.",
	[3] = "You are determined rank now.",
	[4] = "You are painstaking rank now.",
	[5] = "You are obliterative rank now.",
	[6] = "You are razing rank now."
}
local tokens = {
	[0] = {"Ye' brought the token needed to advance to the first vampire hunter rank. I consider that a fluke, but still, congrats! Let me share some of my experience with ye'.", 1, 1000},
	[1] = {"Ye' brought the four tokens needed to advance to the second vampire hunter rank. Pretty lucky ye' are! Let me share some of my experience with ye'.", 4, 5000},
	[2] = {"Ye' brought the five tokens needed to advance to the third vampire hunter rank. Wow, you're pretty determined! Let me share some of my experience with ye'.", 5, 10000},
	[3] = {"Ye' brought the ten tokens needed to advance to the fourth vampire hunter rank. You're absolutely painstaking! Let me share some of my experience with ye'.", 10, 20000},
	[4] = {"Ye' brought the thirty tokens needed to advance to the fifth vampire hunter rank. You're cpletely obliterative, kid! Let me share some of my experience with ye'.", 30, 50000},
	[5] = {"Ye' brought the fifty tokens needed to advance to the last vampire hunter rank. Now that's something. You're razing-amazing! Let me share some of my experience and a little something with ye'!", 50, 100000}
}

function onCreatureAppear(cid)				npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) 			npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) 	npcHandler:onCreatureSay(cid, type, msg) end
function onThink() 						npcHandler:onThink() end

function creatureSayCallback(cid, type, msg)
	if(not npcHandler:isFocused(cid)) then
		return false
	elseif msgcontains(msg, "token") then
		local cpl = getPlayerStorageValue(cid, storage) == 6
		npcHandler:say(cpl and "You are the highest vampire hunter rank now." or "Would ye' like to give me vampire tokens?", cid)
		Topic[cid] = cpl and 0 or 1
	elseif msgcontains(msg, "rank") then
		npcHandler:say(ranks[math.max(0, getPlayerStorageValue(cid, storage))], cid)
		Topic[cid] = 0
	elseif Topic[cid] == 1 then
		local str = getPlayerStorageValue(cid, storage)
		if msgcontains(msg, "yes") then
			local mode = str < 1 and 0 or str
			if doPlayerRemoveItem(cid, 9020, tokens[mode][2]) == TRUE then
				npcHandler:say(tokens[mode][1], cid)
				setPlayerStorageValue(cid, storage, mode + 1)
				doPlayerAddExp(cid, tokens[mode][3], TRUE, TRUE)
				if tokens[mode][4] then
					doPlayerAddItem(cid, 9019, 1)
				end
			else
				npcHandler:say(sorrymessage, cid)
			end
		else
			npcHandler:say("Sure, come back when ye'll have enough tokens.", cid)
		end
		Topic[cid] = 0
	elseif msgcontains(msg, "job") then
		npcHandler:say("I used to be a carpenter, but that was ages ago. Now I'm a vampire hunter.", cid)
		Topic[cid] = 0
	elseif msgcontains(msg, "name") then
		npcHandler:say("My name is Storkus Dustmaker, son of Fire from the Savage Axes.", cid)
		Topic[cid] = 0
	elseif msgcontains(msg, "vampire") and msgcontains(msg, "hunter") then
		npcHandler:say("Yeah, that's my profession. If ye' want to learn more about it, ye will have to get some field experience. Nothing I could tell ye' would prepare ye' for the real thing.", cid)
		Topic[cid] = 0
	elseif msgcontains(msg, "inquisition") then
		npcHandler:say("As long as they're helpful, I'm not asking questions, ye' know?", cid)
		Topic[cid] = 0
	end
	return true
end

npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye, |PLAYERNAME|.")
npcHandler:setMessage(MESSAGE_GREET, "Greetings, |PLAYERNAME|!")
npcHandler:setMessage(MESSAGE_WALKAWAY, "Bye!")

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
Hah, that's why I love cyk ;]

but, just to record, he was suppose to ask for 20 vampire dusts, probably to prove yourself as a vampire killer, then he gives you the mission of killing "The Count", and so on developing Inquisition quest... I'll try to complete the script, thanks a lot cyk :}

like:

Lua:
if msg:lower() == "inquisition" and getPlayerStorageValue(cid,92224) == -1 then
		npcHandler:say("As long as they're helpful, I'm not asking questions, ye' know?", cid)
		Topic[cid] = 0
                elseif msg:lower() == "inquisition" and getPlayerStorageValue(cid,92224) == 1 then
                doremoveitem 20 vamp dust
                setplayerstoragevalue 92225 1
                selfsay "go kill the count"
end

Something like this should work? (of course, respecting lua functions, parameters etc, I wrote like that just for example)
 
Ok, it's working...

Already made my own version of The Count lair:

46057900.jpg


In real
ymj7g4giinq2.PNG


I'll do it later, but if anyone have an script like this so I can use as a base, it would help:

Player uses the coffin, and The Count is summoned
If a garlick Necklace is put at each of those pedestals, the boss summonned is a weaker one, like a Weaker The Count...

-- edit --

count lair v2

30096466.jpg


count lair v3 lol

54543912.jpg
 
Last edited:
Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
 
local Topic, storage, sorrymessage = {}, 9020, "Sorry, ye' don't have enough tokens to progress in rank..."
local ranks = {
	[0] = "You don't have any rank yet.",
	[1] = "You are fluke rank now.",
	[2] = "You are lucky rank now.",
	[3] = "You are determined rank now.",
	[4] = "You are painstaking rank now.",
	[5] = "You are obliterative rank now.",
	[6] = "You are razing rank now."
}
local tokens = {
	[0] = {"Ye' brought the token needed to advance to the first vampire hunter rank. I consider that a fluke, but still, congrats! Let me share some of my experience with ye'.", 1, 1000},
	[1] = {"Ye' brought the four tokens needed to advance to the second vampire hunter rank. Pretty lucky ye' are! Let me share some of my experience with ye'.", 4, 5000},
	[2] = {"Ye' brought the five tokens needed to advance to the third vampire hunter rank. Wow, you're pretty determined! Let me share some of my experience with ye'.", 5, 10000},
	[3] = {"Ye' brought the ten tokens needed to advance to the fourth vampire hunter rank. You're absolutely painstaking! Let me share some of my experience with ye'.", 10, 20000},
	[4] = {"Ye' brought the thirty tokens needed to advance to the fifth vampire hunter rank. You're cpletely obliterative, kid! Let me share some of my experience with ye'.", 30, 50000},
	[5] = {"Ye' brought the fifty tokens needed to advance to the last vampire hunter rank. Now that's something. You're razing-amazing! Let me share some of my experience and a little something with ye'!", 50, 100000}
}
 
function onCreatureAppear(cid)				npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) 			npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) 	npcHandler:onCreatureSay(cid, type, msg) end
function onThink() 						npcHandler:onThink() end
 
function creatureSayCallback(cid, type, msg)
	if(not npcHandler:isFocused(cid)) then
		return false
	elseif msgcontains(msg, "token") then
		local cpl = getPlayerStorageValue(cid, storage) == 6
		npcHandler:say(cpl and "You are the highest vampire hunter rank now." or "Would ye' like to give me vampire tokens?", cid)
		Topic[cid] = cpl and 0 or 1
	elseif msgcontains(msg, "rank") then
		npcHandler:say(ranks[math.max(0, getPlayerStorageValue(cid, storage))], cid)
		Topic[cid] = 0
	elseif Topic[cid] == 1 then
		local str = getPlayerStorageValue(cid, storage)
		if msgcontains(msg, "yes") then
			local mode = str < 1 and 0 or str
			if doPlayerRemoveItem(cid, 9020, tokens[mode][2]) then
				npcHandler:say(tokens[mode][1], cid)
				setPlayerStorageValue(cid, storage, mode + 1)
				doPlayerAddExp(cid, tokens[mode][3])
				if tokens[mode][4] then
					doPlayerAddItem(cid, 9019, 1)
				end
			else
				npcHandler:say(sorrymessage, cid)
			end
		else
			npcHandler:say("Sure, come back when ye'll have enough tokens.", cid)
		end
		Topic[cid] = 0
	elseif msgcontains(msg, "job") then
		npcHandler:say("I used to be a carpenter, but that was ages ago. Now I'm a vampire hunter.", cid)
		Topic[cid] = 0
	elseif msgcontains(msg, "name") then
		npcHandler:say("My name is Storkus Dustmaker, son of Fire from the Savage Axes.", cid)
		Topic[cid] = 0
	elseif msgcontains(msg, "vampire") and msgcontains(msg, "hunter") then
		npcHandler:say("Yeah, that's my profession. If ye' want to learn more about it, ye will have to get some field experience. Nothing I could tell ye' would prepare ye' for the real thing.", cid)
		Topic[cid] = 0
	elseif msgcontains(msg, "inquisition") or msgcontains(msg, "mission") then
		local v = getPlayerStorageValue(cid, 92224)
		if v == -1 then
			npcHandler:say("As long as they're helpful, I'm not asking questions, ye' know?", cid)
			Topic[cid] = 0
		elseif v == 1 then
			npcHandler:say("So they've sent another one? I just hope ye' better than the last one. Are ye' ready for a mission?", cid)
			Topic[cid] = 2
		elseif v >= 2 and v <= 21 then
			npcHandler:say("So ye' brought me so far " .. v .. " of 20 vampire dusts. Do ye' have any more with ye'?", cid)
			Topic[cid] = 3
		elseif v == 22 or v == 23 then
			npcHandler:say("Have you brought me the vampire lord's ring?", cid)
			Topic[cid] = 4
		end
	elseif Topic[cid] == 2 and msgcontains(msg, 'yes') then
		npcHandler:say("As they might have told ye', I'm a vampire hunter. If ye' want to be of any help, ye' can assist me with some of my tasks and bring me 20 ounces of vampire dust. This gives me some time to concentrate on a bigger project.", cid)
		setPlayerStorageValue(cid, 92224, 2)
		Topic[cid] = 0
	elseif Topic[cid] == 3 and msgcontains(msg, 'yes') then
		local n = getPlayerItemCount(cid, 5905)
		if n > 0 then
			local cur = getPlayerStorageValue(cid, 92224)
			local remove = math.min(22 - cur, n)
			doPlayerRemoveItem(cid, 5905, remove)
			setPlayerStorageValue(cid, 92224, cur + remove)
			if cur + remove == 22 then
				npcHandler:say("Fine, you're done! Ye' should talk to me about your mission again now.", cid)
				npcHandler:say("While ye' were keeping the lower ranks busy I could get valuable information about some vampire lords. ...", cid)
				npcHandler:say("One of them is hiding somewhere beneath the green claw swamp. I expect ye' to find him and kill him. ...", cid)
				npcHandler:say("But be warned: without good preparation ye' might get into trouble. I hope for ye' he will be sleeping in his coffin when ye' arrive. ...", cid)
				npcHandler:say("Before ye' open his coffin and drag that beast out to destroy it, I advise ye' to place some garlic necklaces on the stone slabs next to his coffin. That will weaken himconsiderably. ...", cid)
				npcHandler:say("Bring me his ring as a proof. And now hurry and good hunt to ye'.", cid)
			else
				npcHandler:say("So ye' brought me so far " .. cur - 2 + remove  .. " of 20 vampire dusts.", cid) --
			end
		else
			npcHandler:say("You don't have any vampire dusts.", cid) --
		end
		Topic[cid] = 0
	elseif Topic[cid] == 4 and msgcontains(msg, 'yes') and doPlayerRemoveItem(cid, 8752, 1) then
		npcHandler:say("Thank you! You may now report back to Henricus.", cid) --
		setPlayerStorageValue(cid, 92224, 25)
	end
	return true
end
 
npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye, |PLAYERNAME|.")
npcHandler:setMessage(MESSAGE_GREET, "Greetings, |PLAYERNAME|!")
npcHandler:setMessage(MESSAGE_WALKAWAY, "Bye!")
 
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Lua:
local altars = {
	{x=1, y=1, z=1},
	{x=1, y=1, z=1},
	{x=1, y=1, z=1}
}

local summonPos = {x=1, y=1, z=1}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerStorageValue(cid, 92224) == 22 then
		setPlayerStorageValue(cid, 92224, 23)
		local k = {}
		for _, v in ipairs(altars) do
			local tmp = getTileItemById(v, 2199).uid
			if tmp == 0 then
				doCreateMonster('The Weakened Count', summonPos)
				doSendMagicEffect(summonPos, CONST_ME_TELEPORT)
				return true
			else
				table.insert(k, tmp)
			end
		end
		for i = 1, #k do
			doRemoveItem(k[i])
		end
		doCreateMonster('The Count', summonPos)
		doSendMagicEffect(summonPos, CONST_ME_TELEPORT)
		return true
	end
end

henricus:
Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

local Topic = {}
local storage = 90000

function onCreatureAppear(cid)				npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) 			npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) 	npcHandler:onCreatureSay(cid, type, msg) end
function onThink() 						npcHandler:onThink() end

function greetCallback(cid)
	Topic[cid] = 0
	return true
end

function creatureSayCallback(cid, type, msg)
	if not npcHandler:isFocused(cid) then
		return false
	elseif msgcontains(msg, 'ruthless seven') then
		npcHandler:say('They\'re one of the mightiest weapons that our enemies have at disposal. They\'re the leaders of some of the most powerful forces of demonkind.', cid)
		Topic[cid] = 0
	elseif (msgcontains(msg, 'inquisition') or msgcontains(msg, 'join') or msgcontains(msg, 'mission')) and getPlayerStorageValue(cid, storage) == -1 then
		npcHandler:say('Do you want to join the inquisition?', cid)
		Topic[cid] = 1
	elseif Topic[cid] == 1 then
		if msgcontains(msg, 'yes') then
			npcHandler:say('So be it. Now you are a member of the inquisition. You might ask me for a mission to raise in my esteem.', cid)
			setPlayerStorageValue(cid, storage, 1)
		else
			npcHandler:say('Very suspicious!', cid)
		end
		Topic[cid] = 0
	elseif msgcontains(msg, 'mission') then
		local v = getPlayerStorageValue(cid, storage)
		if v == 1 then
			npcHandler:say("Let's see if you are worthy. Take an inquisitor's field guide from the box in the back room. ...", cid)
			npcHandler:say("Follow the instructions in the guide to talk to the Thaian guards that protect the walls and gates of the city and test their loyalty. Then report to me about your mission.", cid)
			setPlayerStorageValue(cid, storage, 2)
			Topic[cid] = 0
		elseif v == 2 then
			npcHandler:say("Your current mission is to investigate the reliability of certain guards. Are you done with that mission?", cid)
			Topic[cid] = 2
		elseif v == 3 then
			npcHandler:say("Listen, we have information about a heretic coven that hides in a mountain called the Big Old One. The witches reach this cursed place on flying brooms and think theyare safe there. ...", cid)
			npcHandler:say("I've arranged a flying carpet that will bring you to their hideout. Travel to Femor Hills and tell the carpet pilot the code word 'eclipse'. ...", cid)
			npcHandler:say("He'll bring you to your destination. At their meeting place, you'll find a cauldron in which they cook some forbidden brew. ...", cid)
			npcHandler:say("Use this vial of holy water to destroy the brew. Also steal their grimoire and bring it to me.", cid)
			setPlayerStorageValue(cid, storage, 4)
			doPlayerAddItem(cid, 7494, 1)
			Topic[cid] = 0
		end
	elseif Topic[cid] == 2 then
		if msgcontains(msg, 'yes') then
			if getPlayerStorageValue(cid, 90001) == 1 and getPlayerStorageValue(cid, 90002) == 1 and getPlayerStorageValue(cid, 90003) == 1 and getPlayerStorageValue(cid, 90004) == 1 and getPlayerStorageValue(cid, 90005) == 1 then
				npcHandler:say("Indeed, this is exactly what my other sources told me. Of course I knew the outcome of this investigation in advance. This was just a test. ...", cid)
				npcHandler:say("Well, now that you've proven yourself as useful, you can ask me for another mission. Let's see if you can handle some field duty, too.", cid)
				setPlayerStorageValue(cid, storage, 3)
			else
				npcHandler:say("I don't think so. This failure will be noted down. However, continue your investigations and return to me after you're done.", cid)
			end
		else
			npcHandler:say("This lax behaviour is very suspicious. You better don't return here until you've finished your mission.", cid)
		end
		Topic[cid] = 0
	elseif msgcontains(msg, 'name') then
		npcHandler:say('I\'m Henricus, the Lord Inquisitor.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'job') then
		npcHandler:say('By edict of the churches I\'m the Lord Inquisitor.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'inquisitor') then
		npcHandler:say('The churches of the gods entrusted me with the enormous and responsible task to lead the inquisition. I leave the field work to inquisitors who I recruit from fitting people that cross my way.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'church') then
		npcHandler:say('The churches of the gods united to fight heresy and dark magic. They are the shield of the true believers, while the inquisition is the sword that fights all enemies of virtuousness.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'gods') then
		npcHandler:say('We owe to the gods of good our creation and continuing existence. If it weren\'t for them, we would surely fall prey to the minions of the vile and dark gods.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'dark') then
		npcHandler:say('The dark powers are always present. If a human shows only the slightest weakness, they try to corrupt him and to lure him into their service. ...', cid)
		npcHandler:say('We must be constantly aware of evil that comes in many disguises.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'king') then
		npcHandler:say('The Thaian kings are crowned by a representative of the churches. This means they reign in the name of the gods of good and are part of the godly plan for humanity. ...', cid)
		npcHandler:say('As nominal head of the church of Banor, the kings aren\'t only worldly but also spiritual authorities. ...', cid)
		npcHandler:say('The kings fund the inquisition and sometimes provide manpower in matters of utmost importance. The inquisition, in return, protects the realm from heretics and individuals that aim to undermine the holy reign of the kings.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'banor') then
		npcHandler:say('In the past, the order of Banor was the only order of knighthood in existence. In the course of time,  the order concentrated more and more on spiritual matters rather than on worldly ones. ...', cid)
		npcHandler:say('Nowadays, the order of Banor sanctions new orders and offers spiritual guidance to the fighters of good.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'fardos') then
		npcHandler:say('The priests of Fardos are often mystics who have secluded themselves from worldly matters. Others provide guidance and healing to people in need in the temples.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'uman') then
		npcHandler:say('The church of Uman oversees the education of the masses as well as the doings of the sorcerer and druid guilds. It decides which lines of research are in accordance with the will of Uman and which are not. ...', cid)
		npcHandler:say('Concerned, the inquisition watches the attempts of these guilds to become more and more independent and to make own decisions. ...', cid)
		npcHandler:say('Unfortunately, the sorcerer guild has become dangerously influential and so the hands of our priests are tied due to political matters ...', cid)
		npcHandler:say('The druids lately claim that they are serving Crunor\'s will and not Uman\'s. Such heresy could only become possible with the independence of Carlin from the Thaian kingdom. ...', cid)
		npcHandler:say('The spiritual centre of the druids switched to Carlin where they have much influence and cannot be supervised by the inquisition.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'crunor') then
		npcHandler:say('The church of Crunor works closely together with the druid guild. This makes a cooperation sometimes difficult.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'zathroth') then
		npcHandler:say('We can see his evil influence almost everywhere. Keep your eyes open or the dark one will lead you on the wrong way and destroy you.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'fafnar') then
		npcHandler:say('Fafnar is mostly worshipped by the peasants and farmers in rural areas. ...', cid)
		npcHandler:say('The inquisition has a close eye on these activities. Simply people tend to mix local superstitions with the teachings of the gods. This again may lead to heretical subcults.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'carlin') then
		npcHandler:say('Carlin is a city of sin and heresy. After the reunion of Carlin with the kingdom, the inquisition will have much work to purify the city and its inhabitants.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'demon') then
		npcHandler:say('Demons exist in many different shapes and levels of power. In general, they are servants of the dark gods and command great powers of destruction.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'darashia') then
		npcHandler:say('Darashia is a godless town full of mislead fools. One day, it will surely share the fate of its sister town Drefia.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'drefia') then
		npcHandler:say('Drefia used to be a city of sin and heresy, just like Carlin nowadays. One day, the gods decided to destroy this town and to erase all evil there.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'venore') then
		npcHandler:say('Venore is somewhat difficult to handle. The merchants have a close eye on our activities in their city and our authority is limited there. However, we will use all of our influence to prevent a second Carlin.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'edron') then
		npcHandler:say('Edron illustrates perfectly why the inquisition is needed and why we need more funds and manpower. ...', cid)
		npcHandler:say('Our agents were on their way to investigate certain occurrences there when some faithless knights fled to some unholy ruins. ...', cid)
		npcHandler:say('We were unable to wipe them out and the local order of knighthood was of little help. ...', cid)
		npcHandler:say('It\'s almost sure that something dangerous is going on there, so we have to continue our efforts.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'ankrahmun') then
		npcHandler:say('Even though they claim differently, this city is in the firm grip of Zathroth and his evil minions. Their whole twisted religion is a mockery of the teachings of our gods ...', cid)
		npcHandler:say('As soon as we have gathered the strength, we should crush this city once and for all.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'elves') or msgcontains(msg, 'ab\'dendriel') then
		npcHandler:say('Those elves are hardly any more civilised than orcs. They can become a threat to mankind at any time.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'dwarf') or msgcontains(msg, 'kazordoon') then
		npcHandler:say('The dwarfs are allied with Thais but follow their own obscure religion. Although dwarfs keep mostly to themselves, we have to observe this alliance closely.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'druid') then
		npcHandler:say('The druids here still follow the old rules. Sadly, the druids of Carlin have left the right path in the last years.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'sorcerer') then
		npcHandler:say('Those who wield great power have to resist great temptations. We have the burden to eliminate all those who give in to the temptations.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'knight') then
		npcHandler:say('Nowadays, most knights seem to have forgotten the noble cause to which all knights were bound in the past. Only a few have remained pious, serve the gods and follow their teachings.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'paladin') then
		npcHandler:say('It\'s a shame that only a few paladins still use their abilities to further the cause of the gods of good. Too many paladins have become selfish and greedy.', cid)
		Topic[cid] = 0
	end
	return true
end

npcHandler:setMessage(MESSAGE_GREET, "Greetings, fellow believer |PLAYERNAME|!")
npcHandler:setMessage(MESSAGE_FAREWELL, "Always be on guard, |PLAYERNAME|!")
npcHandler:setMessage(MESSAGE_WALKAWAY, "This ungraceful haste is most suspicious!")

npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
Last edited:
hahah, great!! *-*

ok, so far so good:

henricus:

Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function doCreatureSayWithDelay(cid,text,type,delay,e,pcid)
	if delay<=0 then
		doCreatureSay(cid,text,type, false,pcid)
	else
		local func=function(pars)
			doCreatureSay(pars.cid,pars.text,pars.type, false,pars.pcid)
			pars.e.done=TRUE
		end
		e.done=FALSE
		e.event=addEvent(func,delay,{cid=cid, text=text, type=type, e=e,pcid=pcid})
	end
end
 
function doNPCTalkALot(msgs,interval,pcid)
	local e={}
	local ret={}
	if interval==nil then interval=10000 end --10 seconds is default time between messages
		for aux=1,table.getn(msgs) do
		e[aux]={}
		doCreatureSayWithDelay(getNpcCid(),msgs[aux],TALKTYPE_PRIVATE_NP,(aux-1)*interval,e[aux],pcid)
		table.insert(ret,e[aux])
	end
	return(ret)
end
 
local Topic = {}
local storage = 90000

-- Storages:
-- 1 = Joining Inquisition
-- 2 = Start Mission 1
-- 3 = Finish Mission 1
-- 4 = Start Mission 2
-- 5 = Finish Mission 2
-- 6 = Start Mission 3

function onCreatureAppear(cid)				npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) 			npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) 	npcHandler:onCreatureSay(cid, type, msg) end
function onThink() 						npcHandler:onThink() end
 
function greetCallback(cid)
	Topic[cid] = 0
	return true
end
 
function creatureSayCallback(cid, type, msg)
	if not npcHandler:isFocused(cid) then
		return false
	elseif msgcontains(msg, 'ruthless seven') then
		npcHandler:say('They\'re one of the mightiest weapons that our enemies have at disposal. They\'re the leaders of some of the most powerful forces of demonkind.', cid)
		Topic[cid] = 0
	elseif (msgcontains(msg, 'inquisition') or msgcontains(msg, 'join') or msgcontains(msg, 'mission')) and getPlayerStorageValue(cid, storage) == -1 then
		npcHandler:say('Do you want to join the inquisition?', cid)
		Topic[cid] = 1
	elseif Topic[cid] == 1 then
		if msgcontains(msg, 'yes') then
			npcHandler:say('So be it. Now you are a member of the inquisition. You might ask me for a {mission} to raise in my esteem.', cid)
			setPlayerStorageValue(cid, storage, 1)
		else
			npcHandler:say('Very suspicious!', cid)
		end
		Topic[cid] = 0
	elseif msgcontains(msg, 'mission') then
		local v = getPlayerStorageValue(cid, storage)
		if v == 1 then -- Start Mission 1 - The interrogation
		doNPCTalkALot({"Let's see if you are worthy. Take an inquisitor's field guide from the box in the back room. ...", "Follow the instructions in the guide to talk to the Thaian guards that protect the walls and gates of the city and test their loyalty. Then report to me about your mission."}, 5000, cid)
			npcHandler:say("Let's see if you are worthy. Take an inquisitor's field guide from the box in the back room. ...", cid)
			setPlayerStorageValue(cid, storage, 2)
			Topic[cid] = 0
		elseif v == 2 then
			npcHandler:say("Your current mission is to investigate the reliability of certain guards. Are you done with that mission?", cid)
			Topic[cid] = 2
		elseif v == 3 then -- Start Mission 2 - The Eclipse
		doNPCTalkALot({"Listen, we have information about a heretic coven that hides in a mountain called the Big Old One. The witches reach this cursed place on flying brooms and think they are safe there. ...", "I've arranged a flying carpet that will bring you to their hideout. Travel to Femor Hills and tell the carpet pilot the code word '{eclipse}'. ...", "He'll bring you to your destination. At their meeting place, you'll find a cauldron in which they cook some forbidden brew. ...", "Use this vial of holy water to destroy the brew. Also steal their grimoire and bring it to me."}, 5000, cid)
			setPlayerStorageValue(cid, storage, 4)
			doPlayerAddItem(cid, 7494, 1)
			Topic[cid] = 0
		elseif v == 4 then
			npcHandler:say("Your current mission is to destroy this coven. Are you done with that mission?", cid)
			Topic[cid] = 3
		end
		elseif v == 5 then -- Start Mission 3 - Vampire Hunt
		doNPCTalkALot({"I think it's time to truly test your abilities. One of our allies has requested assistance. I think you are just the right person to helphim ...", "Storkus is an old and grumpy dwarf who works as a vampire hunter since many, many decades. He's quite successful but even he has his limits. ...", "So occasionally, we send him help. In return he trains and tests our recruits. It's an advantageous agreement for both sides ...", "You'll find him in his cave at the mountain outside of Kazordoon. He'll tell you about your next mission."}, 5000, cid)
			setPlayerStorageValue(cid, storage, 6)
			Topic[cid] = 0
		elseif v == 4 then
			npcHandler:say("Your current mission is to investigate the reliability of certain guards. Are you done with that mission?", cid)
			Topic[cid] = 4
		end
	elseif Topic[cid] == 2 then -- Finish mission 1 - The interrogation
		if msgcontains(msg, 'yes') then
			if getPlayerStorageValue(cid, 90001) == 1 and getPlayerStorageValue(cid, 90002) == 1 and getPlayerStorageValue(cid, 90003) == 1 and getPlayerStorageValue(cid, 90004) == 1 and getPlayerStorageValue(cid, 90005) == 1 then
			doNPCTalkALot({"Indeed, this is exactly what my other sources told me. Of course I knew the outcome of this investigation in advance. This was just a test. ...", "Well, now that you've proven yourself as useful, you can ask me for another mission. Let's see if you can handle some field duty, too."}, 5000, cid)
				setPlayerStorageValue(cid, storage, 3)
			else
				npcHandler:say("I don't think so. This failure will be noted down. However, continue your investigations and return to me after you're done.", cid)
			end
		else
			npcHandler:say("This lax behaviour is very suspicious. You better don't return here until you've finished your mission.", cid)
		end
		Topic[cid] = 0
	
		elseif Topic[cid] == 3 then -- Finish mission 2 - The Eclipse
		if msgcontains(msg, 'yes') then
			if getPlayerStorageValue(cid, 99221) == 1 and getPlayerStorageValue(cid, 99220) == 1 then
				npcHandler:say("Fine, fine. You have proven that you can work efficiently. Still, only further missions will show if you're are truly capable. Ask me for another mission if you're ready.", cid)
				setPlayerStorageValue(cid, storage, 5)
			else
				npcHandler:say("I don't think so. This failure will be noted down. However, continue your mission and return to me when you're done.", cid)
			end
		else
			npcHandler:say("This lax behaviour is very suspicious. You better don't return here until you've finished your mission.", cid)
		end
		
		elseif Topic[cid] == 4 then -- Finish mission 3 - Vampire Hunt
		if msgcontains(msg, 'yes') then
			if getPlayerStorageValue(cid, 92224) == 25 then
				npcHandler:say("??", cid)
				setPlayerStorageValue(cid, storage, 5)
			else
				npcHandler:say("I don't think so. This failure will be noted down. However, continue your mission and return to me when you're done.", cid)
			end
		else
			npcHandler:say("This lax behaviour is very suspicious. You better don't return here until you've finished your mission.", cid)
		end
	
	elseif msgcontains(msg, 'name') then
		npcHandler:say('I\'m Henricus, the Lord Inquisitor.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'job') then
		npcHandler:say('By edict of the churches I\'m the Lord Inquisitor.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'inquisitor') then
		npcHandler:say('The churches of the gods entrusted me with the enormous and responsible task to lead the inquisition. I leave the field work to inquisitors who I recruit from fitting people that cross my way.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'church') then
		npcHandler:say('The churches of the gods united to fight heresy and dark magic. They are the shield of the true believers, while the inquisition is the sword that fights all enemies of virtuousness.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'gods') then
		npcHandler:say('We owe to the gods of good our creation and continuing existence. If it weren\'t for them, we would surely fall prey to the minions of the vile and dark gods.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'dark') then
		npcHandler:say('The dark powers are always present. If a human shows only the slightest weakness, they try to corrupt him and to lure him into their service. ...', cid)
		npcHandler:say('We must be constantly aware of evil that comes in many disguises.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'king') then
		npcHandler:say('The Thaian kings are crowned by a representative of the churches. This means they reign in the name of the gods of good and are part of the godly plan for humanity. ...', cid)
		npcHandler:say('As nominal head of the church of Banor, the kings aren\'t only worldly but also spiritual authorities. ...', cid)
		npcHandler:say('The kings fund the inquisition and sometimes provide manpower in matters of utmost importance. The inquisition, in return, protects the realm from heretics and individuals that aim to undermine the holy reign of the kings.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'banor') then
		npcHandler:say('In the past, the order of Banor was the only order of knighthood in existence. In the course of time,  the order concentrated more and more on spiritual matters rather than on worldly ones. ...', cid)
		npcHandler:say('Nowadays, the order of Banor sanctions new orders and offers spiritual guidance to the fighters of good.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'fardos') then
		npcHandler:say('The priests of Fardos are often mystics who have secluded themselves from worldly matters. Others provide guidance and healing to people in need in the temples.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'uman') then
		npcHandler:say('The church of Uman oversees the education of the masses as well as the doings of the sorcerer and druid guilds. It decides which lines of research are in accordance with the will of Uman and which are not. ...', cid)
		npcHandler:say('Concerned, the inquisition watches the attempts of these guilds to become more and more independent and to make own decisions. ...', cid)
		npcHandler:say('Unfortunately, the sorcerer guild has become dangerously influential and so the hands of our priests are tied due to political matters ...', cid)
		npcHandler:say('The druids lately claim that they are serving Crunor\'s will and not Uman\'s. Such heresy could only become possible with the independence of Carlin from the Thaian kingdom. ...', cid)
		npcHandler:say('The spiritual centre of the druids switched to Carlin where they have much influence and cannot be supervised by the inquisition.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'crunor') then
		npcHandler:say('The church of Crunor works closely together with the druid guild. This makes a cooperation sometimes difficult.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'zathroth') then
		npcHandler:say('We can see his evil influence almost everywhere. Keep your eyes open or the dark one will lead you on the wrong way and destroy you.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'fafnar') then
		npcHandler:say('Fafnar is mostly worshipped by the peasants and farmers in rural areas. ...', cid)
		npcHandler:say('The inquisition has a close eye on these activities. Simply people tend to mix local superstitions with the teachings of the gods. This again may lead to heretical subcults.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'carlin') then
		npcHandler:say('Carlin is a city of sin and heresy. After the reunion of Carlin with the kingdom, the inquisition will have much work to purify the city and its inhabitants.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'demon') then
		npcHandler:say('Demons exist in many different shapes and levels of power. In general, they are servants of the dark gods and command great powers of destruction.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'darashia') then
		npcHandler:say('Darashia is a godless town full of mislead fools. One day, it will surely share the fate of its sister town Drefia.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'drefia') then
		npcHandler:say('Drefia used to be a city of sin and heresy, just like Carlin nowadays. One day, the gods decided to destroy this town and to erase all evil there.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'venore') then
		npcHandler:say('Venore is somewhat difficult to handle. The merchants have a close eye on our activities in their city and our authority is limited there. However, we will use all of our influence to prevent a second Carlin.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'edron') then
		npcHandler:say('Edron illustrates perfectly why the inquisition is needed and why we need more funds and manpower. ...', cid)
		npcHandler:say('Our agents were on their way to investigate certain occurrences there when some faithless knights fled to some unholy ruins. ...', cid)
		npcHandler:say('We were unable to wipe them out and the local order of knighthood was of little help. ...', cid)
		npcHandler:say('It\'s almost sure that something dangerous is going on there, so we have to continue our efforts.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'ankrahmun') then
		npcHandler:say('Even though they claim differently, this city is in the firm grip of Zathroth and his evil minions. Their whole twisted religion is a mockery of the teachings of our gods ...', cid)
		npcHandler:say('As soon as we have gathered the strength, we should crush this city once and for all.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'elves') or msgcontains(msg, 'ab\'dendriel') then
		npcHandler:say('Those elves are hardly any more civilised than orcs. They can become a threat to mankind at any time.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'dwarf') or msgcontains(msg, 'kazordoon') then
		npcHandler:say('The dwarfs are allied with Thais but follow their own obscure religion. Although dwarfs keep mostly to themselves, we have to observe this alliance closely.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'druid') then
		npcHandler:say('The druids here still follow the old rules. Sadly, the druids of Carlin have left the right path in the last years.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'sorcerer') then
		npcHandler:say('Those who wield great power have to resist great temptations. We have the burden to eliminate all those who give in to the temptations.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'knight') then
		npcHandler:say('Nowadays, most knights seem to have forgotten the noble cause to which all knights were bound in the past. Only a few have remained pious, serve the gods and follow their teachings.', cid)
		Topic[cid] = 0
	elseif msgcontains(msg, 'paladin') then
		npcHandler:say('It\'s a shame that only a few paladins still use their abilities to further the cause of the gods of good. Too many paladins have become selfish and greedy.', cid)
		Topic[cid] = 0
	end
	return true
end
 
npcHandler:setMessage(MESSAGE_GREET, "Greetings, fellow believer |PLAYERNAME|!")
npcHandler:setMessage(MESSAGE_FAREWELL, "Always be on guard, |PLAYERNAME|!")
npcHandler:setMessage(MESSAGE_WALKAWAY, "This ungraceful haste is most suspicious!")
 
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

That's correct, eh cyk?

But now I'm screwed up, the site I was using as base does not have the dialogs anymore, it isn't only with Storkus, the dialogs from Henricus isn't available as well =/
 
Back
Top