SPELLCAST FUNDAMENTALS
1.0 SETTING UP YOUR GEAR SETS
(Before you start, make sure to download spellcast. :3 )So let's begin.
If you go into your plugins folder and into spellcast, you'll find a .xml file called default. If you open it, you're looking at the skeleton of every spellcast you will ever read/copy and paste.
First thing to note about programming: just like in written English, sentences begin with a capital and end with a period. Spellcast speaks in its own code language, except instead of sentences it speaks in tags. In order to start, you must first open a tag then close the tag. All tags have <blah> and finish with </blah>.
You can see this in the default document:
<spellcast> (spellcast tag is open!)
……..
…….
……..
</spellcast> (the spellcast tag is closed!)
This is very important. If you don't close all the tags, your file won't load. Spellcast will be upset and be all, "wtf you didn't close all your tags :(" this will show up as an error in your windower console.
(NOTE: For the remainder of the tutorial I'll be using SC as a short form of Spellcast.)
So the first thing you wanna do is set up your gear sets. This is your idle set, your melee set, your mnd set, nuking set, etc… So let's focus on the <sets ></sets> tag.
In your <sets>, first you have to make a <group>. The <group> tag groups your different sets together into one, neat little package. It's the equivalent of telling SC the Monopoly box has a monopoly board with Monopoly money, the Monopoly player pieces, the plastic green and red houses, etc.
Unless you want to make different groups, you want to make your only group the main group.
<?xml version="1.0" ?> <spellcast> <config AutoLoadXML="true" ></config> <variables ></variables> <sets> <Group name="Main" default="yes"> </group> <rules ></rules> </spellcast>(Remember to close your tags!!)
The next step is setting up your first set. This is probably your idle gear or your melee gear, whatever you want. To do this, you have to name your set.
<?xml version="1.0" ?> <spellcast> <config AutoLoadXML="true" ></config> <variables ></variables> <sets> <Group name="Main" default="yes"> <set name="Idle"> </set> </group> </sets> <rules ></rules> </spellcast>(Note that <set> tag is closed with </set>.)
So how does spellcast know you want to wear that Spike earring and that Brutal earring? What about a Bifrost ring and a Genius ring?
The gear tags are as follows:
<set name="Main" default="yes"> <head></head> <neck></neck> <range></range> <ammo></ammo> <head></head> <neck></neck> <lear></lear> <rear></rear> <body></body> <hands></hands> <lring></lring> <rring></rring> <back></back> <waist></waist> <legs></legs> <feet></feet> </set>
Let's say you want to equip two of the same rings (Sapphire rings). When you use Windower scripts (basically a dumbed-down version of SC), sometimes it will muck up and try to equip the same ring into both slots, leading to only one Sapphire ring and the other slot unchanged. With SC, there won't be any mistake.
<sets> <Group name="Main" default="yes"> <Set name="Idle"> <head></head> <neck></neck> <range></range> <ammo></ammo> <head></head> <neck></neck> <lear></lear> <rear></rear> <body></body> <hands></hands> <lring></lring> <rring></rring> <back></back> <waist></waist> <legs></legs> <feet></feet> </Set> ..... </group> </sets>
Let's say you have a two different sets that mostly use the same gear. Instead of retyping it out all out, you can use Baseset. You place this after the set's name.
<?xml version="1.0" ?> <spellcast> .... <sets> <Group name="Main" default="yes"> <set name="Idle"> </set> <set name="Idunno" Baseset="Idle"> </set> </group> </sets> <rules ></rules> </spellcast>
This is really good if your gear needs most of the base set's gear, but it can get a little tricky. For melees this is fine, but for mages I'd try to avoid it. Refer to Variables for an explanation.
You are now ready to make your first gear sets! Remember to close your tags and not misspell anything, particularly with the ear slot: while you are equipping an earring, it goes in the LEFT EAR (<lear></lear>) or the RIGHT EAR (<rear></rear>). I make the mistake of writing it as <learring></learring> a lot more than I should. v_v;;;
Naosu replied
721 weeks ago