Spellcast Help

Eorzea Time
 
 
 
Langues: JP EN FR DE
users online
Forum » FFXI » Jobs » Black Mage » Spellcast Help
Spellcast Help
 Asura.Lordjecht
Offline
Serveur: Asura
Game: FFXI
Posts: 10
By Asura.Lordjecht 2011-05-26 06:40:14
Link | Citer | R
 
Looking for some help with setting up a spellcast macro.
Im wanting to have a macro that will;

switch between twilight cape/ searing cape dependent on day/weather

Switch between Artemis medal, Ugg pendant, and elemental torque dependent on mp / moonphase

I have never used spellcast before so I have no idea how to set this up. Any help would be awesome.
 Bismarck.Lighttaru
Offline
Serveur: Bismarck
Game: FFXI
user: lighttaru
Posts: 146
By Bismarck.Lighttaru 2011-05-26 07:13:26
Link | Citer | R
 
<!-- Handle AFv2 Pants, but do not equip pants if we already have Weather x2 and day bonuses from obi alone as obi alone hits the 35% damage cap. -->
<if Advanced='(!((bool)strmatch("* x2","%Weather") AND "%WeatherElement" = "%SpellElement" AND "$%SpellElementObi" = "1") OR !("%WeatherElement" = "%spellElement")) AND ("%SpellElement" = "%DayElement" AND "$BLMAF2Pants" = "1") AND ("%skill"="ElementalMagic")'>
<equip when="midcast">
<legs lock="yes">Sorcerer's Tonban</legs>
<back lock="yes">Twilight Cape</back>
</equip>
</if>

this is part of aikar blm xml, im kinda usin the same one tho i skipped moon phase part cuz i didnt had artemis back then.

ok about makin xml: first u have to download notepad+(u can find i at:http://wiki.windower.net/plugins/spellcast/xmlediting, its crucial to make n check for error on xml then u should check:http://wiki.windower.net/plugins/spellcast
scroll down a bit n u will find everything to make in: rule pages n variable pages. u can always check user submitted xml page for quick start up guide
 Asura.Lordjecht
Offline
Serveur: Asura
Game: FFXI
Posts: 10
By Asura.Lordjecht 2011-05-26 07:30:18
Link | Citer | R
 
Hmm im seeing aikar's xml is set up to completely control all gear at all times. Kinda looking for a spellcast to just take care of neck / back pieces.
 Valefor.Loffle
Offline
Serveur: Valefor
Game: FFXI
user: Loffle
Posts: 33
By Valefor.Loffle 2011-05-26 07:32:40
Link | Citer | R
 
If you're using Aikar's you'll have put 0's in all the Obis if you don't have them, so that rule above would work fine. If you don't have the Sorc Tonban either, again, the rule won't consider them being there.

It'll think, "It's Ice Day, no Ice Obi, no Relic Legs, ok, Cape, I choose you!"
 Lakshmi.Ryuuwa
Offline
Serveur: Lakshmi
Game: FFXI
user: thefatguy
Posts: 2
By Lakshmi.Ryuuwa 2011-05-26 07:36:42
Link | Citer | R
 
I recommend using a program called Altova XMLSpy if you're new to writing scripts; it will do alot of the work for you. As for your inital question what version of SC are you using?
 Asura.Lordjecht
Offline
Serveur: Asura
Game: FFXI
Posts: 10
By Asura.Lordjecht 2011-05-26 07:37:44
Link | Citer | R
 
version 2.44

I found this script

<?xml version="1.0" ?>

<spellcast>
<config AutoLoadXML="true" RequiredVersion="2.20" HideErrors="false" ShowGearSwaps="false" Debug="false" ShowSpellInfo="false"/>

<variables clear="True">

<!-- Changes Artemis' Medal/U Pendant/Feud Pendant based on Moon Phase/MP -->
<if mode="and" skill="ElementalMagic" notspell="Burn*|Drown*|Choke*|Rasp*|Shock*|Frost*">
<if MPPAfterCastLT="50" Advanced="$UggPendant==1">
<addtochat color="121">Uggalepih Pendant Latent: Active</addtochat>
<addtochat color="121">Moon Phase: %Moon (%MOONPCT%)</addtochat>
<if advanced="$ArtMedal==1">
<if advanced="%MOONPCT > 80">
<equip when="precast|midcast">
<neck lock="yes">Artemis' Medal</neck>
<addtochat color="121">Artemis' Medal grants MORE Magic Attack Bonus, U Pendant inactive</addtochat>
</equip>
</if>
</if>
<else>
<equip when="precast|midcast">
<neck lock="yes">Uggalepih Pendant</neck>
<addtochat color="121">Uggalepih Pendant active</addtochat>
</equip>
</else>
</if>
<elseif advanced="$ArtMedal==1">
<if advanced="%MOONPCT > 30">
<equip when="Precast|midcast">
<neck>Artemis' Medal</neck>
</equip>

<addtochat color="121">Moon Phase: %Moon (%MOONPCT%)</addtochat>
<addtochat color="121">Artemis' Medal: Active</addtochat>
</if>
</elseif>
<elseif advanced='("%MOONPCT < 31" OR "$ArtMedal==0")'>
<equip when="precast|midcast">
<neck>Feud Pendant</neck>
</equip>
<addtochat color="121">Moon Phase: %Moon (%MOONPCT%)</addtochat>
<addtochat color="121">Artemis' Medal: Inactive - Feud Pendant Equipped</addtochat>
</elseif>

</if>

Seems to cover the neck. so I need to add anything else to the xml file or would that be good to go?
 Sylph.Hitetsu
Offline
Serveur: Sylph
Game: FFXI
user: Hitetsu
Posts: 2617
By Sylph.Hitetsu 2011-05-26 08:10:44
Link | Citer | R
 
..That's my script! XD

If that's all you're looking for, add:

</rules>
</spellcast>

to the end of it.


If you're only looking for something to determine Obi's/AF2 Pants/Art Medal, then I should be able to get a better version than that knocked together from my Spellcast.
 Asura.Lordjecht
Offline
Serveur: Asura
Game: FFXI
Posts: 10
By Asura.Lordjecht 2011-05-26 08:14:50
Link | Citer | R
 
Hey yea I took it from your other post. The ONLY think I want spellcast to control is Ugg pendant, Artemes, Fued Neck and the Twilight/Searing cape.
 Sylph.Hitetsu
Offline
Serveur: Sylph
Game: FFXI
user: Hitetsu
Posts: 2617
By Sylph.Hitetsu 2011-05-26 08:21:49
Link | Citer | R
 
This should do it, you'll need the includes folder (has moon.xml in it to determine moon phases), which is why I've zipped it.

Just unzip the contents and put them in your Windower/Plugins/Spellcast folder, rename the blm_medal_obi_pants.xml to Lordjecht_BLM (or whatever you prefer) and you should be good to go after loading it.

I'm not ingame atm, so I can't double check it to make sure it works, but there shouldn't be any issues. Make sure you open it to edit variables to match if you have Obi's/Pants/U Pedant. Use "1" if you have it, "0" if you don't~


EDIT: Just re-read your post and realised I included Obi's in that Spellcast file. The easiest way to make it ignore them is to set all of the "Obi" variables to 0. Like so:

<var name="DarkObi">0</var>
<var name="LightObi">0</var>
<var name="ThunderObi">0</var>
<var name="IceObi">0</var>
<var name="FireObi">0</var>
<var name="WindObi">0</var>
<var name="WaterObi">0</var>
<var name="EarthObi">0</var>
 Asura.Lordjecht
Offline
Serveur: Asura
Game: FFXI
Posts: 10
By Asura.Lordjecht 2011-05-26 08:24:06
Link | Citer | R
 
What is a good program to view that xml?
 Sylph.Hitetsu
Offline
Serveur: Sylph
Game: FFXI
user: Hitetsu
Posts: 2617
By Sylph.Hitetsu 2011-05-26 08:25:40
Link | Citer | R
 
Personally, I use Notepad++, though any regular Text Editor would be fine (Windows Notepad included)
 Asura.Lordjecht
Offline
Serveur: Asura
Game: FFXI
Posts: 10
By Asura.Lordjecht 2011-05-26 08:28:17
Link | Citer | R
 
Okay I changed the obi to 0 and names the file Lordjecht_BLM. when I load up spellcast i get the error

Spellcast XML Parsing Error: line 0- failed to open file
 Sylph.Hitetsu
Offline
Serveur: Sylph
Game: FFXI
user: Hitetsu
Posts: 2617
By Sylph.Hitetsu 2011-05-26 08:36:41
Link | Citer | R
 
Hmm, I'll log in now and see if I get the same error.

I can't spot any glaringly obvious syntax issues with it though ><
 Sylph.Hitetsu
Offline
Serveur: Sylph
Game: FFXI
user: Hitetsu
Posts: 2617
By Sylph.Hitetsu 2011-05-26 08:44:28
Link | Citer | R
 
Hmm, the only way I can recreate that error is by "removing" my /includes/ folder.

Make sure in your Plugins folder, you have:

Spellcast.dll
Spellcast (another folder)

In your Spellcast (folder), you should have

includes (another folder)
Lordjecht_BLM.xml


and in your includes (folder), you should have a file called moon.xml
 Asura.Lordjecht
Offline
Serveur: Asura
Game: FFXI
Posts: 10
By Asura.Lordjecht 2011-05-26 08:47:30
Link | Citer | R
 
Forgot to add the includes folder, everything is working fine now. Thank you for your help and have a great day!
 Sylph.Hitetsu
Offline
Serveur: Sylph
Game: FFXI
user: Hitetsu
Posts: 2617
By Sylph.Hitetsu 2011-05-26 08:48:47
Link | Citer | R
 
No worries! Hope it does what you need ^^

Let me know if anything goes wrong either by posting here or PM'ing me and I'll see what I can do.