Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > World of Warcraft
You last visited: Today at 23:03

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Lua Frage, whatever.

Discussion on Lua Frage, whatever. within the World of Warcraft forum part of the Popular Games category.

Reply
 
Old   #1
 
globalleecher's Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 173
Received Thanks: 11
Lua Frage, whatever.

Code:
running = 0
entrytime = 0
inbattle = 0
join = 0
joinpause = 0

function AutojoinOnLoad()
	DEFAULT_CHAT_FRAME:AddMessage("<Autojoin an>", 1, 0, 0)

	this:RegisterEvent("ZONE_CHANGED_NEW_AREA")
	this:RegisterEvent("BATTLEFIELDS_SHOW")
	this:RegisterEvent("UPDATE_BATTLEFIELD_STATUS")

 	SlashCmdList["BGASSISTTOGGLE"] = AutojoinToggle;
 	SLASH_AUTOJOINTOGGLE1 = "/toggle";

end

function AutojoinToggle()
	if (running == 0) then
		running = 1
		DEFAULT_CHAT_FRAME:AddMessage("<Autojoin an>", 0, 1, 0)
	else
		running = 0
		DEFAULT_CHAT_FRAME:AddMessage("<Autojoin aus>", 1, 0, 0)
	end
end

function AutojoinOnEvent()

	if (event == "ZONE_CHANGED_NEW_AREA") then
		SetMapToCurrentZone()

	elseif (event == "UPDATE_BATTLEFIELD_STATUS") then
		if (running == 1) then
			InBattle()
			if (inbattle == 0) then
				local index = nil
				for i=1, MAX_BATTLEFIELD_QUEUES do
					status, mapName, instanceID = GetBattlefieldStatus(i)
					if status == "confirm" then
						DEFAULT_CHAT_FRAME:AddMessage("<Joini in 10 sekunden>", 1, 0.5, 0)
						entrytime = GetTime()
						index = i
						bgindex = index
					end
				end
			end
		end
	end

end

function AutojoinOnUpdate()

	if (running == 1) then
		InBattle()
		if (inbattle == 0) then
			if (GetBattlefieldStatus(1) == "none") or (GetBattlefieldStatus(2) == "none") or (GetBattlefieldStatus(3) == "none") then
				if (joinpause == 0) then
					if (join == 0) then
						join = 1
						BattlegroundType1:Click();
						joinpause = GetTime()
					elseif (join == 1) then
						join = 2
						BattlegroundType2:Click();
						joinpause = GetTime()
					elseif (join == 2) then
						join = 0
						BattlegroundType3:Click();
						joinpause = GetTime()
					end
				else
					if (GetTime() > (joinpause + .5)) then
						JoinBattlefield(0)
						joinpause = 0
					end
				end
			end
		end

		if UnitIsDeadOrGhost("player") then
			RepopMe()
		end

		expiration = GetBattlefieldInstanceExpiration()
			if (expiration > 0) then
			LeaveBattlefield()
		end
	
		if (entrytime > 0) then
			if (GetTime() > (entrytime + 10)) then
				AcceptBattlefieldPort(bgindex,1)
				StaticPopup_Hide("CONFIRM_BATTLEFIELD_ENTRY")
				bgindex = nil
				entrytime = 0
			end
		end
	end

end

function InBattle()
	if (GetRealZoneText() == "Alterac Valley") or (GetRealZoneText() == "Warsong Gulch") or (GetRealZoneText() == "Arathi Basin") then
		inbattle = 1
	else
		inbattle = 0
	end
end


So, per /toggle wird autoqueue und autojoin aktiviert, allerdings nur fuer AV, AB und WS.

Wie bekomme ichs hin, das es für ADS und Strand auch anmeldet? oder z.B. nur für Strand/ADS?

/edit:

Michael Jackson has died btw.
mfG
globalleecher is offline  
Reply


Similar Threads Similar Threads
Frage zum 173mt2 geht net regestrieren wegen Zeichnung oder ist das frage.
04/02/2009 - Metin2 Private Server - 2 Replies
es geht einfach net.kann jemand helfen oder übersetzung geben bitte.



All times are GMT +1. The time now is 23:03.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.