Advertisement
Guest User

Untitled

a guest
May 6th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.58 KB | None | 0 0
  1. -- No map marks added. They can easily be added by making a table of pos, type and description.
  2.  
  3.  
  4. local keywordHandler = KeywordHandler:new()
  5. local npcHandler = NpcHandler:new(keywordHandler)
  6. NpcSystem.parseParameters(npcHandler)
  7. local talk_state = {}
  8.  
  9.  
  10. -- OTServ event handling functions start
  11. function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
  12. function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
  13. function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
  14. function onThink() npcHandler:onThink() end
  15. -- OTServ event handling functions end
  16.  
  17.  
  18. function greetCallback(cid)
  19. npcHandler:setMessage(MESSAGE_GREET, "Not many travellerzz zzezze dayzz. I hope you bring good newzz.")
  20. return true
  21. end
  22.  
  23. local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
  24. local Storage = {
  25. ChildrenofTheRevolution = {
  26. Questline = 12300, -- Storage through the Quest
  27. Mission00 = 12301, -- Prove Your Worzz!
  28. Mission01 = 12302,
  29. Mission02 = 12303,
  30. Mission03 = 12304,
  31. Mission04 = 12305,
  32. Mission05 = 12306,
  33. SpyBuilding01 = 12307,
  34. SpyBuilding02 = 12308,
  35. SpyBuilding03 = 12309,
  36. StrangeSymbols = 12310
  37. },
  38. WrathoftheEmperor = {
  39. Questline = 12350, -- Storage through the Quest
  40. Mission01 = 12351,
  41. Mission02 = 12352,
  42. Mission03 = 12353,
  43. Mission04 = 12354,
  44. Mission05 = 12355,
  45. Mission06 = 12356,
  46. Mission07 = 12357,
  47. Mission08 = 12358,
  48. Mission09 = 12359,
  49. Mission10 = 12360,
  50. Mission11 = 12361,
  51. Mission12 = 12362,
  52. },
  53. }
  54.  
  55.  
  56. function creatureSayCallback(cid, type, msg)
  57. if not npcHandler:isFocused(cid) then
  58. return false
  59. end
  60.  
  61. if msgcontains(msg, "mission") then
  62. -- CHILDREN OF REVOLUTION QUEST
  63. if getPlayerStorageValue(cid, Storage.ChildrenofTheRevolution.Questline) < 1 then
  64. npcHandler:say("Zzo you are offering your help to a lizzard? Hmm, unuzzual. I don\'t know if I can fully truzzt you yet. ...", cid)
  65. npcHandler:say("You\'ll have to work to earn my truzzt. Are you zzure you want to offer me your help?", cid)
  66. talk_state = 1
  67. elseif getPlayerStorageValue(cid, Storage.ChildrenofTheRevolution.Questline) == 2 then
  68. npcHandler:say("What newzz do you bring? Did you find any cluezz about zzeir whereaboutzz?")
  69. talk_state = 3
  70. elseif getPlayerStorageValue(cid, Storage.ChildrenofTheRevolution.Questline) == 3 then
  71. npcHandler:say({
  72. "Zzurely you have zzeen zze black pondzz and puddlezz all over zze mountain pazz, palezzkin. It izz zze corruption zzat pervadezz zze landzz. It would be wizze not to drink or tazzte from zzem. ... ",
  73. "It zzoakzz zze land, itzz people and even zze air itzzelf. But zzere are zztill zzpotzz not tainted by zze darknezz. ... ",
  74. "A temple, norzzwezzt of zze barricaded outpozzt wizztood zze evil influenzze. However, I lozzt contact to itzz inhabitantzz when zze lizzardzz tightened zzeir grip. ... ",
  75. "No one made it zzrough zze mountainzz for quite zzome time now - exzzept you. Maybe you can find out what happened zzere?"
  76. }, cid)
  77. talk_state = 5
  78. elseif getPlayerStorageValue(cid, Storage.ChildrenofTheRevolution.Questline) == 5 then
  79. npcHandler:say({
  80. "Zzo you found zze temple... lozzt you zzay. It wazz our lazzt remaining bazztion of hope for help from wizzin zze plainzz. ... ",
  81. "Zzat meanzz zze plainzz are now in zze handzz of zze emperor and hizz army. I\'m afraid zzat even zze great gate izz zzealed and zze landzz beyond it tainted azz well. ... ",
  82. "Dark timezz, and I fear we know nozzing about our enemy yet."
  83. }, cid)
  84. talk_state = 0
  85. setPlayerStorageValue(cid, Storage.ChildrenofTheRevolution.Questline, 6)
  86. setPlayerStorageValue(cid, Storage.ChildrenofTheRevolution.Mission01, 3)
  87. elseif getPlayerStorageValue(cid, Storage.ChildrenofTheRevolution.Questline) == 6 then
  88. npcHandler:say({
  89. "Large partzz of zze empire are tainted. I zzee now zzat zzere izz almozzt nozzing left of our onzze zzo zztrong zzivilizzation. But I zztill don't know which danger our enemy really pozzezz. ... ",
  90. "Zzere uzzed to be a remote and quiet zzettlement in zze middle of zze valley. If it hazz not been dezztroyed by zze corruption, I'm zzure zze army of zze emperor will have confizzcated it to gazzer rezzourzzezz. ... ",
  91. "If you can get inzzide zze village, find out anyzzing you can about zzeir zzituation. Zze clever hawk hidezz itzz clawzz. ... ",
  92. "I'm mozzt interezzted in zzeir weaponzz, food and zze zztrengzz of zzeir forzzezz. ... ",
  93. "Are you prepared for zzizz mizzion? "
  94. }, cid)
  95. talk_state = 6
  96. elseif getPlayerStorageValue(cid, Storage.ChildrenofTheRevolution.Questline) == 7 then
  97. if getPlayerStorageValue(cid, Storage.ChildrenofTheRevolution.SpyBuilding01) == 1 and getPlayerStorageValue(cid, storage.ChildrenofTheRevolution.SpyBuilding02) == 1 and getPlayerStorageValue(cid, storage.ChildrenofTheRevolution.SpyBuilding03) == 1 then
  98. npcHandler:say({
  99. "Zzizz izz mozzt unfortunate. Zzo many warriorzz? Large amountzz of food? And how many weaponzz did you zzay? I zzee, hmm. ... ",
  100. "Direct confrontation izz futile. We'll have to find ozzer wayzz to approach zze emperor and hizz army. "
  101. }, cid)
  102. setPlayerStorageValue(Storage.ChildrenoftheRevolution.Questline, 8)
  103. setPlayerStorageValue(Storage.ChildrenoftheRevolution.Mission02, 5)
  104. talk_state = 0
  105. end
  106. elseif getPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Questline) == 8 then
  107. npcHandler:say({
  108. "Your lazzt excurzzion revealed a terrifying truzz. Zze enemy'zz forzzezz are overwhelming, zzeir zztrengzz probably unrivaled. We cannot attack an army of zzizz zzize unlezz - unlezz we zzin out zzeir rankzz a little. ... ",
  109. "A zzingle individual can be azz zztrong azz an army if he zztrikezz zze army azz a whole. ... ",
  110. "Are you ready for your nexzzt tazzk? "
  111. }, cid)
  112. talk_state = 7
  113. elseif getPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Questline) == 11 then
  114. npcHandler:say({
  115. "You accomplished an important tazzk in breaking zze defenzze of zze emperor. Not everyzzing might be lozzt yet. ... ",
  116. "I've got anozzer mizzion for you which will be even more dangerouzz zzan zze lazzt one. Return to me when you're ready. "
  117. }, cid)
  118. talk_state = 0
  119. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Questline, 12)
  120. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Mission03, 3)
  121. elseif getPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Questline) == 12 then
  122. npcHandler:say({
  123. "Wizz zze enemy'zz forzzezz weakened like zzizz, we will be able to zzneak pazzt zze defenzze and furzzer inzzpect zze norzz. You should travel to zze mountain range furzzer eazzt of zze village. ... ",
  124. "Zze old route to zze gate hazz been taken by darknezz. You'll have to find ozzer wayzz. Are you up to zzizz, palezzkin? "
  125. }, cid)
  126. talk_state = 10
  127. elseif getPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Questline) == 17 then
  128. npcHandler:say({
  129. "You have zzolved zze riddle? Imprezzive, palezzkin. Zze humming you hear in zze chamber mozzt zzertainly comezz from a magic portal zzomewhere in zze temple. ...",
  130. "Have you zzearched zze ozzer chamberzz for any magical devizzezz or portalzz?"
  131. }, cid)
  132. talk_state = 12
  133. elseif getPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Questline) == 18 then
  134. npcHandler:say({
  135. "If I'm correct, zze portal in zze chamber beyond zze mechanizzm will lead you to zze great gate. It izz perfectly pozzible, however, zzat you will not be tranzzported directly into zze area. ...",
  136. "You will razzer be brought to a plazze clozze by your goal. Where exzzactly, I cannot zzay. ...",
  137. "Take all your courage and walk zze pazz zzrough zze portal. At leazzt TRY it - after all, I didn't make you my pupil for nozzing, Kohei. Are you prepared?"
  138. }, cid)
  139. talk_state = 13
  140. elseif getPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Questline) == 20 then
  141. npcHandler:say({
  142. "Too clozze, far too clozze. I felt a huge impact not long after you left. Zze war machinery of zze emperor muzzt finally have been zztarted. ...",
  143. "I focuzzed and could only hope zzat I would reach you before everyzzing wazz too late. If I hadn't been able to tranzzport you here, our cauzze would have been lozzt. ...",
  144. "I'm afraid we cannot continue zzizz fight here today. Zze rezzizztanzze izz zztill fragile. I'm afraid, zzere izz zztill much left to do. We'll have to prepare for war. ...",
  145. "You've helped uzz a great deal during zzezze dark hourzz, I've got zzomezzing for you my friend. Pleazze, take zzizz zzerpent crezzt azz a zzign of my deep rezzpect. ...",
  146. "Rezzt for now, you will need it - you have earned it."
  147. }, cid)
  148. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Questline, 21)
  149. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Mission05, 3) --Questlog, Children of the Revolution "Mission 5: Phantom Army"
  150. doPlayerAddItem(cid, 11116, 1)
  151. doPlayerAddExp(cid, 10000, true)
  152. talk_state = 0
  153. -- CHILDREN OF REVOLUTION QUEST
  154.  
  155. -- WRATH OF THE EMPEROR QUEST
  156. elseif getPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Questline) == 21 and getPlayerStorageValue(cid, Storage.WrathoftheEmperor.Questline) < 1 then
  157. npcHandler:say({
  158. "Zze attackzz have weakened our enemy zzignificantly. Yet, your quezzt continuezz. Bezzidezz zzome tazzkzz you could take, zze zzreat of zze emperor izz zztill hanging over our headzz like a rain cloud. ... ",
  159. "Zzo, are you indeed willing to continue zze fight for our cauzze? "
  160. }, cid)
  161. talk_state = 14
  162. elseif getPlayerStorageValue(cid, Storage.WrathoftheEmperor.Questline) == 1 then
  163. npcHandler:say("Ah you have returned. I azzume you already found zzome itemzz to build a proper dizzguizze? ", cid)
  164. talk_state = 16
  165. elseif getPlayerStorageValue(Storage.WrathoftheEmperor.Questline) == 6 then
  166. npcHandler:say({
  167. "You ezztablished zze connection to zze hideout, good. But zzizz izz no time to rezzt. Your new tazzk will be quite different. ... ",
  168. "Zze gardenzz are plagued by a creature. Zze former keeper of zzizz garden became an abomination of madnezz zzat needzz to be zztopped. ... ",
  169. "He hidezz deep underground and it will be dangerouzz to challenge him in hizz lair but I am willing to rizzk it. ... ",
  170. "Find him, dezztroy him, bring me hizz - I uhm, mean it izz utterly nezzezzary for you to deliver me a proof of hizz deazz. ... ",
  171. "Now go - what are you waiting for, zzoftzzkin? Ready to finish what needzz to be finished? "
  172. }, cid)
  173. talk_state = 19
  174. elseif getPlayerStorageValue(cid, Storage.WrathoftheEmperor.Questline) == 8 then
  175. npcHandler:say("Zzo... you finished him. Show me hizz head, will you? ", cid)
  176. talk_state = 20
  177. elseif getPlayerStorageValue(cid, Storage.WrathoftheEmperor.Questline) == 9 then
  178. npcHandler:say({
  179. "At zze dawn of time, zze children of zze Great Zznake were numerouzz. Zzey daringly colonizzed many partzz of zze world. But all bravery did not help againzzt zze sheer number of enemiezz zzey encountered. ... ",
  180. "And while zze entitiezz zze unbelieverzz call godzz battled for power out of vanity, zze fazze of zze world changed violently. ... ",
  181. "Many zzentrezz of our magnifizzent zzivilizzation were dezztroyed and only two realmzz zzat we know of remained intact but lozzt contact to each ozzer. ... ",
  182. "In vizzionzz, zze Great Zznake revealed to Zalamon zze exzzizztenzze of ozzer lizzard people in a vazzt jungle in a far away land. ...",
  183. "Zzough zze lizardzz of zze land failed zze Great Zznake and lozzt itzz favour, zzey are zztill in pozzezzion of ancient reliczz of immenzze power, onzze imbued by zze Great Zznake himzzelf. ... ",
  184. "I had vizzionzz of an - item. Yezz. It may be uzzeful for uzz - I mean you, ezzpecially you. ... ",
  185. "We need a zzeptre of power zzat can be found in zze underground of an ancient temple. It hazz been overrun by zzavage apezz and you will have to fight zzem and zze ancient guardianzz of zze temple azz well. Get uzz zzat zzeptre wherever it might be. ... ",
  186. "It wazz revealed zzat it hazz been zzplit into 3 partzz for reazzonzz zzat are of no importanzze anymore. Zzizz powerful devizze could help uzz in our battle againzzt zze emperor. ... ",
  187. "A shaft, a cuzzp, and an emerald form a zzeptre of zzuch power zzat zze partzz were hidden and are now guarded by vile creaturezz. ... ",
  188. "Find it. Retrieve it. And bring it back to me. "
  189. }, cid)
  190. setPlayerStorageValue(cid, Storage.WrathoftheEmperor.Questline, 10)
  191. setPlayerStorageValue(cid, Storage.WrathoftheEmperor.Mission04, 1)
  192. talk_state = 0
  193. elseif getPlayerStorageValue(cid, Storage.WrathoftheEmperor.Questline) == 11 then
  194. npcHandler:say("You - azzembled zze zzeptre? Hand it out, give it to me, will you? ", cid)
  195. talk_state = 21
  196. elseif getPlayerStorageValue(cid, Storage.WrathoftheEmperor.Questline) == 12 then
  197. npcHandler:say({
  198. "Now we need to get clozzer to zze emperor himzzelf. A hive of beezz would defend zzeir queen wizz zzeir lives in cazze an enemy gained entranzze. Zzizz makezz a formidable defenzze line, nearly inviolable. ... ",
  199. "But a zztranger directly in zze midzzt of zze hive will be acczzepted - after all it izz not pozzible to overcome zzuch a formidable defenzze which izz nearly inviolable, or izz it? Ha. ... ",
  200. "Now zzat you overcame zzeir linezz of defenzze at zze great gate, you only need to find a way to enter zzeir home. ... ",
  201. "Head zztraight to zze entranzze of zze zzity. If you can convinzze zze guardzz to let you enter zze zzity, you should be able to reach our contact zzere wizz eazze. ... ",
  202. "We have alzzo forged zome paperzz for you and zzent zzem to zze zzity. Your victory in zze arena iz well known in our land. Wizz zze help of zzezze paperzz you will pretend zzat zzome of zze higher officialzz want to talk to you about your battle. ... ",
  203. "Zzizz way you will be able to enter zze zzity of zze dragon emperor and meet our contact zzere in zze imperial offizze. He will give you zze next inzztructionzz. "
  204. }, cid)
  205. setPlayerStorageValue(cid, Storage.WrathoftheEmperor.Questline, 13)
  206. setPlayerStorageValue(cid, Storage.WrathoftheEmperor.Mission05, 1) --Questlog, Wrath of the Emperor "Mission 05: New in Town"
  207. talk_state = 0
  208. -- WRATH OF THE EMPEROR QUEST
  209. end
  210.  
  211. -- WRATH OF THE EMPEROR QUEST
  212. elseif msgcontains(msg, "crate") then
  213. if talk_state == 17 then
  214. npcHandler:say("Ah I zzee. You are ready for your mizzion and waiting for me to create and mark zze crate? ", cid)
  215. talk_state = 18
  216. end
  217. -- WRATH OF THE EMPEROR QUEST
  218.  
  219. -- CHILDREN OF REVOLUTION QUEST
  220. elseif msgcontains(msg, "symbols") then
  221. if getPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.StrangeSymbols) == 1 then
  222. npcHandler:say({
  223. "Mh, zze zzymbolzz of zze chamber you dezzcribe are very common in our culture, palezzkin. You should have come accrozz zzem in many a plazze already. ...",
  224. "Zze zzymbolzz zzeem to be arranged in zzome way you zzay? Were zzere any notizzeable devizzezz? Zzwitchezz or leverzz? "
  225. }, cid)
  226. talk_state = 11
  227. end
  228. -- CHILDREN OF REVOLUTION QUEST
  229. elseif msgcontains(msg, "poison") or msgcontains(msg, "poizzon") then
  230. if getPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Questline) == 9 then
  231. npcHandler:say("Zze emperor of zze dragonzz hazz tranzzformed himzzelf into an undead creature to lazzt for all eternity, to cheat deazz. Hizz corruption flowzz to zzozze he bound, and from zzem to zzozze zzey bound, and from zzem into zze land.", cid)
  232. talk_state = 0
  233. end
  234. -- CHILDREN OF REVOLUTION QUEST
  235. elseif msgcontains(msg, "yes") then
  236. -- CHILDREN OF REVOLUTION QUEST
  237. if talk_state == 1 then
  238. npcHandler:say({
  239. "Zzen indeed, I have a tazzk for you. Lizzten carefully and you might even learn zzomezzing. A wizze being hearzz one zzing and underzztandzz ten. ...",
  240. "Zze mountainzz to zze norzz are overrun by corrupted lizzardzz. ...",
  241. "Beyond zzem, you'll find a lush valley, zze Muggy Plainzz. Find out about zzeir planzz, zzeir tacticzz. Zze lizzardzz' art of war izz characterizzed by dizzguizze and zzecrezzy. ...",
  242. "A traveller told me about a barricaded zzettlement zzey ezztablished. It'zz a weak and in all zzeir arroganzze, poorly guarded outpozzt beyond zze mountainzz. ...",
  243. "If you can find any documentzz about zzeir zztrategiezz, zze rezzizztanzze will be very grateful. ...",
  244. "Are you interezzted, palezzkin?"
  245. }, cid)
  246. talk_state = 2
  247. elseif talk_state == 2 then
  248. npcHandler:say("Be warned. Zze mountain pazzezz have been dezzerted for zzeveral weekzz now. No one made it acrozz and I fear you won't meet a zzingle friendly zzoul up zzere.", cid)
  249. setPlayerStorageValue(Storage.ChildrenoftheRevolution.Questline, 1)
  250. setPlayerStorageValue(Storage.ChildrenoftheRevolution.Mission00, 1) --Questlog, Children of the Revolution "Prove Your Worzz!"
  251. talk_state = 0
  252. elseif talk_state == 3 then
  253. npcHandler:say("Exzztraordinary. We are mozzt fortunate to have zzezze documentzz in our handzz now. Zzizz would zzertainly help me to build an effective rezzizztanzze. Will you give zzem to me? ", cid)
  254. talk_state = 4
  255. elseif talk_state == 4 then
  256. if doPlayerRemoveItem(cid, 11101, 1) then
  257. npcHandler:say({
  258. "Aaah, zzezze look zzertainly interezzting. Zzezze manuzzcriptzz show uzz zzeveral locationzz of zze enemy troopzz. ... ",
  259. "I'm imprezzed, zzoftzzkin. Maybe you can be of zzome more help. "
  260. }, cid)
  261. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Questline, 3)
  262. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Mission00, 2) --Questlog, Children of the Revolution "Prove Your Worzz!"
  263. talk_state = 0
  264. end
  265. elseif talk_state == 5 then
  266. npcHandler:say("I've marked itzz location on your map. Go and find out what happened zzere. In zze pazzt it wazz known azz zze Temple of Equilibrium. ", cid)
  267. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Questline, 4)
  268. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Mission01, 1) --Questlog, Children of the Revolution "Mission 1: Corruption"
  269. --player:addMapMark(Position(33177, 31193, 7), 5, "Temple of Equilibrium")
  270. talk_state = 0
  271. elseif talk_state == 6 then
  272. npcHandler:say({
  273. "I'll mark zze entranzze to Chaochai on your map. ... ",
  274. "Conzzentrate on one location at a time. Zze one who chazzezz after two harezz, won't catch even one. "
  275. }, cid)
  276. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Questline, 7)
  277. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Mission02, 1) --Questlog, Children of the Revolution "Mission 2: Imperial Zzecret Weaponzz"
  278. --[[ for i = 1, #marks.ChildrenOfTheRevolution do
  279. local mark = marks.ChildrenOfTheRevolution[i]
  280. player:addMapMark(mark.position, mark.type, mark.description)
  281. end]]
  282. talk_state = 0
  283. elseif talk_state == 7 then
  284. npcHandler:say({
  285. "Not far to zze eazzt of zze village, you'll find rizze fieldzz. Zzey uzze zzem to rezztore zzeir food suppliezz. ... ",
  286. "In zze zztorage accrozz zzizz room, you'll find a zzpecial poizzon which will zzignificantly weaken zzem if uzzed on zze water and zzoil zze rizze growzz in. ... ",
  287. "Are you fully prepared for zzizz?"
  288. }, cid)
  289. talk_state = 8
  290. elseif talk_state == 8 then
  291. npcHandler:say({
  292. "Good. Zze fieldzz should be not far from Xiachai in zze eazzt. Go to zze top terrazze and mix zze poizzon wizz zze water. ... ",
  293. "{Poizzon} izz often uzzed by cowardzz, yet it grantzz great power to zze opprezzed. "
  294. }, cid)
  295. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Questline, 9)
  296. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Mission03, 1) --Questlog, Children of the Revolution "Mission 3: Zee Killing Fieldzz"
  297. talk_state = 0
  298. elseif talk_state == 10 then
  299. npcHandler:say({
  300. "Perhapzz you can find a way to enter zze norzz of zze valley and find a pazzage to zze great gate itzzelf. Zzearch any templezz or zzettlementzz you come accrozz for hidden pazzagezz. ... ",
  301. "I wish for a zzafe return wizz good newzz. "
  302. }, cid)
  303. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Questline, 13)
  304. if getPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Mission04) <= 1 then
  305. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Mission04, 1) --Questlog, Children of the Revolution "Mission 4: Zze Way of Zztonezz"
  306. end
  307. talk_state = 0
  308. elseif talk_state == 11 then
  309. npcHandler:say({
  310. "Interezzting. It'zz a riddle, zzoftzzkin. Zzuch gamezz are very popular in our culture. I believe zze leverzz will alter zze arrangement. ... ",
  311. "Not too far from zze lever, zzere muzzt be a hint of zzome zzort. An image of how zze zzymbolzz muzzt be arranged. Zzurely zze mechanizzm will trigger a zzecret pazzage, maybe a moving wall or a portal. ... ",
  312. "Zzizz should be our pazz to zze great gate. Head to zze zztorage onzze again. Zzere should be zzome extra greazzy oil which should work wizz zzuch a large mechanizzm. Zze leverzz should zzen be movable again. "
  313. }, cid)
  314. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.StrangeSymbols, 2)
  315. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Mission04, 3) --Questlog, Children of the Revolution "Mission 4: Zze Way of Zztonezz"
  316. talk_state = 0
  317. elseif talk_state == 12 then
  318. npcHandler:say({
  319. "Zzen zzizz izz zze way which will lead you to zze great gate. ...",
  320. "By zze way, before I forget it - zzinzze you are zzkilled in zzolving riddlezz, maybe you can make uzze of zzizz old tome I've found? It containzz ancient knowledge and truly izz a tezztament of our culture, treat it wizz care. ...",
  321. "I may alzzo have anozzer mizzion for you if you are interezzted."
  322. }, cid)
  323. doPlayerAddItem(cid, 11134, 1)
  324. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Questline, 18)
  325. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Mission04, 6) --Questlog, Children of the Revolution "Mission 4: Zze Way of Zztonezz"
  326. talk_state = 0
  327. elseif talk_state == 13 then
  328. npcHandler:say("You did well on your quezzt zzo far. I hope you will reach zze great gate in time. If we are lucky, it will zztill be open. ... Zalamon: If not, it will already be overrun by enemy zzoldierzz. Direct confrontation will be inevitable in zzat cazze, palezzkin. Now clear your mind and approach zze portal.", cid)
  329. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Questline, 19)
  330. setPlayerStorageValue(cid, Storage.ChildrenoftheRevolution.Mission05, 1) --Questlog, Children of the Revolution "Mission 5: Phantom Army"
  331. talk_state = 0
  332. -- CHILDREN OF REVOLUTION QUEST
  333.  
  334. -- WRATH OF THE EMPEROR QUEST
  335. elseif talk_state == 14 then
  336. npcHandler:say({
  337. "You continue to imprezz, zzoftzzkin. ... ",
  338. "A contact of zze rezzizztanzze izz located furzzer in zze norzz of Zao. ... ",
  339. "Zze emperor will drag hizz forzzezz to zze great gate now to bolzzter hizz defenzze. Zzinzze we attacked zze gate directly, he will not expect uzz taking a completely different route to reach zze norzzern territoriezz. ... ",
  340. "I azzume you are already geared up and ready to conquer zze norzz? "
  341. }, cid)
  342. talk_state = 15
  343. elseif talk_state == 15 then
  344. npcHandler:say({
  345. "Your determination izz highly appreciated. To zzneak pazzt zze eyezz of zze enemy, you will have to uzze a diverzzion. Zzere are zzeveral old tunnelzz beneazz zze zzoil of Zzao. ... ",
  346. "One of zzem izz uzzed azz a maintenanzze connection by enemy lizardzz. To enter it, you will have to uzze a dizzguizze. Zzomezzing like a crate perhapzz. ... ",
  347. "Mh, if you can find zzome nailzz - 3 should be enough - and 1 piezze of wood, I should be able to create an appropriate cazzing. Return to me if you found zze itemzz and we will talk about zze next zztep. "
  348. }, cid)
  349. setPlayerStorageValue(cid, Storage.WrathoftheEmperor.Questline, 1)
  350. setPlayerStorageValue(cid, Storage.WrathoftheEmperor.Mission01, 1) --Questlog, Wrath of the Emperor "Mission 01: Catering the Lions Den"
  351. talk_state = 0
  352. elseif talk_state == 16 then
  353. npcHandler:say({
  354. "Very good, I am confident zzizz will zzuffizze. Now I can build and mark a {crate} large enough for you to fit in - while zztill being able to breazze of courzze - and I will mark it in our tongue zzo it will look lezz zzuzzpizziouzz. ... ",
  355. "Wizz zzeir eyezz towardzz zze gate, your chanzzezz to zzlip zzrough have never been better. I will keep zze zzpare materialzz here wizz me, we can alwayzz build a new one if you need to. "
  356. }, cid)
  357. talk_state = 17
  358. elseif talk_state == 18 then
  359. if getPlayerItemCount(cid, 8309) >= 3 and getPlayerItemCount(cid, 5901) >= 1 then
  360. doPlayerRemoveItem(cid, 5901, 1)
  361. doPlayerRemoveItem(cid, 8309, 3)
  362. setPlayerStorageValue(cid, Storage.WrathoftheEmperor.Questline, 2)
  363. setPlayerStorageValue(cid, Storage.WrathoftheEmperor.Mission01, 2) --Questlog, Wrath of the Emperor "Mission 01: Catering the Lions Den"
  364. doPlayerAddItem(cid, 12284, 1)
  365. npcHandler:say({
  366. "Alright. Let uzz create a crate. Hm. Let me zzee. ... ",
  367. "Good. Zzat will do. ... ",
  368. "Zze maintenanzze tunnelzz are in zze eazzt of zze plainzz, near ze coazt. Here, I will mark zzem on your map. ... ",
  369. "Uzze zze dizzguizze wizzely, try to hide in zze dark and avoid being zzeen at all cozzt. ... ",
  370. "Onzze you have reached zze norzz, you can find zze rezzizztanzze hideout at zze ozzer zzpot I marked on your map. Now hurry. "
  371. }, cid)
  372. --[[ for i = 1, #marks.WrathOfTheEmperor do
  373. local mark = marks.WrathOfTheEmperor[i]
  374. player:addMapMark(mark.position, 19, mark.description)
  375. end]]
  376. talk_state = 0
  377. end
  378. elseif talk_state == 19 then
  379. npcHandler:say({
  380. "Fine. I guezz poizzoning zzome of hizz plantzz will be enough to lure him out of hizz conzzealment. Zzizz plant poizzon here should allow you to do zzome zzignificant damage, take it. ... ",
  381. "You can find him eazzt of zze corrupted gardenzz. Zzere uzzed to be a zzmall domizzile zzere but it hazz probably been conzzumed by zze corruption zzo beware. And now - go. "
  382. }, cid)
  383. setPlayerStorageValue(cid, Storage.WrathoftheEmperor.Questline, 7)
  384. setPlayerStorageValue(cid, Storage.WrathoftheEmperor.Mission03, 1) --Questlog, Wrath of the Emperor "Mission 03: The Keeper"
  385. doPlayerAddItem(cid, 12320, 1)
  386. talk_state = 0
  387. elseif talk_state == 20 then
  388. if doPlayerRemoveItem(cid, 12323, 1) then
  389. npcHandler:say("Zzizz izz not hizz head but clearly belonged to zze keeper. I - I am imprezzed. You can go now. Leave me alone for a zzecond. ", cid)
  390. setPlayerStorageValue(cid, Storage.WrathoftheEmperor.Questline, 9)
  391. setPlayerStorageValue(cid, Storage.WrathoftheEmperor.Mission03, 3) --Questlog, Wrath of the Emperor "Mission 03: The Keeper"
  392. talk_state = 0
  393. end
  394.  
  395. elseif talk_state == 21 then
  396. if doPlayerRemoveItem(cid, 12327, 1) then
  397. setPlayerStorageValue(cid, Storage.WrathoftheEmperor.Questline, 12)
  398. setPlayerStorageValue(cid, Storage.WrathoftheEmperor.Mission04, 3) --Questlog, Wrath of the Emperor "Mission 04: Sacrament of the Snake"
  399. npcHandler:say("Finally. At lazzt. Zze zzeptre izz - ourzz. Ourzz of courzze. A weapon we should uzze wizzely for our cauzze. I need a zzecond or two. Do you leave me already? ", cid)
  400. talk_state = 0
  401. end
  402. -- WRATH OF THE EMPEROR QUEST
  403. end
  404. end
  405. return true
  406. end
  407.  
  408.  
  409. npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
  410. npcHandler:addModule(FocusModule:new())
  411. npcHandler:setCallback(CALLBACK_GREET, greetCallback)
  412. --npcHandler:setMessage(MESSAGE_WALKAWAY, '') dunno
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement