Page 1 of 1

specific time skill use

Posted: Fri Mar 23, 2012 6:29 am
by mickyblueeyes
is there a command to write in the script to only use a skill at a given point ie at -50% health

Re: specific time skill use

Posted: Fri Mar 23, 2012 9:16 am
by Uwars
If by script you mean class xml file then yes:

Code: Select all

<action name="Simple Athelas Essence (Moral200-300)" cooldown="120000" skillid="0x70001346" melee="true" ranged="true" >
<condition type="Health" max="65"/>
</action>
This would wait until your health got below 65% and then drink a potion, you can use the same condition in any skill as well (like for an RK to heal himself).

Re: specific time skill use

Posted: Fri Mar 23, 2012 9:26 am
by mickyblueeyes
yeh that what a ment m8 would this command work on pre-combat food aswell

Re: specific time skill use

Posted: Fri Mar 23, 2012 10:43 am
by Uwars
I was trying to find my xml that used food (can't at the moment); but I think all actions are treated the same and will only fire if all conditions are met. This would mean that pre-combat, the food would only be eaten if your health is low.

Re: specific time skill use

Posted: Fri Mar 23, 2012 10:48 am
by Uwars
Also, if you look at the class xsd, you can see what and how each condition can be applied.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>

<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://lotro.pwnagebot.com/Class/v2.0" targetNamespace="http://lotro.pwnagebot.com/Class/v2.0">

  <xsd:element name="actions">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element minOccurs="1" maxOccurs="1" name="mindist" />
        <xsd:element maxOccurs="unbounded" name="action">
          <xsd:complexType>
            <xsd:sequence minOccurs="0">
              <xsd:element maxOccurs="unbounded" name="condition">
                <xsd:complexType>
                  <xsd:attribute name="type" type="xs:condition_type" use="required" />
                  <xsd:attribute name="max" type="xsd:decimal" use="optional" />
                  <xsd:attribute name="min" type="xsd:decimal" use="optional" />
                </xsd:complexType>
              </xsd:element>
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:string" use="required" />
            <xsd:attribute name="cooldown" type="xsd:unsignedLong" use="required" />
            <xsd:attribute name="skillid" type="xs:hex_string" use="optional" />
            <xsd:attribute name="quickbarindex" type="xsd:byte" use="optional" />
            <xsd:attribute name="ranged" type="xsd:boolean" use="optional" />
            <xsd:attribute name="melee" type="xsd:boolean" use="optional" />
            <xsd:attribute name="casted" type="xsd:boolean" use="optional" />
            <xsd:attribute name="precombatbuff" type="xsd:boolean" use="optional" />
            <xsd:attribute name="outofcombatbuff" type="xsd:boolean" use="optional" />
            <xsd:attribute name="postrestbuff" type="xsd:boolean" use="optional" />
            <xsd:attribute name="delay" type="xsd:unsignedLong" use="optional" />
          </xsd:complexType>
        </xsd:element>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>

  <!-- hex_string is used to map our lotro skill ids -->
  
  <xsd:simpleType name="hex_string">
    <xsd:restriction base="xsd:string">
      <xsd:pattern value="0x[A-Za-z0-9]+" />
    </xsd:restriction>
  </xsd:simpleType>

  <!-- condition type is a list of any possible conditions that we support either
  generic ones or ones specific to lotro -->
  
  <xsd:simpleType name="condition_type">
    <xsd:union memberTypes="xs:base_condition_type xs:lotro_condition_type" />
  </xsd:simpleType>
  
  <!-- A list of generic conditions that are supported for all games. -->
  
  <xsd:simpleType name="base_condition_type">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Distance" />
      <xsd:enumeration value="Target Health" />
      <xsd:enumeration value="Health" />
      <xsd:enumeration value="Power" />
      <xsd:enumeration value="Cast Once" />
      <xsd:enumeration value="Attackers" />
    </xsd:restriction>
  </xsd:simpleType>

  <!-- A list of specific conditions that only make sense for lotro. -->
  
  <xsd:simpleType name="lotro_condition_type">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Focus" />
      <xsd:enumeration value="Fervour" />
      <xsd:enumeration value="Attunement" />
    </xsd:restriction>
  </xsd:simpleType>

</xsd:schema>

Re: specific time skill use

Posted: Fri Mar 23, 2012 11:06 am
by rhui
Uwars, you still using Rev 209 and i think that class.xsd is also an old one without attunement for rune-keepers ;)

Try Rev 214 of the hotfix release!

I think in the future i will build-in an auto updater feature for the bot *wink wink*

Re: specific time skill use

Posted: Fri Mar 23, 2012 11:16 am
by Uwars
Thanks, I am actually using it on my gaming machine (just don't have it here). I did fix it up on the other post I was answering but hadn't come back to this one yet ;)

(fixed now I think)...need to remove/move all of these old versions :)

Re: specific time skill use

Posted: Fri Mar 23, 2012 11:37 am
by mickyblueeyes
thank you pll your info is a great help :)