Likes: 0
Results 1 to 3 of 3
Thread: [LUA] Arena Fighting NPC
-
12-03-10, 11:31 AM #1
[LUA] Arena Fighting NPC
Register to remove this adIt'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")
› See More: [LUA] Arena Fighting NPCLast edited by Avidgamer; 13-03-10 at 10:51 AM.
-
13-03-10, 10:51 AM #2
Update
Fixed a few errors.
-
13-03-10, 11:22 AM #3
Register to remove this adThx for sharing mate, it seems good
Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread
Visitors found this page by searching for:
Nobody landed on this page from a search engine, yet!
SEO Blog