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

Lua Relogger Integration

goodmorning

New Member
Joined
Sep 16, 2010
Messages
259
Reaction score
1
So.. it'd be awesome if i could integrate this lua code into a plugin.. but I've got no idea in the world how I'd do it.

Code:
string login =	"if (WoWAccountSelectDialog and WoWAccountSelectDialog:IsShown()) then "
				"for i = 0, GetNumGameAccounts() do "
					"if GetGameAccountInfo(i) == '" + accname + "' then "
						"WoWAccountSelect_SelectAccount(i) "
					"end "
				"end "
			"elseif (AccountLoginUI and AccountLoginUI:IsVisible()) then "
				"DefaultServerLogin('" + username + "', '" + password + "') "
				"AccountLoginUI:Hide() "
			"elseif (RealmList and RealmList:IsVisible()) then "
				"for i = 1, select('#',GetRealmCategories()) do "
					"for j = 1, GetNumRealms(i) do "
						"if GetRealmInfo(i, j) == '" + realm + "' then "
							"RealmList:Hide() "
							"ChangeRealm(i, j) "
						"end "
					"end "
				"end "
			"elseif (CharacterSelectUI and CharacterSelectUI:IsVisible()) then "
				"if GetServerName() ~= '"+ realm + "' and (not RealmList or not RealmList:IsVisible()) then "
					"RequestRealmList(1) "
				"else "
					"for i = 0,GetNumCharacters() do "
						"if (GetCharacterInfo(i) == '" + name + "') then "
							"CharacterSelect_SelectCharacter(i) "
							"EnterWorld() "
						"end "
					"end "
				"end "
			"end ";

Any help would be appreciated.
 
Who wrote that?

Anyway, in a plugin you'd just split the state checking up, making Lua.GetReturnValue calls to
"return WoWAccountSelectDialog and WoWAccountSelectDialog:IsShown()"
"return AccountLoginUI and AccountLoginUI:IsVisible()"
"return RealmList and RealmList:IsVisible()"
"return CharacterSelectUI and CharacterSelectUI:IsVisible()"
-> "return GetServerName() ~= '"+ realm + "' and (not RealmList or not RealmList:IsVisible()"

and most of the rest you could just put into Lua.DoString calls underneath each conditional

This is, of course, assuming that HB doesn't kill itself when you dc from WoW entirely...
 
Who wrote that?

Anyway, in a plugin you'd just need to be calling Lua.GetReturnValue to
"return WoWAccountSelectDialog and WoWAccountSelectDialog:IsShown()"
"return AccountLoginUI and AccountLoginUI:IsVisible()"
"return RealmList and RealmList:IsVisible()"
"return CharacterSelectUI and CharacterSelectUI:IsVisible()"
-> "return GetServerName() ~= '"+ realm + "' and (not RealmList or not RealmList:IsVisible()"

and most of the rest you could just put into Lua.DoString calls underneath each conditional

This is, of course, assuming that HB doesn't kill itself when you dc from WoW entirely...

Rofl.. obviously it wasn't me. A friend from MMOwned.

Normally HB doesn't kill itself unless the process terminates, so that shouldn't be an issue.
 
well, according to mmowned its 'spammable' so you mite as well just make a plugin that executes that whole block every 5 seconds or something inside Pulse()

but, Pulse might not call when not logged in
 
Last edited:
Back
Top