Advertisement
Guest User

Untitled

a guest
Sep 12th, 2016
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 47.07 KB | None | 0 0
  1. ----------------------------------------------------
  2. ----------------------------------------------------
  3. ---------------- Manual Install --------------------
  4. ----------------------------------------------------
  5. ----------------------------------------------------
  6. ----------------------------------------------------
  7. --------- By Danny1ma ------------------------------
  8. ----------------------------------------------------
  9. ----------------------------------------------------
  10.  
  11. -- Marriage Effect -- Skilleffect
  12. function marriage_Add ( role , statelv )
  13. local month = os.date ("%m")
  14. local day = os.date ("%d")
  15. local monthnum = tonumber(month)
  16. local daynum = tonumber(day)
  17.  
  18. if monthnum == 02 and daynum == 14 then
  19. local statelv = 2
  20. local mspdsa_dif = (statelv * 0.009) * .15
  21. local mspdsa = (MspdSa(role) + mspdsa_dif) * ATTR_RADIX
  22. SetCharaAttr( mspdsa , role , ATTR_STATEV_MSPD )
  23.  
  24.  
  25. local strsb_dif = 15 + (15 * .15)
  26. local strsb = StrSb( role ) + strsb_dif
  27. SetCharaAttr( strsb , role , ATTR_STATEV_STR )
  28.  
  29. local consb_dif = 15 + (15 * .15)
  30. local consb = ConSb( role ) + consb_dif
  31. SetCharaAttr( consb , role , ATTR_STATEV_CON )
  32.  
  33. local agisb_dif = 15 + (15 * .15)
  34. local agisb = AgiSb( role ) + agisb_dif
  35. SetCharaAttr( agisb , role , ATTR_STATEV_AGI )
  36.  
  37. local dexsb_dif = 15 + (15 * .15)
  38. local dexsb = DexSb( role ) + dexsb_dif
  39. SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )
  40.  
  41. local stasb_dif = 15 + (15 * .15)
  42. local stasb = StaSb( role ) + stasb_dif
  43. SetCharaAttr( stasb , role , ATTR_STATEV_STA )
  44.  
  45. local defsb_dif = 100 + (100 * .15)
  46. local defsb = DefSb(role) + defsb_dif
  47. SetCharaAttr( defsb , role , ATTR_STATEV_DEF )
  48.  
  49. local hrecsb_dif = 30 + (30 * .15)
  50. local hrecsb = HrecSb(role) + hrecsb_dif
  51. SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC )
  52. --------Any other day other than valentines
  53. else
  54.  
  55. local statelv = 2
  56. local mspdsa_dif = statelv * 0.009
  57. local mspdsa = (MspdSa(role) + mspdsa_dif) * ATTR_RADIX
  58. SetCharaAttr( mspdsa , role , ATTR_STATEV_MSPD )
  59.  
  60.  
  61. local strsb_dif = 15
  62. local strsb = StrSb( role ) + strsb_dif
  63. SetCharaAttr( strsb , role , ATTR_STATEV_STR )
  64.  
  65. local consb_dif = 15
  66. local consb = ConSb( role ) + consb_dif
  67. SetCharaAttr( consb , role , ATTR_STATEV_CON )
  68.  
  69. local agisb_dif = 15
  70. local agisb = AgiSb( role ) + agisb_dif
  71. SetCharaAttr( agisb , role , ATTR_STATEV_AGI )
  72.  
  73. local dexsb_dif = 15
  74. local dexsb = DexSb( role ) + dexsb_dif
  75. SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )
  76.  
  77. local stasb_dif = 15
  78. local stasb = StaSb( role ) + stasb_dif
  79. SetCharaAttr( stasb , role , ATTR_STATEV_STA )
  80.  
  81. local defsb_dif = 100
  82. local defsb = DefSb(role) + defsb_dif
  83. SetCharaAttr( defsb , role , ATTR_STATEV_DEF )
  84.  
  85. local hrecsb_dif = 30
  86. local hrecsb = HrecSb(role) + hrecsb_dif
  87. SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC )
  88.  
  89. ALLExAttrSet(role)
  90. end
  91. end
  92.  
  93. function marriage_Rem ( role , statelv )
  94. local month = os.date ("%m")
  95. local day = os.date ("%d")
  96. local monthnum = tonumber(month)
  97. local daynum = tonumber(day)
  98. if monthnum == 02 and daynum == 14 then
  99. local statelv = 2
  100. local mspdsa_dif = (statelv * 0.009 ) * .15
  101. local mspdsa = (MspdSa(role) - mspdsa_dif) * ATTR_RADIX
  102. SetCharaAttr( mspdsa , role , ATTR_STATEV_MSPD )
  103.  
  104.  
  105. local strsb_dif = 15 + (15 * .15)
  106. local strsb = StrSb( role ) - strsb_dif
  107. SetCharaAttr( strsb , role , ATTR_STATEV_STR )
  108.  
  109. local consb_dif = 15 + (15 * .15)
  110. local consb = ConSb( role ) - consb_dif
  111. SetCharaAttr( consb , role , ATTR_STATEV_CON )
  112.  
  113.  
  114. local agisb_dif = 15 + (15 * .15)
  115. local agisb = AgiSb( role ) - agisb_dif
  116. SetCharaAttr( agisb , role , ATTR_STATEV_AGI )
  117.  
  118. local dexsb_dif = 15 + (15 * .15)
  119. local dexsb = DexSb( role ) - dexsb_dif
  120. SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )
  121.  
  122. local stasb_dif = 15 + (15 * .15)
  123. local stasb = StaSb( role ) - stasb_dif
  124. SetCharaAttr( stasb , role , ATTR_STATEV_STA )
  125.  
  126. local defsb_dif = 100 + (100 * .15)
  127. local defsb = DefSb(role) - defsb_dif
  128. SetCharaAttr( defsb , role , ATTR_STATEV_DEF )
  129.  
  130. local hrecsb_dif = 30 + (30 * .15)
  131. local hrecsb = HrecSb(role) - hrecsb_dif
  132. SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC )
  133. else
  134.  
  135. local statelv = 2
  136. local mspdsa_dif = statelv * 0.009
  137. local mspdsa = (MspdSa(role) - mspdsa_dif) * ATTR_RADIX
  138. SetCharaAttr( mspdsa , role , ATTR_STATEV_MSPD )
  139.  
  140.  
  141. local strsb_dif = 15
  142. local strsb = StrSb( role ) - strsb_dif
  143. SetCharaAttr( strsb , role , ATTR_STATEV_STR )
  144.  
  145. local consb_dif = 15
  146. local consb = ConSb( role ) - consb_dif
  147. SetCharaAttr( consb , role , ATTR_STATEV_CON )
  148.  
  149.  
  150. local agisb_dif = 15
  151. local agisb = AgiSb( role ) - agisb_dif
  152. SetCharaAttr( agisb , role , ATTR_STATEV_AGI )
  153.  
  154. local dexsb_dif = 15
  155. local dexsb = DexSb( role ) - dexsb_dif
  156. SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )
  157.  
  158. local stasb_dif = 15
  159. local stasb = StaSb( role ) - stasb_dif
  160. SetCharaAttr( stasb , role , ATTR_STATEV_STA )
  161.  
  162. local defsb_dif = 100
  163. local defsb = DefSb(role) - defsb_dif
  164. SetCharaAttr( defsb , role , ATTR_STATEV_DEF )
  165.  
  166. local hrecsb_dif = 30
  167. local hrecsb = HrecSb(role) - hrecsb_dif
  168. SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC )
  169. ALLExAttrSet(role)
  170. end
  171. end
  172.  
  173. -- Marriage Chest -- itemeffect
  174. function ItemUse_Marriage(role, Item)
  175. local Item_CanGet = GetChaFreeBagGridNum ( role )
  176. if Item_CanGet < 1 then
  177. SystemNotice(role ,"You need at least 1 available slot to open Marriage Chest.")
  178. UseItemFailed ( role )
  179. return
  180. end
  181. local cha_name = GetChaDefaultName ( role )
  182. Logs('Marriage Chest', ''..cha_name..' opened Marriage Chest')
  183. GiveItem ( role , 0 , 2521 , 1 , 1 )
  184. end
  185.  
  186. ------------------------------------------------------------
  187. -- Marriage System -- -- Functions
  188. ------------------------------------------------------------
  189. function CheckWeddingDress (role)
  190. local ChaType = GetChaTypeID(role) -- Character Race
  191. local Body = GetItemID (GetEquipItemP(role, 2)) -- Body
  192. local Glove = GetItemID (GetEquipItemP(role, 3)) -- Gloves
  193. local Shoes = GetItemID (GetEquipItemP(role, 4)) -- Boots
  194. local Hat = GetItemID(GetEquipItemP(role, 0))-- Hat
  195. -- Lance
  196. if ChaType == 1 then
  197. if Body ~= 5221 or Glove ~= 5222 or Shoes ~= 5223 then
  198. return 0
  199. end
  200. -- Carsise
  201. elseif ChaType == 2 then
  202. if Body ~= 5238 or Glove ~= 5239 or Shoes ~= 5240 then
  203. return 0
  204. end
  205. -- Phyllis
  206. elseif ChaType == 3 then
  207. if Body ~= 5245 or Glove ~= 5246 or Shoes ~= 5247 or Hat ~= 5244 then
  208. return 0
  209. end
  210. -- Amy
  211. elseif ChaType == 4 then
  212. if Body ~= 5253 or Glove ~= 5254 or Shoes ~= 5255 or Hat ~= 5252 then
  213. return 0
  214. end
  215. end
  216. end
  217. function ValentinesRingJudge(role)
  218. local Ring_Num = 0
  219. local t = {} --called the target of various teammates
  220. t[0] = role
  221. t[1] = GetTeamCha(role, 0 )
  222. t[2] = GetTeamCha(role, 1 )
  223. t[3] = GetTeamCha(role, 2 )
  224. t[4] = GetTeamCha(role, 3 )
  225. local t_Num = {} --all teammates who recorded the number of rings
  226. t_Num[0] = 0
  227. t_Num[1] = 0
  228. t_Num[2] = 0
  229. t_Num[3] = 0
  230. t_Num[4] = 0
  231. local i = 1
  232. for i = 1 , 4, 1 do
  233. if t[i] ~= nil then
  234. local Ring_Num_Add = CheckBagItem( t[i] , 2521 )
  235. if Ring_Num_Add == 1 then
  236.  
  237. local retbag = HasLeaveBagGrid( t[i], 1)
  238. if retbag ~= LUA_TRUE then
  239. BickerNotice(role,"Your partners Inventory is full!")
  240. BickerNotice(t[i],"You need at least 1 free Slot!")
  241. return LUA_FALSE
  242. end
  243. local NocLock =KitbagLock( t[i], 0 )
  244. if NocLock == LUA_FALSE then
  245. BickerNotice( role , "Your partners Inventory is locked!")
  246. BickerNotice( t[i] , "You need to make sure your inventory is unlocked")
  247. return LUA_FALSE
  248. end
  249.  
  250. if CheckWeddingDress(role) == 0 then
  251. BickerNotice(role, "You are not dressed up!")
  252. BickerNotice(t[i], "Your partner is not dressed up")
  253. return 0
  254. end
  255.  
  256. if CheckWeddingDress(t[i]) == 0 then
  257. BickerNotice (role, "Your partner is not dressed up!")
  258. BickerNotice (t[i], "You are not dressed up!")
  259. return 0
  260. end
  261. t_Num[i] = 1 --If you have rings, the Value set to 1, so check back for use
  262. Ring_Num = Ring_Num + Ring_Num_Add --Will ring the ranks of the total number of records for the judge to do with the back
  263. local USED_Ring_Num = CheckBagItem( t[i] , 7408 ) --determine whether this team-mate who has been bound ring
  264. if USED_Ring_Num >= 1 then
  265. BickerNotice(role,"Your partner is already married!")
  266. BickerNotice(t[i],"You can only marry once! Get divorced!")
  267. return LUA_FALSE
  268. end
  269. end
  270. end
  271. end
  272. if Ring_Num == 1 then --if the team ring A total of 1 man and take on this task were combined
  273. return LUA_TRUE
  274. elseif Ring_Num > 1 then
  275. BickerNotice(role,"You need one Valentines Day Ring!")
  276. return LUA_FALSE
  277. else
  278. BickerNotice(role,"Please find someone who has a ring to marry!")
  279. return LUA_FALSE
  280. end
  281. end
  282.  
  283. function ValentinesRing(role)
  284. local Ring_Num = 0
  285. local t = {} --called the target of various teammates
  286. t[0] = role
  287. t[1] = GetTeamCha(role, 0 )
  288. t[2] = GetTeamCha(role, 1 )
  289. t[3] = GetTeamCha(role, 2 )
  290. t[4] = GetTeamCha(role, 3 )
  291. local t_Num = {} --all teammates who recorded the number of rings
  292. t_Num[0] = 0
  293. t_Num[1] = 0
  294. t_Num[2] = 0
  295. t_Num[3] = 0
  296. t_Num[4] = 0
  297. local i = 1
  298. for i = 1 , 4, 1 do
  299. if t[i] ~= nil then
  300. local Ring_Num_Add = CheckBagItem( t[i] , 2521 )
  301. if Ring_Num_Add == 1 then
  302. t_Num[i] = 1 --If you have rings, the Value set to 1, so check back for use
  303. Ring_Num = Ring_Num + Ring_Num_Add -- Will ring the ranks of the total number of records for the judge to do with the back
  304. local USED_Ring_Num = CheckBagItem( t[i] , 7408 ) --determine whether this team-mate who has been bound ring
  305. if USED_Ring_Num >= 1 then
  306. BickerNotice(role,"Your partner is already married!")
  307. BickerNotice(t[i],"You can marry only once! Get divorced!")
  308. return LUA_FALSE
  309. end
  310. end
  311. end
  312. end
  313.  
  314. if Ring_Num == 1 then -- if the team ring A total of 1 man and take on this task were combined
  315. local i = 1
  316. for i = 1 , 4 ,1 do
  317. if t_Num[i] == 1 then
  318.  
  319. --local RoleType = GetChaID(role)
  320. --local TeamerType = GetChaID(t[i])
  321. if (RoleType<=2 and TeamerType>=3) or (RoleType>=3 and TeamerType<=2) then --sex determination
  322. --Players will take the task of information recorded in the other ring Means of
  323. local ID_Num = GetCharID(role) --Get access tasks players ID number, and record in the ring in
  324. GiveItem ( t[i] , 0 , 7408 , 1 , 4 )
  325. local a = DelBagItem ( t[i] , 2521 , 1)
  326. local Item = GetChaItem2 ( t[i] , 2 , 7408 ) --Valentines teammates made the right ring pointer
  327. local Num_JZ = GetItemForgeParam ( Item , 1 )
  328. Num_JZ = TansferNum ( Num_JZ )
  329. Num_JZ = ID_Num --with a concise record of information bits Role ID number recorded
  330. SetItemForgeParam ( Item , 1 , Num_JZ )
  331. AddChaSkill ( t[i] , SK_QLZX, 1 , 1 , 0 )
  332. --To record the appropriate information teammates play in the next task Ring in the home
  333. local ID_Num1 = GetCharID(t[i]) --Get the right team-mates ID number, and record in the ring in
  334. GiveItem ( role , 0 , 7408 , 1 , 4 )
  335. local b = DelBagItem ( role , 2521 , 1)
  336. local Item1 = GetChaItem2 ( role , 2 , 7408 ) --made the task then the players Valentines Day ring pointer
  337. local Num_JZ1 = GetItemForgeParam ( Item1 , 1 )
  338. Num_JZ1 = TansferNum ( Num_JZ1 )
  339. Num_JZ1 = ID_Num1 --Scouring Records the ID number of information bits
  340. SetItemForgeParam ( Item1 , 1 , Num_JZ1 )
  341. AddChaSkill ( role , SK_QLZX, 1 , 1 , 0 )
  342.  
  343. Notice("<High Priest>: Congrats to the couple, ("..GetChaDefaultName(role).." & "..GetChaDefaultName(t[i])..") for getting married! May you share eternal happiness for the rest of your lives!")
  344. PlayEffect(role, 839)
  345. PlayEffect(t[i], 839)
  346. else
  347. BickerNotice(role,"Please note about your gender!")
  348. end
  349. end
  350. end
  351.  
  352. local cha1 = GetChaDefaultName ( role )
  353. local cha2 = GetChaDefaultName ( t[i] )
  354. return LUA_TRUE
  355.  
  356. elseif Ring_Num > 1 then
  357. BickerNotice(role,"You can only marry one person!")
  358. return LUA_FALSE
  359. else
  360. BickerNotice(role,"Please find someone who has a ring to marry!")
  361. return LUA_FALSE
  362. end
  363. end
  364.  
  365. function MarriageDivorce(role)
  366. local Ring = CheckBagItem( role, 7408 )
  367. local Dev = CheckBagItem(role, 7409)
  368. local RName = 7408
  369. local DName = 7409
  370. if Ring > 0 then
  371. if Dev > 0 then
  372. TakeItem( role, 0, 7408 , 1 )
  373. TakeItem( role, 0, 7409 , 1 )
  374. else
  375. HelpInfo(role,0,"High Priest:You do not meet the requirements to divorce ! You do not have "..GetItemName(RName).." anymore!")
  376. end
  377. else
  378. HelpInfo(role,0,"High Priest:You do not meet the requirements to divorce ! You do not have a "..GetItemName(DName).." ")
  379. end
  380. end
  381.  
  382. function marriage_effect_hook(ignore,role,freq,time)
  383. Hearts = {}
  384. Hearts[1] = 355
  385. Hearts[2] = 370
  386. Hearts[3] = 354
  387. Hearts[4] = 355
  388. Hearts[5] = 356
  389.  
  390. local x = math.random(1,5)
  391.  
  392. local Ring_Num = 0
  393. local t = {}
  394. t[0] = role
  395. t[1] = GetTeamCha(role, 0 )
  396. t[2] = GetTeamCha(role, 1 )
  397. t[3] = GetTeamCha(role, 2 )
  398. t[4] = GetTeamCha(role, 3 )
  399. local i = 1
  400. local item_count = CheckBagItem ( role , 7408 )
  401. local item_party = CheckBagItem ( t[i] , 7408)
  402. local Ring_Num = Ring_Num + item_count
  403. if Ring_Num == 1 then
  404. for i = 1 , 4 , 1 do
  405. if t[i] ~= nil then
  406. local statelv = 1
  407. local statetime = 3600
  408. if item_count > 0 then
  409. if item_party > 0 then
  410. local month = os.date ("%m")
  411. local day = os.date ("%d")
  412. local hour = os.date ("%H")
  413. local minute = os.date ("%M")
  414. local second = os.date ("%S")
  415.  
  416. local minutenum = tonumber(minute)
  417. local hournum = tonumber(hour)
  418. local secondnum = tonumber(second)
  419. local monthnum = tonumber(month)
  420. local daynum = tonumber(day)
  421.  
  422. if monthnum == 02 and daynum == 14 and minutenum == 05 and secondnum == 00 then
  423. PlayEffect(role, Hearts[x])
  424. end
  425. AddState ( role , role , marriage , statelv , statetime )
  426. end
  427. end
  428. end
  429. end
  430. if t[i] == nil then
  431. local statelv_marriage = GetChaStateLv ( role , marriage )
  432. if statelv_marriage~=0 then
  433. RemoveState ( role, marriage )
  434. BickerNotice( role , "<High Priest>: Marriage Effect Disabled!")
  435. end
  436. end
  437. else
  438. end
  439. end
  440. Hook:AddPostHook("cha_timer", marriage_effect_hook,1)
  441.  
  442.  
  443.  
  444. function RemoveStats( role )
  445. RemoveState(role, STATE_BBRING1)
  446. RemoveState(role, STATE_BBRING2)
  447. RemoveState(role, STATE_BBRING3)
  448. RemoveState(role, STATE_BBRING4)
  449. RemoveState(role, STATE_BBRING5)
  450. RemoveState(role, STATE_BBRING6)
  451. RemoveState(role, STATE_BBRING7)
  452. RemoveState(role , STATE_ROSO1 )
  453. RemoveState(role , STATE_ROSO2 )
  454. RemoveState(role , STATE_ROSO3 )
  455. RemoveState(role , STATE_ROSO4 )
  456. RemoveState(role , STATE_ROSO5 )
  457. RemoveState(role , STATE_ROSO6 )
  458. RemoveState(role , STATE_ROSO7 )
  459. RemoveState(role , STATE_ROSO8 )
  460. RemoveState(role , STATE_ROSO9 )
  461. RemoveState(role, marriage )
  462. RemoveState(role , STATE_VIPSET)
  463. return 1
  464. end
  465.  
  466.  
  467.  
  468. --Iteminfo
  469.  
  470. 7408 Marriage Certificate n1785 10130005 0 0 0 0 0 0 41 0 0 0 0 0 0 0 0 0 1 0 0 -1,-2,-2,-2 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0 0,0 0,0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0 0 This here certificate proves that you are married! I cannot be deleted unless you wish to be divorced! If you want to be divorced, please go see the priest at Church! 0
  471. 7409 Divorce Certificate Dcerti 10130005 0 0 0 0 0 0 41 0 0 0 0 0 0 0 0 0 1 0 0 -1,-2,-2,-2 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0 0,0 0,0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0 0 You will need to show me to the priest, in order to prove that you can be divorced! 0
  472. 2521 Valentine's Day Ring n2119 10130005 0 0 0 0 0 0 41 0 0 0 0 1 0 0 0 0 1 0 0 -1,-2,-2,-2 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0 0,0 0,0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0 0 Go with your soulmate to find Magician and ask him to enchant the ring. 0
  473. ---
  474. --- NPC
  475.  
  476. ----------------------
  477. --Church NPCs
  478. ---------------------
  479. --Cleaner
  480. function npc_talk01()
  481.  
  482. Talk( 1, "Cleaner: Hello! What a happy day to start a new life with the person you love!" )
  483.  
  484. end
  485.  
  486. --Monk - Lisa
  487. function npc_talk02()
  488.  
  489. Talk( 1, "Monk - Lisa: My name it's such artistic. Dont you think so?")
  490.  
  491. end
  492.  
  493. --Little Boy
  494. function npc_talk03()
  495.  
  496. Talk( 1, "Little Boy: Nobody wants to play with me. In moments like this I rather be emo.")
  497.  
  498. end
  499.  
  500. --Kidsnapper
  501. function npc_talk04()
  502.  
  503. Talk( 1, "Kidsnapper: To many children around, and there are not parents to care of them. This is going to be easy.")
  504.  
  505. end
  506.  
  507. --Luca Tony
  508. function npc_talk05 ()
  509.  
  510. Talk( 1, "Luca Tony: What the hell!! Means these pictures? Just wondering, What was Moliyo developer smoking when he designed this.")
  511.  
  512. end
  513.  
  514. --Richardson
  515. function npc_talk06 ()
  516.  
  517. Talk( 1, "Richardson: A happy couple! So cute... Now buy one of my products to celebrate!")
  518. Text( 1, "Trade", BuyPage)
  519.  
  520. InitTrade()
  521. Other( 3343 )--Rose
  522. Other( 3344 )--Lovers Chocolate
  523. Other( 3345 )--Firecracker A
  524. Other( 3346 )--Firecracker B
  525. Other( 3347 )--Firecracker C
  526. Other( 3348 )--Firework A
  527. Other( 3349 )--Firework B
  528. Other( 3350 )--Firework C
  529. Other( 3351 )--Royal Salute A
  530. Other( 3352 )--Royal Salute B
  531. Other( 3353 )--Royal Salute C
  532. Other( 3354 )--Heart Shape I
  533. Other( 3355 )--Heart Shape LOVE
  534. Other( 3356 )--Heart Shape U
  535. end
  536.  
  537. --Granny Mila
  538. function npc_talk07()
  539.  
  540. Talk( 1, "Granny Mila: Hello! I always pray here, and if you sit in the seat behind me, you will have bad luck for 3 days!")
  541.  
  542. end
  543.  
  544. -----------------------
  545. --Npc Function Priest--
  546. -----------------------
  547. function Priest()
  548. Talk( 1, "High Priest: I am very happy to see you around, you had finally decided to devote the word of God?")
  549. Text( 1, "Buy Apparel", BuyPage)
  550. Text( 1, "I wish to marry", JumpPage, 2)
  551. Text( 1, "I wish to divorce", JumpPage, 6)
  552. Text( 1, "What I need to get married?", JumpPage, 5)
  553. Text( 1, "Nevermind i just check it.", CloseTalk)
  554.  
  555. Talk( 2, "High Priest: Nice to hear that these days! To marry first you need to get the Certificate, and that is not a easy task. You need to show us that you are ready to start a new life and a family with the person you love!")
  556. Text( 2, "We are ready to get married!", JumpPage, 3)
  557.  
  558. Talk (3, "High Priest: Please find your lover, and team with him up than you may live together happy!")
  559. InitTrigger ()
  560. TriggerCondition (1, HasItem, 2521, 1)
  561. TriggerCondition (1, ValentinesRingJudge)
  562. TriggerCondition (1, HasLeaveBagGrid, 1)
  563. TriggerCondition (1, KitbagLock, 0)
  564. TriggerAction (1, ValentinesRing)
  565. TriggerFailure (1, JumpPage, 4)
  566. Text (3, "Yes I want to marry!", MultiTrigger, GetMultiTrigger (), 1)
  567.  
  568. Talk (4, "High Priest: I believe you do not meet the requirments to marry this person!")
  569. Text (4, "Back", JumpPage, 1)
  570.  
  571. Talk (5, "You need the Valentine's Day Ring and to be in Party with your Sweetheart! You must also be wearing your tuxedo and wedding dress! Then come to me to do the further process!")
  572. Text (5, "Back", JumpPage, 1)
  573.  
  574. Talk (6, "High Priest: You sure you want to divorce? ")
  575. Text (6, "Yes I am Sure!", MarriageDivorce)
  576.  
  577. Talk (7, "High Priest: I believe you do not meet the requirments to divorce this person!")
  578. Text (7, "Back", JumpPage, 1)
  579.  
  580.  
  581. InitTrade()
  582. Weapon()
  583. Weapon(5221)
  584. Weapon(5222)
  585. Weapon(5223)
  586. Weapon()
  587. Weapon(5238)
  588. Weapon(5239)
  589. Weapon(5240)
  590. Weapon(5244)
  591. Weapon(5245)
  592. Weapon(5246)
  593. Weapon(5247)
  594. Weapon(5252)
  595. Weapon(5253)
  596. Weapon(5254)
  597. Weapon(5255)
  598. Other(7409)
  599.  
  600. end
  601.  
  602. function npc_talk09()
  603.  
  604. Talk( 1, "Monk - Eli: I am not able to give you the bless of God yet, but who cares?")
  605.  
  606. InitTrigger()
  607. TriggerAction( 1, ReAll )
  608. Text( 1, "Bless me anyway!", MultiTrigger,GetMultiTrigger(),1)
  609.  
  610. end
  611.  
  612.  
  613. function npc_priest()
  614. Talk( 1, "Priest - Maylada: Hi! I am Priest Maylada, tell me when you need to purify your soul in the Church." )
  615. Text( 1, "How to go Church?", JumpPage, 2)
  616. Text( 1, "Never Mind", CloseTalk)
  617. Talk( 2, "Priest - Maylada: To access the Church, you need a Church Visit Ticket." )
  618. Text( 2, "Purchase Church Visit Ticket", JumpPage, 3)
  619.  
  620.  
  621. Talk (3, "Priest - Maylada: In order to purchase church visit ticket, i will need 300,000 gold")
  622. InitTrigger ()
  623. TriggerCondition (1, HasMoney, 300000)
  624. TriggerCondition (1, KitbagLock, 0)
  625. TriggerCondition (1, HasLeaveBagGrid, 1)
  626. TriggerAction (1, TakeMoney, 300000)
  627. TriggerAction (1, GiveItem, 3024, 1, 4)
  628. TriggerFailure (1, JumpPage, 4)
  629. Text (3, "Purchase!", MultiTrigger, GetMultiTrigger (), 1)
  630.  
  631. Talk( 4, "Priest - Maylada: Something went wrong. You don't have 300,000 gold!" )
  632. end
  633.  
  634. ----------------------------------------------------------
  635. -- Holy Priestess - Ada
  636. ----------------------------------------------------------
  637. function r_talk70 ()
  638. Talk( 1, "Ada: Hi, friend from afar. May the Goddess be with you. I am High Priestess Ada." )
  639.  
  640. AddNpcMission ( 756 )
  641. AddNpcMission ( 341 )
  642. AddNpcMission ( 356 )
  643. AddNpcMission ( 357 )
  644. AddNpcMission ( 521 )
  645. AddNpcMission ( 539 )
  646. AddNpcMission ( 540 )
  647. AddNpcMission ( 541 )
  648. AddNpcMission ( 552 )
  649. AddNpcMission ( 553 )
  650. AddNpcMission ( 556 )
  651.  
  652. end
  653.  
  654.  
  655. ----------------------------------------------------------
  656. -- Highest Priest
  657. ---------------------------------
  658. function r_talk47 ()
  659. Talk( 1, "Gannon: Hello, my friend. May the Goddess Kara bless you. I'm High Priest Gannon of Shaitan City" )
  660. Text( 1, "Research Runestone", JumpPage, 2)
  661. Text( 1, "Combine Treasure Map", JumpPage, 7)
  662. Text( 1, "Illusion Fragment to change a Blueprint", JumpPage, 9)
  663. Text( 1, "Illusion Heart to exchange for Lv 60 ring", JumpPage, 10)
  664.  
  665. Talk( 2, "Gannon: I am doing some research on ancient runestones. If you bring me enough, I will exchange them for something good." )
  666. Text( 2, "Regarding Skeletar set items", JumpPage, 3)
  667. Text( 2, "Regarding Incantation set", JumpPage, 4)
  668. Text( 2, "Regarding Evanescence set items", JumpPage, 5)
  669. Text( 2, "Regarding Enigma set items", JumpPage, 6)
  670.  
  671. Talk( 3, "Gannon: Skeletar set items belong to Lv 30 equipments from Forsaken City. You will need to pass me 10 Nal Runestones and 10 Sol Runestones. You can select the related class too." )
  672.  
  673. InitTrigger()
  674. TriggerCondition( 1, HasItem, 3425, 10 )
  675. TriggerCondition( 1, HasItem, 3426, 10 )
  676. TriggerAction( 1, TakeItem, 3425, 10 )
  677. TriggerAction( 1, TakeItem, 3426, 10 )
  678. TriggerAction( 1, GiveItem, 3400, 1 , 4)
  679. TriggerFailure( 1, JumpPage, 30 )
  680. Text( 3, "Obtain Swordsman equipment", MultiTrigger, GetMultiTrigger(), 1)
  681.  
  682. InitTrigger()
  683. TriggerCondition( 1, HasItem, 3425, 10 )
  684. TriggerCondition( 1, HasItem, 3426, 10 )
  685. TriggerAction( 1, TakeItem, 3425, 10 )
  686. TriggerAction( 1, TakeItem, 3426, 10 )
  687. TriggerAction( 1, GiveItem, 3401, 1 , 4)
  688. TriggerFailure( 1, JumpPage, 30 )
  689. Text( 3, "Obtained Hunter equipment", MultiTrigger, GetMultiTrigger(), 1)
  690.  
  691. InitTrigger()
  692. TriggerCondition( 1, HasItem, 3425, 10 )
  693. TriggerCondition( 1, HasItem, 3426, 10 )
  694. TriggerAction( 1, TakeItem, 3425, 10 )
  695. TriggerAction( 1, TakeItem, 3426, 10 )
  696. TriggerAction( 1, GiveItem, 3402, 1 , 4)
  697. TriggerFailure( 1, JumpPage, 30 )
  698. Text( 3, "Obtained Herbalist equipment", MultiTrigger, GetMultiTrigger(), 1)
  699.  
  700. InitTrigger()
  701. TriggerCondition( 1, HasItem, 3425, 10 )
  702. TriggerCondition( 1, HasItem, 3426, 10 )
  703. TriggerAction( 1, TakeItem, 3425, 10 )
  704. TriggerAction( 1, TakeItem, 3426, 10 )
  705. TriggerAction( 1, GiveItem, 3403, 1 , 4)
  706. TriggerFailure( 1, JumpPage, 30 )
  707. Text( 3, "Obtained Explorer equipment", MultiTrigger, GetMultiTrigger(), 1)
  708.  
  709. Talk( 4, "Gannon: Incantation set items are Lv 40 equipments from Forsaken City and Dark Swamp. You need to bring me 10 El Runestone and 10 Cam Runestone in exchange. You can select the class for the equipment." )
  710.  
  711. InitTrigger()
  712. TriggerCondition( 1, HasItem, 3428, 10 )
  713. TriggerCondition( 1, HasItem, 3429, 10 )
  714. TriggerAction( 1, TakeItem, 3428, 10 )
  715. TriggerAction( 1, TakeItem, 3429, 10 )
  716. TriggerAction( 1, GiveItem, 3404, 1 , 4)
  717. TriggerFailure( 1, JumpPage, 30 )
  718. Text( 4, "Obtained Crusader equipment", MultiTrigger, GetMultiTrigger(), 1)
  719.  
  720. InitTrigger()
  721. TriggerCondition( 1, HasItem, 3428, 10 )
  722. TriggerCondition( 1, HasItem, 3429, 10 )
  723. TriggerAction( 1, TakeItem, 3428, 10 )
  724. TriggerAction( 1, TakeItem, 3429, 10 )
  725. TriggerAction( 1, GiveItem, 3405, 1 , 4)
  726. TriggerFailure( 1, JumpPage, 30 )
  727. Text( 4, "Obtained Champion equipment", MultiTrigger, GetMultiTrigger(), 1)
  728.  
  729. InitTrigger()
  730. TriggerCondition( 1, HasItem, 3428, 10 )
  731. TriggerCondition( 1, HasItem, 3429, 10 )
  732. TriggerAction( 1, TakeItem, 3428, 10 )
  733. TriggerAction( 1, TakeItem, 3429, 10 )
  734. TriggerAction( 1, GiveItem, 3406, 1 , 4)
  735. TriggerFailure( 1, JumpPage, 30 )
  736. Text( 4, "Obtained Sharpshooter equipment", MultiTrigger, GetMultiTrigger(), 1)
  737.  
  738. InitTrigger()
  739. TriggerCondition( 1, HasItem, 3428, 10 )
  740. TriggerCondition( 1, HasItem, 3429, 10 )
  741. TriggerAction( 1, TakeItem, 3428, 10 )
  742. TriggerAction( 1, TakeItem, 3429, 10 )
  743. TriggerAction( 1, GiveItem, 3407, 1 , 4)
  744. TriggerFailure( 1, JumpPage, 30 )
  745. Text( 4, "Obtain Cleric equipment", MultiTrigger, GetMultiTrigger(), 1)
  746.  
  747. InitTrigger()
  748. TriggerCondition( 1, HasItem, 3428, 10 )
  749. TriggerCondition( 1, HasItem, 3429, 10 )
  750. TriggerAction( 1, TakeItem, 3428, 10 )
  751. TriggerAction( 1, TakeItem, 3429, 10 )
  752. TriggerAction( 1, GiveItem, 3408, 1 , 4)
  753. TriggerFailure( 1, JumpPage, 30 )
  754. Text( 4, "Obtained Seal Master equipment", MultiTrigger, GetMultiTrigger(), 1)
  755.  
  756. InitTrigger()
  757. TriggerCondition( 1, HasItem, 3428, 10 )
  758. TriggerCondition( 1, HasItem, 3429, 10 )
  759. TriggerAction( 1, TakeItem, 3428, 10 )
  760. TriggerAction( 1, TakeItem, 3429, 10 )
  761. TriggerAction( 1, GiveItem, 3409, 1 , 4)
  762. TriggerFailure( 1, JumpPage, 30 )
  763. Text( 4, "Obtained Voyager equipment", MultiTrigger, GetMultiTrigger(), 1)
  764.  
  765. Talk( 5, "Gannon: Incantation set items belonged to Demonic World Lv50 equipments. You will need to pass me 10 Ja Runestones and 10 Tef Runestones. You can select the related class too." )
  766.  
  767. InitTrigger()
  768. TriggerCondition( 1, HasItem, 3427, 10 )
  769. TriggerCondition( 1, HasItem, 3430, 10 )
  770. TriggerAction( 1, TakeItem, 3427, 10 )
  771. TriggerAction( 1, TakeItem, 3430, 10 )
  772. TriggerAction( 1, GiveItem, 3410, 1 , 4)
  773. TriggerFailure( 1, JumpPage, 30 )
  774. Text( 5, "Obtained Crusader equipment", MultiTrigger, GetMultiTrigger(), 1)
  775.  
  776. InitTrigger()
  777. TriggerCondition( 1, HasItem, 3427, 10 )
  778. TriggerCondition( 1, HasItem, 3430, 10 )
  779. TriggerAction( 1, TakeItem, 3427, 10 )
  780. TriggerAction( 1, TakeItem, 3430, 10 )
  781. TriggerAction( 1, GiveItem, 3411, 1 , 4)
  782. TriggerFailure( 1, JumpPage, 30 )
  783. Text( 5, "Obtained Champion equipment", MultiTrigger, GetMultiTrigger(), 1)
  784.  
  785. InitTrigger()
  786. TriggerCondition( 1, HasItem, 3427, 10 )
  787. TriggerCondition( 1, HasItem, 3430, 10 )
  788. TriggerAction( 1, TakeItem, 3427, 10 )
  789. TriggerAction( 1, TakeItem, 3430, 10 )
  790. TriggerAction( 1, GiveItem, 3412, 1 , 4)
  791. TriggerFailure( 1, JumpPage, 30 )
  792. Text( 5, "Obtained Sharpshooter equipment", MultiTrigger, GetMultiTrigger(), 1)
  793.  
  794. InitTrigger()
  795. TriggerCondition( 1, HasItem, 3427, 10 )
  796. TriggerCondition( 1, HasItem, 3430, 10 )
  797. TriggerAction( 1, TakeItem, 3427, 10 )
  798. TriggerAction( 1, TakeItem, 3430, 10 )
  799. TriggerAction( 1, GiveItem, 3413, 1 , 4)
  800. TriggerFailure( 1, JumpPage, 30 )
  801. Text( 5, "Obtain Cleric equipment", MultiTrigger, GetMultiTrigger(), 1)
  802.  
  803. InitTrigger()
  804. TriggerCondition( 1, HasItem, 3427, 10 )
  805. TriggerCondition( 1, HasItem, 3430, 10 )
  806. TriggerAction( 1, TakeItem, 3427, 10 )
  807. TriggerAction( 1, TakeItem, 3430, 10 )
  808. TriggerAction( 1, GiveItem, 3414, 1 , 4)
  809. TriggerFailure( 1, JumpPage, 30 )
  810. Text( 5, "Obtained Seal Master equipment", MultiTrigger, GetMultiTrigger(), 1)
  811.  
  812. InitTrigger()
  813. TriggerCondition( 1, HasItem, 3427, 10 )
  814. TriggerCondition( 1, HasItem, 3430, 10 )
  815. TriggerAction( 1, TakeItem, 3427, 10 )
  816. TriggerAction( 1, TakeItem, 3430, 10 )
  817. TriggerAction( 1, GiveItem, 3415, 1 , 4)
  818. TriggerFailure( 1, JumpPage, 30 )
  819. Text( 5, "Obtained Voyager equipment", MultiTrigger, GetMultiTrigger(), 1)
  820.  
  821. Talk( 6, "Gannon: Enigma set items belonged to Demonic World Lv60 equipments. You will need to pass me 10 Ter Runestones and 10 Fa Runestones. You can select the related class too." )
  822.  
  823. InitTrigger()
  824. TriggerCondition( 1, HasItem, 3455, 10 )
  825. TriggerCondition( 1, HasItem, 3456, 10 )
  826. TriggerAction( 1, TakeItem, 3455, 10 )
  827. TriggerAction( 1, TakeItem, 3456, 10 )
  828. TriggerAction( 1, GiveItem, 3416, 1 , 4)
  829. TriggerFailure( 1, JumpPage, 30 )
  830. Text( 6, "Obtained Crusader equipment", MultiTrigger, GetMultiTrigger(), 1)
  831.  
  832. InitTrigger()
  833. TriggerCondition( 1, HasItem, 3455, 10 )
  834. TriggerCondition( 1, HasItem, 3456, 10 )
  835. TriggerAction( 1, TakeItem, 3455, 10 )
  836. TriggerAction( 1, TakeItem, 3456, 10 )
  837. TriggerAction( 1, GiveItem, 3417, 1 , 4)
  838. TriggerFailure( 1, JumpPage, 30 )
  839. Text( 6, "Obtained Champion equipment", MultiTrigger, GetMultiTrigger(), 1)
  840.  
  841. InitTrigger()
  842. TriggerCondition( 1, HasItem, 3455, 10 )
  843. TriggerCondition( 1, HasItem, 3456, 10 )
  844. TriggerAction( 1, TakeItem, 3455, 10 )
  845. TriggerAction( 1, TakeItem, 3456, 10 )
  846. TriggerAction( 1, GiveItem, 3418, 1 , 4)
  847. TriggerFailure( 1, JumpPage, 30 )
  848. Text( 6, "Obtained Sharpshooter equipment", MultiTrigger, GetMultiTrigger(), 1)
  849.  
  850. InitTrigger()
  851. TriggerCondition( 1, HasItem, 3455, 10 )
  852. TriggerCondition( 1, HasItem, 3456, 10 )
  853. TriggerAction( 1, TakeItem, 3455, 10 )
  854. TriggerAction( 1, TakeItem, 3456, 10 )
  855. TriggerAction( 1, GiveItem, 3419, 1 , 4)
  856. TriggerFailure( 1, JumpPage, 30 )
  857. Text( 6, "Obtain Cleric equipment", MultiTrigger, GetMultiTrigger(), 1)
  858.  
  859. InitTrigger()
  860. TriggerCondition( 1, HasItem, 3455, 10 )
  861. TriggerCondition( 1, HasItem, 3456, 10 )
  862. TriggerAction( 1, TakeItem, 3455, 10 )
  863. TriggerAction( 1, TakeItem, 3456, 10 )
  864. TriggerAction( 1, GiveItem, 3420, 1 , 4)
  865. TriggerFailure( 1, JumpPage, 30 )
  866. Text( 6, "Obtained Seal Master equipment", MultiTrigger, GetMultiTrigger(), 1)
  867.  
  868. InitTrigger()
  869. TriggerCondition( 1, HasItem, 3455, 10 )
  870. TriggerCondition( 1, HasItem, 3456, 10 )
  871. TriggerAction( 1, TakeItem, 3455, 10 )
  872. TriggerAction( 1, TakeItem, 3456, 10 )
  873. TriggerAction( 1, GiveItem, 3421, 1 , 4)
  874. TriggerFailure( 1, JumpPage, 30 )
  875. Text( 6, "Obtained Voyager equipment", MultiTrigger, GetMultiTrigger(), 1)
  876.  
  877. InitTrigger()
  878. TriggerCondition( 1, HasItem, 0432, 1 )
  879. TriggerCondition( 1, HasItem, 0433, 1 )
  880. TriggerCondition( 1, HasItem, 0434, 1 )
  881. TriggerCondition( 1, HasItem, 0435, 1 )
  882. TriggerCondition( 1, HasMoney, 2000 )
  883. TriggerAction( 1, TakeItem, 0432, 1 )
  884. TriggerAction( 1, TakeItem, 0433, 1 )
  885. TriggerAction( 1, TakeItem, 0434, 1 )
  886. TriggerAction( 1, TakeItem, 0435, 1 )
  887. TriggerAction( 1, TakeMoney, 2000 )
  888. TriggerAction( 1, GiveItem, 1092, 1, 4 )
  889. TriggerFailure( 1, JumpPage, 8 )
  890.  
  891. Talk( 7, "Gannon: Bring the 4 map fragments to me and I will combine a complete treasure map for you." )
  892. Text( 7, "Combine Treasure Map",MultiTrigger, GetMultiTrigger(), 1)
  893. Talk( 8, "Gannon: When you have collected the 4 separate maps, look for me and bring along 2000G." )
  894.  
  895. InitTrigger()
  896. TriggerCondition( 1, HasItem, 2324, 5 )
  897. TriggerCondition( 1, HasLeaveBagGrid, 1 )
  898. TriggerCondition( 1, KitbagLock, 0 )
  899. TriggerAction( 1, TakeItem, 2324, 5 )
  900. TriggerAction( 1, GiveItem, 1000, 1 , 4)
  901. TriggerFailure( 1, JumpPage, 11 )
  902. Talk( 9, "Gannon: Ah? Can you give me your Fragment? It will be worth your while." )
  903. Text( 9, "5 Illusion Fragments to exchange for 1 Burry Blueprint", MultiTrigger, GetMultiTrigger(), 1)
  904.  
  905. InitTrigger()
  906. TriggerCondition( 1, HasItem, 2324, 30 )
  907. TriggerCondition( 1, HasLeaveBagGrid, 1 )
  908. TriggerCondition( 1, KitbagLock, 0 )
  909. TriggerAction( 1, TakeItem, 2324, 30 )
  910. TriggerAction( 1, GiveItem, 1001, 1 , 4)
  911. TriggerFailure( 1, JumpPage, 11 )
  912. Text( 9, "30 Illusion Fragments to exchange for 1 Encrypted Blueprint ", MultiTrigger, GetMultiTrigger(), 1)
  913.  
  914. InitTrigger()
  915. TriggerCondition( 1, HasItem, 2324, 100 )
  916. TriggerCondition( 1, HasLeaveBagGrid, 1 )
  917. TriggerCondition( 1, KitbagLock, 0 )
  918. TriggerAction( 1, TakeItem, 2324, 100 )
  919. TriggerAction( 1, GiveItem, 1002, 1 , 4)
  920. TriggerFailure( 1, JumpPage, 11 )
  921. Text( 9, "100 Illusion Fragments to exchange for 1 Sealed Blueprint", MultiTrigger, GetMultiTrigger(), 1)
  922.  
  923. InitTrigger()
  924. TriggerCondition( 1, HasItem, 2324, 500 )
  925. TriggerCondition( 1, HasLeaveBagGrid, 1 )
  926. TriggerCondition( 1, KitbagLock, 0 )
  927. TriggerAction( 1, TakeItem, 2324, 500 )
  928. TriggerAction( 1, GiveItem, 1003, 1 , 4)
  929. TriggerFailure( 1, JumpPage, 11 )
  930. Text( 9, "500 Illusion Fragments to exchange for 1 Invocation Blueprint", MultiTrigger, GetMultiTrigger(), 1)
  931.  
  932. InitTrigger()
  933. TriggerCondition( 1, HasItem, 2325, 1 )
  934. TriggerCondition( 1, HasLeaveBagGrid, 1 )
  935. TriggerCondition( 1, KitbagLock, 0 )
  936. TriggerAction( 1, TakeItem, 2325, 1 )
  937. TriggerAction( 1, GiveItem, 4656, 1 , 4)
  938. TriggerFailure( 1, JumpPage, 11 )
  939. Talk( 10, "Gannon: Its such a beautiful Illusion Heart. Let me use this ring to exchange." )
  940. Text( 10, "Exchanged Flame of Fury", MultiTrigger, GetMultiTrigger(), 1)
  941.  
  942. InitTrigger()
  943. TriggerCondition( 1, HasItem, 2325, 1 )
  944. TriggerCondition( 1, HasLeaveBagGrid, 1 )
  945. TriggerCondition( 1, KitbagLock, 0 )
  946. TriggerAction( 1, TakeItem, 2325, 1 )
  947. TriggerAction( 1, GiveItem, 4657, 1 , 4)
  948. TriggerFailure( 1, JumpPage, 11 )
  949. Text( 10, "Redeem Stable Cliff", MultiTrigger, GetMultiTrigger(), 1)
  950.  
  951. InitTrigger()
  952. TriggerCondition( 1, HasItem, 2325, 1 )
  953. TriggerCondition( 1, HasLeaveBagGrid, 1 )
  954. TriggerCondition( 1, KitbagLock, 0 )
  955. TriggerAction( 1, TakeItem, 2325, 1 )
  956. TriggerAction( 1, GiveItem, 4658, 1 , 4)
  957. TriggerFailure( 1, JumpPage, 11 )
  958. Text( 10, "Redeem Wind of the Gentle Soul", MultiTrigger, GetMultiTrigger(), 1)
  959.  
  960. InitTrigger()
  961. TriggerCondition( 1, HasItem, 2325, 1 )
  962. TriggerCondition( 1, HasLeaveBagGrid, 1 )
  963. TriggerCondition( 1, KitbagLock, 0 )
  964. TriggerAction( 1, TakeItem, 2325, 1 )
  965. TriggerAction( 1, GiveItem, 4659, 1 , 4)
  966. TriggerFailure( 1, JumpPage, 11 )
  967. Text( 10, "Redeem Entwined Rattan", MultiTrigger, GetMultiTrigger(), 1)
  968.  
  969. InitTrigger()
  970. TriggerCondition( 1, HasItem, 2325, 1 )
  971. TriggerCondition( 1, HasLeaveBagGrid, 1 )
  972. TriggerCondition( 1, KitbagLock, 0 )
  973. TriggerAction( 1, TakeItem, 2325, 1 )
  974. TriggerAction( 1, GiveItem, 4660, 1 , 4)
  975. TriggerFailure( 1, JumpPage, 11 )
  976. Text( 10, "Redeem Water of Miracle", MultiTrigger, GetMultiTrigger(), 1)
  977.  
  978. Talk( 11, "You do not have the items required for exchanging, or your inventory might be binded or you do not have sufficient inventory slots." )
  979.  
  980. AddNpcMission ( 102 )
  981. AddNpcMission ( 416 )
  982. AddNpcMission ( 751 )
  983. AddNpcMission ( 755 )
  984. AddNpcMission ( 95 )
  985. AddNpcMission ( 96 )
  986. AddNpcMission ( 97 )
  987. AddNpcMission ( 151 )
  988. AddNpcMission ( 1227 )
  989. AddNpcMission ( 342 )
  990. AddNpcMission ( 343 )
  991. AddNpcMission ( 344 )
  992. AddNpcMission ( 345 )
  993. AddNpcMission ( 346 )
  994. AddNpcMission ( 347 )
  995. AddNpcMission ( 348 )
  996. AddNpcMission ( 349 )
  997. AddNpcMission ( 350 )
  998. AddNpcMission ( 351 )
  999. AddNpcMission ( 352 )
  1000. AddNpcMission ( 353 )
  1001. AddNpcMission ( 354 )
  1002. AddNpcMission ( 355 )
  1003. AddNpcMission ( 5009 )
  1004. AddNpcMission ( 5015 )
  1005. AddNpcMission ( 5017 )
  1006. AddNpcMission ( 5024 )
  1007. AddNpcMission ( 5028 )
  1008. AddNpcMission ( 5031 )
  1009. AddNpcMission ( 5059 )
  1010. AddNpcMission ( 5064 )
  1011.  
  1012. end
  1013.  
  1014. function el_talk15 ()
  1015. Talk (1, "magic summer: I dream to be a friend Pei cruel devil killed Locke. Brave soldier, if you can find for me the soul of my friend on behalf of the seven letters PEIMENG. I will take the collection of many years I give you the magic box. ")
  1016.  
  1017. Text (1, "I would like to give me the magic ring", JumpPage, 2)
  1018.  
  1019. AddNpcMission (6139)
  1020. AddNpcMission (6161)
  1021. AddNpcMission (6166)
  1022.  
  1023. Talk (2, "said magician: Please find your lover, and a good team group, and then loudly singing to find a good man to marry a bar.")
  1024. InitTrigger ()
  1025. TriggerCondition (1, HasItem, 2521, 1) ------------------ mall to buy Valentine's Day Ring
  1026. TriggerCondition (1, ValentinesRingJudge)
  1027. TriggerCondition (1, HasLeaveBagGrid, 1)
  1028. TriggerCondition (1, KitbagLock, 0)
  1029. TriggerAction (1, ValentinesRing)
  1030. TriggerFailure (1, JumpPage, 3)
  1031. Text (2, "marry a good man to find it, although I did not mind ... ...", MultiTrigger, GetMultiTrigger (), 1)
  1032. Talk (3, "Where is the problem? Check whether the conditions to meet you")
  1033. Text (3, "Back", JumpPage, 2)
  1034. end
  1035.  
  1036. --High Priest
  1037. function npc_talk08()
  1038.  
  1039. Talk( 1, "High Priest: I am very happy to see you around, you had finally decided to devote the word of God?")
  1040. Text( 1, "I am looking forward to Marry.", JumpPage, 2)
  1041. Text( 1, "What I need to marry!", JumpPage, 5)
  1042. Text( 1, "Nah I have nothing to do here.", CloseTalk)
  1043.  
  1044. Talk( 2, "High Priest: Nice to hear that these days! To marry first you need to get the Certificate, and that is not a easy task. You need to show us that you are ready to start a new life and a family with the person you love!")
  1045. Text( 2, "I am ready!", JumpPage, 3)
  1046.  
  1047. Talk (3, "High Priest: Please find your lover, and team with him up than you may live togher happy!.")
  1048. InitTrigger ()
  1049. TriggerCondition (1, HasItem, 2521, 1) ------------------ mall to buy Valentine's Day Ring
  1050. TriggerCondition (1, ValentinesRingJudge)
  1051. TriggerCondition (1, HasLeaveBagGrid, 1)
  1052. TriggerCondition (1, KitbagLock, 0)
  1053. TriggerAction (1, ValentinesRing)
  1054. TriggerFailure (1, JumpPage, 4)
  1055. Text (3, "Yes I want to marry!", MultiTrigger, GetMultiTrigger (), 1)
  1056. Talk (4, "Where is the problem? Check whether you meet the condtions!")
  1057. Text (4, "Back", JumpPage, 2)
  1058. Talk (5, "You need the Valentine's Day Ring and to be in Party with your Sweetheart than come to me to do the further process!")
  1059. Text (5, "Back", JumpPage, 1)
  1060.  
  1061. end
  1062.  
  1063. --- NPC - Magsea
  1064.  
  1065. 24 Holy Priestess - Ada 1 430 0 86248,330381 86248,330381 159 Old Shaitan City 14 0 r_talk70 0
  1066. 99 Nun-Maylada 1 430 0 82300,353400 82300,353400 45 Shaitan City 13 0 npc_priest 0
  1067. 1 High Priest - Gannon 1 23 0 86299,350092 86299,350092 264 Shaitan City 13 0 r_talk47 0
  1068. -- Missionsdk
  1069.  
  1070. elseif conditions[i].func == ValentinesRingJudge then
  1071. PRINT( "ConditionsTest:ValentinesRingJudge, p1 = ", conditions[i].p1 )
  1072. local ret = ValentinesRingJudge( character, conditions[i].p1 )
  1073. if ret ~= LUA_TRUE then
  1074. PRINT( "ConditionsTest:ValentinesRingJudge = false" )
  1075. return LUA_FALSE
  1076. end
  1077.  
  1078. PRINT( "AcceptMission:npcid = %d ", npcid )
  1079. if mission.tp == NOMAL_MISSION or mission.tp == WORLD_MISSION then
  1080. PRINT( "AcceptMission:Required number of empty slots in inventory:numgrid = ", mission.begin.baggrid )
  1081. local ret = HasLeaveBagGrid( character, mission.begin.baggrid )
  1082. if ret ~= LUA_TRUE then
  1083. PRINT( "AcceptMission:insufficient inventory slot when character accept quest! num = ", mission.begin.baggrid )
  1084. BickerNotice( character, "Inventory space insufficient, requires "..mission.begin.baggrid.." space. Activation of quest failed!" )
  1085. return LUA_FALSE
  1086. end
  1087.  
  1088. PRINT( "AcceptMission:Required number of empty slots in inventory:numgrid = ", mission.missionlist[tpindex].begin.baggrid )
  1089. local numgrid = mission.missionlist[tpindex].begin.baggrid
  1090. local ret = HasLeaveBagGrid( character, numgrid )
  1091. if ret ~= LUA_TRUE then
  1092. PRINT( "AcceptMission:insufficient inventory slot when character accept quest! num = ", numgrid )
  1093. BickerNotice( character, "Inventory space insufficient, requires "..numgrid.." space. Activation of quest failed!" )
  1094. return LUA_FALSE
  1095. end
  1096.  
  1097. if mission.tp == NOMAL_MISSION or mission.tp == WORLD_MISSION then
  1098. PRINT( "CompleteMission:Required number of empty slots in inventory:numgrid = ", mission.result.baggrid )
  1099. local ret = HasLeaveBagGrid( character, mission.result.baggrid )
  1100. if ret ~= LUA_TRUE then
  1101. PRINT( "CompleteMission:insufficient inventory slot when character completes quest!num = ", mission.result.baggrid )
  1102. BickerNotice( character, "Inventory space insufficient, requires "..mission.result.baggrid.."1 slot. Completion of quest failed!" )
  1103. return LUA_FALSE
  1104. end
  1105.  
  1106. PRINT( "CompleteMission:Required number of empty slots in inventory:numgrid = ", mission.missionlist[index].result.baggrid )
  1107. local numgrid = mission.missionlist[index].result.baggrid
  1108. local ret = HasLeaveBagGrid( character, numgrid )
  1109. if ret ~= LUA_TRUE then
  1110. PRINT( "CompleteMission:insufficient inventory slot when character accept quest! num = ", numgrid )
  1111. BickerNotice( character, "Inventory space insufficient, requires "..numgrid.."1 slot. Completion of quest failed!" )
  1112. return LUA_FALSE
  1113. end
  1114.  
  1115.  
  1116. elseif conditions[i].func == HasLeaveBagGrid then
  1117. PRINT( "ConditionsTest:HasLeaveBagGrid, p1 =", conditions[i].p1 )
  1118. local ret = HasLeaveBagGrid( character, conditions[i].p1 )
  1119. if ret ~= LUA_TRUE then
  1120. PRINT( "ConditionsTest:HasLeaveBagGrid = false" )
  1121. return LUA_FALSE
  1122. end
  1123.  
  1124. PRINT( "CreateRandMission:Required number of empty slots in inventory:numgrid = ", mission.missionlist[tpindex].begin.baggrid )
  1125. local numgrid = mission.missionlist[tpindex].begin.baggrid
  1126. local ret = HasLeaveBagGrid( character, numgrid )
  1127. if ret ~= LUA_TRUE then
  1128. PRINT( "CreateRandMission:insufficient inventory slot when character accept quest! num = ", numgrid )
  1129. BickerNotice( character, "Inventory space insufficient, requires "..numgrid.." space. Activation of quest failed!" )
  1130. return LUA_FALSE, 0
  1131. end
  1132.  
  1133.  
  1134. elseif conditions[i].func == KitbagLock then
  1135. PRINT( "ConditionsTest:KitbagLock, p1 = ", conditions[i].p1 )
  1136. local ret = KitbagLock( character, conditions[i].p1 )
  1137. if ret ~= LUA_TRUE then
  1138. PRINT( "ConditionsTest:KitbagLock = false" )
  1139. return LUA_FALSE
  1140. end
  1141.  
  1142. elseif conditions[i].func == ValentinesRing then
  1143. PRINT( "ConditionsTest:ValentinesRing, p1 = ", conditions[i].p1 )
  1144. local ret = ValentinesRing( character, conditions[i].p1 )
  1145. if ret ~= LUA_TRUE then
  1146. PRINT( "ConditionsTest:ValentinesRing = false" )
  1147. return LUA_FALSE
  1148. end
  1149.  
  1150. elseif conditions[i].func == ValentinesRingJudge then
  1151. PRINT( "ConditionsTest:ValentinesRingJudge, p1 = ", conditions[i].p1 )
  1152. local ret = ValentinesRingJudge( character, conditions[i].p1 )
  1153. if ret ~= LUA_TRUE then
  1154. PRINT( "ConditionsTest:ValentinesRingJudge = false" )
  1155. return LUA_FALSE
  1156. end
  1157.  
  1158. elseif actions[i].func == ValentinesRing then
  1159. PRINT( "ActionsProc:ValentinesRing, p1 = ", actions[i].p1 )
  1160. local ret = ValentinesRing( character, actions[i].p1 )
  1161. if ret ~= LUA_TRUE then
  1162. PRINT( "ActionsProc:ValentinesRing failed!" )
  1163. SystemNotice( character, "ActionsProc:ValentinesRing failed!" )
  1164. return LUA_FALSE
  1165. end
  1166.  
  1167. --NPCSDK
  1168.  
  1169. elseif usCmd == CMD_CM_BLACKMARKET_EXCHANGE_REQ then --黑市兑换
  1170. local timeNum = ReadWord( rpk )
  1171. local srcID = ReadWord( rpk )
  1172. local srcNum = ReadWord( rpk )
  1173. local tarID = ReadWord( rpk )
  1174. local tarNum = ReadWord( rpk )
  1175. local byIndex = ReadWord( rpk )
  1176.  
  1177. local ret = KitbagLock( character, 0 )
  1178. if ret ~= LUA_TRUE then
  1179. SystemNotice( character, "Inventory is binded. Unable to redeem" )
  1180. return
  1181. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement