Windower: Idle/Engaged status and Avatar Perpetuation - Windower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Idle/Engaged status and Avatar Perpetuation

#1 User is offline   Rioitz 

  • Padawan
  • PipPip
  • Group: Members
  • Posts: 36
  • Joined: 23-January 12

Posted 16 July 2013 - 06:21 PM

I have a question regarding "engaged" status and Avatars.

Do I need to make two different rules for Engaged and Idle when summoning Avatars/performing Blood pacts/Job Abilites?
Like this:

<!-- Avatar Perpetuation Rules -->		
    	<if skill="SummoningMagic">
    	<if spell="Fire Spirit|Earth Spirit|Water Spirit|Air  Spirit|Ice Spirit|Thunder Spirit|Light Spirit|Dark Spirit"  status="Idle">
			<equip when="precast" set="Fast Cast-Avatar" />
			<var cmd="set PetActive True" />	
			<var cmd="set PetIsValid 1" />				
        	<var cmd="set CurrentAvatar %Spell" />
        	<equip when="midcast" set="Avatar Perpetuation-Spirit" />
		</if>	
		<elseif spell="Ifrit|Titan|Leviathan|Garuda|Shiva|Ramuh" status="Idle">
			<equip when="precast" set="Fast Cast" />
			<var cmd="set PetActive True" />	
			<var cmd="set PetIsValid 1" />				
        	<var cmd="set CurrentAvatar %Spell" />			
        	<equip when="aftercast" set="Avatar Perpetuation" />
    	</elseif>
		<elseif spell="Carbuncle" status="Idle">
        	<equip when="precast" set="Fast Cast" />
			<var cmd="set PetActive True" />	
			<var cmd="set PetIsValid 1" />				
        	<equip when="aftercast" set="Avatar Perpetuation-Carbuncle" />
    	</elseif>
		<elseif spell="Fenrir" status="Idle">
        	<equip when="precast" set="Fast Cast" />
			<var cmd="set PetActive True" />		
			<var cmd="set PetIsValid 1" />				
        	<equip when="aftercast" set="Avatar Perpetuation-Fenrir" />
    	</elseif>
		<elseif spell="Diabolos" status="Idle">
        	<equip when="precast" set="Fast Cast" />
			<var cmd="set PetActive True" />
			<var cmd="set PetIsValid 1" />				
        	<equip when="aftercast" set="Avatar Perpetuation-Diabolos" />
    	</elseif>
		<elseif spell="Alexander">
        	<equip when="precast" set="Alexander&Odin"/>
        	<action type="aftercastdelay" delay="12"/>
    	</elseif>
    	<elseif spell="Odin">
        	<equip when="precast" set="Alexander&Odin"/>
        	<action type="aftercastdelay" delay="12"/>
		</elseif>
		<if spell="Fire Spirit|Earth Spirit|Water Spirit|Air  Spirit|Ice Spirit|Thunder Spirit|Light Spirit|Dark Spirit"  status="Engaged">
			<equip when="precast" set="Fast Cast-Avatar" />
			<var cmd="set PetActive True" />	
			<var cmd="set PetIsValid 1" />				
        	<var cmd="set CurrentAvatar %Spell" />
        	<equip when="midcast" set="TP-$TP-Variable-$Avatar-Variable" />
		</if>	
		<elseif spell="Ifrit|Titan|Leviathan|Garuda|Shiva|Ramuh" status="Engaged">
			<equip when="precast" set="Fast Cast" />
			<var cmd="set PetActive True" />	
			<var cmd="set PetIsValid 1" />				
        	<var cmd="set CurrentAvatar %Spell" />			
        	<equip when="aftercast" set="Avatar Perpetuation" />
    	</elseif>
		<elseif spell="Carbuncle" status="Engaged">
        	<equip when="precast" set="Fast Cast" />
			<var cmd="set PetActive True" />	
			<var cmd="set PetIsValid 1" />				
        	<equip when="aftercast" set="TP-$TP-Variable-$Avatar-Variable" />
    	</elseif>
		<elseif spell="Fenrir" status="Engaged">
        	<equip when="precast" set="Fast Cast" />
			<var cmd="set PetActive True" />		
			<var cmd="set PetIsValid 1" />				
        	<equip when="aftercast" set="TP-$TP-Variable-$Avatar-Variable" />
    	</elseif>
		<elseif spell="Diabolos" status="Engaged">
        	<equip when="precast" set="Fast Cast" />
			<var cmd="set PetActive True" />
			<var cmd="set PetIsValid 1" />				
        	<equip when="aftercast" set="TP-$TP-Variable-$Avatar-Variable" />
    	</elseif>
		<elseif status="engaged">
            	<equip when="engaged|aftercast" set="TP-$TP-Variable-$Avatar-Variable" />
    	</elseif>


(Also does that code look like it would work? I wasn't too sure if the status was put in the right location or if it had to be an "advanced if")

Or is there a way to set it for example:

If status = engaged : use the engaged group
If stats = idle : use the idle group

Which would save me writing out massive amounts of rules for each Blood Pact/Ability/Avatar.

Thanks!
0

#2 User is offline   Shadowmeld 

  • Advanced Member
  • PipPipPipPip
  • Group: Members
  • Posts: 119
  • Joined: 14-January 09
  • Gender:Male
  • Name: Shadowmeld
  • Server: Cerberus
  • Jobs: THF 99, PLD 99, DRG 99, COR 99, BLM 99, SCH 99, WAR 99
  • Race: Mithra
  • Linkshell: Electric Mayhem

Posted 18 July 2013 - 09:06 AM

There are a few ways that you can do it. One of the current popular ways to do it is to use the sequential reading of set names to your advantage. For instance.

<set name="Superawesome-engaged" />
<set name="Superawesome-*" />


<if x ="y">
  <equip set="Superawesome-%Status" />
</if>


Because of the way that spellcast reads your sets into memory. When you are engaged, it will equip Superawesome-engaged, but for any other status it will equip Superawesome-*. It reads the sets into memory sequentially, so if you put Superawesome-* before Superawesome-engaged, it would never equip the second set.

I would avoid using groups for status changes if I were you. When you change groups, you get red text printed to the console every time. You definitely want to use sets. Here are some recommendations for your code to clean it up and make it smaller.

First sets:

<set name="AvatarPerp-Engaged-Carbuncle" />
<set name="AvatarPerp-Engaged-Diabolos" />
<set name="AvatarPerp-Engaged-Fenrir" />
<set name="AvatarPerp-Engaged-Spirit" />
<set name="AvatarPerp-Engaged-*" />
<set name="AvatarPerp-*-Carbuncle" />
<set name="AvatarPerp-*-Diabolos" />
<set name="AvatarPerp-*-Fenrir" />
<set name="AvatarPerp-*-Spirit" />
<set name="AvatarPerp-*-*" /> <!-- This must be the last set or you will run into problems -->


Now the rules can be easily done. I will do two different code blocks. A few things. There is already a system variable PetIsValid. It has a value of true or false. It is true if the pet is called, false if the pet is not. It parses this at the beginning of the spellcast so you do have to finagle the sets a bit to force the right sets. I like to split up the casting rules and the aftercast rules for smn. It makes the code a little simpler.

<if skill="SummoningMagic" nottype="SummonerPact">
  <if spell="*Spirit">
	<equip when="precast" set="Fast Cast-Avatar" />
  </if>
  <elseif notspell="Odin|Alexander">
	<equip when="precast" set="Fast Cast" />
  </elseif>
  <else>
	<equip when="precast" set="AlexanderOdin" /> <!-- I strongly reccommend removing the & from your set name, you might even have to.  -->
	<aftercastdelay delay="12" />
  </else>
</if>


Now, the rest of the code will go at the very end of your rules section. They have to be the very last rules in your code because of the <return /> code.

<if skill="SummoningMagic" nottype="SummonerPact">
  <if spell="*Spirit">
	<equip when="aftercast" set="AvatarPerp-%Status-Spirit" />
	<return />
  </if>
  <elseif notspell="Odin|Alexander">
	<equip when="aftercast" set="AvatarPerp-%Status-%Spell" />
	<return />
  </elseif>
</if>

<if spell="Release">
  <equip when="aftercast" set="%Status" />
  <return />
</if>

<if PetIsValid="true">
  <if PetName="*Spirit">
	<equip when="idle|resting|engaged|aftercast" set="AvatarPerp-%Status-Spirit" />
  </if>
  <else>
	<equip when="idle|resting|engaged|aftercast" set="AvatarPerp-%Status-%PetName" />
  </else>
  <return />
</if>

<equip when="idle|resting|engaged|aftercast" set="%Status" />


So, what does this do? Well lets say that you are summoning an avatar. Lets pick Garuda. And lets say that you are idle. Precast, you equip the fast cast set. Aftercast, it hits the first of your ending rules, so it will try to equip the set AvatarPerp-%Status-%Spell. When the system tracks those variables down, it becomes AvatarPerp-Idle-Garuda. You don't have a set AvatarPerp-Idle-Garuda, BUT you do have the set AvatarPerp-*-* that catches it at the last moment and it runs with that set, so that is what is equipped. Now lets say you engage an enemy. You aren't summoning a pet so that rule isn't processed. Neither are you releasing your pet, so that rule is ignored too. You already have a pet, so when you switch status to engaged, it then tries to equip AvatarPerp-Engaged-Garuda. This is caught by the AvatarPerp-Engaged-* set and you are good to go. The last rule is for when you are running around without a pet. I just use the %Status Variables for my basic sets, but you can use whatever you want.

Hope this helps.
0

#3 User is offline   Rioitz 

  • Padawan
  • PipPip
  • Group: Members
  • Posts: 36
  • Joined: 23-January 12

Posted 20 July 2013 - 02:26 AM

Thanks so much! The info was so clearly laid out as well I couldn't have asked for a better response!!

Just to follow up, for example how would this work with Blood Pacts or Abilities? Basicly the same way just change the spell to the relative pact or ability?

So it would use -Blood Pact timer gear > Skill/Accuracy/Attack (Magic/Physical) depending on the ward type.

I was thinking it might be like this?

<!--Blood Pact: Rage - Magical -->
	<if spell="Meteor Strike|Geocrush|Grand Fall|Wind Blade|Heavenly Strike|Thunderstorm|Ruinous Omen|Nether Blast|Somnolence|Nightmare|Night Terror">
        	<equip when="precast" set="Blood Pact Delay" />
        	<equip when="midcast" set="Blood Pact-Rage-Magical-$BloodPactVariable" />
        	<aftercastdelay delay="5" />			
			<equip when="aftercast" set="AvatarPerp-%Status-%PetName" />
	</if>


Also I was hoping to set up "modes" for blood pacts, so I could toggle Accuracy or Attack with the click of a button depending on if I was noticing resists or accuracy issues. Is there a relatively simple way this could be incorporated into a spellcast?

So in variables $BloodPactVariable would be

Attack/Accuracy


And I would have sets like:

            	Blood Pact Rage-Magical-Accuracy
   		Blood Pact Rage-Magical-Attack
   		Blood Pact Rage-Physical-Attack
   		Blood Pact Rage-Physical-Accuracy


Would this be on the right track?

Thanks again for all the help!
0

#4 User is offline   Shadowmeld 

  • Advanced Member
  • PipPipPipPip
  • Group: Members
  • Posts: 119
  • Joined: 14-January 09
  • Gender:Male
  • Name: Shadowmeld
  • Server: Cerberus
  • Jobs: THF 99, PLD 99, DRG 99, COR 99, BLM 99, SCH 99, WAR 99
  • Race: Mithra
  • Linkshell: Electric Mayhem

Posted 22 July 2013 - 08:53 AM

Your rule is pretty much correct. You don't have to do the aftercast equip because the ispetvalid rule that I did before will handle that as long as it is placed before the ispetvalid rule.

For the other, that is very easy to do.

I would recommend you set up two variables to handle it though.

<var name="PhysicalBPMode">attack</var>
<var name="MagicalBPMode">accuracy</var> <!-- I just put different values here to illustrate what I am  getting at. -->


you can change the modes a few ways. The way I currently handle toggles is with spellcast's extra triggers. Spellcast has a few "spells" programmed in that actually have no function in the game but are useful. Some of these spells are Update, Trigger, Triggerx (x is a number from 1-99*), CycleCombatMode and various other spells. Here is an example that you could do

<if spell = "Update">
  <if spelltargetraw="PBPM*">
	<if spelltargetraw="*:attack">
  	<var cmd='set PhysicalBPMode attack' />
	</if>
	<elseif spelltargetraw="*:accuracy">
  	<var cmd='set PhysicalBPMode accuracy' />
	</elseif>
	<else>
  	<if advanced='"$PhysicalBPMode" == "attack"'>
    	<var cmd='set PhysicalBPMode accuracy' />
  	</if>
  	<else>
    	<var cmd='set PhysicalBPMode attack' />
  	</else>
	</else>
  </if>
</if>


This rule allows two separate paths for toggling the PhysicalBPMode variable. The first generic toggle is done by a macro that simply is /ma Update PBPM. This will be caught by the else in the rule and toggle between accuracy and attack. The second option is to manually set your variable with the magic command /ma Update PBPM:attack. I include this, but it really isn't that much easier than just having a macro that is /console input sc var set PhysicalBPMode attack. It just makes it a little easier if you type your toggles like I do sometimes.
0

#5 User is offline   Rioitz 

  • Padawan
  • PipPip
  • Group: Members
  • Posts: 36
  • Joined: 23-January 12

Posted 30 July 2013 - 10:09 AM

Hey, sorry taking so long to get back to you, work is troublesome!

I have put together the whole thing in my spare time but I seem to be having trouble with the rules

Here is the full Spellcast

However I seem to be having trouble with getting the right sets to equip under the right situations.

For example when I am idle with an Avatar out, it only equips my idle set, as opposed to Avatar perpetuation gear. Similar situation with engaged status and the mode it is set to (Accuracy/Haste).

The Blood Pact gear doesn't seem to be swapping in at all either.

Also I was wondering how to add in "if Avatar's Favor buff is active = use Avatar's Favor set"?

Very sorry for all the questions! Chances are they are all very simple fixes that I have missed >,<

This post has been edited by Rioitz: 31 July 2013 - 05:12 AM

0

#6 User is offline   Shadowmeld 

  • Advanced Member
  • PipPipPipPip
  • Group: Members
  • Posts: 119
  • Joined: 14-January 09
  • Gender:Male
  • Name: Shadowmeld
  • Server: Cerberus
  • Jobs: THF 99, PLD 99, DRG 99, COR 99, BLM 99, SCH 99, WAR 99
  • Race: Mithra
  • Linkshell: Electric Mayhem

Posted 30 July 2013 - 10:27 AM

It's not there anymore.
0

#7 User is offline   sdahlka 

  • Elite Member
  • PipPipPipPipPip
  • Group: Members
  • Posts: 361
  • Joined: 15-October 11

Posted 30 July 2013 - 10:21 PM

@Rioitz
the link you posted for your spellcast is incorrect
if someone helps you be kind and post back to let them know if it worked
0

#8 User is offline   Rioitz 

  • Padawan
  • PipPip
  • Group: Members
  • Posts: 36
  • Joined: 23-January 12

Posted 31 July 2013 - 05:11 AM

Fixed ^^ Sorry about that!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users