undead mage
Active Member
Like the title says need npc quentin or somthing from the rl tibia thais temple
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Quentin" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="57" head="0" body="0" legs="0" feet="0" addons="0"/>
</npc>
<?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>
<!---~~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())