What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

Call a HB function from the game it's self?

AutomaticCoding

New Member
Joined
Dec 20, 2011
Messages
1,091
Reaction score
1
Just playing around, not really coding anything worth while but I want to know how to call a function from a macro ingame.

So, say I type ingame:

/script Honorbuddy:PluginName:RunFunction("reset");

then had in my script:

public void reset() {
bool enabled = true;
long startTime = new Java.util.Calendar().getInstance().getTimeInMillis();
settings = defaultSettings
}

How would I do this?

I'm thinking (can't test it, due to HB being down) that this would work:

/script var reset = true;

public void Pulse() {
if(Styx.StyxInstance.Lua.GetReturnVal<bool>("reset")) {
Styx.StyxInstance.Lua.DoString("var reeset = false");
reset();
}
}

But I'm not sure if that would work, would it?
 
Last edited:
you can do.
Lua.DoString("RunMacroText("/say hello")");

or you can use lua return val, if you need something from the api.
 
you can do.
Lua.DoString("RunMacroText("/say hello")");

or you can use lua return val, if you need something from the api.

But, I want the user (me) to be able to configure/start/stop the bot from in the game.

E.G., I want to be able to play legit, have a macro that mills/prospects all my items. How would I start the function from that macro? Call a function in HB with the WoW UI?
 
But, I want the user (me) to be able to configure/start/stop the bot from in the game.

E.G., I want to be able to play legit, have a macro that mills/prospects all my items. How would I start the function from that macro? Call a function in HB with the WoW UI?

Dunno if it could be, but i think its a huge risk.

A lot of pirox user got banned when using the first Archbot because it was printing logs/commands in game.

But if you dont care for being banned, ignore me. :P
 
But, I want the user (me) to be able to configure/start/stop the bot from in the game.

E.G., I want to be able to play legit, have a macro that mills/prospects all my items. How would I start the function from that macro? Call a function in HB with the WoW UI?
replace the /say with whatever your macro is. and then code it into your plugin. theres no way (well no easy way) to bind that code to button, if thats what you wanted.
 
Dunno if it could be, but i think its a huge risk.

A lot of pirox user got banned when using the first Archbot because it was printing logs/commands in game.

But if you dont care for being banned, ignore me. :P

Eh, not really sure. So, blizzard would ban me for going ingame and doing:

/script status = "Flying to zone"; DEFAULT_CHAT_FRAME:AddMessage("Pirox - Archbot: " .. status);

I doubt it to be honest.
 
why? just do Logging.Write("My message here") screw printing it in game
 
Eh, not really sure. So, blizzard would ban me for going ingame and doing:

/script status = "Flying to zone"; DEFAULT_CHAT_FRAME:AddMessage("Pirox - Archbot: " .. status);

I doubt it to be honest.

If they classify it as being related to botting, why not? They ban at will. Like they did it with Pirox.

But PQR is doing the same thing, so maybe they dont. Who knows, its Blizzard.

Also if you are the only one, chances are good that they dont care, if it would be a general bot feature, risks could be much higher.

Edit: Codename is right, why would you want it to be in wow? :o
 
why? just do Logging.Write("My message here") screw printing it in game

>Bot for helping you play legit
>Alt tabbing every 5 settings to check the log

Q__Q

Anyway, we weren't even talking about that, I was talking about calling a function from the ingame UI.
 
There is code that watches for PM's, why couldn't HB watch for custom messages too?

Like make a macro "/e he's grinding is 'erbs again!!!" and have the plugin checking chat until it see's that exact string in chat, ie "Imnotabot says he's grinding is 'erbs again!!!" then start it's shit up? Custom macro won't draw any attention to your bot, and if it's an emote it has to come from your toon. not likely to start your bot from randoms posting Anal messages in Trade and not likly to get reported.
 
Take a look at the Toney's TSM profile for ProfessionBuddy, it uses ingame events to trigger bot to do tasks. Same way you could make certain ingame events trigger it to do milling / prospecting / <whatever>...


Link here.</whatever>
 
Back
Top