Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.27 KB | None | 0 0
  1. quest pet_system begin
  2. state start begin
  3. function get_pet_info(itemVnum)
  4. pet_info_map = {
  5. -- [ITEM VNUM] MOB_VNUM, DEFAULT NAME, buff_idx, spawn_effect_idx
  6. [53001] = { 34077, " - Ateţ Kuţu Ankasý ", 1},
  7. [53002] = { 34002, " - Yavru Ren Geyiđi ", 1},
  8. [53003] = { 34003, " - Buz Ankasý ", 1},
  9. [53005] = { 34004, " - Yavru Azrail ", 1},
  10. [53006] = { 34009, " - Altýn Yavru Azrail ", 1},
  11. [53007] = { 34010, " - Bambi ", 1},
  12. [53008] = { 34011, " - Knuud ", 1},
  13. [53009] = { 34012, " - Bao Bao ", 1},
  14. [53010] = { 34008, " - Leonidas ", 1},
  15. [53011] = { 34007, " - Khan ", 1},
  16. [53012] = { 34005, " - Porki ", 1},
  17. [53013] = { 34006, " - Rufus ", 1},
  18. [53014] = { 34013, " - Ţiţko Cellatcýk ", 1},
  19. [53015] = { 34014, " - Altýn Ţiţko Cellatcýk ", 1},
  20. [53016] = { 34015, " - Boney ", 1},
  21. [53017] = { 34016, " - Yeţim Ankasý ", 1},
  22. [53018] = { 34020, " - Kar Leonidas ", 1},
  23. [53019] = { 34019, " - Arktis Khan ", 1},
  24. [53022] = { 34021, " - Sheldon ", 1},
  25. [53023] = { 34022, " - Cooper ", 1},
  26. [53024] = { 34023, " - Yavru Panter ", 1},
  27. [53025] = { 34024, " - Yavru Leopar ", 1},
  28. [53222] = { 34026, " - Balkabađý Kafasý ", 1},
  29. [53223] = { 34027, " - Cadý Süpürgesi ", 1},
  30. [53224] = { 34028, " - Kar Tanesi ", 1},
  31. [53225] = { 34029, " - Çancýk ", 1},
  32. [53226] = { 34030, " - Cupido ", 1},
  33. [53227] = { 34031, " - Öfkeli Kalp ", 1},
  34. [53228] = { 34032, " - Mavi Ay ", 1},
  35. [53229] = { 34033, " - Kýzýl Ay ", 1},
  36. [53230] = { 34034, " - Mavi Koç ", 1},
  37. [53231] = { 34035, " - Beyaz Kuzucuk ", 1},
  38. [53232] = { 34036, " - Yavru Huashin ", 1},
  39. [53233] = { 34100, " - Bruce ", 0},
  40. [53234] = { 34101, " - Wayne ", 0},
  41. [53235] = { 34102, " - Robin ", 0},
  42. [53236] = { 34103, " - Valentino ", 0},
  43. [53237] = { 34104, " - Valentinia ", 0},
  44. [53238] = { 34105, " - Valentino ", 0},
  45. [53239] = { 34106, " - Valentinia ", 0},
  46. [53240] = { 34107, " - Ay Feneri ", 0},
  47. [53241] = { 34108, " - Ay Feneri ", 0},
  48. [53242] = { 34111, " - Bonsa+ ", 0},
  49. [53243] = { 34111, " - Bonsa ", 0},
  50. [53244] = { 34112, " - Bayan Jiangshi ", 0},
  51. [53245] = { 34113, " - Bay Jiangshi ", 0},
  52. [53246] = { 34114, " - Genç Jiangshi ", 0},
  53. [53247] = { 34115, " - Kýrmýzý Elf ", 0},
  54. [53248] = { 34116, " - Yeţil Elf ", 0},
  55. [53249] = { 34117, " - Kýrmýzý Elf ", 0},
  56. [53258] = { 34090, " - Bunte Laterne ", 0},
  57. [53259] = { 34091, " - Grüne Laterne ", 0},
  58. [53268] = { 34087, " - Lycan Maddäus ", 0},
  59. [53269] = { 34088, " - Lycaninho ", 0},
  60. [53260] = { 34092, " - Osvald Bey ", 0},
  61. [53261] = { 34093, " - Cobblepot Bey ", 0},
  62. [53263] = { 34095, " - Griffy ", 0},
  63. [53264] = { 34096, " - Nogaj ", 0},
  64. [53253] = { 34086, " - Hui ", 0},
  65. [53254] = { 34089, " - Buh ", 0},
  66. }
  67.  
  68. itemVnum = tonumber(itemVnum)
  69.  
  70. return pet_info_map[itemVnum]
  71. end
  72. function get_spawn_effect_file(idx)
  73. effect_table = {
  74. [0] = nil,
  75. [1] = "d:\\\\ymir work\\\\effect\\\\etc\\\\appear_die\\\\monster_die.mse",
  76. }
  77. return effect_table [idx]
  78. end
  79. when 53001.use or 53002.use or 53003.use or 53015.use or 53005.use or 53006.use or 53007.use or 53008.use or 53009.use or 53010.use or 53011.use or 53012.use or 53016.use or 53014.use or 53013.use or 53017.use or 53018.use or 53019.use or 53020.use or 53021.use or 53022.use or 53023.use or 53024.use or 53025.use or 53222.use or 53223.use or 53224.use or 53225.use or 53226.use or 53227.use or 53228.use or 53229.use or 53230.use or 53231.use or 53232.use or
  80. 53233.use or 53234.use or 53235.use or 53236.use or 53237.use or 53238.use or 53239.use or 53240.use or 53241.use or 53242.use or 53243.use or 53244.use or 53245.use or 53246.use or 53247.use or 53248.use or 53249.use or 53250.use or 53251.use or 53256.use or 53258.use or 53259.use or 53268.use or 53269.use or 53260.use or 53261.use or 53263.use or 53264.use or 53253.use or 53254.use begin
  81. local pet_info = pet_system.get_pet_info(item.vnum)
  82.  
  83. if null != pet_info then
  84.  
  85. local mobVnum = pet_info[1]
  86. local petName = pet_info[2]
  87. local spawn_effect_file_name = pet_system.get_spawn_effect_file(pet_info[3])
  88.  
  89. if true == pet.is_summon(mobVnum) then
  90. if spawn_effect_file_name != nil then
  91. pet.spawn_effect (mobVnum, spawn_effect_file_name)
  92. end
  93. pet.unsummon(mobVnum)
  94. else
  95. if pet.count_summoned() < 1 then
  96. pet.summon(mobVnum, petName, false)
  97. else
  98. syschat("Evcil hayvan muhru yok")
  99. end
  100. if spawn_effect_file_name != nil then
  101. pet.spawn_effect(mobVnum, spawn_effect_file_name)
  102. end
  103. end -- if pet.is_summon
  104. end -- if null != pet_info
  105. end -- when
  106. end -- state
  107. end -- quest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement