WoW football lua script menu

User Tag List

Page 1 of 3 123 LastLast
Results 1 to 15 of 36
  1. #1
    y2kss66's Avatar Member
    Reputation
    104
    Join Date
    Jan 2008
    Posts
    778
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    WoW football lua script

    So I was browsing ArcEMU's website for some help with their emulator and stumbled upon this epic thread!
    Log In
    this is an automated football script! amazing and great work! by the burning-azzinoth team!

    there are pictures on the original thread.

    I just thought that I would share it here.

    lua:

    http://svn.burning-azzinoth.de/LUApp...s/Football.lua

    or

    Code:
    --[[=========================================
     _     _    _
    | |   | |  | |  /\                  /\
    | |   | |  | | /  \   _ __  _ __   /  \   _ __ ___
    | |   | |  | |/ /\ \ | '_ \| '_ \ / /\ \ | '__/ __|
    | |___| |__| / ____ \| |_) | |_) / ____ \| | | (__
    |______\____/_/    \_\ .__/| .__/_/    \_\_|  \___|
      Scripting Project  | |   | | Improved LUA Engine
                         |_|   |_|
       SVN: http://svn.burning-azzinoth.de/LUAppArc
       LOG: http://burning-azzinoth.de/arcemu/new/frontend/?t=2
       ----------------------
       WoW Football
       Code by Kenuvis
       Version 0.2
    ========================================]]--
    
    local Conf = {}
    -- Wieviele Spieler brauch es pro Team mindestens, damit das Spiel starten kann?
    -- Howmany player each team is essential for starting the game?
    Conf.MinPlayer = 5
    -- Wieviele Tore braucht man, ehe man gewonnen hat?
    -- Howmany goals is essential to win the game?
    Conf.Goals = 5
    -- NPC ID des Balles
    -- NPC ID of the Ball
    Conf.BallID = 198768
    -- NPC ID des Masters
    -- NPC ID of the Master
    Conf.MasterID = 198767
    
    -- Eckpunkte des Feldes (60[x] x 30[y])
    -- corners of the field (60[x] x 30[y])
    Conf.Ecke_A = {x = -5121, y = 1088}
    Conf.Ecke_B = {x = -5061, y = 1118}
    
    -- Rezzlocations f�r die Teams
    -- Rezzlocation for the Teams
    Conf.Rezz_A = {x = -5100.198242, y = 1085.230103, z = 386}
    Conf.Rezz_B = {x = -5080.903320, y = 1084.947266, z = 386}
    
    -- Belohnung f�r die Gewinner
    -- Reward for the Winner
    Conf.WinRewardItem = 90001
    Conf.WinRewardCount = 3
    
    -- Trostpreis f�r die Verlierer
    -- Reward for the Looser
    Conf.LooseRewardItem = 90001
    Conf.LooseRewardCount = 1
    
    -- Name f�r Team A und B
    -- Name of Team A and B
    Conf.Team_A_Name = "A"
    Conf.Team_B_Name = "B"
    
    -- de = Deutsch; en = english
    Conf.Language = "de"
    
    Conf.Lang = {
    	de = {
    			Run_already = "Du kannst dir das Spiel gerne anschauen. Nehm Platz!",
    			Wait_Status = " Team %s Warteschlange: %s \n Team %s Warteschlange: %s",
    			Join_Team = "Zu Team %s anmelden",
    			Join_Random_Team = "Zu Zufallsteam anmelden",
    			Leave_Team = "Abmelden",
    			Second_To_Wait = "Noch %s Sekunden",
    			Mod_Goal_1 = "Team %s %s : %s Team %s",
    			Mod_End_1 = "Das Spiel ist aus, aus .. Team %s hat gewonnen!"},
    	en = { 
    			Run_already = "The game is already running. Please, sit down and watch the game.",
    			Wait_Status = " Team %s player: %s \n Team %s player: %s",
    			Join_Team = "Join Team %s ",
    			Join_Random_Team = "Join random Team",
    			Leave_Team = "Leave",
    			Second_To_Wait = "%s seconds",
    			Mod_Goal_1 = "Team %s %s : %s Team %s",
    			Mod_End_1 = "The game is over! Team %s win the game!"}
    		}
    
    
    ----------------------------------------
    ----- Ab hier nichts weiter �ndern -----
    ----- Nothing change after this    -----
    ----------------------------------------
    
    RegisterUnitEvent(Conf.BallID,18,"D_Match_On_Spawn")
    
    RegisterUnitGossipEvent(Conf.MasterID, 1, "D_Match_On_Gossip")
    RegisterUnitGossipEvent(Conf.MasterID, 2, "D_Match_On_Select")
    
    local D_Match = {
    		Player = {},
    		Team_A = {},
    		Team_B = {},
    		Last_Player = 0,
    		Ecke_A = Conf.Ecke_A,
    		Ecke_B = Conf.Ecke_B,
    		Points_A = 0,
    		Points_B = 0,
    		Leader = 0,
    		Ball = 0,
    		Run = false,
    		Rezz = {}
    				}
    				
    -- Local functions --
    
    local function D_Match_Clear_Offline(_table)
    	for i,ply in pairs(_table) do
    		while not ply:IsInWorld() do
    			table.remove(_table, i)
    			ply = _table[i]
    			if ply == nil then break end
    		end
    	end
    
    	return _table
    end
    
    local function D_Match_Check_Movement(x, y, addx, addy)
    
    	local multix = 1
    	local multiy = 1
    	
    	if x + addx > D_Match.Ecke_B.x then
    		multix = addx/(x - D_Match.Ecke_B.x)
    	elseif x + addx < D_Match.Ecke_A.x then
    		multix = addx/(D_Match.Ecke_A.x - x)
    	end
    
    	if y + addy > D_Match.Ecke_B.y then
    		multiy = addy/(D_Match.Ecke_B.y - y)
    	elseif y + addy < D_Match.Ecke_A.y then
    		multiy = addy/(y - D_Match.Ecke_A.y)
    	end
    
    	local multi = math.max(math.abs(multix), math.abs(multiy))
    
    	return addx/multi, addy/multi
    
    end
    
    local function D_Match_Event(Event, Addition)
    
    	if Event == "goal" then
    	    D_Match.Leader:SendChatMessage(14, 0, string.format(Conf.Lang[Conf.Language].Mod_Goal_1, Conf.Team_A_Name, D_Match.Points_A, D_Match.Points_B, Conf.Team_B_Name))
    
    	    --Torsch�tze D_Match.Last_Player
    
            if D_Match.Points_A >= Conf.Goals then
                D_Match_Event("end", Addition)
                return
    		elseif D_Match.Points_B >= Conf.Goals then
                D_Match_Event("end", Addition)
                return
    		end
    		
    		D_Match_Event("unreg_ball")
    		D_Match_Event("spawn_ball", D_Match.Leader)
    		D_Match_Event("spawn_player", D_Match.Leader)
    		
    	elseif Event == "player_change" then
    		if math.random() > 0.7 then
    			D_Match.Leader:SpawnGameObject(185466, Addition:GetX(), Addition:GetY(), Addition:GetZ(), 0, 10000)
    		end		    	
    	elseif Event == "end" then
    	    D_Match.Leader:SendChatMessage(14, 0, string.format(Conf.Lang[Conf.Language].Mod_End_1, Addition))
      		D_Match_Event("unreg_ball")
            D_Match.Player = {}
            
            if Addition == Conf.Team_A_Name then
            	Win = D_Match.Team_A
            	Loose = D_Match.Team_B
            else
            	Win = D_Match.Team_B
            	Loose = D_Match.Team_A
            end
    		
    		for _,ply in pairs(Win) do
            	if ply:IsInWorld() then
            		ply:AddItem(Conf.WinRewardItem, Conf.WinRewardCount)
            	end
            end
            for _,ply in pairs(Loose) do
            	if ply:IsInWorld() then
            		ply:AddItem(Conf.LooseRewardItem, Conf.LooseRewardCount)
            	end
            end
            
    		D_Match.Team_A = {}
    		D_Match.Team_B = {}
    		D_Match.Last_Player = 0
    		D_Match.Points_A = 0
    		D_Match.Points_B = 0
    		D_Match.Ball = 0
    		D_Match.Run = false
    	elseif Event == "start" then
    
      		D_Match_Event("spawn_ball", Addition)
    		D_Match.Leader = Addition
    		D_Match_Event("spawn_player", Addition)
    		
    		D_Match_Event("firework", "blau")
    
    		D_Match.Run = true
    	elseif Event == "unreg_ball" then
    		if D_Match.Ball then
    			D_Match.Ball:RemoveEvents()
    			D_Match.Ball:Despawn(1,0)
    		end
    	elseif Event == "spawn_ball" then
    	
    	    local x = D_Match.Ecke_A.x + 30
    	    local y = D_Match.Ecke_A.y + 15
    	    local z = Addition:GetZ()+3
    	
    	    D_Match.Ball = Addition:SpawnCreature(Conf.BallID, x, y, z, 0, 35, 600000)
    	elseif Event == "spawn_player" then
    	
    	    local x = D_Match.Ecke_A.x
    	    local y = D_Match.Ecke_A.y
    	    local z = Addition:GetZ()+5
    	    local mapid = Addition:GetMapId()
    			    
    		for _,ply in pairs(D_Match.Team_A) do
    			if ply:IsInWorld() then
    			    ply:Teleport(mapid, x, y+15+math.random(-5,5), z, 0)
    			end
    		end
    		
    		for _,ply in pairs(D_Match.Team_B) do
    			if ply:IsInWorld() then
    			    ply:Teleport(mapid, x+60, y+15+math.random(-5,5), z, 3)
    			end
    		end
    	elseif Event == "firework" then
    		for a = D_Match.Ecke_A.x, D_Match.Ecke_B.x, 2 do
    			D_Match.Leader:SpawnGameObject(181852, a, D_Match.Ecke_B.y, D_Match.Leader:GetZ(), 1, 5000)
                D_Match.Leader:SpawnGameObject(181852, a, D_Match.Ecke_A.y, D_Match.Leader:GetZ(), 1, 5000)
            end
            
            for a = D_Match.Ecke_A.y, D_Match.Ecke_B.y, 2 do
    			D_Match.Leader:SpawnGameObject(181852, D_Match.Ecke_A.x, a, D_Match.Leader:GetZ(), 1, 5000)
                D_Match.Leader:SpawnGameObject(181852, D_Match.Ecke_B.x, a, D_Match.Leader:GetZ(), 1, 5000)
            end
        else
        	print("behandeltes Event - "..Event)
        end
        
    end
    
    local function D_Match_Start_Check(Unit)
    	if table.getn(D_Match.Team_A) >= Conf.MinPlayer and table.getn(D_Match.Team_B) >= Conf.MinPlayer then
    	    D_Match_Event("start", Unit)
    	end
    end
    
    -- Register --
    
    function D_Match_On_Gossip(Unit,_,Player)
    
    	if D_Match.Run then 
    		Unit:SendChatMessage(12, 0, Conf.Lang[Conf.Language].Run_already)
    		return 
    	end
    
    	local Text = string.format(Conf.Lang[Conf.Language].Wait_Status, Conf.Team_A_Name, table.getn(D_Match.Team_A), Conf.Team_B_Name, table.getn(D_Match.Team_B))
    
    	if table.find(D_Match.Player, Player) then
    	    entry.AddGossipMenu(Unit, Player, {Conf.Lang[Conf.Language].Leave_Team, 1, Text, 2})
    	else
    	    entry.AddGossipMenu(Unit, Player, {string.format(Conf.Lang[Conf.Language].Join_Team, Conf.Team_A_Name), 3,
    										   string.format(Conf.Lang[Conf.Language].Join_Team, Conf.Team_B_Name), 4,
    										   Conf.Lang[Conf.Language].Join_Random_Team, 5,
    										   Text, 2})
    	end
    	
    end
    
    function D_Match_On_Select(Unit,_,Player,_,id)
    
    	if id == 1 then
    		local i = table.find(D_Match.Player, Player)
    		if i then
    		    table.remove(D_Match.Player, i)
    			i = table.find(D_Match.Team_A, Player)
    			if i then
    			    table.remove(D_Match.Team_A, i)
    			else
    			    i = table.find(D_Match.Team_B, Player)
    			    if i then
    			        table.remove(D_Match.Team_B, i)
    				end
    			end
    		end
    	elseif id == 2 then
    		Player:SendBroadcastMessage(string.format(Conf.Lang[Conf.Language].Wait_Status, Conf.Team_A_Name, table.getn(D_Match.Team_A), Conf.Team_B_Name, table.getn(D_Match.Team_B)))
    	elseif id == 3 then
    	    table.insert(D_Match.Team_A, Player)
    	    D_Match.Team_A = D_Match_Clear_Offline(D_Match.Team_A)
    	    table.insert(D_Match.Player, Player)
            D_Match.Player = D_Match_Clear_Offline(D_Match.Player)
            D_Match_Start_Check(Unit)
    	elseif id == 4 then
    	    table.insert(D_Match.Team_B, Player)
    	    D_Match.Team_B = D_Match_Clear_Offline(D_Match.Team_B)
    	    table.insert(D_Match.Player, Player)
    	    D_Match.Player = D_Match_Clear_Offline(D_Match.Player)
    	    D_Match_Start_Check(Unit)
    	elseif id == 5 then
            D_Match_On_Select(Unit,_,Player,_,math.random(3,4))
    	elseif id == 6 then
    		D_Match_Event("start", Unit)
    	end
    	
    	Player:GossipComplete()
    
    end
    
    
    -- Game Handle --
    
    function D_Match_On_Spawn(Unit)
    	Unit:RegisterEvent("D_Match_Move_Check", 500, 0)
    end
    
    function D_Match_Move_Check(Unit)
    
    	for _,ply in pairs(Unit:GetInRangePlayers()) do
    		if not table.find(D_Match.Rezz, ply, 1) then
    			if ply:GetHealthPct() == 0 then
    				if table.find(D_Match.Team_A, ply) then
    					ply:Teleport(Unit:GetMapId(), Conf.Rezz_A.x, Conf.Rezz_A.y, Conf.Rezz_A.z, 0)
    				else
    					ply:Teleport(Unit:GetMapId(), Conf.Rezz_B.x, Conf.Rezz_B.y, Conf.Rezz_B.z, 0)
    				end
    				table.insert(D_Match.Rezz, {ply, 20})
    			end
    		end
    	end
    	
    	for i,ply in pairs(D_Match.Rezz) do
    		D_Match.Rezz[i][2] = ply[2] - 1
    		if ply[2] - 1 <= 0 then
    			ply[1]:ResurrectPlayer()
    			table.remove(D_Match.Rezz, i)
    		else
    			if math.iseven(ply[2]) then
    				ply[1]:SendBroadcastMessage(string.format(Conf.Lang[Conf.Language].Second_To_Wait, ply[2]/2))
    			end
    		end
    	end	
    
    	local ux = Unit:GetX()
    	local uy = Unit:GetY()
    	
    	if math.between(D_Match.Ecke_B.y-10, D_Match.Ecke_A.y+10, uy) then
    		if ux < D_Match.Ecke_A.x+2 then
    			D_Match.Points_A = D_Match.Points_A + 1
    			D_Match_Event("goal", "A")
    			return
    		elseif ux > D_Match.Ecke_B.x-2 then                               
    			D_Match.Points_B = D_Match.Points_B + 1
    			D_Match_Event("goal", "B")
    			return
    		end
    	end
    	
    	local Player = Unit:GetClosestPlayer()
    	if table.find(D_Match.Player, Player) then
    	    local Dist = entry.GetDistance(Player, ux, uy)
    	    
    		if Dist < 3 and Dist > 0 then
    		
    		    if D_Match.Last_Player ~= Player then
                   D_Match_Event("player_change", Player)
                   D_Match.Last_Player = Player
    			end
    
    			local xmove = (ux - Player:GetX())
    			local ymove = (uy - Player:GetY())
    
    			local c = (xmove^2 + ymove^2)^0.5
    			local multi = c/(7-(Dist*2))
    			xmove = xmove/multi
    			ymove = ymove/multi
    			
    			xmove, ymove = D_Match_Check_Movement(ux, uy, xmove, ymove)
    
    	        Unit:MoveTo(ux + xmove, uy + ymove, Player:GetZ(), 0)
    		end
    	end
    	
    end
    SQL:

    http://svn.burning-azzinoth.de/LUApp...s/Football.sql

    Screen Shots!!!

    Screens from Thread:
    http://img13.imageshack.us/img13/678...9215409dw7.jpg
    http://img13.imageshack.us/img13/965...9215451yx6.jpg
    http://img24.imageshack.us/img24/946...9215506er9.jpg

    Credits:
    Burning-Azzinoth team
    kenuvis
    Raham
    Last edited by y2kss66; 03-19-2009 at 06:58 AM. Reason: screenshots fixed!

    WoW football lua script
  2. #2
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    150/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Thanks for sharing?...

  3. #3
    y2kss66's Avatar Member
    Reputation
    104
    Join Date
    Jan 2008
    Posts
    778
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    your welcome?...

  4. #4
    axxo135's Avatar Member
    Reputation
    3
    Join Date
    Nov 2007
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol need to try this sounds cool :P

  5. #5
    thebigman's Avatar Contributor Reliable Trader
    CoreCoins Purchaser
    Reputation
    89
    Join Date
    Dec 2008
    Posts
    605
    Thanks G/R
    2/0
    Trade Feedback
    26 (96%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is this the real football or the soccer crap

  6. #6
    moltn's Avatar Member
    Reputation
    45
    Join Date
    Dec 2007
    Posts
    81
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Screenshot, pl0x? xD

  7. #7
    y2kss66's Avatar Member
    Reputation
    104
    Join Date
    Jan 2008
    Posts
    778
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    screen shots are on the original arcemu link

    this is soccer.
    the real football.

  8. #8
    shadowslayer133's Avatar Active Member
    Reputation
    61
    Join Date
    May 2008
    Posts
    313
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    soccer = futball in EU

    Done by piersd
    Gamer tag - Midnight133

  9. #9
    GnTR's Avatar Member
    Reputation
    3
    Join Date
    May 2008
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you Taunting Europe?

  10. #10
    DarkMTV's Avatar Member
    Reputation
    1
    Join Date
    Apr 2008
    Posts
    69
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sounds nice but can u put a pic plz ?

  11. #11
    Mitron's Avatar Contributor
    Reputation
    127
    Join Date
    Jun 2008
    Posts
    1,324
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool but pictures in this thread would be great :P you need to log in on arcemu to see screenies and i dont wanna make an account there :P

    ----------------------------------------------------------------

  12. #12
    fastelf's Avatar Active Member
    Reputation
    44
    Join Date
    Apr 2007
    Posts
    279
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need both LuaAppArc & LSL for this to work.

  13. #13
    y2kss66's Avatar Member
    Reputation
    104
    Join Date
    Jan 2008
    Posts
    778
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I do not have a server as of right now.
    so if someone else could post screen shots that would be nice and I will give you 2+Rep.

  14. #14
    Ickybad's Avatar Contributor
    Reputation
    214
    Join Date
    Apr 2008
    Posts
    904
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Boo football = oval ball with laces and actual contact.. Not a lil black and white ball being kicked into a net +2.

  15. #15
    3xploit's Avatar Member
    Reputation
    9
    Join Date
    Feb 2009
    Posts
    59
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Scyther View Post
    Boo football = oval ball with laces and actual contact.. Not a lil black and white ball being kicked into a net +2.
    Agreed Nice script tho +Rep

    May the Force be with you

Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 01-02-2014, 05:22 AM
  2. [Lua Script] Script Tester Without WoW Client?
    By MadameGrip in forum WoW EMU Questions & Requests
    Replies: 8
    Last Post: 04-08-2011, 10:13 AM
  3. Replies: 0
    Last Post: 02-17-2009, 03:53 AM
  4. Dr. Emu's LUA Script Editor 1.0 BETA *WoW Edition
    By Dr. Emu in forum WoW EMU Programs
    Replies: 25
    Last Post: 02-06-2009, 01:04 PM
All times are GMT -5. The time now is 10:05 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search