View Single Post
  #1  
Unread 02-03-2006, 04:47 PM
maddbomber83's Avatar
maddbomber83 maddbomber83 is offline
A Fallen Diplomat
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Oggok
Posts: 52
Default Click to Cast V1.0

Hello fellow developers!
I have created a new addon that I call Click to Cast. It was inspired by CColdiron's Coldy's Priest Groupwindow w/Effect Buttons.

I have uploaded a patch to his window that enables Click to Cast.

I also have my player window with this enabled.
http://www.eq2interface.com/download...fo.php?id=4169

The mod will take the characters SubClass and Level, compare it to a list, and cast a spell when you click. Currently Click to Cast is set up for 4 types of spells. Cures for Noxious, Arcane, Elemental and Trauma. It can easily be adapted for any other type of spell (pet heals come to mind).

To add this code to your mod, you just have to include the base file, and activate the spell page that you want to cast. I'll run through the chain of events real quick so you have an idea of what is going on.

So to mod a group window, add the base file to your mod.
Code:
<include>MaddBomber_UseAbility_Group.xml</include>
There are 4 pages that corispond to the 4 types of spells (Noxious, Arcane, Elemental and Trauma).
So you need to activate the page for the type of spell you want to cast. I use a button with a
Code:
OnPress="UseAbility.Elemental.Activated=true"
Now you'll need to add some parent. to that for the right level.

Done! thats it.

Now my code will take over for a brief second. First the page you activated (Elemental) will set the class and level in a data object based off /GameData.Self.SubClass and Level.

It will then Reference that XML file, lets say your a Warden level 7. It goes to the Warden page, goes to the Elemental section (because that is the page that was activated), goes to the level 7 section, and executes that code. So, that code should say something like,
Code:
useability Cure Elemental
Here is a block of code from one of the class files.
Code:
<Data Name="Noxious"
1="number.id"
2="number.id"
3="number.id"
4="number.id"
5="number.id"
6="number.id"
7="useability Cure Noxious"
8="number.id"
9="number.id"
10="number.id"
If I activated the Noxious page, and was a level 7 warden, the game would cast Cure Noxious.

Since each class has its own file, it is easy to change and swap.

Some quick notes, you can't include the same physical page twice. So like right now i'm uploading my player window with click to cast. I can't include "newfile" in both the group window and the player window. So I add an end to it.
Code:
MaddBomber_UseAbility_Group.xml
MaddBomber_UseAbility_Player.xml
That file includes the file class.xml from a folder. The folder for each version of UseAbility needs to be different. So Cure_Group and Cure_Player
Now your good to go.

Any questions, comments, suggestions let me know!

My hopes are that Click to Cast's base files (the class files) are easily patched to different mods so that they can be shared between all click to cast enabled windows.

Also, it is not limited to spells. The program will just run whatever is in those " ", so you could have the guardian Noxious one say, Heal me I'm sick! into group chat.
__________________

Last edited by maddbomber83 : 02-03-2006 at 05:13 PM.
Reply With Quote