[Lua] Arena Fighting NPC menu

User Tag List

Results 1 to 6 of 6
  1. #1
    Krazymoo's Avatar Corporal
    Reputation
    1
    Join Date
    Feb 2010
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua] Arena Fighting NPC

    It's just a script that teleports you to an arena, spawns a creature and allows you to fight it.
    It can be used for quests, for a different type of PvP system or whatever you think off.

    Will be scripting NPC's for the fights shortly if anyone likes it.

    I made this quickly, so their might be some errors and what not. Please report back with any errors you find and I'll do my best to fix them..

    You must edit :
    Local NPC ID
    X,Y,Z coords etc
    Creature Spawn Info
    RegisterUnitEvent NPC ID
    -----------------
    Download

    Arena Fighting LUA - Pastebin

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

    Code:
    --[[
    	Custom Arena Fighting
    	Teleports to a set area and spawns a custom mob to fight.
    ]]
    
    -- Variables
    local NPC_ID = 2555
    
    -- On Triggers
    function ArenaFightingGossipOnTalk(Unit, Event, player)
    	Unit:GossipCreateMenu(100, player, 0)
    	Unit:GossipMenuAddItem(0, "I want to fight NPC_NAME (Level 80)", 1, 0)
    	Unit:GossipMenuAddItem(0, "I'd like to fight NPC_NAME! (Level 85)", 2, 0)
    	Unit:GossipMenuAddItem(0, "I'd like to attempt NPC_NAME! (Level 90)", 3, 0)
    	Unit:GossipMenuAddItem(0, "Please can I try NPC_NAME! (Level 95)", 4, 0)
    	Unit:GossipMenuAddItem(0, "Mabey next time.", 500, 0)
    	Unit:GossipSendMenu(player)
    end
    
    function ArenaFightingGossipOnSelect(Unit, Event, player, id, intid, code, pMisc)
    		if (intid == 1) then
    			player:SendBroadcastMessage("Your being teleported to the ring, get ready to fight!")
    			player:Teleport(ZoneID, X, Y, Z)
    			Unit:SpawnCreature(NPC_ID, X, Y, Z, O, Faction, Duration)
    			player:GossipComplete()
    		end
    	end
    
    		if (intid == 2) then
    			player:SendBroadcastMessage("Your being teleported to the ring, get ready to fight!")
    			player:Teleport(ZoneID, X, Y, Z)
    			Unit:SpawnCreature(NPC_ID, X, Y, Z, O, Faction, Duration)
    			player:GossipComplete()
    		end
    	
    	
    		if (intid == 3) then
    			player:SendBroadcastMessage("Your being teleported to the ring, get ready to fight!")
    			player:Teleport(ZoneID, X, Y, Z)
    			Unit:SpawnCreature(NPC_ID, X, Y, Z, O, Faction, Duration)
    			player:GossipComplete()
    		end
    	
    	
    		if (intid == 4) then
    			Unit:GossipCreateMenu(100, player, 0)
    			Unit:GossipMenuAddItem(0, "Mabey next time.", 500, 0)
    			Unit:GossipSendMenu(player)
    		end
    	
    
    RegisterUnitGossipEvent(2555, 1, "ArenaFightingGossipOnTalk")
    RegisterUnitGossipEvent(2555, 2, "ArenaFightingGossipOnSelect")
    As you can probably tell, I'm new to LUA, so feedback and error reports would be appreciated.
    Last edited by Krazymoo; 03-13-2010 at 08:58 AM.

    [Lua] Arena Fighting NPC
  2. #2
    BloodgultchWoW's Avatar Corporal
    Reputation
    1
    Join Date
    Mar 2010
    Posts
    25
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice. I it possable to make it so groups can go threw at once? Like for a monster boss fight? Or possibly randomly spawn a random monster? Maybe have it so you and ur group teleport to the place, anD a random monster is there. Maybe make it instances off?

    Anyways, cool script, good idea. Maybe you should think about those updates, but overall good script! +rep

  3. #3
    Krazymoo's Avatar Corporal
    Reputation
    1
    Join Date
    Feb 2010
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can definetly try to get that working, would need to have a look first though.

    Thanks for the reply.

  4. #4
    Krazymoo's Avatar Corporal
    Reputation
    1
    Join Date
    Feb 2010
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Updated

    Fixed some errors, now working properly.

  5. #5
    shadowstyler's Avatar Private
    Reputation
    3
    Join Date
    Mar 2010
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    huh error sss

  6. #6
    Krazymoo's Avatar Corporal
    Reputation
    1
    Join Date
    Feb 2010
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Care to explain what errors, cant help with just "huh error sss"

Similar Threads

  1. LUA scripting Quest NPC
    By Dz The Rage in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 04-05-2009, 01:36 PM
  2. [LUA Release] Warp Npc (Noob friendly)
    By Lytle69 in forum WoW EMU General Releases
    Replies: 6
    Last Post: 10-03-2008, 06:06 PM
  3. [Lua Question] Flying npc
    By bill45 in forum World of Warcraft Emulator Servers
    Replies: 15
    Last Post: 06-03-2008, 06:35 PM
  4. What Someone Should Do For The Arena Fighting Community...
    By Jackalantern in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 04-13-2007, 07:10 PM
  5. What Someone Should Do For The Arena Fighting Community...
    By Jackalantern in forum World of Warcraft Exploits
    Replies: 1
    Last Post: 04-13-2007, 07:04 PM
All times are GMT -5. The time now is 07:14 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search