Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- start shit
- local keywordHandler = KeywordHandler:new()
- local npcHandler = NpcHandler:new(keywordHandler)
- NpcSystem.parseParameters(npcHandler)
- local talkState = {}
- 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
- --returns how many msgs he have said already
- function cancelNPCTalk(events)
- local ret=1
- for aux=1,table.getn(events) do
- if events[aux].done==FALSE then
- stopEvent(events[aux].event)
- else
- ret=ret+1
- end
- end
- events=nil
- return(ret)
- end
- function doCreatureSayWithDelay(cid,text,type,delay,e)
- if delay<=0 then
- doCreatureSay(cid,text,type)
- else
- local func=function(pars)
- doCreatureSay(pars.cid,pars.text,pars.type)
- pars.e.done=TRUE
- end
- e.done=FALSE
- e.event=addEvent(func,delay,{cid=cid, text=text, type=type, e=e})
- end
- end
- function doNPCTalkALot(msgs,interval)
- local e={}
- local ret={}
- if interval==nil then interval=3000 end --3 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])
- table.insert(ret,e[aux])
- end
- return(ret)
- end
- --end shit :P
- -- Killing In the Name Of.. --
- -- (taski) --
- -- ~~~~~~~~ By Seminari ~~~~~~ --
- -- //// | \\\\ --
- -- / __ __ \ --
- -- |[*] | [*]| --
- -- | ^ | --
- -- \ \_____/ / --
- -- --\___/-- --
- -- \______/ --
- -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ --
- function creatureSayCallback(cid, type, msg)
- if(not npcHandler:isFocused(cid)) then
- return false
- end
- -- zmienne lokalne
- local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
- local namee = getPlayerName(cid)
- local taski_do_wziecia_msg = ""
- local x_msg_taked_task = ""
- local taski_do_cancel_msg = ""
- local taski_czy_cancelowac_napewno_msg = ""
- local taski_do_report_msg = ""
- local ilosc_w_msgu = 0
- local ilosc_w_msgu2 = 0
- local ilosc_w_msgu3 = 0
- -- joinowanie
- if msgcontains(msg, 'join') then
- if KITNO_hasPlayerJoinedPawAndFur(cid) then
- npcHandler:say("You are allready member of Paw and Fur society, maybe you want to do some {task}s?", cid)
- return true
- elseif not(KITNO_hasPlayerJoinedPawAndFur(cid)) then
- npcHandler:say("Are you really want to join Paw and Fur society?", cid)
- talkState[talkUser] = 1
- end
- elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then
- if KITNO_doJoinToPawAndFur(cid) then
- npcHandler:say("You are joined the Paw and Fur society, you can take now some {task}s.", cid)
- talkState[talkUser] = 0
- return true
- elseif not(KITNO_doJoinToPawAndFur(cid)) then
- npcHandler:say("You are allready member of Paw and Fur society, maybe you want to do some {task}s?", cid)
- talkState[talkUser] = 0
- return true
- end
- elseif msgcontains(msg, 'no') and talkState[talkUser] == 1 then
- npcHandler:say("If no then no, idiot!", cid)
- talkState[talkUser] = 0
- return true
- elseif msgcontains(msg, 'no') then
- npcHandler:say("If no then no!", cid)
- talkState[talkUser] = 0
- return true
- -- koniec joinowania
- -- branie taskow
- elseif (msgcontains(msg, 'task') or msgcontains(msg, 'tasks')) then
- if not(KITNO_hasPlayerJoinedPawAndFur(cid)) then
- npcHandler:say("Sorry, but before you start any task you need to {join} Paw and Fur society.", cid)
- elseif KITNO_hasPlayerJoinedPawAndFur(cid) then
- if not(KITNO_canPlayerTakeMoreTaskFromGrizzlyAdams(cid)) then
- npcHandler:say("Sorry, but you allready taked maximum tasks ("..KITNO_max_tasks_in_paw_and_fur.."), You can {cancel} or {report}.", cid)
- elseif KITNO_canPlayerTakeMoreTaskFromGrizzlyAdams(cid) then
- for a,b in pairs(KITNO_Paw_and_Fur_tasks_for_lvl) do
- if getPlayerLevel(cid) >= a.lvl_min and getPlayerLevel(cid) <= a.lvl_max then
- for i=1, #b.tasks do
- for c,d in pairs(KITNO_Paw_and_Fur_tasks_tbl) do
- if b.tasks[i] == c then
- if KITNO_getPlayerSTGValue(cid, d.task_started_stg) < 1 then
- ilosc_w_msgu3 = ilosc_w_msgu3 + 1
- taski_do_wziecia_msg = taski_do_wziecia_msg .. " {".. c .."}<<"
- end
- end
- end
- end
- taski_do_wziecia_msg = string.gsub (taski_do_wziecia_msg, "<<", "," , (ilosc_w_msgu3 - 2))
- if ilosc_w_msgu3 >= 2 then taski_do_wziecia_msg = string.gsub (taski_do_wziecia_msg, "<<", " or" , 1) end
- taski_do_wziecia_msg = string.gsub (taski_do_wziecia_msg, "<<", "." , 1)
- npcHandler:say("You can take this tasks: ".. taski_do_wziecia_msg .."", cid)
- if KITNO_canPlayerAskAboutSpecialTasksFromGrizzlyAdams(cid) then
- npcHandler:say("Also you can ask about {special} tasks.", cid)
- end
- talkState[talkUser] = b.talk_to_take_task
- return true
- else
- npcHandler:say("Sorry, but in table there is no lvl on which u are ("..getPlayerLevel(cid)..") <-- this lvl isn't in task table.", cid)
- talkState[talkUser] = 0
- return true
- end
- end
- end
- end
- -- koniec brania taskow
- -- cancelowanie taskow
- elseif (msgcontains(msg, 'cancel') or msgcontains(msg, 'cancels')) then
- if not(KITNO_hasPlayerJoinedPawAndFur(cid)) then
- npcHandler:say("Sorry, but before you start any task you need to {join} Paw and Fur society.", cid)
- return true
- elseif KITNO_hasPlayerJoinedPawAndFur(cid) then
- if not(KITNO_hasPlayerStartedAnyTaskFromGrizzlyAdams(cid)) then
- npcHandler:say("You can't cancel any {task} because you haven't started yet any {task}.", cid)
- return true
- elseif KITNO_hasPlayerStartedAnyTaskFromGrizzlyAdams(cid) then
- for a,b in pairs(KITNO_Paw_and_Fur_tasks_for_lvl) do
- for i=1, #b.tasks do
- for c,d in pairs(KITNO_Paw_and_Fur_tasks_tbl) do
- if b.tasks[i] == c then
- if KITNO_getPlayerSTGValue(cid, d.task_started_stg) >= 1 then
- ilosc_w_msgu = ilosc_w_msgu + 1
- taski_do_cancel_msg = taski_do_cancel_msg .. " {".. c .."}<<"
- end
- end
- end
- end
- taski_do_cancel_msg = string.gsub (taski_do_cancel_msg, "<<", "," , (ilosc_w_msgu - 2))
- if ilosc_w_msgu >= 2 then taski_do_cancel_msg = string.gsub (taski_do_cancel_msg, "<<", " or" , 1) end
- taski_do_cancel_msg = string.gsub (taski_do_cancel_msg, "<<", "." , 1)
- npcHandler:say("You can cancel this tasks: ".. taski_do_cancel_msg .."", cid)
- if KITNO_canPlayerAskAboutSpecialTasksFromGrizzlyAdams(cid) then
- npcHandler:say("Also you can ask about {special} tasks.", cid)
- end
- talkState[talkUser] = KITNO_PawAndFur_talk_cancel
- return true
- end
- end
- end
- -- koniec cancelowania taskow
- -- raportowanie taskow
- elseif (msgcontains(msg, 'report') or msgcontains(msg, 'raport')) then
- if not(KITNO_hasPlayerJoinedPawAndFur(cid)) then
- npcHandler:say("Sorry, but before you start any task you need to {join} Paw and Fur society.", cid)
- return true
- elseif KITNO_hasPlayerJoinedPawAndFur(cid) then
- if not(KITNO_hasPlayerStartedAnyTaskFromGrizzlyAdams(cid)) then
- npcHandler:say("You can't report any {task} because you haven't started yet any {task}.", cid)
- return true
- elseif KITNO_hasPlayerStartedAnyTaskFromGrizzlyAdams(cid) then
- for a,b in pairs(KITNO_Paw_and_Fur_tasks_for_lvl) do
- for i=1, #b.tasks do
- for c,d in pairs(KITNO_Paw_and_Fur_tasks_tbl) do
- if b.tasks[i] == c then
- if KITNO_getPlayerSTGValue(cid, d.task_started_stg) >= 1 then
- ilosc_w_msgu2 = ilosc_w_msgu2 + 1
- taski_do_report_msg = taski_do_report_msg .. " {".. c .."}<<"
- end
- end
- end
- end
- taski_do_report_msg = string.gsub (taski_do_report_msg, "<<", "," , (ilosc_w_msgu2 - 2))
- if ilosc_w_msgu2 >= 2 then taski_do_report_msg = string.gsub (taski_do_report_msg, "<<", " or" , 1) end
- taski_do_report_msg = string.gsub (taski_do_report_msg, "<<", "." , 1)
- npcHandler:say("You can report this tasks: ".. taski_do_report_msg .."", cid)
- if KITNO_canPlayerAskAboutSpecialTasksFromGrizzlyAdams(cid) then
- npcHandler:say("Also you can ask about {special} tasks.", cid)
- end
- talkState[talkUser] = KITNO_PawAndFur_talk_report
- return true
- end
- end
- end
- -- konkretne taski
- elseif isInArray(KITN0_spis_wszystkich_taskow_Paw_and_Fur, msg:lower()) then
- for e,f in pairs(KITNO_Paw_and_Fur_tasks_tbl) do
- if msgcontains(msg, e) then
- -- talka daje do brania taska
- if talkState[talkUser] == f.talk_to_take_task then
- if KITNO_getPlayerSTGValue(cid, f.task_started_stg) >= 1 then
- npcHandler:say("You allrady have started this {task}!", cid)
- talkState[talkUser] = 0
- return true
- elseif KITNO_getPlayerSTGValue(cid, f.task_started_stg) < 1 then
- npcHandler:say(f.text_when_player_want_to_take_task, cid)
- talkState[talkUser] = f.talk_take_task
- return true
- end
- -- talka daje do cancelowania taska
- elseif talkState[talkUser] == KITNO_PawAndFur_talk_cancel then
- if KITNO_getPlayerSTGValue(cid, f.task_started_stg) < 1 then
- npcHandler:say("You haven't started yet this {task} so you can't {cancel} them!", cid)
- talkState[talkUser] = 0
- return true
- elseif KITNO_getPlayerSTGValue(cid, f.task_started_stg) >= 1 then
- if KITNO_getPlayerSTGValue(cid, f.task_started_stg) == 1 then
- taski_czy_cancelowac_napewno_msg = "You have allready killed: ".. KITNO_getPlayerSTGValue(cid,f.task_counter_stg) .."/".. f.task_required_kills .." ".. e ..". Do You really want to cancel this task?"
- elseif KITNO_getPlayerSTGValue(cid, f.task_started_stg) == 2 then
- taski_czy_cancelowac_napewno_msg = "You can kill boss of ".. e ..", but you really want to {cancel}? Then You won't be able to kill this boss."
- elseif KITNO_getPlayerSTGValue(cid, f.task_started_stg) == 3 then
- taski_czy_cancelowac_napewno_msg = "You killed boss, you should {report} that, but if you really want to {cancel} then u won't get points"
- end
- npcHandler:say(taski_czy_cancelowac_napewno_msg, cid)
- talkState[talkUser] = f.talk_cancel_task
- return true
- end
- -- reportowanie tasku
- elseif talkState[talkUser] == KITNO_PawAndFur_talk_report then
- if KITNO_getPlayerSTGValue(cid, f.task_started_stg) < 1 then
- npcHandler:say("You haven't yet started this {task}!", cid)
- talkState[talkUser] = 0
- return true
- elseif KITNO_getPlayerSTGValue(cid, f.task_started_stg) == 1 then
- if KITNO_getPlayerSTGValue(cid, f.task_counter_stg) < f.task_required_kills then
- npcHandler:say("Sorry but you have allready killed: ".. KITNO_getPlayerSTGValue(cid,f.task_counter_stg) .."/".. f.task_required_kills .." ".. e ..". Come back when you done!", cid)
- talkState[talkUser] = 0
- return true
- elseif KITNO_getPlayerSTGValue(cid, f.task_counter_stg) >= f.task_required_kills then
- KITNO_addPlayerPointsToPawAndFur(cid, f.task_points)
- if f.reward_exp ~= nil then
- doPlayerAddExperience(cid, f.reward_exp)
- end
- if f.boss then
- KITNO_setPlayerSTGValue(cid, f.task_started_stg, 2)
- KITNO_setPlayerSTGValue(cid, f.task_counter_stg, 0)
- elseif not(f.boss) then
- KITNO_setPlayerSTGValue(cid, f.task_started_stg, -1)
- KITNO_setPlayerSTGValue(cid, f.task_counter_stg, 0)
- KITNO_updateNumberOfStartedTasksFromGrizzlyAdams(cid, -1)
- end
- npcHandler:say(f.text_when_player_reported_succesfull_task, cid)
- if f.text_when_player_reported_succesfull_task2 ~= nil then
- npcHandler:say(f.text_when_player_reported_succesfull_task2, cid)
- end
- talkState[talkUser] = 0
- return true
- end
- elseif KITNO_getPlayerSTGValue(cid, f.task_started_stg) == 2 then
- npcHandler:say("First kill boss of ".. e .." and then {report} back to me. Of course you can {cancel} but you won't be able to kill boss!", cid)
- talkState[talkUser] = 0
- return true
- elseif KITNO_getPlayerSTGValue(cid, f.task_started_stg) == 3 then
- if f.boss_points == nil then f.boss_points = 0 end
- KITNO_setPlayerSTGValue(cid, f.task_started_stg, -1)
- KITNO_setPlayerSTGValue(cid, f.task_counter_stg, 0)
- KITNO_addPlayerPointsToPawAndFur(cid, f.boss_points)
- npcHandler:say("Good work, for this boss i added you ".. f.boss_points .." task points.", cid)
- KITNO_updateNumberOfStartedTasksFromGrizzlyAdams(cid, -1)
- talkState[talkUser] = 0
- return true
- end
- end
- end
- end
- -- yesy
- elseif msgcontains(msg, 'yes') then
- -- branie taskow
- if talkState[talkUser] >= 200 and talkState[talkUser] <= 299 then
- for g,h in pairs(KITNO_Paw_and_Fur_tasks_tbl) do
- if talkState[talkUser] == h.talk_take_task then
- if KITNO_getPlayerSTGValue(cid, h.task_started_stg) >= 1 then
- npcHandler:say("You allrady have started this {task}!", cid)
- talkState[talkUser] = 0
- return true
- elseif KITNO_getPlayerSTGValue(cid, h.task_started_stg) < 1 then
- x_msg_taked_task = KITNO_Paw_and_Fur_when_player_taked_task_msgs_tbl[math.random(1,#KITNO_Paw_and_Fur_when_player_taked_task_msgs_tbl)]
- npcHandler:say(x_msg_taked_task, cid)
- KITNO_setPlayerSTGValue(cid, h.task_started_stg, 1)
- KITNO_setPlayerSTGValue(cid, h.task_counter_stg, 0)
- KITNO_updateNumberOfStartedTasksFromGrizzlyAdams(cid, 1)
- talkState[talkUser] = 0
- return true
- end
- end
- end
- -- cancelowanie taskow
- elseif talkState[talkUser] >= 300 and talkState[talkUser] <= 399 then
- for g,h in pairs(KITNO_Paw_and_Fur_tasks_tbl) do
- if talkState[talkUser] == h.talk_cancel_task then
- if KITNO_getPlayerSTGValue(cid, h.task_started_stg) < 1 then
- npcHandler:say("You allrady haven't yet started this {task}!", cid)
- talkState[talkUser] = 0
- return true
- elseif KITNO_getPlayerSTGValue(cid, h.task_started_stg) >= 1 then
- npcHandler:say("You canceled task called ".. g ..".", cid)
- KITNO_setPlayerSTGValue(cid, h.task_started_stg, -1)
- KITNO_setPlayerSTGValue(cid, h.task_counter_stg, -1)
- KITNO_updateNumberOfStartedTasksFromGrizzlyAdams(cid, -1)
- talkState[talkUser] = 0
- return true
- end
- end
- end
- -- branie tasku na demony
- elseif talkState[talkUser] == 6666 then
- if KITNO_getStatusDemonTaskInPawAndFur(cid) < 1 then
- KITNO_setStatusDemonTaskInPawAndFur(cid, 1)
- KITNO_setCounterDemonsInPawAndFur(cid, 0)
- npcHandler:say("Good show, old chap! Come back to me when you are done hunting.", cid)
- talkState[talkUser] = 0
- return true
- end
- end
- -- rangi
- elseif msgcontains(msg, 'rank') then
- npcHandler:say("Your current rank is ".. KITNO_getPlayerRankNameInPawAndFur(cid) .." to advance to next {rank} ask about {promotion}", cid)
- -- promotion
- elseif (msgcontains(msg, 'promotion') or msgcontains(msg, 'advance')) then
- if KITNO_getPlayerRankInPawAndFur(cid) < 1 then
- if KITNO_getPlayerPointsInPawAndFur(cid) >= KITNO_Paw_and_Fur_rank_tbl[1].points_to_reach_this_rank then
- if getPlayerLevel(cid) >= KITNO_Paw_and_Fur_rank_tbl[1].minimum_lvl_to_reach_this_rank then
- KITNO_advancePlayerToRankInPawAndFur(cid, 1)
- npcHandler:say(KITNO_Paw_and_Fur_rank_tbl[1].msg_przy_advance, cid)
- if KITNO_Paw_and_Fur_rank_tbl[1].msg_przy_advance2 ~= nil then
- npcHandler:say(KITNO_Paw_and_Fur_rank_tbl[1].msg_przy_advance2, cid)
- end
- doPlayerAddExperience(cid, KITNO_Paw_and_Fur_rank_tbl[1].reward_exp)
- else
- npcHandler:say("To {advance} to next {rank} you need to have " .. KITNO_Paw_and_Fur_rank_tbl[1].minimum_lvl_to_reach_this_rank .. "+ lvl.", cid)
- end
- else
- npcHandler:say("To {advance} to next {rank} you need to get " .. KITNO_Paw_and_Fur_rank_tbl[1].points_to_reach_this_rank .. " points. (You allready have: ".. KITNO_getPlayerPointsInPawAndFur(cid) .." points).", cid)
- end
- elseif KITNO_getPlayerRankInPawAndFur(cid) >= 1 then
- if KITNO_getPlayerPointsInPawAndFur(cid) >= KITNO_Paw_and_Fur_rank_tbl[KITNO_getPlayerRankInPawAndFur(cid) + 1].points_to_reach_this_rank then
- if getPlayerLevel(cid) >= KITNO_Paw_and_Fur_rank_tbl[KITNO_getPlayerRankInPawAndFur(cid) + 1].minimum_lvl_to_reach_this_rank then
- KITNO_advancePlayerToRankInPawAndFur(cid, KITNO_getPlayerRankInPawAndFur(cid) + 1)
- npcHandler:say(KITNO_Paw_and_Fur_rank_tbl[KITNO_getPlayerRankInPawAndFur(cid) + 1].msg_przy_advance, cid)
- if KITNO_Paw_and_Fur_rank_tbl[KITNO_getPlayerRankInPawAndFur(cid) + 1].msg_przy_advance2 ~= nil then
- npcHandler:say(KITNO_Paw_and_Fur_rank_tbl[KITNO_getPlayerRankInPawAndFur(cid) + 1].msg_przy_advance2, cid)
- end
- doPlayerAddExperience(cid, KITNO_Paw_and_Fur_rank_tbl[KITNO_getPlayerRankInPawAndFur(cid) + 1].reward_exp)
- if KITNO_Paw_and_Fur_rank_tbl[KITNO_getPlayerRankInPawAndFur(cid) + 1].reward_item ~= nil then
- doPlayerAddItem(cid, KITNO_Paw_and_Fur_rank_tbl[KITNO_getPlayerRankInPawAndFur(cid) + 1].reward_item, KITNO_Paw_and_Fur_rank_tbl[KITNO_getPlayerRankInPawAndFur(cid) + 1].reward_item_count)
- end
- else
- npcHandler:say("To {advance} to next {rank} you need to have " .. KITNO_Paw_and_Fur_rank_tbl[KITNO_getPlayerRankInPawAndFur(cid) + 1].minimum_lvl_to_reach_this_rank .. "+ lvl.", cid)
- end
- else
- npcHandler:say("To {advance} to next {rank} you need to get" .. KITNO_Paw_and_Fur_rank_tbl[KITNO_getPlayerRankInPawAndFur(cid) + 1].points_to_reach_this_rank .. " points. (You allready have: ".. KITNO_getPlayerPointsInPawAndFur(cid) .." points).", cid)
- end
- end
- -- special taski
- elseif msgcontains(msg, 'special') then
- if not(KITNO_canPlayerAskAboutSpecialTasksFromGrizzlyAdams(cid)) then
- npcHandler:say("Your {rank} is too low to talk with me about {special} tasks.", cid)
- talkState[talkUser] = 0
- return true
- elseif KITNO_canPlayerAskAboutSpecialTasksFromGrizzlyAdams(cid) then
- if KITNO_getStatusSpecialTasksInPawAndFur(cid) < 1 then
- KITNO_setStatusSpecialTasksInPawAndFur(cid, 1)
- npcHandler:say("Have you heared about Tiquandas Revenge? It is said that the jungle itself is alive and takes revenge for all the bad things people have done to it. ...", cid)
- npcHandler:say("I myself believe that there is some truth in this clap trap. Something 'real' which therefore must have a hideout somewhere. Go find it and take revenge yourself! Ask me about the special task when you're done.", cid)
- talkState[talkUser] = 0
- return true
- elseif KITNO_getStatusSpecialTasksInPawAndFur(cid) == 1 then
- npcHandler:say("Come back when you kill Tiquandas Revenge. You can't {cancel} this {task} because {special} tasks cannot be canceled.", cid)
- talkState[talkUser] = 0
- return true
- elseif KITNO_getStatusSpecialTasksInPawAndFur(cid) == 2 then
- KITNO_setStatusSpecialTasksInPawAndFur(cid, 3)
- npcHandler:say("Great accievement, old chap! You are an outstanding hunter, no doubt about it!", cid)
- talkState[talkUser] = 0
- return true
- elseif KITNO_getStatusSpecialTasksInPawAndFur(cid) == 3 then
- KITNO_setStatusSpecialTasksInPawAndFur(cid, 4)
- npcHandler:say("This task is a very dangerous one. I want you to look for Demodras' hideout. It might be somewhere under the Plains of Havoc. Good luck, old chap, come back in one piece and ask me about the special task when you're done.", cid)
- talkState[talkUser] = 0
- return true
- elseif KITNO_getStatusSpecialTasksInPawAndFur(cid) == 4 then
- npcHandler:say("Come back when you kill Demodras. You can't {cancel} this {task} because {special} tasks cannot be canceled.", cid)
- talkState[talkUser] = 0
- return true
- elseif KITNO_getStatusSpecialTasksInPawAndFur(cid) == 5 then
- KITNO_setStatusSpecialTasksInPawAndFur(cid, 6)
- npcHandler:say("Jolly good show! You can cross swords with any creature in this world! I bow to you.", cid)
- talkState[talkUser] = 0
- return true
- elseif KITNO_getStatusSpecialTasksInPawAndFur(cid) == 6 then
- if not(KITNO_canPlayerAskAboutDemonTaskFromGrizzlyAdams(cid)) then
- npcHandler:say("Your {rank} is too low to talk about next {special} task... Demons are soo much powerful.", cid)
- talkState[talkUser] = 0
- return true
- elseif KITNO_canPlayerAskAboutDemonTaskFromGrizzlyAdams(cid) then
- if KITNO_getStatusDemonTaskInPawAndFur(cid) < 1 then
- npcHandler:say("The spawn of pure evil must be erased from Tibia. You'll find demons lurking in the northern ruins of Edron as well as in some of other deeper dungeons of Tibia. Slay 6666 demons for the Greater Good! Do you think you can handle this task?", cid)
- talkState[talkUser] = 6666
- return true
- elseif KITNO_getStatusDemonTaskInPawAndFur(cid) == 1 then
- if KITNO_getCounterDemonsInPawAndFur(cid) < KITNO_how_many_demons_required_in_special_paw_and_fur then
- npcHandler:say("You allready killed ".. KITNO_getCounterDemonsInPawAndFur(cid) .."/".. KITNO_how_many_demons_required_in_special_paw_and_fur .." demons. Come back when you done.", cid)
- talkState[talkUser] = 0
- return true
- elseif KITNO_getCounterDemonsInPawAndFur(cid) >= KITNO_how_many_demons_required_in_special_paw_and_fur then
- KITNO_setStatusDemonTaskInPawAndFur(cid, 2)
- KITNO_setCounterDemonsInPawAndFur(cid, 0)
- doPlayerAddItem(cid, KITNO_PawAndFur_Holy_Icon_id, 1)
- KITNO_givePlayerAccesToStartDemonOak(cid)
- npcHandler:say("Such derring do deserves a special reward! Take this holy icon, It neutralizes great evil and gives you access to areas which are protected by those forces.", cid)
- talkState[talkUser] = 0
- return true
- end
- elseif KITNO_getStatusDemonTaskInPawAndFur(cid) == 2 then
- if KITNO_getPlayerStatusInDemonOak(cid) == 1 then
- npcHandler:say("You have mission to destroy Demon Oak, after you done this {task}, come back and talk about {special} task.", cid)
- elseif KITNO_getPlayerStatusInDemonOak(cid) == 2 then
- end
- end
- end
- end
- end
- end
- return true
- end
- npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
- npcHandler:addModule(FocusModule:new())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement