Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This is the very start of the file, below my lines are the actual attack script. I used a few special conditions as I run 2 //different melee sorcs and have them both precasting differently. This way the do not override each other or get caught in loops //attempting each others skills.
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- var ClassAttack = {
- doAttack: function (unit, preattack) {
- if (Config.MercWatch && Town.needMerc()) {
- print("mercwatch");
- Town.visitTown();
- }
- var slot = me.weaponswitch;
- if (me.getSkill(58, 1) && !me.getState(30)) { // Energy Shield in the Field for Zealer
- Skill.cast(58, 0);
- }
- //////////////////////////////////////////////// The Beast ////////////////////////////////////////////////////
- if (!me.getState(140) && me.charname === "defeated" && !me.getState(10) || !me.getState(16)) { // Field full buff
- Precast.doPrecast(true); // Beast takes place of CTA so just Enchant and Frozen Armor are needed
- delay(200);
- }
- if (!me.getState(140) && me.charname === "defeated") { // Not Werebear Check
- Attack.weaponSwitch(); // Switch to Beast
- Skill.cast(228, 0); // Cast Werebear
- }
- if (me.charname === "defeated") { // always checks for Primary Slot for attack which is set in the Chars Config File
- Attack.weaponSwitch(Attack.getPrimarySlot());
- }
- //////////////////////////End The Beast And Begin/////////////////////Beast Needs Frozen Shield//////////////////
- if (me.getState(140) && me.charname === "defeated" && !me.getState(10)) { // Frozen Armor went away!
- Attack.weaponSwitch(Attack.getPrimarySlot()); // Get Primary slot in case it drops Frozen Armor at a bad time
- delay(200);
- Attack.weaponSwitch(); // Switch to Beast
- Skill.cast(228, 0); // Unshift from Werebear
- Precast.doPrecast(true); // Rebuff Frozen Armor (enchant if missing, unlikely but its checked, precast I removed "|| force")
- Attack.weaponSwitch(Attack.getPrimarySlot()); // Ensure primary weapon is back out so we know our weapon state
- }
- if (!me.getState(140) && me.charname === "defeated") { // Not Werebear Check
- Attack.weaponSwitch(); // Switch to beast
- Skill.cast(228, 0); // Cast Werebear
- }
- if (me.charname === "defeated") { // always checks for Primary Slot for attack which is set in the Chars Config File
- Attack.weaponSwitch(Attack.getPrimarySlot());}
- //////////////////////////////////////////End All Beast///////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement