Ir para conteúdo

Blessed Wooden Stake Quest


speedyks

Posts Recomendados

Ae galera trago do OTFans essa bela quest para vocês!

 

Galera está tudo que nem o tibia global é so vocês adicionarem no mapa em lugares escondidinhos que fica muito legal :)

 

NPCS:

 

Quentin.xml

<?xml version="1.0"?>
<npc name="Quentin" script="data/npc/scripts/stolek.lua" access="5" lookdir="1" autowalk="25">
<health now="1" max="1"/>
<look type="57" head="20" body="30" legs="40" feet="50" corpse="3128"/>
 <parameters>
<parameter key="message_greet" value="Welcome, adventurer |PLAYERNAME|! If you are new in Tibia, ask me for help." />
 </parameters>
</npc>

 

Gamon.xml

<?xml version="1.0"?>
<npc name="Gamon" script="data/npc/scripts/kolek.lua" access="5" lookdir="1" autowalk="25">
<health now="1" max="1"/>
<look type="128" head="96" body="96" legs="87" feet="88" corpse="3128"/>
 <parameters>
<parameter key="message_greet" value="Nice to meet you, Mister |PLAYERNAME|! Looking for furniture? You've come to the right place!" />
 </parameters>
</npc>

 

Tibra.xml

<?xml version="1.0"?>
<npc name="Tibra" script="data/npc/scripts/stolek2.lua" access="5" lookdir="1" autowalk="25">
<health now="1" max="1"/>
<look type="138" head="40" body="91" legs="89" feet="114"/>
 <parameters>
<parameter key="message_greet" value="Welcome in the name of gods, pilgrim |PLAYERNAME|!" />
 </parameters>
</npc>

 

Maealil.xml

<?xml version="1.0"?>
<npc name="Maealil" script="data/npc/scripts/stolek3.lua" access="5" lookdir="1" autowalk="25">
<health now="1" max="1"/>
<look type="63" head="20" body="30" legs="40" feet="50" corpse="3128"/>
 <parameters>
<parameter key="message_greet" value="Ashari, |PLAYERNAME|." />
 </parameters>
</npc>

 

Yberius.xml

<?xml version="1.0"?>
<npc name="Yberius" script="data/npc/scripts/stolek4.lua" access="5" lookdir="1" autowalk="25">
<health now="1" max="1"/>
<look type="57" head="20" body="30" legs="40" feet="50" corpse="3128"/>
 <parameters>
<parameter key="message_greet" value="Welcome, young |PLAYERNAME|! If you are new in Tibia, ask me for help." />
 </parameters>
</npc>

 

Isimov.xml

<?xml version="1.0"?>
<npc name="Isimov" script="data/npc/scripts/stolek5.lua" access="5" lookdir="1" autowalk="25">
<health now="1" max="1"/>
<look type="160" head="115" body="41" legs="41" feet="114" corpse="3128"/>
 <parameters>
<parameter key="message_greet" value="Hiho |PLAYERNAME| and greetings my child!" />
 </parameters>
</npc>

 

Amanda.xml

<?xml version="1.0"?>
<npc name="Amanda" script="data/npc/scripts/stolek6.lua" access="5" lookdir="1" autowalk="25">
<health now="1" max="1"/>
<look type="160" head="115" body="127" legs="41" feet="114" corpse="3128"/>
 <parameters>
<parameter key="message_greet" value="Welcome to the temple of Banor's blood |PLAYERNAME|." />
 </parameters>
</npc>

 

Kasmir.xml

<?xml version="1.0"?>
<npc name="Kasmir" script="data/npc/scripts/stolek7.lua" access="5" lookdir="1" autowalk="25">
<health now="1" max="1"/>
<look type="130" head="76" body="41" legs="38" feet="114" corpse="3128"/>
 <parameters>
<parameter key="message_greet" value="May Daramanian enlighten you |PLAYERNAME|!" />
 </parameters>
</npc>

 

Rakhem.xml

<?xml version="1.0"?>
<npc name="Rakhem" script="data/npc/scripts/stolek8.lua" access="5" lookdir="1" autowalk="25">
<health now="1" max="1"/>
<look type="130" head="0" body="94" legs="88" feet="131" corpse="3128"/>
 <parameters>
<parameter key="message_greet" value="Be mourned pilgrim in flesh." />
 </parameters>
</npc>

 

Brewster.xml

<?xml version="1.0"?>
<npc name="Brewster" script="data/npc/scripts/stolek9.lua" access="5" lookdir="1" autowalk="25">
<health now="1" max="1"/>
<look type="133" head="76" body="115" legs="114" feet="114" corpse="3128"/>
 <parameters>
<parameter key="message_greet" value="G...greetings <hicks>." />
 </parameters>
</npc>

 

Tyrias.xml

<?xml version="1.0"?>
<npc name="Tyrias" script="data/npc/scripts/stolek10.lua" access="5" lookdir="1" autowalk="25">
<health now="1" max="1"/>
<look type="133" head="76" body="113" legs="95" feet="113" corpse="3128"/>
 <parameters>
<parameter key="message_greet" value="Be greeted, child." />
 </parameters>
</npc>

 

Chondur.xml

<?xml version="1.0"?>
<npc name="Chondur" script="data/npc/scripts/stolek11.lua" access="5" lookdir="1" autowalk="25">
<health now="1" max="1"/>
<look type="154" head="0" body="121" legs="113" feet="1" corpse="3128"/>
 <parameters>
<parameter key="message_greet" value="Be greeted, child." />
 </parameters>
</npc>

 

 

AND SCRIPTS:

 

kolek.lua

<!---~~Sprzedawanie Wooden Stake z RL Tibii by GM Prakt~~---!>
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
	return false
end

local kasa = zloto + platyna + crystal
local zloto = getPlayerItemCount(cid,2148)
local platyna = getPlayerItemCount(cid,2152)*100
local crystal = getPlayerItemCount(cid,2160)*10000

	elseif msgcontains(msg, 'wooden stake') then
				selfSay('Making a stake from a chair? Are you insane??! I won't waste my chairs on you for free! You will have to pay for it, but since I consider your plan a blasphemy, it will cost 5000 gold pieces. Okay?')
				talk_state = 1
		end
------------------------------------------------ confirm yes ------------------------------------------------
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
		talk_state = 0
			elseif kasa >= 5000 then
			doPlayerRemoveMoney(uid,5000)
					selfSay('Argh... my heart aches! Alright... a promise is a promise. Here - take this wooden stake, and now get lost.')
					doPlayerAddItem(cid,5941,1)
					end
				else
				selfSay('You do not have enough money!')
				end
------------------------------------------------ confirm no ------------------------------------------------
	elseif msgcontains(msg, 'no') and (talk_state = 1) then
		selfSay('Then not.')
		talk_state = 0
	end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

stolek1.lua

<!---~~Błogosławienie Wooden Stake z RL Tibii by GM Prakt~~---!>
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
	return false
end

local quescik = getPlayerStorageValue(cid,6660)
local miejsce = getPlayerPosition(cid)

	if msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) == 0 then
				selfSay('A blessed stake to defeat evil spirits? I do know an old prayer which is said to grant sacred power and to be able to bind this power to someone, or something. ...')
				selfSay('However, this prayer needs the combined energy of ten priests. Each of them has to say one line of the prayer. ...')
				selfSay('I could start with the prayer, but since the next priest has to be in a different location, you probably will have to travel a lot. ...')
				selfSay('Is this stake really important enough to you so that you are willing to take this burden?')
				talk_state = 1
		end
	elseif msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) >= 1 then
			if quescik == -1
			selfSay('Ah, I see you brought a stake with you. Are you ready to receive my line of the prayer then?')
			talk_state = 2
			else
			selfSay('I have already blessed your wooden stake.')
			talk_state = 0
			end		
------------------------------------------------ confirm yes ------------------------------------------------
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
			talk_state = 0
					selfSay('Alright, I guess you need a stake first. Maybe Gamon can help you, the leg of a chair or something could just do. Try asking him for a stake, and if you have one, bring it back to me.')
				end
------------------------------------------------ confirm yes2 ------------------------------------------------
	elseif msgcontains(msg, 'yes') and talk_state == 2 then
			talk_state = 0
					selfSay('So receive my prayer: "Light shall be near - and darkness afar". Now, bring your stake to Tibra in the Carlin church for the next line of the prayer. I will inform her what to do.')
					setPlayerStorageValue(cid,6660,1)
					doSendMagicEffect(miejsce,14)
				end
------------------------------------------------ confirm no ------------------------------------------------
	elseif msgcontains(msg, 'no') and (talk_state = 1 or talk_state = 2) then
		selfSay('Then not.')
		talk_state = 0
	end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

stolek2.lua

<!---~~Błogosławienie Wooden Stake z RL Tibii by GM Prakt~~---!>
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
	return false
end

local quescik = getPlayerStorageValue(cid,6660)
local quest2  = getPlayerStorageValue(cid,6661)
local miejsce = getPlayerPosition(cid)

	if msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) == 0 then
				if quescik == 1
				selfSay('Yes, I heard about it from Quentin, but you have not that stake!')
				talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quescik == -1
			selfSay('You should first talk to Quentin in Thais.')
			talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) >= 1 then
			if quescik == 1
			selfSay('Yes, I was informed what to do. Are you prepared to receive my line of the prayer?')
			talk_state = 1
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quest2 == 1
			selfSay('I have already blessed your wooden stake.')
			talk_state = 0
		end
------------------------------------------------ confirm yes ------------------------------------------------
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
			talk_state = 0
					selfSay('So receive my prayer: "Hope may fill your heart - doubt shall be banned". Now, bring your stake to Maealil in the elven settlement for the next line of the prayer. I will inform him what to do.')
					setPlayerStorageValue(cid,6661,1)
					doSendMagicEffect(miejsce,14)
				end
------------------------------------------------ confirm no ------------------------------------------------
	elseif msgcontains(msg, 'no') and (talk_state = 1) then
		selfSay('Then not.')
		talk_state = 0
	end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

stolek3.lua

<!---~~Błogosławienie Wooden Stake z RL Tibii by GM Prakt~~---!>
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
	return false
end

local quescik = getPlayerStorageValue(cid,6661)
local quest2  = getPlayerStorageValue(cid,6662)
local miejsce = getPlayerPosition(cid)

	if msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) == 0 then
				if quescik == 1
				selfSay('Yes, I heard about it, but you have not that stake!')
				talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quescik == -1
			selfSay('Previous priest shoulded asked you who visit next. If you did not start quest, you should visit Quentin in Thais.')
			talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) >= 1 then
			if quescik == 1
			selfSay('Yes, I was informed what to do. Are you prepared to receive my line of the prayer?')
			talk_state = 1
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quest2 == 1
			selfSay('I have already blessed your wooden stake.')
			talk_state = 0
		end
------------------------------------------------ confirm yes ------------------------------------------------
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
			talk_state = 0
					selfSay('So receive my prayer: "Peace may fill your soul - evil shall be cleansed". Now, bring your stake to Yberius in the Venore temple for the next line of the prayer. I will inform him what to do.')
					setPlayerStorageValue(cid,6662,1)
					doSendMagicEffect(miejsce,14)
				end
------------------------------------------------ confirm no ------------------------------------------------
	elseif msgcontains(msg, 'no') and (talk_state = 1) then
		selfSay('Then not.')
		talk_state = 0
	end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

stolek4.lua

<!---~~Błogosławienie Wooden Stake z RL Tibii by GM Prakt~~---!>
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
	return false
end

local quescik = getPlayerStorageValue(cid,6662)
local quest2  = getPlayerStorageValue(cid,6663)
local miejsce = getPlayerPosition(cid)

	if msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) == 0 then
				if quescik == 1
				selfSay('Yes, I heard about it, but you have not that stake!')
				talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quescik == -1
			selfSay('Previous priest shoulded asked you who visit next. I am not that person. If you did not start quest, you should visit Quentin in Thais.')
			talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) >= 1 then
			if quescik == 1
			selfSay('Yes, I was informed what to do. Are you prepared to receive my line of the prayer?')
			talk_state = 1
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quest2 == 1
			selfSay('I have already blessed your wooden stake.')
			talk_state = 0
		end
------------------------------------------------ confirm yes ------------------------------------------------
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
			talk_state = 0
					selfSay('So receive my prayer: "Protection will be granted - from dangers at hand". Now, bring your stake to Isimov in the dwarven settlement for the next line of the prayer. I will inform him what to do.')
					setPlayerStorageValue(cid,6663,1)
					doSendMagicEffect(miejsce,14)
				end
------------------------------------------------ confirm no ------------------------------------------------
	elseif msgcontains(msg, 'no') and (talk_state = 1) then
		selfSay('Then not.')
		talk_state = 0
	end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

stolek5.lua

<!---~~Błogosławienie Wooden Stake z RL Tibii by GM Prakt~~---!>
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
	return false
end

local quescik = getPlayerStorageValue(cid,6663)
local quest2  = getPlayerStorageValue(cid,6664)
local miejsce = getPlayerPosition(cid)

	if msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) == 0 then
				if quescik == 1
				selfSay('Yes, I heard about it, but you have not that stake!')
				talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quescik == -1
			selfSay('Previous priest shoulded asked you who visit next. I am not that person. If you did not start quest, you should visit Quentin in Thais.')
			talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) >= 1 then
			if quescik == 1
			selfSay('Yes, I was informed what to do. Are you prepared to receive my line of the prayer?')
			talk_state = 1
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quest2 == 1
			selfSay('I have already blessed your wooden stake.')
			talk_state = 0
		end
------------------------------------------------ confirm yes ------------------------------------------------
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
			talk_state = 0
					selfSay('So receive my prayer: "Unclean spirits shall be repelled". Now, bring your stake to Amanda in Edron for the next line of the prayer. I will inform her what to do.')
					setPlayerStorageValue(cid,6664,1)
					doSendMagicEffect(miejsce,14)
				end
------------------------------------------------ confirm no ------------------------------------------------
	elseif msgcontains(msg, 'no') and (talk_state = 1) then
		selfSay('Then not.')
		talk_state = 0
	end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

stolek6.lua

<!---~~Błogosławienie Wooden Stake z RL Tibii by GM Prakt~~---!>
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
	return false
end

local quescik = getPlayerStorageValue(cid,6664)
local quest2  = getPlayerStorageValue(cid,6665)
local miejsce = getPlayerPosition(cid)

	if msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) == 0 then
				if quescik == 1
				selfSay('Yes, I heard about it, but you have not that stake!')
				talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quescik == -1
			selfSay('Previous priest shoulded asked you who visit next. I am not that person. If you did not start quest, you should visit Quentin in Thais.')
			talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) >= 1 then
			if quescik == 1
			selfSay('Yes, I was informed what to do. Are you prepared to receive my line of the prayer?')
			talk_state = 1
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quest2 == 1
			selfSay('I have already blessed your wooden stake.')
			talk_state = 0
		end
------------------------------------------------ confirm yes ------------------------------------------------
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
			talk_state = 0
					selfSay('So receive my prayer: "Wicked curses shall be broken". Now, bring your stake to Kasmir in Darashia for the next line of the prayer. I will inform him what to do.')
					setPlayerStorageValue(cid,6665,1)
					doSendMagicEffect(miejsce,14)
				end
------------------------------------------------ confirm no ------------------------------------------------
	elseif msgcontains(msg, 'no') and (talk_state = 1) then
		selfSay('Then not.')
		talk_state = 0
	end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

stolek7.lua

<!---~~Błogosławienie Wooden Stake z RL Tibii by GM Prakt~~---!>
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
	return false
end

local quescik = getPlayerStorageValue(cid,6665)
local quest2  = getPlayerStorageValue(cid,6666)
local miejsce = getPlayerPosition(cid)

	if msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) == 0 then
				if quescik == 1
				selfSay('Yes, I heard about it, but you have not that stake!')
				talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quescik == -1
			selfSay('Previous priest shoulded asked you who visit next. I am not that person. If you did not start quest, you should visit Quentin in Thais.')
			talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) >= 1 then
			if quescik == 1
			selfSay('Yes, I was informed what to do. Are you prepared to receive my line of the prayer?')
			talk_state = 1
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quest2 == 1
			selfSay('I have already blessed your wooden stake.')
			talk_state = 0
		end
------------------------------------------------ confirm yes ------------------------------------------------
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
			talk_state = 0
					selfSay('So receive my prayer: "Let there be honour and humility". Now, bring your stake to Rahkem in Ankrahmun for the next line of the prayer. I will inform him what to do.')
					setPlayerStorageValue(cid,6666,1)
					doSendMagicEffect(miejsce,14)
				end
------------------------------------------------ confirm no ------------------------------------------------
	elseif msgcontains(msg, 'no') and (talk_state = 1) then
		selfSay('Then not.')
		talk_state = 0
	end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

stolek8.lua

<!---~~Błogosławienie Wooden Stake z RL Tibii by GM Prakt~~---!>
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
	return false
end

local quescik = getPlayerStorageValue(cid,6666)
local quest2  = getPlayerStorageValue(cid,6667)
local miejsce = getPlayerPosition(cid)

	if msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) == 0 then
				if quescik == 1
				selfSay('Yes, I heard about it, but you have not that stake!')
				talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quescik == -1
			selfSay('Previous priest shoulded asked you who visit next. I am not that person. If you did not start quest, you should visit Quentin in Thais.')
			talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) >= 1 then
			if quescik == 1
			selfSay('Yes, I was informed what to do. Are you prepared to receive my line of the prayer?')
			talk_state = 1
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quest2 == 1
			selfSay('I have already blessed your wooden stake.')
			talk_state = 0
		end
------------------------------------------------ confirm yes ------------------------------------------------
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
			talk_state = 0
					selfSay('So receive my prayer: 'Let there be power and compassion'. Now, bring your stake to Brewster in Port Hope for the next line of the prayer. I will inform him what to do.')
					setPlayerStorageValue(cid,6667,1)
					doSendMagicEffect(miejsce,14)
				end
------------------------------------------------ confirm no ------------------------------------------------
	elseif msgcontains(msg, 'no') and (talk_state = 1) then
		selfSay('Then not.')
		talk_state = 0
	end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

stolek9.lua

<!---~~Błogosławienie Wooden Stake z RL Tibii by GM Prakt~~---!>
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
	return false
end

local quescik = getPlayerStorageValue(cid,6667)
local quest2  = getPlayerStorageValue(cid,6668)
local miejsce = getPlayerPosition(cid)

	if msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) == 0 then
				if quescik == 1
				selfSay('Yes, I heard about it, but you have not that stake!')
				talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quescik == -1
			selfSay('Previous priest shoulded asked you who visit next. I am not that person. If you did not start quest, you should visit Quentin in Thais.')
			talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) >= 1 then
			if quescik == 1
			selfSay('Yes, I was informed what to do. Are you prepared to receive my line of the prayer?')
			talk_state = 1
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quest2 == 1
			selfSay('I have already blessed your wooden stake.')
			talk_state = 0
		end
------------------------------------------------ confirm yes ------------------------------------------------
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
			talk_state = 0
					selfSay('So receive my prayer: 'Your hand shall be guided - your feet shall walk in <hicks> harmony'. Now, bring your stake to Tyrias in <hicks> Liberty Bay for the next line of the prayer. I will inform him what to do.')
					setPlayerStorageValue(cid,6668,1)
					doSendMagicEffect(miejsce,14)
				end
------------------------------------------------ confirm no ------------------------------------------------
	elseif msgcontains(msg, 'no') and (talk_state = 1) then
		selfSay('Then not.')
		talk_state = 0
	end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

stolek10.lua

<!---~~Błogosławienie Wooden Stake z RL Tibii by GM Prakt~~---!>
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
	return false
end

local quescik = getPlayerStorageValue(cid,6668)
local quest2  = getPlayerStorageValue(cid,6669)
local miejsce = getPlayerPosition(cid)

	if msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) == 0 then
				if quescik == 1
				selfSay('Yes, I heard about it, but you have not that stake!')
				talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quescik == -1
			selfSay('Previous priest shoulded asked you who visit next. I am not that person. If you did not start quest, you should visit Quentin in Thais.')
			talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) >= 1 then
			if quescik == 1
			selfSay('Brewster sent me a strange message about some strange hocus-pocus. I think it's nonsense, but since you have come that far, I'll play along. Are you ready?')
			talk_state = 1
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quest2 == 1
			selfSay('I have already blessed your wooden stake.')
			talk_state = 0
		end
------------------------------------------------ confirm yes ------------------------------------------------
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
			talk_state = 0
					selfSay('So receive my prayer: "Your mind shall be a vessel for joy, light and wisdom" - uh, wow, something happened. Well, I guess that's it, but next time if you need some mumbo jumbo rather go to Chondur.')
					setPlayerStorageValue(cid,6669,1)
					doSendMagicEffect(miejsce,14)
					doPlayerRemoveItem(uid,5941,1)
					doPlayerAddItem(uid,5942,1)
				end
------------------------------------------------ confirm no ------------------------------------------------
	elseif msgcontains(msg, 'no') and (talk_state = 1) then
		selfSay('Then not.')
		talk_state = 0
	end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

stolek11.lua

<!---~~Błogosławienie Wooden Stake z RL Tibii by GM Prakt~~---!>
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
	return false
end

local quescik = getPlayerStorageValue(cid,6669)
local quest2  = getPlayerStorageValue(cid,6670)
local miejsce = getPlayerPosition(cid)

	if msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) == 0 then
				if quescik == 1
				selfSay('Ten prayers for a blessed stake? Don't tell me they made you travel whole Tibia for it! Listen, child, if you bring me a wooden stake, I'll bless it for you. <chuckles>!')
				talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quescik == -1
			selfSay('I don't have time... Ask someone else!')
			talk_state = 0
		end
	elseif msgcontains(msg, 'wooden stake') and getPlayerItemCount(uid,5941) >= 1 then
			if quescik == 1
			selfSay('Would you like to receive a spiritual prayer to bless your stake?')
			talk_state = 1
		end
	elseif msgcontains(msg, 'wooden stake') then
			if quest2 == 1
			selfSay('I have already blessed your wooden stake.')
			talk_state = 0
		end
------------------------------------------------ confirm yes ------------------------------------------------
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
			talk_state = 0
					selfSay('<mumblemumble> Sha Kesh Mar!')
					setPlayerStorageValue(cid,6670,1)
					doSendMagicEffect(miejsce,14)
					doPlayerRemoveItem(uid,5941,1)
					doPlayerAddItem(uid,5942,1)
				end
------------------------------------------------ confirm no ------------------------------------------------
	elseif msgcontains(msg, 'no') and (talk_state = 1) then
		selfSay('Then not.')
		talk_state = 0
	end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

 

Créditos: PRAKT <-- CASO O CRÉDITO ESTEJA ERRADO ME COMUNIQUE.

Link para o comentário
Compartilhar em outros sites

  • 1 month later...
  • 5 months later...
×
×
  • Criar Novo...