WHM Script Help Needed

Language: JP EN DE FR
New Items
2018-08-14
users online
Forum » Windower » Spellcast Scripting » White Mage » WHM script help needed
WHM script help needed
 Quetzalcoatl.Balthor
Offline
Server: Quetzalcoatl
Game: FFXI
Posts: 6
By Quetzalcoatl.Balthor 2013-08-24 02:19:08
Link | Quote | Reply
 
I'm new to spellcast, and used a WHM spellcast by Elvaanmoq, and I tried modifying it to reflect my gear. I don't understand the <elseif> and <if> enough to fix this mistake myself. The error accoding to windower is on line 344, the next to last line. Can anyone help me out. Thank you!

Also, I haven't messed with some of the equipment sets yet, so, try not to pay attention to EVERY detail of the equipment.

Code
    <?xml version="1.0" ?>
    <spellcast>
    <config
    Debug="false"
    ShowGearSwaps="false"
    NormalSet="IDLE"
    RestingSet="REST"
    EngagedSet="TP"
    />
     
    <sets>
    <group name="WHM" default="Yes">
    <set name="IDLE">
    <main>Terra's Staff</main>
    <sub>Fulcio Grip</sub>
    <ammo>Clarus Stone</ammo>
    <head>Nares Cap</head>
    <neck>Twilight Torque</neck>
    <lear>Moonshade Earring</lear>
    <rear>Loquacious Earring</rear>
    <body>Gendewitha Bliaut</body>
    <hands>Bokwus Gloves</hands>
    <lring>Defending Ring</lring>
    <rring>Balrahn's Ring</rring>
    <back>Cheviot Cape</back>
    <waist>Witful Belt</waist>
    <legs>Nares Trews</legs>
    <feet>Gendewitha Galoshes</feet>
    </set>
     
    <set name="REST">
    <main>Chatoyant Staff</main>
    <sub>Fulcio Grip</sub>
    <ammo>Clarus Stone</ammo>
    <head>Goliard Chapeau</head>
    <neck>Eidolon Pendant</neck>
    <rear>Antivenom Earring</rear>
    <body>Gendewitha Bliaut</body>
    <hands>Nares Cuffs</hands>
    <legs>Nisse Slacks</legs>
    <waist>Austerity belt</waist>
    <feet>Chelona Boots</feet>
	<back>Vita Cape</back>
	<rring>Star Ring</rring>
    </set>
     
    <set name="CURE">
    <main>Teiwaz</main>
    <sub>Fulcio Grip</sub>
    <ammo>Clarus Stone</ammo>
    <head>Orison Cap +2</head>
    <neck>Colossus's Torque</neck>
    <lear>Orison Earring</lear>
    <rear>Lifestorm Earring</rear>
    <body>Gendewitha Bliaut</body>
    <hands>Bokwus Gloves</hands>
    <lring>Ephedra Ring</lring>
    <rring>Ephedra Ring</rring>
    <back>Refraction Cape</back>
    <waist>Cleric's Belt</waist>
    <legs>Orsn. Pantaln. +1</legs>
    <feet>Gendewitha Galoshes</feet>
    </set>
     
    <set name="CURETIME" BaseSet="CURE">
    <head>Nares Cap</head>
    <ammo>Incantor Stone</ammo>
    <neck>Orison Locket</neck>
    <body>Gendewitha Bliaut</body>
    <waist>Witful Belt</waist>
    <feet>Chelona Boots</feet>
	<rear>Loquac. Earring</rear>
	<legs>Orsn. Pantaln. +1</legs>
    </set>
    <set name="MNDENF">
    <main>Soothsayer Staff</main>
    <sub>Fulcio Grip</sub>
    <ammo>Clarus Stone</ammo>
    <head>Nares Cap</head>
    <neck>Orison Locket</neck>
    <lear>Lifestorm Earring</lear>
    <rear>Psystorm Earring</rear>
    <body>Gendewitha Bliaut</body>
    <hands>Bokwus Gloves</hands>
    <lring>Strendu Ring</lring>
    <rring>Balrahn's Ring</rring>
    <back>Refraction Cape</back>
    <waist>Cleric's Belt</waist>
    <legs>Nares Trews</legs>
    <feet>Gendewitha Galoshes</feet>
    </set>
     
    <set name="DRKMAGIC">
    <main>Soothsayer Staff</main>
    <sub>Fulcio Grip</sub>
    <head>Nares Cap</head>
    <lear>Moonshade Earring</lear>
    <rear>Loquac. Earring</rear>
    <body>Gendewitha Bliaut</body>
    <hands>Bokwus Gloves</hands>
    <lring>Strendu Ring</lring>
    <rring>Balrahn's Ring</rring>
    <back>Refraction Cape</back>
    <waist>Cleric's Belt</waist>
    <legs>Nares Trews</legs>
	<neck>Stoicheion Medal</neck>
    <feet>Gendewitha Galoshes</feet>	
    </set>
    <set name="FAST">
    <main>Teiwaz</main>
    <sub>Fulcio Grip</sub>
    <head>Nares Cap</head>
    <neck>Orison Locket</neck>
    <lear>Loquac. Earring</lear>
    <body>Anhur Robe</body>
    <hands>Bokwus Gloves</hands>
    <waist>Witful Belt</waist>
    <legs>Nares Trews</legs>
    <feet>Chelona Boots</feet>
    </set>

     
    <set name="ENHSKILL" BaseSet="FAST">
    <neck>Colossus's torque</neck>
    <feet>Orsn. Duckbills +1</feet>	
    </set>	
    <set name="BAR" BaseSet="FAST">
    <head>Orison Cap +2</head>
    <neck>Colossus's torque</neck>
    <hands>Orison Mitts +1</hands>
    <legs>Cleric's Pantaln.</legs>
    <feet>Orsn. Duckbills +1</feet>
	<body>Orison Bliaud +2</body>
    </set>
    <set name="DIVINE" BaseSet="FAST">
    <main>Soothsayer Staff</main>
    <sub>Wise Strap</sub>
    <head>Nares Cap</head>
    <body>Nares Saio</body>
    <hands>Bokwus Gloves</hands>
    <rring>Demon's Ring</rring>
	<lring>Strendu Ring</lring>
    <back>Searing Cape</back>
    <waist>Oneiros Sash</waist>
    <feet>Gendewitha Galoshes</feet>
	<neck>Stoicheion Medal</neck>
	<lear>Hecate's Earring</lear>
	<rear>Novio Earring</rear>
    </set>
     
    <set name="TP">
    <!--<head>Xux Hat</head>
    <neck>Asperity Necklace</neck>
    <lear>Steelflash Earring</lear>
    <rear>Bladeborn Earring</rear>
    <body>Hedera Cotehardie</body>
    <hands>Blessed Mitts</hands>
    <lring>Rajas Ring</lring>
    <rring>Mars's Ring</rring>
    <waist>Ninurta's Sash</waist>
    <legs>Rubeus Spats</legs>
    <feet>Bokwus Boots</feet>-->
    </set>
     
    <set name="WS">
    <!--<ammo>Oreiad's Tathlum</ammo>
    <head>Xux Hat</head>
    <neck>Morgana's choker</neck>
    <lear>Brutal Earring</lear>
    <rear>Moonshade Earring</rear>
    <body>Hydra Doublet</body>
    <hands>Augur's Gloves</hands>
    <lring>Rajas Ring</lring>
    <rring>Mars's Ring</rring>
    <back></back>
    <waist>Witch Sash</waist>
    <legs>Rubeus Spats</legs>
    <feet>Nares Clogs</feet>-->
    </set>
    <set name="WSFN" BaseSet="WS">
    <!--<head>Nefer Khat</head>
    <neck>Stoicheion Medal</neck>
    <lear>Hecate's Earring</lear>
    <rear>Strophadic Earring</rear>
    <body>Bokwus Robe</body>
    <hands>Nares Cuffs</hands>
    <lring>Strendu Ring</lring>
    <rring>Omega Ring</rring>
    <back>Searing Cape</back>-->
    </set>
     
    <set name="TOWN">
    <main>Terra's Staff</main>
    <sub>Fulcio Grip</sub>
    <ammo>Clarus Stone</ammo>
    <head>Nares Cap</head>
    <neck>Twilight Torque</neck>
    <lear>Moonshade Earring</lear>
    <rear>Loquac. Earring</rear>
    <body>Gendewitha Bliaut</body>
    <hands>Bokwus Gloves</hands>
    <lring>Defending Ring</lring>
    <rring>Balrahn's Ring</rring>
    <back>Cheviot Cape</back>
    <waist>Witful Belt</waist>
    <legs>Nares Trews</legs>
    <feet>Gendewitha Galoshes</feet>
    </set>
     
    <set name="gearup">
    <item>Linkshell</item>
    <item>Echo Drops</item>
    <item>Molva Maul</item>
    <item>Genbu's Shield</item>
    <item>Twilight Cloak</item>
    <item>Balrahn's Ring</item>
    </set>
    </group>
    </sets>
    <variables>
    <var name="IceStaff">Soothsayer Staff</var>
    <var name="WindStaff">Soothsayer Staff</var>
    <var name="EarthStaff">Soothsayer Staff</var>
    <var name="ThunderStaff">Soothsayer Staff</var>
    <var name="WaterStaff">Soothsayer Staff</var>
    <var name="FireStaff">Soothsayer Staff</var>
    <var name="DarkStaff">Soothsayer Staff</var>
    <var name="LightStaff">Soothsayer Staff</var>
    </variables>
    <rules>
     
    <!-- para que no cambie el arma durante tp -->
    <if status="Engaged">
    <equip when="idle|engaged|resting|precast|midcast|aftercast">
    <main lock="t" />
    <sub lock="t" />
    <range lock="t" />
    </equip>
    </if>
    <if NotStatus="Engaged">
    <if area="*Windurst*|Heavens*|*San d'Oria*|Chateau*|*Bastok*|Metalworks|*Jeuno*|Ru'Lude*|*Whitegate|Al Zahbi|Chocobo*|*Colosseum|Selbina|Mhaura|Kazham|Norg|Tavnazia*|*Adoulin" notarea="Dynamis*|*[S]" notbuffactive="Besieged">
    <action type="Equip" when="idle|engaged|resting|precast|midcast|aftercast" set="Town" />
    </if>
    <else>
    <action type="equip" when="aftercast" set="IDLE"/>
    </else>
    </if>
    <else>
    <action type="equip" when="aftercast" set="TP"/>
    </else>
     
    <if Area="*Remnants|Periqia|Ilrusi Atoll|Mamool Ja Training Grounds|Lebros Caverns|Leujoaom Sanctum|Nyzul Isle|The Ashu Talif">
    <equip when="idle|engaged|resting|precast|midcast|aftercast">
    <rring lock="t">Balrahn's Ring</rring>
    </equip>
    </if>
     
    <if Skill="HealingMagic">
    <if spell="cure*|cura*">
    <equip when="precast" set="CURETIME" />
    <equip when="midcast" set="CURE" />
    </if>
    <elseif spell="*na">
    <equip when="precast" set="Idle" />
    </elseif>
    <elseif spell="raise*|reraise*|arise">
    <equip when="precast" set="FAST" />
    </elseif>
    <else>
    <equip when="precast" set="HEALING" />
    </else>
    </if>
    <elseif Skill="EnhancingMagic">
    <if spell="Stoneskin|Aquaveil|Blink|Boost*|Auspice">
    <equip when="precast" set="ENHSKILL" />
    </if>
    <elseif spell="Bar*">
    <equip when="precast" set="BAR" />
    </elseif>
    <elseif spell="Regen*">
    <equip when="precast" set="REGEN" />
    </elseif>
    <else>
    <equip when="precast" set="FAST" />
    <if spell="Sneak" BuffActive="Sneak" advanced='"%target"="<me>"'>
    <command when="precast">cancel 71</command>
    </if>
    </else>
    </elseif>
    <elseif skill="EnfeeblingMagic">
    <if spell="Slow|Paralyze">
    <equip when="precast" set="MNDENF" />
    </if>
    <elseif spell="Sleep*|Blind|Bind">
    <equip when="precast" set="INTENF" />
    <else>

    <elseif skill="DivineMagic">
    <equip when="precast" set="DIVINE" />
    <if spell="Repose">
    <equip when="precast" set="REPOSE" />
    </if>
    </elseif>	
    <elseif skill="DarkMagic">
    <equip when="precast" set="DRKMAGIC" />
    </elseif>
    <elseif spell="Impact">
    <equip when="precast" set="DRKMAGIC" />
    <equip when="precast|midcast|aftercast">
    <body lock="t">Twilight Cloak</body>
    </equip>
    <precastdelay delay="1"/>
    </elseif>
    <elseif skill="Ninjutsu">
    <equip when="precast" set="FAST" />	
    </elseif>
     
    <if spell="Divine Caress">
    <equip when="precast|midcast|aftercast">
    <hands>Orison Mitts +1</hands>
    </equip>
    </if>
    <elseif spell="Divine Seal">
    <equip when="precast|midcast|aftercast">
    <head>Orison Cap +2</head>
    <legs>Orsn. Pantaln. +2</legs>
    </equip>
    </elseif>
    <elseif spell="Afflatus Solace">
    <equip when="precast">
    <body>Gendewitha Bliaut</body>
    </equip>
    </elseif>
     
    <if type="WeaponSkill">
    <if spell="Flash Nova">
    <equip when="precast" set="WSFN" />
    </if>
    <else>
    <equip when="precast" set="WS" />
    </else>
     
    </rules>
    </spellcast>
 Fenrir.Caladbolg
Offline
Server: Fenrir
Game: FFXI
Posts: 103
By Fenrir.Caladbolg 2013-08-24 02:23:57
Link | Quote | Reply
 
looks like </if> missing at 343 for the <if on 336
 Quetzalcoatl.Balthor
Offline
Server: Quetzalcoatl
Game: FFXI
Posts: 6
By Quetzalcoatl.Balthor 2013-08-24 02:33:12
Link | Quote | Reply
 
So, I need to make it look like:
Code
</if></rules>


On line 343, or:
Code
    </if>
</rules>


On lines 343-344?
 Fenrir.Caladbolg
Offline
Server: Fenrir
Game: FFXI
Posts: 103
By Fenrir.Caladbolg 2013-08-24 02:34:05
Link | Quote | Reply
 
yes, either should work
 Quetzalcoatl.Balthor
Offline
Server: Quetzalcoatl
Game: FFXI
Posts: 6
By Quetzalcoatl.Balthor 2013-08-24 02:36:19
Link | Quote | Reply
 
It is still reading as error on line 344 when it looks like this:
Code
    </if>
	</rules>
    </spellcast>
 Fenrir.Caladbolg
Offline
Server: Fenrir
Game: FFXI
Posts: 103
By Fenrir.Caladbolg 2013-08-24 02:58:44
Link | Quote | Reply
 
297 needs to be changed from <else> to </elseif>
and 298 needs an </elseif> as well
 Quetzalcoatl.Balthor
Offline
Server: Quetzalcoatl
Game: FFXI
Posts: 6
By Quetzalcoatl.Balthor 2013-08-24 03:09:01
Link | Quote | Reply
 
I found the </elsif> problems, but put the solutions at the end, does that make a difference where I put them? Or, as long as it's solved, it works in the proper order?

I'd hate to be casting cures in my nuking gear and such.
 Quetzalcoatl.Balthor
Offline
Server: Quetzalcoatl
Game: FFXI
Posts: 6
By Quetzalcoatl.Balthor 2013-08-24 03:20:19
Link | Quote | Reply
 
I believe I have it figured out. Thank you for the help.
Log in to post.