Jump to content

Can not get LUA Hearthstone to work


Bambo
 Share

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
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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...