Custom Classes API / Functions - MMOCrawlerbots | WoW Bot Forum
Important: Please register to use the 20 minutes trial version or buy the bot!
Bot ready for World of Warcraft 5.4 Build 17538

UpdateLauncher DOWNLOAD

Wow Bot: CrawlerBot Last version: click here State: EU: working US: working

Author Topic: Custom Classes API / Functions  (Read 2050 times)

September 25, 2012, 00:13:45 AM

telcy Offline

  • *
  • *
  • Posts: 1692
  • Reputation: 182
    • View Profile
custom classes api / functions


Code: [Select]
CastSpellByID //CastSpellByID(int spellid, target, wait = true)
HasBuff //HasBuff(target, int id)
IsSpellKnown // IsSpellKnown(int spellID)
GetAttackerCount // returns attacker count
GetAttacker // returns attackers as array
SetTarget // SetTarget(int target)
FaceTarget // FaceTarget(int target)
IsSpellReady // IsSpellReady(int spellID)
SendKey // SendKey(string key)
_Log // _Log(string msg)
PlayerHpPercent // returns hp in percent
PlayerManaPercent // returns mp in percent
PlayerIsAutoAttacking // returns auto attacking state
StartAutoAttack // enables auto attack
LuaDoString // LuaDoString(string luacode)
WowGetLuaValue // returns Lua Value
GetDistToUnit // returns distance to unit
GetComboPoints() // returns combo points
« Last Edit: October 21, 2012, 23:14:20 PM by telcy »

October 31, 2012, 15:11:01 PM
Reply #1

Dyz Offline

  • *
  • Posts: 11
  • Reputation: 0
    • View Profile
would be nice if you could add a funktion to get the fokus/energy/duno what the monk one is called

November 02, 2012, 13:28:36 PM
Reply #2

leptest Offline

  • *
  • Posts: 40
  • Reputation: 6
    • View Profile
Wow it took me a while to find this sub/super section, but i am so glad i did :D.

I have been trying to find a list of all available functions and parameters. Is all of them? Basically i'm looking for a function to check a Monk's Chi. But it would be really helpful if there was an area explaining all functions.

Thanks

November 02, 2012, 17:19:49 PM
Reply #3

leptest Offline

  • *
  • Posts: 40
  • Reputation: 6
    • View Profile
So i had no luck trying to find an inbuilt function. So i looked into the WoW API and came up with this solution:

Code: Lua
  1. function Settings()
  2.         ...
  3.         -- Should never be 5 in the log
  4.         Chi = 5;
  5.         ...
  6. end
  7. ...
  8. function Fight()
  9.         ...
  10.         -- Check Chi
  11.         LuaDoString("mana = UnitPower('player', 12);");
  12.         Chi = tonumber(WowGetLuaValue("mana"));
  13.         _Log(Chi);
  14.         ...
  15. end
  16.  
  17.  

Hope this helps out, i have posted an updated version of the Monk class that checks Chi to use the best possible spell: http://mmocrawlerbots.com/forum/monk/monks/new/#new

Thanks.
« Last Edit: November 02, 2012, 17:49:08 PM by leptest »

November 15, 2012, 19:10:12 PM
Reply #4

kampfschaf Offline

  • ****
  • Posts: 349
  • Reputation: 33
  • me gusta.
    • View Profile
Here's a list of the UnitPower enums used by wow:

http://www.wowwiki.com/PowerType

just used it for my shadow priest aswell. Thanks for the tip leptest
I'm back and slowly getting back into my projects

 

* Recent Topics

* Useful Stuff