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 5383 times)

October 25, 2012, 08:00:16 AM
Reply #15

kampfschaf

  • ****
  • Posts: 349
  • Reputation: 31
  • me gusta.
    • View Profile
Is there a way to allow a player to channel a spell?  I want my warlock to be able to channel Drain Soul for the duration but it just keeps casting and recasting after 2-3 seconds of channeling.

Setting the optional third parameter (wait for cast) on CastSpellByID to "true" should do it.
Code: [Select]
CastSpellByID(1120, Target, true);
I'm back and slowly getting back into my projects

October 26, 2012, 13:00:39 PM
Reply #16

Lodyha

  • *
  • Posts: 7
  • Reputation: 1
    • View Profile
How exactly SendKey() wroks? For example SendKey("a") will press keybinding "a" in game? Thx

October 26, 2012, 22:19:00 PM
Reply #17

kampfschaf

  • ****
  • Posts: 349
  • Reputation: 31
  • me gusta.
    • View Profile
like a short keydown event, yes.

Code: [Select]
SendKey(83, 2000);

will send the "keydown" signal for key 83 ("s") to the game for 2000 milliseconds (movement)
I'm back and slowly getting back into my projects

November 01, 2012, 09:31:32 AM
Reply #18

savas

  • *
  • Posts: 9
  • Reputation: 0
    • View Profile
hi,

Is it possible to execute a macro by its name?

November 01, 2012, 09:52:00 AM
Reply #19

kampfschaf

  • ****
  • Posts: 349
  • Reputation: 31
  • me gusta.
    • View Profile
A feature I would love for my Hunter and for Pet Checks. Going to query hamburger ,)
I'm back and slowly getting back into my projects

November 05, 2012, 01:07:26 AM
Reply #20

sod53

  • *
  • Posts: 2
  • Reputation: 0
    • View Profile
I tried to customize my Mage Class. It should use conjured food if some is ther, else it should make some.

With LuaDoString I didn´t manage to get it to work.

Now i wrote a macro which will eat or make some food. I bind it to "j".

I implemented :
function eat()
if PlayerHpPercent() < 99 and GetAttackerCount() == 0 then 
   _Log("Eat");
   SendKey("j",3200);
   SendKey("j");
end
end


The log shows "Eat" but nothing is happening. What´s wrong?

Thank you

November 05, 2012, 01:12:43 AM
Reply #21

Hamburger

  • *
  • *
  • Posts: 590
  • Reputation: 95
    • View Profile
you have to replace "j" with the VirtuelKey number for "j" ;-)

November 05, 2012, 01:20:28 AM
Reply #22

sod53

  • *
  • Posts: 2
  • Reputation: 0
    • View Profile
the ascii code? - 106

SendKey(106, 3200); ?

i tried, but also didn´t work...

November 05, 2012, 04:20:29 AM
Reply #23

canthave

  • *
  • Posts: 8
  • Reputation: 2
    • View Profile
Anyone have any examples of/if i can tie together a priority for custom classes? A rotation is fine and dandy, but i would really like it to start at the top of the spell list after every spell cast. Working on a brewmaster CustomClass and i want it to cast kegsmash>Blackout Kick>jab>Tiger palm.

also while im here, im haveing trouble setting up Zen Sphere as a heal spell.
   if not HasBuff(124081,0) if IsSpellKnown(124081) and IsSpellReady(124081) and PlayerHpPercent() <= 70 then
      _Log("Hp lower then 70% Cast Zen Sphere");
      CastSpellByID(124081, Player, true);
   end
It fails to load the profile with the if not hasbuff callout and runs just fine without it. I just dont want to get the benefit of it ticking without waisting 2 chi to blow it up(hence the callout to ingnore the line if i have the HoT already ticking). If anyone could give me some tips on either problems i would love it!

November 05, 2012, 05:56:30 AM
Reply #24

canthave

  • *
  • Posts: 8
  • Reputation: 2
    • View Profile
Anyone have any examples of/if i can tie together a priority for custom classes? A rotation is fine and dandy, but i would really like it to start at the top of the spell list after every spell cast. Working on a brewmaster CustomClass and i want it to cast kegsmash>Blackout Kick>jab>Tiger palm.

also while im here, im haveing trouble setting up Zen Sphere as a heal spell.
   if not HasBuff(124081,0) if IsSpellKnown(124081) and IsSpellReady(124081) and PlayerHpPercent() <= 70 then
      _Log("Hp lower then 70% Cast Zen Sphere");
      CastSpellByID(124081, Player, true);
   end
It fails to load the profile with the if not hasbuff callout and runs just fine without it. I just dont want to get the benefit of it ticking without waisting 2 chi to blow it up(hence the callout to ingnore the line if i have the HoT already ticking). If anyone could give me some tips on either problems i would love it!

