Jump to content

Recommended Posts

Hey guys,

I've found some old code in the forum and tried to bring it back to life. Unfortunately this is my first experience with lua.

var bindLocation = Lua.LuaDoString("hearth=GetBindLocation();", "hearth");

var position = new Vector3(-407.123f, 1633.99f, -4439.37f, 15.43328);
int npcEntryId = 6929; 

while (bindLocation != "Orgrimmar")

{
wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(position, npcEntryId);

Lua.LuaDoString("GossipTitleButton1:Click();");

Lua.RunMacroText("/click StaticPopup1Button1");
}

I get this lua error: 

http://prntscr.com/kai2uj

 

Probably a simple thing that I am just overlooking. Appreciate any help.

 

Greetings

 

Link to comment
https://wrobot.eu/forums/topic/9836-can-not-get-lua-hearthstone-to-work/
Share on other sites

I know this thread already. As I stated. My Lua knowledge is very limited for now. I wanna fix the syntax of the code posted above. Or is it completely wrong and will not work?

 

Thanks for sending the link anyway.

 

Just now, Bambo said:

I know this thread already. As I stated. My Lua knowledge is very limited for now. I wanna fix the syntax of the code posted above. Or is it completely wrong and will not work?

 

I'm trying to point out where you need to put return at.

Now I dont get the error anymore, ty. Still doesn't work at all though xD just skips to next pulse

var bindLocation = Lua.LuaDoString("hearth=GetBindLocation(); return bindLocation;", "hearth");

var position = new Vector3(-407.123f, 1633.99f, -4439.37f, 15.43328);
int npcEntryId = 6929; 

while (bindLocation != "Orgrimmar")

{
wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(position, npcEntryId);

Lua.LuaDoString("GossipTitleButton1:Click();");

Lua.RunMacroText("/click StaticPopup1Button1");
}

Thanks alot for the help.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...