Page 1 of 1

Warrior skill script

Posted: Tue May 16, 2006 10:22 am
by aChallenged1
This is a very basic script. All it does, for now, is bash if you have a shield in off hand, or kick if no sheild, and taunt.

More than anything this is my first script, rather than macro. It's been 2 years since I tried to do this for EQ and I'm thankful to Lax, Bardomatic, Echoism, and others on IRC for their help getting this thing working.

This has been tested and works just fine, I use it in place of isxeqmelee which was giving me fits.

Code: Select all

function combatskills()
{
   if !${Me.Stunned}
   {
      if ${Me.AbilityReady[Bash]} && ${InvSlot[offhand].Item.ID} || ${Me.Race.Name.Equal[Ogre]}
            doability Bash
 
      if ${Me.AbilityReady[Kick]}
            doability Kick
 
      if ${Me.AbilityReady[Taunt]}
            doability Taunt
   }
}
 
function main()
{
   while 1
    {
      waitframe
      if ${Me.Combat}
         call combatskills
    }
}
My next attempt will be to add a bind wound function.
Sure, there are other scripts and clients availible, but you don't learn if you don't code. So, once again, I am coding and learning.

Posted: Tue May 16, 2006 10:57 am
by aChallenged1
And already there are modifications. These due to help from fearless in IRC.

Code: Select all

function combatskills()
{
if !${Me.Stunned}
   {
    if ( !${Me.Casting.ID} && ${Me.AbilityReady[Bash]} )
    {
        if ( ${Me.Race.Name.Equal[Ogre]} || ${InvSlot[Offhand].Item.Type.Equal[Shield]} )
        {
           doability Bash
        }
        else
        {
           doability Kick
        }
    }
  }
}
 
function main()
{
   while 1
    {
      waitframe
      if ${Me.Combat}
         call combatskills
    }
}
A new version: 3July06

Posted: Tue May 16, 2006 11:50 am
by Lax
Change

Code: Select all

wait frame
to

Code: Select all

waitframe

Posted: Mon Jul 03, 2006 4:16 am
by eolewis
What if your like, an Ogre that doesn't need a shield to bash/slam? Just being curious. For now, I'm using the old Autofire_0.4 prog to use my slam/taunt hotkey (I know, don't really need to continually taunt, but I like to... helps with raising his skill)

Posted: Mon Jul 03, 2006 6:00 am
by aChallenged1
All that would be required is add an "OR Me.Race == Ogre"

I'm not exactly sure how to do that. I know that ${Me.Race} will return your race. But when I tried a test of

Code: Select all

if ${Me.Race[Ogre]} 
I got an error of "Non-numeric variable encountered: ${Me.Race[Ogre]} == Ogre. Failed to calculate result"

Posted: Mon Jul 03, 2006 8:05 am
by aChallenged1
Ok, there's an existing problem with ISXEQ, it does not have members Equal and ShortName, which is why in all my testing I couldn't get the change to work. Once that is corrected, I'll test again and repost with updated version for Ogres.

Posted: Mon Jul 03, 2006 8:32 am
by drzoon
In addition to Ogres, Barbarians and Trolls also have the racial slam ability.

Posted: Mon Jul 03, 2006 8:42 am
by aChallenged1
Ok the first script should now work for Ogre even if not using a shield.

I haven't done anything for the slam portion yet, but anyone could do it by taking what I've done and modifying and adding in a line for it.