Lol.. spent another few hours pouring over this guide, my code, and other profiles just to realize i had two "if" statements in one line X( at least im learning :P

November 09, 2012, 08:26:52 AM
Reply #25

zukzuk

  • *
  • Posts: 140
  • Reputation: 73
    • View Profile
Anyone have any examples of/if i can tie together a priority for custom classes? A rotation is fine and dandy, but i would really like it to start at the top of the spell list after every spell cast.
Basically, the "NextAction();" action call used in all the profiles (including examples) doesn't do what it's supposed to, as far as I can tell. I simply used "do return end;" instead: http://mmocrawlerbots.com/forum/hunter/another-bm-customclass-profile/

November 10, 2012, 16:35:35 PM
Reply #26

Venificus

  • *
  • Posts: 71
  • Reputation: 9
    • View Profile
Working on an Arcane Mage CC and wondering if there is a command to check the number of stacks of a buff (or in this case, the Arcane Charge debuff) and cast Arcane missles if there are 4 or more and arcane missles are ready.  i know how to code it to check if AM is ready and then to fire it - would be similair to the instant pyro script, but not sure how to check buff or debuff stack count.  any help on that would be appreciated

thanx
Ven

November 10, 2012, 17:38:10 PM
Reply #27

Tunkawa

  • *
  • Posts: 2
  • Reputation: 0
    • View Profile
Is there a way to make the casting (say elemental shaman to cast lightning bolt > Lava burst) with out a huge delay? Like there is a good 2 sec before starting to cast the next spell.  Like it is going through the entire check list after being interrupted.

November 16, 2012, 19:25:09 PM
Reply #28

zukzuk

  • *
  • Posts: 140
  • Reputation: 73
    • View Profile
I guess you could always write your Fight() function in a way so that it never returns until your current target is dead or GetAttackerCount() == 0 (or maybe merely until GetAttackerCount() == 0, you would have to take care of target switching as well then though).

Then you could loop over your priority list however you want and e. g. check "UnitCastingInfo" (WoW API) to see if your character is still casting, and if it isn't proceed to the next action right away (and if your character is still casting, sleep for e. g. 100ms and repeat the check) .
« Last Edit: November 16, 2012, 19:29:51 PM by zukzuk »

January 12, 2013, 12:48:43 PM
Reply #29

Res

  • *
  • Posts: 327
  • Reputation: 50
  • The Hungarian Mad Scientist ;D
    • View Profile
Anyone have any examples of/if i can tie together a priority for custom classes? A rotation is fine and dandy, but i would really like it to start at the top of the spell list after every spell cast. Working on a brewmaster CustomClass and i want it to cast kegsmash>Blackout Kick>jab>Tiger palm.

also while im here, im haveing trouble setting up Zen Sphere as a heal spell.
   if not HasBuff(124081,0) if IsSpellKnown(124081) and IsSpellReady(124081) and PlayerHpPercent() <= 70 then
      _Log("Hp lower then 70% Cast Zen Sphere");
      CastSpellByID(124081, Player, true);
   end
It fails to load the profile with the if not hasbuff callout and runs just fine without it. I just dont want to get the benefit of it ticking without waisting 2 chi to blow it up(hence the callout to ingnore the line if i have the HoT already ticking). If anyone could give me some tips on either problems i would love it!

--------------------------------------------------------------------------------------------------------------------------

 if IsSpellKnown(124081) and IsSpellReady(124081) and not HasBuff(124081,0) and PlayerHpPercent() <= 70 then
      _Log("Hp lower then 70% Cast Zen Sphere");
      CastSpellByID(124081, Player, true);
     return;
   end

--------------------------------------------------------------------------------------------------------------------------

return;  <===| needed to do something after he checkd or casted the spell.

and not <===| is the correct syntax :D dont make more than one If  between If then :)

CastSpellByID(124081, Player, true); <===|  124081= ID of the spell what u want to cast | Player= selftargeting or selfcast | true= wait the casting time of the spell. ( if the spell is instant write false )

_Log("Hp lower then 70% Cast Zen Sphere"); <===| _Log("<Text>");  this is what you see in your bot's log you can write here what you want. I can't write down in english what i wanted to say here :/ sorry :D



Here is the correct code in my opinion :D but i'm still learning this. So maybe i had a mistake :d but i hope i dont have:P
« Last Edit: January 12, 2013, 12:56:45 PM by Res »
The Button's Function is to say thanks to the forum user who helped on you or made a great usable profile etc.. for everyone:) |Thx for The Premium CBTeam!!<3|

 

* Useful Links

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

* Useful Stuff