Advertisement
Motenten

Salvage-Include

Nov 29th, 2012
1,267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 10.66 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2.     <!-- Last modified: 11/29/2012 4:52:00 PM -->
  3.  
  4.  
  5. <includes>
  6. <!-- Variables for whether slots have been unlocked in Salvage. -->
  7.   <include name="SalvageEquipVars">
  8.       <var name="SalvageMainLocked">true</var>
  9.       <var name="SalvageAmmoLocked">true</var>
  10.       <var name="SalvageHeadLocked">true</var>
  11.       <var name="SalvageRingLocked">true</var>
  12.       <var name="SalvageBodyLocked">true</var>
  13.       <var name="SalvageHandLocked">true</var>
  14.       <var name="SalvageWaistLocked">true</var>
  15.       <var name="SalvageFeetLocked">true</var>
  16.  
  17.       <!-- The default gear listed is mainly gear that I should always have on me
  18.           regardless of job (mostly), and that is All Jobs.
  19.           You can adjust this set to whatever general values are appropriate.
  20.           After that, you can modify each one to match specific jobs after importing
  21.           this include by repeating the var rule after the import rule. -->
  22.  
  23.       <!-- Main: Must be set after import if you want main weapon explicitly tested.  Usually only for mages for staff swapping.
  24.                 Leaving it blank is safe for melee to avoid loss of TP. -->
  25.       <var name="SalvageTestMain"></var>
  26.       <var name="SalvageTestAmmo">Tantra Tathlum</var>
  27.       <var name="SalvageTestNeck">Calcitrant Stole</var>
  28.       <var name="SalvageTestRing">Rajas Ring</var>
  29.       <var name="SalvageTestBody">Tantra Cyclas +2</var>
  30.       <var name="SalvageTestHands">Melee Gloves +2</var>
  31.       <var name="SalvageTestWaist">Black Belt</var>
  32.       <var name="SalvageTestFeet">Tantra Gaiters +2</var>
  33.   </include>
  34.  
  35.   <include name="SalvageEquipRules">
  36.  
  37.       <!-- Stone spell is used to retest what's currently locked in salvage.  Water is used to reset vars. -->
  38.  
  39.       <!-- If we have not tested a slot and found that we can put gear there, lock the slot so that
  40.           we aren't spammed with invalid attempts to change gear.   -->
  41.       <if area="*Remnants">
  42.           <if type="Trigger">
  43.               <!-- Stone is the starting point.  It attempts to equip designated pieces
  44.                   of equipment into slots that are still marked as locked.  It makes a
  45.                   delayed call to Death afterwards so that we can cancel this spell
  46.                   and then see the results of attempting to equip the gear.  Any gear
  47.                   that actually got equipped indicates that that slot is no longer locked. -->
  48.               <if Spell="Trigger" SpellTargetRaw=".SalvageCheck">
  49.                   <command>wait 1;input /ma Update .Salvage</command>
  50.                   <cancelspell />
  51.    
  52.                   <!-- Only attempt to equip gear in slots that are still currently locked so that
  53.                       we don't attempt to change out normal gear on subsequent tests. -->
  54.    
  55.                   <if advanced='"$SalvageMainLocked" = "true"'>
  56.                       <equip when="Precast"><main>$SalvageTestMain</main></equip>
  57.                   </if>
  58.                   <if advanced='"$SalvageAmmoLocked" = "true"'>
  59.                       <equip when="Precast"><ammo>$SalvageTestAmmo</ammo></equip>
  60.                   </if>
  61.                   <if advanced='"$SalvageHeadLocked" = "true"'>
  62.                       <equip when="Precast"><neck>$SalvageTestNeck</neck></equip>
  63.                   </if>
  64.                   <if advanced='"$SalvageRingLocked" = "true"'>
  65.                       <equip when="Precast"><lring>$SalvageTestRing</lring></equip>
  66.                   </if>
  67.                   <if advanced='"$SalvageBodyLocked" = "true"'>
  68.                       <equip when="Precast"><body>$SalvageTestBody</body></equip>
  69.                   </if>
  70.                   <if advanced='"$SalvageHandLocked" = "true"'>
  71.                       <equip when="Precast"><hands>$SalvageTestHands</hands></equip>
  72.                   </if>
  73.                   <if advanced='"$SalvageWaistLocked" = "true"'>
  74.                       <equip when="Precast"><waist>$SalvageTestWaist</waist></equip>
  75.                   </if>
  76.                   <if advanced='"$SalvageFeetLocked" = "true"'>
  77.                       <equip when="Precast"><feet>$SalvageTestFeet</feet></equip>
  78.                   </if>
  79.                  
  80.                   <return />
  81.               </if>
  82.    
  83.               <!-- This spell is automatically called after Stone is run. -->
  84.               <!-- Need to use a spell that players will never have access to.  Choosing 'Death'. -->
  85.               <!-- Anything that got equipped gets its pathos limiter variable unlocked. -->
  86.               <elseif spell="Update" SpellTargetRaw=".Salvage">
  87.                   <cancelspell />
  88.                   <var cmd="set SalvageLocksUnlocked false" />
  89.    
  90.                   <if NotEquipMain=""> <!-- Simply check whether there's a weapon equipped.  Don't expect anything in particular. -->
  91.                       <if advanced='"$SalvageMainLocked" = "true"'>
  92.                           <AddToChat>Main weapon unlocked.</AddToChat>
  93.                           <var cmd="set SalvageMainLocked false" />
  94.                           <var cmd="set SalvageLocksUnlocked true" />
  95.                       </if>
  96.                   </if>
  97.                   <if EquipAmmo="$SalvageTestAmmo">
  98.                       <if advanced='"$SalvageAmmoLocked" = "true"'>
  99.                           <AddToChat>Ranged/ammo slots unlocked.</AddToChat>
  100.                           <var cmd="set SalvageAmmoLocked false" />
  101.                           <var cmd="set SalvageLocksUnlocked true" />
  102.                       </if>
  103.                   </if>
  104.                   <if EquipNeck="$SalvageTestNeck">
  105.                       <if advanced='"$SalvageHeadLocked" = "true"'>
  106.                           <AddToChat>Head/neck slots unlocked.</AddToChat>
  107.                           <var cmd="set SalvageHeadLocked false" />
  108.                           <var cmd="set SalvageLocksUnlocked true" />
  109.                       </if>
  110.                   </if>
  111.                   <if EquipLRing="$SalvageTestRing">
  112.                       <if advanced='"$SalvageRingLocked" = "true"'>
  113.                           <AddToChat>Rings/earrings slots unlocked.</AddToChat>
  114.                           <var cmd="set SalvageRingLocked false" />
  115.                           <var cmd="set SalvageLocksUnlocked true" />
  116.                       </if>
  117.                   </if>
  118.                   <if EquipBody="$SalvageTestBody">
  119.                       <if advanced='"$SalvageBodyLocked" = "true"'>
  120.                           <AddToChat>Body slot unlocked.</AddToChat>
  121.                           <var cmd="set SalvageBodyLocked false" />
  122.                           <var cmd="set SalvageLocksUnlocked true" />
  123.                       </if>
  124.                   </if>
  125.                   <if EquipHands="$SalvageTestHands">
  126.                       <if advanced='"$SalvageHandLocked" = "true"'>
  127.                           <AddToChat>Hands slot unlocked.</AddToChat>
  128.                           <var cmd="set SalvageHandLocked false" />
  129.                           <var cmd="set SalvageLocksUnlocked true" />
  130.                       </if>
  131.                   </if>
  132.                   <if EquipWaist="$SalvageTestWaist">
  133.                       <if advanced='"$SalvageWaistLocked" = "true"'>
  134.                           <AddToChat>Back/waist slots unlocked.</AddToChat>
  135.                           <var cmd="set SalvageWaistLocked false" />
  136.                           <var cmd="set SalvageLocksUnlocked true" />
  137.                       </if>
  138.                   </if>
  139.                   <if EquipFeet="$SalvageTestFeet">
  140.                       <if advanced='"$SalvageFeetLocked" = "true"'>
  141.                           <AddToChat>Legs/feet slots unlocked.</AddToChat>
  142.                           <var cmd="set SalvageFeetLocked false" />
  143.                           <var cmd="set SalvageLocksUnlocked true" />
  144.                       </if>
  145.                   </if>
  146.    
  147.                   <!-- If you have a consistent naming convention, you can force an
  148.                       update to the default gear set at this point, or generate a
  149.                       call to a JA/Spell that will properly readjust your gear now
  150.                       that the new slots are unlocked -->
  151.                   <if advanced='"$SalvageLocksUnlocked" = "true"'>
  152.                       <!-- Fixed set: -->
  153.                       <!-- <equip set="Standard" /> -->
  154.                       <!-- Reset to default/normal: -->
  155.                       <action type="Command">wait 1;input /ja Tranquility</action>
  156.                   </if>
  157.               </elseif>
  158.    
  159.               <!-- Reset variables (mainly for testing, but also in case Spellcast and its
  160.                   variables are still loaded when you next make a salvage run). -->
  161.               <elseif spell="Reset" SpellTargetRaw=".Salvage">
  162.                   <action type="cancelspell"/>
  163.                   <addtochat>Resetting Salvage locks.</addtochat>
  164.                   <var cmd="set SalvageMainLocked true" />
  165.                   <var cmd="set SalvageAmmoLocked true" />
  166.                   <var cmd="set SalvageHeadLocked true" />
  167.                   <var cmd="set SalvageRingLocked true" />
  168.                   <var cmd="set SalvageBodyLocked true" />
  169.                   <var cmd="set SalvageHandLocked true" />
  170.                   <var cmd="set SalvageWaistLocked true" />
  171.                   <var cmd="set SalvageFeetLocked true" />
  172.               </elseif>
  173.           </if>
  174.           <else>
  175.               <!-- <addtochat>Locking gear for Salvage.</addtochat> -->
  176.  
  177.               <if advanced='"$SalvageMainLocked" = "true"'>
  178.                   <lock slot="main|sub" when="All" lock="yes" />
  179.               </if>
  180.               <if advanced='"$SalvageAmmoLocked" = "true"'>
  181.                   <lock slot="ranged|ammo" when="All" lock="yes" />
  182.               </if>
  183.               <if advanced='"$SalvageHeadLocked" = "true"'>
  184.                   <lock slot="head|neck" when="All" lock="yes" />
  185.               </if>
  186.               <if advanced='"$SalvageRingLocked" = "true"'>
  187.                   <lock slot="lear|rear|lring|rring" when="All" lock="yes" />
  188.               </if>
  189.               <if advanced='"$SalvageBodyLocked" = "true"'>
  190.                   <lock slot="body" when="All" lock="yes" />
  191.               </if>
  192.               <if advanced='"$SalvageHandLocked" = "true"'>
  193.                   <lock slot="hands" when="All" lock="yes" />
  194.               </if>
  195.               <if advanced='"$SalvageWaistLocked" = "true"'>
  196.                   <lock slot="back|waist" when="All" lock="yes" />
  197.               </if>
  198.               <if advanced='"$SalvageFeetLocked" = "true"'>
  199.                   <lock slot="legs|feet" when="All" lock="yes" />
  200.               </if>
  201.           </else>
  202.       </if>
  203.   </include>
  204.  
  205. </includes>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement