Advertisement
Guest User

Untitled

a guest
Jun 15th, 2015
503
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.38 KB | None | 0 0
  1. function get_sets()
  2. sets = {}
  3.  
  4. sets.aftercast_Idle_noSub = {main="Keraunos",sub="Mephitis Grip",ammo="Incantor Stone",
  5. neck="Twilight Torque",ear1="Nourishing earring",ear2="Loquacious Earring",
  6. body="Respite Cloak",hands="Serpentes Cuffs",ring1="Defending Ring",ring2="Patricius ring",
  7. back="Iximulew Cape",waist="Fucho-no-obi",legs="Assiduity Pants",feet="Serpentes Sabots"}
  8.  
  9. sets.aftercast_Idle_Sub = {main="Keraunos",sub="Mephitis Grip",ammo="Incantor Stone",
  10. neck="Twilight Torque",ear1="Nourishing earring",ear2="Loquacious Earring",
  11. body="Respite Cloak",hands="Serpentes Cuffs",ring1="Defending Ring",ring2="Patricius ring",
  12. back="Iximulew Cape",waist="Fucho-no-obi",legs="Assiduity Pants",feet="Serpentes Sabots"}
  13.  
  14. sets.aftercast_Idle = sets.aftercast_Idle_noSub
  15.  
  16. sets.precast_FastCast = {ammo="Incantor Stone",head="Nahtirah Hat",ear2="Loquacious Earring",
  17. body="Anhur Robe",hands="Gendewitha Gages",back="Swith Cape",legs="Orvail Pants",feet="Chelona Boots"}
  18.  
  19. sets.Resting = {main="Chatoyant Staff",sub="Mephitis Grip",
  20. head="Nahtirah Hat",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
  21. body="Hagondes Coat",hands="Nares Cuffs",ring1="Sangoma Ring",ring2="Maquette Ring",
  22. back="Shadow Mantle",waist="Korin Obi",legs="Nares Trews",feet="Chelona Boots"}
  23.  
  24. sets.midcast_ElementalMagic = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
  25. head="Hagondes Hat +1",
  26. neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
  27. body="Vanir Cotehardie",hands="Otomi Gloves",
  28. ring1="Prolix ring",ring2="Acumen ring",
  29. back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
  30. feet="Umbani Boots"}
  31.  
  32.  
  33.  
  34. sets.midcast_DarkMagic = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
  35. head="Hagondes Hat +1",
  36. neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
  37. body="Vanir Cotehardie",hands="Otomi Gloves",
  38. ring1="Prolix ring",ring2="Acumen ring",
  39. back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
  40. feet="Umbani Boots"}
  41.  
  42.  
  43.  
  44. sets.midcast_EnfeeblingMagic = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
  45. head="Hagondes Hat +1",
  46. neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
  47. body="Vanir Cotehardie",hands="Otomi Gloves",
  48. ring1="Prolix ring",ring2="Acumen ring",
  49. back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
  50. feet="Umbani Boots"}
  51.  
  52.  
  53.  
  54. sets.midcast_Impact = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
  55. head="Hagondes Hat +1",
  56. neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
  57. body="Vanir Cotehardie",hands="Otomi Gloves",
  58. ring1="Prolix ring",ring2="Acumen ring",
  59. back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
  60. feet="Umbani Boots"}
  61.  
  62.  
  63.  
  64. sets.midcast_Embrava = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
  65. head="Hagondes Hat +1",
  66. neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
  67. body="Vanir Cotehardie",hands="Otomi Gloves",
  68. ring1="Prolix ring",ring2="Acumen ring",
  69. back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
  70. feet="Umbani Boots"}
  71.  
  72.  
  73.  
  74. sets.midcast_EnhancingMagic = {main="Kirin's Pole",sub="Fulcio Grip",ammo="Incantor Stone",
  75. head="Nahtirah Hat",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
  76. body="Anhur Robe",hands="Gendewitha Gages",
  77. back="Swith Cape",waist="Ninurta's Sash",legs="Orvail Pants",feet="Chelona Boots"}
  78.  
  79. sets.precast_Stun = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
  80. head="Hagondes Hat +1",
  81. neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
  82. body="Vanir Cotehardie",hands="Otomi Gloves",
  83. ring1="Prolix ring",ring2="Acumen ring",
  84. back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
  85. feet="Umbani Boots"}
  86.  
  87.  
  88.  
  89.  
  90. sets.midcast_Cure = {main="Keraunos",sub="Mephitis Grip",head="Nahtirah Hat",ear1="Roundel Earring",ear2="Loquacious Earring",
  91. neck="Orunmila's Torque",body="Heka's Kalasiris",hands="Bokwus Gloves",ring1="Patricius Ring",ring2="Kunaji Ring",
  92. back="Tempered +1",waist="Witful Belt",legs="Nares Trews",feet="Regal pumps"}
  93.  
  94. sets.midcast_Helix = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
  95. head="Hagondes Hat +1",
  96. neck="Eddy necklace",ear1="Friomis Earring",ear2="Hecate's Earring",
  97. body="Vanir Cotehardie",hands="Otomi Gloves",
  98. ring1="Prolix ring",ring2="Acumen ring",
  99. back="Toro Cape",waist="Yamabuki-no-obi",legs="Hagondes pants +1",
  100. feet="Umbani Boots"}
  101.  
  102.  
  103.  
  104. sets.midcast_Stoneskin = {main="Kirin's Pole",neck="Stone Gorget",waist="Siegel Sash",legs="Shedir Seraweels"}
  105.  
  106. sets.Obi = {}
  107. sets.Obi.Fire = {waist='Karin Obi',back='Twilight Cape',lring='Zodiac Ring'}
  108. sets.Obi.Earth = {waist='Dorin Obi',back='Twilight Cape',lring='Zodiac Ring'}
  109. sets.Obi.Water = {waist='Suirin Obi',back='Twilight Cape',lring='Zodiac Ring'}
  110. sets.Obi.Wind = {waist='Furin Obi',back='Twilight Cape',lring='Zodiac Ring'}
  111. sets.Obi.Ice = {waist='Hyorin Obi',back='Twilight Cape',lring='Zodiac Ring'}
  112. sets.Obi.Thunder = {waist='Rairin Obi',back='Twilight Cape',lring='Zodiac Ring'}
  113. sets.Obi.Light = {waist='Korin Obi',back='Twilight Cape',lring='Zodiac Ring'}
  114. sets.Obi.Dark = {waist='Anrin Obi',back='Twilight Cape',lring='Zodiac Ring'}
  115.  
  116. sets.staves = {}
  117.  
  118. sets.staves.damage = {main="Keraunos"}
  119. sets.staves.damage.Thunder = {main="Keraunos"}
  120. sets.staves.damage.Fire = {main="Keraunos"}
  121.  
  122. sets.staves.accuracy = {main="Keraunos"}
  123. sets.staves.damage.Thunder = {main="Keraunos"}
  124. sets.staves.damage.Ice = {main="Keraunos"}
  125.  
  126. stuntarg = 'Shantotto'
  127.  
  128.  
  129. end
  130.  
  131. function precast(spell,action)
  132. if spell.english == 'Impact' then
  133. cast_delay(2)
  134. equip(sets['precast_FastCast'],{body="Twilight Cloak"})
  135. if not buffactive['elemental seal'] then
  136. add_to_chat(8,'--------- Elemental Seal is down ---------')
  137. end
  138.  
  139. elseif spell.skill=='ElementalMagic' and spell.casttime < 3 then
  140. cast_delay(0.1)
  141. equip(sets.midcast_ElementalMagic)
  142. if spell.element == 'Earth' then
  143. equip({neck="Quanpur Necklace"})
  144. end
  145. if spell.element == world.weather_element or spell_element == world.day_element and sets.Obi[spell.element] then
  146. equip(sets.Obi[spell.element])
  147. end
  148. elseif spell.english == 'Stun' then
  149. cast_delay(0.1)
  150. equip(sets['precast_Stun'])
  151. if not buffactive.thunderstorm then
  152. add_to_chat(8,'--------- Thunderstorm is down ---------')
  153. elseif not buffactive.klimaform then
  154. add_to_chat(8,'----------- Klimaform is down -----------')
  155. end
  156. if stuntarg ~= 'Shantotto' then
  157. send_command('@input /t '..stuntarg..' ---- Byrth Stunned!!! ---- ')
  158. end
  159. else
  160. equip(sets['precast_FastCast'])
  161. cast_delay(0.5)
  162. end
  163.  
  164. if (buffactive.alacrity or buffactive.celerity) and world.weather_element == spell.element then
  165. equip({feet='Argute Loafers +2'})
  166. end
  167. end
  168.  
  169. function midcast(spell,action)
  170. if string.find(spell.english,'Cur') then
  171. equip(sets.midcast_Cure)
  172. if spell.element == world.weather_element or spell_element == world.day_element then
  173. equip({main="Chatoyant Staff"},sets.Obi[spell.element])
  174. end
  175. if buffactive.rapture then
  176. equip({head="Savant's Bonnet +2"})
  177. end
  178. elseif spell.english == 'Impact' then
  179. local tempset = sets['midcast_Impact']
  180. tempset['body'] = 'Twilight Cloak'
  181. tempset['head'] = empty
  182. equip(tempset)
  183. if spell.element == world.weather_element or spell_element == world.day_element then
  184. equip(sets.Obi[spell.element])
  185. end
  186. if sets.staves.damage[spell.element] then
  187. equip(sets.staves.damage[spell.element])
  188. end
  189. elseif spell.skill=="ElementalMagic" then
  190. if string.find(spell.english,'helix') then
  191. equip(sets['midcast_Helix'])
  192. else
  193. equip(sets.midcast_ElementalMagic)
  194. if spell.element=='Earth' then
  195. equip({neck="Quanpur Necklace"})
  196. end
  197. if spell.element == world.weather_element or spell_element == world.day_element then
  198. equip(sets.Obi[spell.element])
  199. end
  200. end
  201. if buffactive.ebullience then
  202. equip({head="Savant's Bonnet +2"})
  203. end
  204. if buffactive.klimform then
  205. equip ({feet="Savant's Loafers +2"})
  206. end
  207.  
  208. elseif spell.english == 'Stoneskin' then
  209. equip(sets['midcast_Stoneskin'])
  210. elseif spell.skill == 'EnhancingMagic' then
  211. if spell.english == 'Embrava' then
  212. equip(sets['midcast_Embrava'])
  213. if not buffactive.perpetuance then
  214. add_to_chat(8,'--------- Perpetuance is down ---------')
  215. end
  216. if not buffactive.accession then
  217. add_to_chat(8,'--------- Accession is down ---------')
  218. end
  219. if not buffactive.penury then
  220. add_to_chat(8,'--------- Penury is down ---------')
  221. end
  222. end
  223. if buffactive.perpetuance then
  224. equip(sets['midcast_EnhancingMagic'],{hands="Savant's Bracers +2"})
  225. else
  226. equip(sets['midcast_EnhancingMagic'])
  227. end
  228. else
  229. weathercheck(spell.element,sets['midcast_'..spell.skill])
  230. end
  231.  
  232. if spell.english == 'Sneak' then
  233. send_command('@wait 1.8;cancel 71;')
  234. end
  235. end
  236.  
  237. function aftercast(spell,action)
  238. equip(sets['aftercast_Idle'])
  239.  
  240. if spell.english == 'Sleep' or spell.english == 'Sleepga' then
  241. send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
  242. elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
  243. send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
  244. elseif spell.english == 'Break' or spell.english == 'Breakga' then
  245. send_command('@wait 20;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
  246. end
  247. end
  248.  
  249. function status_change(new,tab)
  250. if new == 'Resting' then
  251. equip(sets['Resting'])
  252. else
  253. equip(sets['aftercast_Idle'])
  254. end
  255. end
  256.  
  257. function buff_change(status,gain_or_loss)
  258. if status == 'Sublimation: Complete' and gain_or_loss == 'gain' and not 'stunmode' then -- True whether gained or lost
  259. sets.aftercast_Idle = sets.aftercast_Idle_noSub
  260. elseif status == 'Sublimation: Activated' and gain_or_loss == 'gain' and not 'stunmode' then
  261. sets.aftercast_Idle = sets.aftercast_Idle_Sub
  262. end
  263. equip(sets.aftercast_Idle)
  264. end
  265.  
  266. function pet_midcast(spell,action)
  267. end
  268.  
  269. function pet_aftercast(spell,action)
  270. end
  271.  
  272.  
  273.  
  274. function self_command(command)
  275. if command == 'stuntarg' then
  276. stuntarg = target.name
  277. elseif command == 'stunmode' then
  278. windower.add_to_chat(100,'Stun Mode')
  279. if sets.aftercast_Idle ~= sets.precast_Stun then
  280. stunmode = true
  281. sets.aftercast_Idle = sets.precast_Stun
  282. elseif buffactive['Sublimation: Activated'] then
  283. stunmode = false
  284. sets.aftercast_Idle = sets.aftercast_Idle_Sub
  285. else
  286. stunmode = false
  287. sets.aftercast_Idle = sets.aftercast_Idle_noSub
  288. end
  289. equip(sets.aftercast_Idle)
  290. end
  291. end
  292.  
  293.  
  294.  
  295. -- This function is user defined, but never called by GearSwap itself. It's just a user function that's only called from user functions. I wanted to check the weather and equip a weather-based set for some spells, so it made sense to make a function for it instead of replicating the conditional in multiple places.
  296.  
  297. function weathercheck(spell_element,set)
  298. if spell_element == world.weather_element or spell_element == world.day_element then
  299. equip(set,sets['Obi_'..spell_element])
  300. else
  301. equip(set)
  302. end
  303. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement