Hello & Welcome to our community. Is this your first visit? Register
Follow us on
Follow us on Facebook Follow us on Twitter Watch us on YouTube


MMOCoin

Likes Likes:  0
Results 1 to 3 of 3
  1. #1
    Banned

    Join Date
    Aug 2008
    Location
    Scotland
    Posts
    652
    Post Thanks / Like
    Rep Power
    0
    Reputation
    103

    [LUA] Arena Fighting NPC


    Register to remove this ad
    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 PvP 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'll need to edit a few bits, like the NPC ID, Teleport Coords etc.
    -----------------
    Download

    Arena Fighting LUA

    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")
    Please report errors in this thread.


    › See More: [LUA] Arena Fighting NPC
    Last edited by Avidgamer; 13-03-10 at 10:51 AM.



  2. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

  3. #2
    Banned

    Join Date
    Aug 2008
    Location
    Scotland
    Posts
    652
    Post Thanks / Like
    Rep Power
    0
    Reputation
    103
    Update

    Fixed a few errors.

  4. #3
    Sergeant
    Dr. Fallen's Avatar
    Join Date
    Mar 2010
    Location
    Turkey
    Posts
    74
    Post Thanks / Like
    Rep Power
    15
    Reputation
    64

    Register to remove this ad
    Thx for sharing mate, it seems good

 

 

Visitors found this page by searching for:

Nobody landed on this page from a search engine, yet!
SEO Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -5. The time now is 10:49 AM.
Powered by vBulletin® Copyright ©2000-2024, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org