Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.86 KB | None | 0 0
  1. _addon = {}
  2. _addon.name = 'packetstun'
  3. _addon.version = '1.000'
  4.  
  5. require 'tablehelper'
  6.  
  7. local config = require 'config'
  8. local files = require 'filehelper'
  9.  
  10. windower.register_event('load',function ()
  11. notice('Version '.._addon.version..' loaded.')
  12. jatable = S{
  13. --trex path
  14. --'1897', --regurgitation
  15. --'1896', --aqua fortis
  16. --'1898', --delta thrusta
  17. '1899',--torpefying charge
  18. --'1900', --grim glower
  19. '1901', --Calcifying Mist
  20. --'2136', --oppressive glare
  21.  
  22. --'260','1339', --geist wall
  23. '2787', --whirling inferno
  24. --'263','1342', --cyclotail
  25.  
  26. --'120','1428', --foul breath
  27. --'118','1426', --ripper fang
  28. --'123','1431', --chomp rush
  29. --'124','1432', --scythe tail
  30. '2680', --Tarichutoxin
  31.  
  32.  
  33. '548', --tortoise song
  34. '791', --tortoise song
  35. --'550', --tortoise stomp
  36. --'793', --tortoise stomp
  37. '2329', --testudo tremor
  38.  
  39. '2764', --blistering roar
  40. '2765', --searing serration
  41. '2766', --volcanic stasis
  42. '2767', --tyrannical blow
  43. '2768', --batholithic shell
  44. '2769', --pyroclastic surge
  45. '2770', --incinerating lahar
  46.  
  47. --shark
  48. '2755', --Protolithic Puncture
  49. '2756', --Aquatic Lance
  50. '2757', --Pelagic Cleaver
  51. '2758', --Carcharian Verve
  52. '2759', --Tidal Guillotine
  53. '2760', --Marine Mayhem
  54.  
  55. --craklaw
  56. '2701', --Impenetrable Carapace
  57. '2702', --Rending Deluge
  58. '2703', --Sundering Snip
  59. '2704', --Viscid Spindrift
  60. '2705', --Riptide Eupnea
  61.  
  62. --Uragnite
  63. --'250','1317', --Palsynyxis
  64. '251','1318', --Painful Whip
  65. '2437', --Virulent Haze
  66. --'1315', --Gas Shell
  67. --'1316', --Venom Shell
  68. '1319', --Suctorial Tentacle
  69.  
  70. --jagil
  71. '1614', --Recoil Dive
  72.  
  73. --orobon
  74. '2383', --mayhem lantern
  75. '1441', --seaspray
  76. '1439', --hypnic lamp
  77. '1438', --Vile Belch
  78. '1439', --Hypnic Lamp
  79. '1440', --Seismic Tail
  80. '1442', --Leeching Current
  81.  
  82.  
  83. --crab
  84. '2256', --venom shower
  85. --'186','1333', --Bubble Shower
  86. --'187','1334' --Bubble Curtain
  87. --'188','1335', --Big Scissors
  88. --'189','1336', --Scissor Guard
  89.  
  90.  
  91. --bee path
  92. --butterfly
  93. --'2694', --Tempestuous Upheaval
  94. --'2695', --Slice N Dice
  95. '2696', --Blackout
  96. --'2697', --Smouldering Swarm"
  97.  
  98. --Chapuli
  99. '2689', --Nature's Meditation
  100. '2690', --Sensilla Blades
  101. '2691', --Tegmina Buffet
  102. '2692', --Sanguinary Slash
  103. '2693', --Orthopterror
  104.  
  105. --Scorpion
  106. --'464', --Venom Sting
  107. --'465', --Stasis
  108. --'466', --Venom Storm
  109. --'467', --Earthbreaker
  110. --'97', --Death Scissors
  111. --'98', --Wild Rage
  112. --'99', --Earth Pounder
  113. --'100', --Sharp Strike
  114.  
  115. --gnat
  116. '2514', --Booming Bombination
  117. --'1902', --Insipid Nip
  118. --'1903', --Pandemic Nip
  119. --'1904', --Bombination
  120. '1905', --Cimicine Discharge
  121. --'1906', --Emetic Discharge
  122.  
  123. --wamoura
  124. '1695', --Magma Fan
  125. --'1696', --Erratic Flutter
  126. --'1697', --Proboscis
  127. --'1698', --Erosion Dust
  128. --'1699', --Exuviation
  129. '1700', --Fire Break
  130. '2788', --Benumbing Blaze
  131.  
  132. --bee
  133. '2746', --Mandibular Lashing
  134. '2747', --Vespine Hurricane
  135. '2748', --Stinger Volley
  136. '2749', --Droning Whirlwind
  137. '2750', --Incisive Denouement
  138. '2751', --Incisive Apotheosis
  139.  
  140. --legion
  141. --hall of an
  142. '2273','2274', --dark star
  143. '2265', --choas blast
  144. '2267','2268', --dancing tail
  145. '2269','2270', --chilling roar
  146. '2469', --rending talons
  147. '2472', --wings of agony
  148. '2470', --shreiking gale
  149. '2471', --wings of woe
  150. '2473', --thpheosomthing rage
  151. '2474', --ravenous wail
  152. '2271','2272', --douse something
  153.  
  154. --hall of Ki
  155. '1530', --sulfurious breathe
  156. '1534', --gates of hades
  157. '1529', --lava spit
  158. '2445', --acheron flame
  159. '1531', --scorching lash
  160. '1772', --fulmination
  161. '1768', --tourbillion
  162. '1769', --dreadstorm
  163. '1767', --thunderstrike
  164. '1766', --tenberous mist
  165. '1771', --plauge swipe
  166. '1580', --nerve gas
  167. '2500', --death profit
  168. '2495', --slicing sickle
  169. '2497', --phlem explosion
  170. '2496', --raptoral claw
  171. '2498', --masercating bile
  172. '2499', --preying posture
  173.  
  174. --hall of im
  175. '274', --memento mori
  176. '275', --silece seal
  177. '276', --envoutment
  178. '277', --danse macabre
  179. '1070', --final retribution
  180. '1073', --gala macabre
  181. '2382', --hadal summons
  182. '1857', --hellsnap
  183. '1858', --hellclap
  184. '1859', --cackle
  185. '1860', --necrobane
  186. '1861', --necropurge
  187. '1862', --bligestorm
  188. '1863', --thunderous shreik
  189. '1850', --bloodrake
  190. '1851', --decolation
  191. '1852', --nefouris kiss
  192. '1853', --heliosomething
  193. '1854', --wings of ghenna
  194. '1855', --eternal damnation
  195. '1856', --nocturnal servitude
  196. '2132', --dirty breath
  197. '2278', --minax glare
  198. '2458', --yaksha stance
  199. '2459', --damnation
  200. '2460', --bliss
  201. '2461', --oblivion
  202. --'2462', --rakasha stance
  203. '2463', --judgment
  204. '2464', --illusion
  205. '2465', --vengence
  206.  
  207. --hall of muru
  208. '2176', --storm wing
  209. '2175', --reaving wind
  210. '2173', --feral peck
  211. '2172', --bloody beak
  212. '2174', --warped wail
  213. '2177', --calmous wind
  214. '1933', --aolian void
  215. '1935', --dessication
  216. '1934', --extreme purgetation
  217. '1932', --salverous gale
  218. '1931', --dustvoid
  219. '2348', --gorge
  220. '2349', --disgorge
  221. '2363', --turbine cyclone
  222. '2364', --seismic impact
  223. '2365', --incenerator
  224. '2366', --arm cannon
  225. '2367','2477', --balistic kick
  226. '2553', --claw
  227. '2555', --quill
  228. '2368', --scapula beam
  229.  
  230. --hall of mul
  231. '2554', --yama's judgement
  232. '2501', --sakra storm
  233. '2369', --eradicator
  234. '2528', --diluval wake
  235. '2529', --kurnugi collapse
  236. '2530', --searing hiatus
  237. '2531', --deivesatong gale
  238. '2532', --bolt of purdition
  239. '2533', --cripling rime
  240. '2534', --oblivion's mantle
  241. '2542', --gnash n guttle
  242. '2543', --slutty spectum
  243. '2544', --chalmus reak
  244. '2545', --rancid reflux
  245. '2546', --crowning flatus
  246. '2547', --slimy propsal
  247. '2548', --just desserts
  248.  
  249. --new shit
  250. '2735', --sairain slide
  251. '2736', --jungle wallop
  252. '2741', --saurian swamp
  253. '2742', --jungle hoodoo
  254. '2734', --velk pygammaachi
  255. '2740', --velk
  256. '2827', --coming through
  257. '2825', --velk ambush
  258. '2828', --merciless mauling
  259. '2826', --galumph
  260. '2829', --crocasomethin
  261. --'2831', --battle trance
  262. --'2733', --death spin
  263. --'2739', --death spin
  264. '1', --foot kick
  265. '1311', --foot kick
  266. '3', --whirl
  267. '1313', --whirl
  268.  
  269. }
  270. matable = S{
  271. '505', --meteor
  272. '502', --kaustra
  273. '357', --slowga
  274. '503',
  275. '367',
  276. '365', --breakga
  277. }
  278. end)
  279.  
  280. --This event happens when an action packet is received.
  281. windower.register_event('action', function(act)
  282. --Category 7 is weapon skill readying for players and npcs. The following
  283. --gets the ability id of the tp move being used and (after subtracting 256
  284. --due to it being offset, compares it against the abilities table. Then checks
  285. --it against your danger words and the user against your moblist.
  286. --if act['category'] == 7 and isMob(tonumber(act['actor_id'])) then
  287. if act['category'] == 7 then
  288. local num = tonumber(act['targets'][1]['actions'][1]['param']) - 256
  289. if num < 1 then return end
  290. if jatable[tostring(num)] ~= nil then
  291. windower.send_command('input /ma Stun <t>')
  292. windower.send_command('input /echo '..num)
  293. end
  294. end
  295.  
  296. --Category 8 is spell casting
  297. if act['category'] == 8 and tonumber(act['targets'][1]['actions'][1]['message']) ~= 16 and isMob(tonumber(act['actor_id'])) and act['param'] ~= 28787 then
  298. --if act['category'] == 8 and tonumber(act['targets'][1]['actions'][1]['message']) ~= 16 and isMob(tonumber(act['actor_id'])) then
  299. local num = tonumber(act['targets'][1]['actions'][1]['param'])
  300. if num <= 0 then return end
  301. if matable[tostring(num)] ~= nil then
  302. windower.send_command('input /ma Stun <t>')
  303. end
  304. end
  305. end)
  306.  
  307. --Check if the actor is actually an npc rather than a player
  308. function isMob(id)
  309. return windower.ffxi.get_mob_by_id(id)['is_npc']
  310. end
  311.  
  312. windower.register_event('incoming text',function (original, modified, color)
  313. if (string.find(original,'The spring has returned')) then
  314. windower.send_command('input /ma Stun <t>')
  315. end
  316. return modified,color
  317. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement