Advertisement
Guest User

Untitled

a guest
Nov 18th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.04 KB | None | 0 0
  1. local canBuyAddon = false
  2. local keywordHandler = KeywordHandler:new()
  3. local npcHandler = NpcHandler:new(keywordHandler)
  4. NpcSystem.parseParameters(npcHandler)
  5.  
  6. function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
  7. function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
  8. function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
  9. function onThink() npcHandler:onThink() end
  10.  
  11. npcHandler:setMessage(MESSAGE_GREET, "Greetings |PLAYERNAME|. Will you help me? If you do, I'll reward you with nice addons! Just say {addons}, {outfits} or {help} if you don't know what to do.")
  12.  
  13. function playerBuyAddonNPC(cid, message, keywords, parameters, node)
  14. if(not npcHandler:isFocused(cid)) then
  15. return false
  16. end
  17. if (parameters.confirm ~= true) and (parameters.decline ~= true) then
  18. local thingstr = 'addon'
  19. if parameters.addon == 0 then
  20. thingstr = 'outfit'
  21. end
  22. if(getPlayerPremiumDays(cid) == 0) and (parameters.premium == true) then
  23. npcHandler:say('Sorry, but this ' .. thingstr .. ' is only for premium players!', cid)
  24. npcHandler:resetNpc()
  25. return true
  26. end
  27. if (getPlayerStorageValue(cid, parameters.storageID) ~= -1) then
  28. npcHandler:say('You already have this ' .. thingstr .. '!', cid)
  29. npcHandler:resetNpc()
  30. return true
  31. end
  32. if (parameters.stID_outfit ~= 0) and (getPlayerStorageValue(cid, parameters.stID_outfit) == -1) then
  33. npcHandler:say('You must have this outfit first before buying addons!', cid)
  34. npcHandler:resetNpc()
  35. return true
  36. end
  37. local itemsTable = parameters.items
  38. local items_list = ''
  39. if table.maxn(itemsTable) > 0 then
  40. for i = 1, table.maxn(itemsTable) do
  41. local item = itemsTable[i]
  42. items_list = items_list .. item[2] .. ' ' .. getItemNameById(item[1])
  43. if i ~= table.maxn(itemsTable) then
  44. items_list = items_list .. ', '
  45. end
  46. end
  47. end
  48. local text = ''
  49. if (parameters.cost > 0) and table.maxn(parameters.items) then
  50. text = items_list .. ' and ' .. parameters.cost .. ' gp'
  51. elseif (parameters.cost > 0) then
  52. text = parameters.cost .. ' gp'
  53. elseif table.maxn(parameters.items) then
  54. text = items_list
  55. end
  56. npcHandler:say('Did you bring me ' .. text .. ' for ' .. keywords[1] .. '?', cid)
  57. canBuyAddon = true
  58. return true
  59. elseif (parameters.confirm == true and canBuyAddon == true) then
  60. local addonNode = node:getParent()
  61. local addoninfo = addonNode:getParameters()
  62. local items_number = 0
  63. canBuyAddon = false
  64. if table.maxn(addoninfo.items) > 0 then
  65. for i = 1, table.maxn(addoninfo.items) do
  66. local item = addoninfo.items[i]
  67. if (getPlayerItemCount(cid,item[1]) >= item[2]) then
  68. items_number = items_number + 1
  69. end
  70. end
  71. end
  72. if(getPlayerMoney(cid) >= addoninfo.cost) and (items_number == table.maxn(addoninfo.items)) then
  73. doPlayerRemoveMoney(cid, addoninfo.cost)
  74. if table.maxn(addoninfo.items) > 0 then
  75. for i = 1, table.maxn(addoninfo.items) do
  76. local item = addoninfo.items[i]
  77. doPlayerRemoveItem(cid,item[1],item[2])
  78. end
  79. end
  80.  
  81. if getPlayerSex(cid) == PLAYERSEX_MALE then
  82. doPlayerAddOutfit(cid, addoninfo.outfit_male, addoninfo.addon)
  83. elseif getPlayerSex(cid) == PLAYERSEX_FEMALE then
  84. -- female addons fixes
  85. if addoninfo.outfit_female == 137 or addoninfo.outfit_female == 157 then
  86. if addoninfo.addon == 1 then
  87. addoninfo.addon = 2
  88. elseif addoninfo.addon == 2 then
  89. addoninfo.addon = 1
  90. end
  91. end
  92. -- end female addon fixes
  93. doPlayerAddOutfit(cid, addoninfo.outfit_female, addoninfo.addon)
  94. else
  95. npcHandler:say('Sorry, your sex is wrong.', cid)
  96. return true
  97. end
  98. setPlayerStorageValue(cid,addoninfo.storageID,1)
  99. npcHandler:say('Here you are.', cid)
  100. else
  101. npcHandler:say('You do not have needed items or cash!', cid)
  102. end
  103. npcHandler:resetNpc()
  104. return true
  105. elseif (parameters.decline == true) then
  106. npcHandler:say('Not interested? Maybe other addon?', cid)
  107. canBuyAddon = false
  108. npcHandler:resetNpc()
  109. return true
  110. end
  111. return false
  112. end
  113.  
  114. local noNode = KeywordNode:new({'no'}, playerBuyAddonNPC, {decline = true})
  115. local yesNode = KeywordNode:new({'yes'}, playerBuyAddonNPC, {confirm = true})
  116.  
  117. -- citizen (done)
  118. -- addon1 storage = 10001
  119. -- addon2 storage = 10002
  120. -- outfit storage = 0
  121. local outfit_node = keywordHandler:addKeyword({'first citizen addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5878,100}}, outfit_female = 136, outfit_male = 128, addon = 1, storageID = 10001, stID_outfit = 0})
  122. outfit_node:addChildKeywordNode(yesNode)
  123. outfit_node:addChildKeywordNode(noNode)
  124. local outfit_node = keywordHandler:addKeyword({'second citizen addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5890,100}, {5902,50}, {2480,1}}, outfit_female = 136, outfit_male = 128, addon = 2, storageID = 10002, stID_outfit = 0})
  125. outfit_node:addChildKeywordNode(yesNode)
  126. outfit_node:addChildKeywordNode(noNode)
  127.  
  128. -- hunter (done)
  129. -- addon1 storage = 10003
  130. -- addon2 storage = 10004
  131. -- outfit storage = 0
  132. local outfit_node = keywordHandler:addKeyword({'first hunter addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5947,1}, {5876,100}, {5948,100}, {5891,5}, {5887,1}, {5889,1}, {5888,1}}, outfit_female = 137, outfit_male = 129, addon = 1, storageID = 10003, stID_outfit = 0})
  133. outfit_node:addChildKeywordNode(yesNode)
  134. outfit_node:addChildKeywordNode(noNode)
  135. local outfit_node = keywordHandler:addKeyword({'second hunter addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5875,1}}, outfit_female = 137, outfit_male = 129, addon = 2, storageID = 10004, stID_outfit = 0})
  136. outfit_node:addChildKeywordNode(yesNode)
  137. outfit_node:addChildKeywordNode(noNode)
  138.  
  139. -- knight (done)
  140. -- addon1 storage = 10005
  141. -- addon2 storage = 10006
  142. -- outfit storage = 0
  143. local outfit_node = keywordHandler:addKeyword({'first knight addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5880,100}, {5892,1}}, outfit_female = 139, outfit_male = 131, addon = 1, storageID = 10005, stID_outfit = 0})
  144. outfit_node:addChildKeywordNode(yesNode)
  145. outfit_node:addChildKeywordNode(noNode)
  146. local outfit_node = keywordHandler:addKeyword({'second knight addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5893,100}, {11422,1}, {5885,1}, {5887,1}}, outfit_female = 139, outfit_male = 131, addon = 2, storageID = 10006, stID_outfit = 0})
  147. outfit_node:addChildKeywordNode(yesNode)
  148. outfit_node:addChildKeywordNode(noNode)
  149.  
  150. -- mage (done)
  151. -- addon1 storage = 10007
  152. -- addon2 storage = 10008
  153. -- outfit storage = 0
  154. local outfit_node = keywordHandler:addKeyword({'first mage addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{2182,1}, {2186,1}, {2185,1}, {2181,1}, {2183,1}, {2190,1}, {2191,1}, {2188,1}, {2189,1}, {2187,1}, {5904,10}, {5809,1}, {2193,20}}, outfit_female = 141, outfit_male = 130, addon = 1, storageID = 10007, stID_outfit = 0})
  155. outfit_node:addChildKeywordNode(yesNode)
  156. outfit_node:addChildKeywordNode(noNode)
  157. local outfit_node = keywordHandler:addKeyword({'second mage addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5903,1}}, outfit_female = 141, outfit_male = 130, addon = 2, storageID = 10008, stID_outfit = 0})
  158. outfit_node:addChildKeywordNode(yesNode)
  159. outfit_node:addChildKeywordNode(noNode)
  160.  
  161. -- summoner (done)
  162. -- addon1 storage = 10009
  163. -- addon2 storage = 10010
  164. -- outfit storage = 0
  165. local outfit_node = keywordHandler:addKeyword({'first summoner addon'}, playerBuyAddonNPC, {premium = true, cost = 500000, items = {}, outfit_female = 138, outfit_male = 133, addon = 1, storageID = 10009, stID_outfit = 0})
  166. outfit_node:addChildKeywordNode(yesNode)
  167. outfit_node:addChildKeywordNode(noNode)
  168. local outfit_node = keywordHandler:addKeyword({'second summoner addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5894,70}, {5911,20}, {5883,40}, {5922,35}, {5879,100}, {5881,60}, {5882,40}, {5904,15}, {5905,30}}, outfit_female = 138, outfit_male = 133, addon = 2, storageID = 10010, stID_outfit = 0})
  169. outfit_node:addChildKeywordNode(yesNode)
  170. outfit_node:addChildKeywordNode(noNode)
  171.  
  172.  
  173. -- barbarian (done)
  174. -- addon1 storage = 10011
  175. -- addon2 storage = 10012
  176. -- outfit storage = 0
  177. local outfit_node = keywordHandler:addKeyword({'first barbarian addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5880,100}, {5892,1}, {5893,50}, {5876,50}}, outfit_female = 147, outfit_male = 143, addon = 1, storageID = 10011, stID_outfit = 0})
  178. outfit_node:addChildKeywordNode(yesNode)
  179. outfit_node:addChildKeywordNode(noNode)
  180. local outfit_node = keywordHandler:addKeyword({'second barbarian addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5884,1}, {5885,1}, {5910,50}, {5911,50}, {5879,100}}, outfit_female = 147, outfit_male = 143, addon = 2, storageID = 10012, stID_outfit = 0})
  181. outfit_node:addChildKeywordNode(yesNode)
  182. outfit_node:addChildKeywordNode(noNode)
  183.  
  184. -- druid (done)
  185. -- addon1 storage = 10013
  186. -- addon2 storage = 10014
  187. -- outfit storage = 0
  188. local outfit_node = keywordHandler:addKeyword({'first druid addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5896,50}, {5897,50}}, outfit_female = 148, outfit_male = 144, addon = 1, storageID = 10013, stID_outfit = 0})
  189. outfit_node:addChildKeywordNode(yesNode)
  190. outfit_node:addChildKeywordNode(noNode)
  191. local outfit_node = keywordHandler:addKeyword({'second druid addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5906,100}, {5939,1}, {5940,1}}, outfit_female = 148, outfit_male = 144, addon = 2, storageID = 10014, stID_outfit = 0})
  192. outfit_node:addChildKeywordNode(yesNode)
  193. outfit_node:addChildKeywordNode(noNode)
  194.  
  195. -- nobleman (done)
  196. -- addon1 storage = 10015
  197. -- addon2 storage = 10016
  198. -- outfit storage = 0
  199. local outfit_node = keywordHandler:addKeyword({'first nobleman addon'}, playerBuyAddonNPC, {premium = true, cost = 150000, items = {}, outfit_female = 140, outfit_male = 132, addon = 1, storageID = 10015, stID_outfit = 0})
  200. outfit_node:addChildKeywordNode(yesNode)
  201. outfit_node:addChildKeywordNode(noNode)
  202. local outfit_node = keywordHandler:addKeyword({'second nobleman addon'}, playerBuyAddonNPC, {premium = true, cost = 150000, items = {}, outfit_female = 140, outfit_male = 132, addon = 2, storageID = 10016, stID_outfit = 0})
  203. outfit_node:addChildKeywordNode(yesNode)
  204. outfit_node:addChildKeywordNode(noNode)
  205.  
  206. -- oriental (done)
  207. -- addon1 storage = 10017
  208. -- addon2 storage = 10018
  209. -- outfit storage = 0
  210. local outfit_node = keywordHandler:addKeyword({'first oriental addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{11423,1}}, outfit_female = 150, outfit_male = 146, addon = 1, storageID = 10017, stID_outfit = 0})
  211. outfit_node:addChildKeywordNode(yesNode)
  212. outfit_node:addChildKeywordNode(noNode)
  213. local outfit_node = keywordHandler:addKeyword({'second oriental addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5883,100}, {5895,100}, {5891,2}, {5912,100}}, outfit_female = 150, outfit_male = 146, addon = 2, storageID = 10018, stID_outfit = 0})
  214. outfit_node:addChildKeywordNode(yesNode)
  215. outfit_node:addChildKeywordNode(noNode)
  216.  
  217. -- warrior (done)
  218. -- addon1 storage = 10019
  219. -- addon2 storage = 10020
  220. -- outfit storage = 0
  221. local outfit_node = keywordHandler:addKeyword({'first warrior addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5925,100}, {5899,100}, {5884,1}, {5919,1}}, outfit_female = 142, outfit_male = 134, addon = 1, storageID = 10019, stID_outfit = 0})
  222. outfit_node:addChildKeywordNode(yesNode)
  223. outfit_node:addChildKeywordNode(noNode)
  224. local outfit_node = keywordHandler:addKeyword({'second warrior addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5880,100}, {5887,1}}, outfit_female = 142, outfit_male = 134, addon = 2, storageID = 10020, stID_outfit = 0})
  225. outfit_node:addChildKeywordNode(yesNode)
  226. outfit_node:addChildKeywordNode(noNode)
  227.  
  228. -- wizard (done)
  229. -- addon1 storage = 10021
  230. -- addon2 storage = 10022
  231. -- outfit storage = 0
  232. local outfit_node = keywordHandler:addKeyword({'first wizard addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5922,50}}, outfit_female = 149, outfit_male = 145, addon = 1, storageID = 10021, stID_outfit = 0})
  233. outfit_node:addChildKeywordNode(yesNode)
  234. outfit_node:addChildKeywordNode(noNode)
  235. local outfit_node = keywordHandler:addKeyword({'second wizard addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{2536,1}, {2492,1}, {2488,1}, {2123,1}}, outfit_female = 149, outfit_male = 145, addon = 2, storageID = 10022, stID_outfit = 0})
  236. outfit_node:addChildKeywordNode(yesNode)
  237. outfit_node:addChildKeywordNode(noNode)
  238.  
  239. -- assassin (done)
  240. -- addon1 storage = 10023
  241. -- addon2 storage = 10024
  242. -- outfit storage = 10051
  243. local outfit_node = keywordHandler:addKeyword({'first assassin addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5912,50}, {5910,50}, {5911,50}, {5913,50}, {5914,50}, {5909,50}, {5879,100}}, outfit_female = 156, outfit_male = 152, addon = 1, storageID = 10023, stID_outfit = 10051})
  244. outfit_node:addChildKeywordNode(yesNode)
  245. outfit_node:addChildKeywordNode(noNode)
  246. local outfit_node = keywordHandler:addKeyword({'second assassin addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5804,1}, {5930,1}}, outfit_female = 156, outfit_male = 152, addon = 2, storageID = 10024, stID_outfit = 10051})
  247. outfit_node:addChildKeywordNode(yesNode)
  248. outfit_node:addChildKeywordNode(noNode)
  249. local outfit_node = keywordHandler:addKeyword({'assassin outfit'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5898,30}, {5882,10}, {5881,30}, {5885,1}, {5906,10}, {5905,20}, {5895,20}}, outfit_female = 156, outfit_male = 152, addon = 0, storageID = 10051, stID_outfit = 0})
  250. outfit_node:addChildKeywordNode(yesNode)
  251. outfit_node:addChildKeywordNode(noNode)
  252.  
  253. -- beggar (done)
  254. -- addon1 storage = 10025
  255. -- addon2 storage = 10026
  256. -- outfit storage = 10052
  257. local outfit_node = keywordHandler:addKeyword({'first beggar addon'}, playerBuyAddonNPC, {premium = true, cost = 20000, items = {{5883,100}}, outfit_female = 157, outfit_male = 153, addon = 1, storageID = 10025, stID_outfit = 10052})
  258. outfit_node:addChildKeywordNode(yesNode)
  259. outfit_node:addChildKeywordNode(noNode)
  260. local outfit_node = keywordHandler:addKeyword({'second beggar addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{6107,1}}, outfit_female = 157, outfit_male = 153, addon = 2, storageID = 10026, stID_outfit = 10052})
  261. outfit_node:addChildKeywordNode(yesNode)
  262. outfit_node:addChildKeywordNode(noNode)
  263. local outfit_node = keywordHandler:addKeyword({'beggar outfit'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5878,50}, {5921,30}, {5913,20}, {5894,10}}, outfit_female = 157, outfit_male = 153, addon = 0, storageID = 10052, stID_outfit = 0})
  264. outfit_node:addChildKeywordNode(yesNode)
  265. outfit_node:addChildKeywordNode(noNode)
  266.  
  267. -- pirate (done) -
  268. -- addon1 storage = 10027
  269. -- addon2 storage = 10028
  270. -- outfit storage = 10053
  271. local outfit_node = keywordHandler:addKeyword({'first pirate addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{6098,100}, {6126,100}, {6097,100}}, outfit_female = 155, outfit_male = 151, addon = 1, storageID = 10027, stID_outfit = 10053})
  272. outfit_node:addChildKeywordNode(yesNode)
  273. outfit_node:addChildKeywordNode(noNode)
  274. local outfit_node = keywordHandler:addKeyword({'second pirate addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{11426,1}, {6102,1}, {11425,1}, {11424,1}}, outfit_female = 155, outfit_male = 151, addon = 2, storageID = 10028, stID_outfit = 10053})
  275. outfit_node:addChildKeywordNode(yesNode)
  276. outfit_node:addChildKeywordNode(noNode)
  277. local outfit_node = keywordHandler:addKeyword({'pirate outfit'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{6096,1}, {6095,1}, {5918,1}, {5462,1}}, outfit_female = 155, outfit_male = 151, addon = 0, storageID = 10053, stID_outfit = 0})
  278. outfit_node:addChildKeywordNode(yesNode)
  279. outfit_node:addChildKeywordNode(noNode)
  280.  
  281. -- shaman (done) -
  282. -- addon1 storage = 10029
  283. -- addon2 storage = 10030
  284. -- outfit storage = 10054
  285. local outfit_node = keywordHandler:addKeyword({'first shaman addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{3966,5}, {3967,5}}, outfit_female = 158, outfit_male = 154, addon = 1, storageID = 10029, stID_outfit = 10054})
  286. outfit_node:addChildKeywordNode(yesNode)
  287. outfit_node:addChildKeywordNode(noNode)
  288. local outfit_node = keywordHandler:addKeyword({'second shaman addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5810,5}, {3955,5}, {5015,1}}, outfit_female = 158, outfit_male = 154, addon = 2, storageID = 10030, stID_outfit = 10054})
  289. outfit_node:addChildKeywordNode(yesNode)
  290. outfit_node:addChildKeywordNode(noNode)
  291.  
  292. -- norseman (done) --
  293. -- addon1 storage = 10031
  294. -- addon2 storage = 10032
  295. -- outfit storage = 10055
  296. local outfit_node = keywordHandler:addKeyword({'first norseman addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{7290,5}}, outfit_female = 252, outfit_male = 251, addon = 1, storageID = 10031, stID_outfit = 10055})
  297. outfit_node:addChildKeywordNode(yesNode)
  298. outfit_node:addChildKeywordNode(noNode)
  299. local outfit_node = keywordHandler:addKeyword({'second norseman addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{7290,10}}, outfit_female = 252, outfit_male = 251, addon = 2, storageID = 10032, stID_outfit = 10055})
  300. outfit_node:addChildKeywordNode(yesNode)
  301. outfit_node:addChildKeywordNode(noNode)
  302.  
  303. -- jester (undone)
  304. -- addon1 storage = 10033
  305. -- addon2 storage = 10034
  306. -- outfit storage = 10056
  307.  
  308. -- demonhunter (undone)
  309. -- addon1 storage = 10035
  310. -- addon2 storage = 10036
  311. -- outfit storage = 10057
  312.  
  313. -- nightmare (done)
  314. -- addon1 storage = 10037
  315. -- addon2 storage = 10038
  316. -- outfit storage = 10058
  317. local outfit_node = keywordHandler:addKeyword({'first nightmare addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{6500,500}}, outfit_female = 269, outfit_male = 268, addon = 1, storageID = 10037, stID_outfit = 10058})
  318. outfit_node:addChildKeywordNode(yesNode)
  319. outfit_node:addChildKeywordNode(noNode)
  320. local outfit_node = keywordHandler:addKeyword({'second nightmare addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{6500,1000}}, outfit_female = 269, outfit_male = 268, addon = 2, storageID = 10038, stID_outfit = 10058})
  321. outfit_node:addChildKeywordNode(yesNode)
  322. outfit_node:addChildKeywordNode(noNode)
  323.  
  324. -- brotherhood (done)
  325. -- addon1 storage = 10039
  326. -- addon2 storage = 10040
  327. -- outfit storage = 10059
  328. local outfit_node = keywordHandler:addKeyword({'first brotherhood addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{6500,500}}, outfit_female = 279, outfit_male = 278, addon = 1, storageID = 10039, stID_outfit = 10059})
  329. outfit_node:addChildKeywordNode(yesNode)
  330. outfit_node:addChildKeywordNode(noNode)
  331. local outfit_node = keywordHandler:addKeyword({'second brotherhood addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{6500,1000}}, outfit_female = 279, outfit_male = 278, addon = 2, storageID = 10040, stID_outfit = 10059})
  332. outfit_node:addChildKeywordNode(yesNode)
  333. outfit_node:addChildKeywordNode(noNode)
  334.  
  335. -- yalaharian (undone)
  336. -- addon1 storage = 10041
  337. -- addon2 storage = 10041
  338. -- outfit storage = 10060
  339.  
  340. keywordHandler:addKeyword({'addons'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can give you citizen, hunter, knight, mage, nobleman, summoner, warrior, barbarian, druid, wizard, oriental, pirate, assassin, beggar, shaman. Other addons can be obtained in quests.'})
  341. keywordHandler:addKeyword({'outfits'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can give you assassin, beggar and pirate outfits. I can\'t give you the norseman, the yalaharian, the wayfarer, the jester, the nightmare and the brotherhood outfits for now.'})
  342. keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To get the first addon say \'first NAME addon\', for the second addon say \'second NAME addon\'. For an outfit say \'NAME outfit\'.'})
  343.  
  344. npcHandler:addModule(FocusModule:new())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement