Important: Please register to test the 20 minutes trial version or buy the bot!
Ready for WoW 5.3 Build 17128
Wow Bot: CrawlerBot Last version: click here State: EU: working US: working

Author Topic: [Guide][EN] How to create a CustomClass [UPDATED v8]  (Read 5365 times)

July 20, 2013, 23:38:43 PM
Reply #30

xkellettx

  • *
  • Posts: 2
  • Reputation: 0
    • View Profile
Sorry to bump if its not ok but I wasn't sure where to ask this.

Is there a command to check for mob ID and one to make it your target.
I have only coded with java before so I'm new to LUA. (what I'm trying to do is check for a totem and attack it(for this: Townlong Steppes Easy Path 88-90)
Code: [Select]
function TotemCheck()
check() = GetAttackerCount();
if check() >= 2 then
_log("Hitting totem");
Target = GetAttacker(2);
CastSpellByID(20271, Target, true);
Target = GetAttacker(1);
end
NextAction();
end

this code is obviously just to hit a second target, since I don't know how to check for mob ID

July 20, 2013, 23:49:30 PM
Reply #31

Athermal

  • *
  • *
  • Posts: 657
  • Reputation: 115
  • German Noob
    • View Profile
test this. i use this in custom  class in function fight() at first entry.
Code: [Select]
    local totem = GetObjectByID(61245);
    if totem ~= 0 and GetDistToUnit(totem) < 25 then
        _Log("Fight: kill Totem")       
        SetTarget(totem)
        Target = totem
        CastSpellByID(20271,Target,true)
        Sleep(500)
        Target = GetAttacker(1)
        return
    end
You like it then give +rep for it

July 21, 2013, 07:53:23 AM
Reply #32

xkellettx

  • *
  • Posts: 2
  • Reputation: 0
    • View Profile
test this. i use this in custom  class in function fight() at first entry.
Code: [Select]
    local totem = GetObjectByID(61245);
    if totem ~= 0 and GetDistToUnit(totem) < 25 then
        _Log("Fight: kill Totem")       
        SetTarget(totem)
        Target = totem
        CastSpellByID(20271,Target,true)
        Sleep(500)
        Target = GetAttacker(1)
        return
    end
ok I will thanks and how does the fight() method work? is it just a normal method or what?

 

* Useful Links

WoW Bot - CrawlerBot
* Download
* Guides
* Info & Clip

* Useful Stuff