[Release] GM Event System menu

User Tag List

Page 1 of 3 123 LastLast
Results 1 to 15 of 39
  1. #1
    CoolManBob's Avatar Active Member
    Reputation
    92
    Join Date
    Jul 2006
    Posts
    208
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Release] GM Event System

    This is my first release on MMOwned, I have done many other things and released other stuff. But this is the first script im giving to the public

    This is a GM Event System, It works by have a OnChat hook that checks for certain messages

    The Commands Are:

    GM Commands
    Code:
    #start - It Initiates an Event, sends a WorldText, gets your position and writes it to the corresponding variables
    
    #end - Obviously ends the event, clears the variables
    
    #remind - Sends a World Text reminding players of an event
    
    #setpos - remaps the variables to your current position
    
    #setspec on - Turns spectating mode on
    
    #setspec off - turns off spectating mode
    Player Commands
    Code:
    #join - Teleports the player to the event coordinates the gm set when he started the event
    
    #leave - teleports the player to their respective mall
    
    #spec - teleports the player to the coordinates that the gm set to for spectating, the players will be rooted
    
    #stuck - This is a command for if a player gets stuck, it will revive them, and teleport them to Shattrath

    You have to set the Mall Coordinates!!!!



    Code:
    
    
    #include "StdAfx.h"
       #include "Setup.h"
       #include <string>
       #include <iostream>
    
       using namespace std;
       static string infoHelp, gmEventStart, gmEventEnd, gmRemind, gmSetPos, gmSpecOn, gmSpecOff, plrJoin, plrLeave, plrSpectate, plrStuck;
       float x,y,z,sx,sy,sz;
       uint32 mapid,smapid;
       bool EventStarted, CanSpectate;
    
    
       void EventOnChat(Player * pPlayer, uint32 Type, uint32 Lang, const char * Message, const char * Misc)
       {
    		
         	//GM Commands
    		gmEventStart = "#start";
          	gmEventEnd = "#end";
    		gmRemind = "#remind";
    		gmSetPos = "#setpos";
    		gmSpecOn = "#setspec on";
    		gmSpecOff = "#setspec off";
    		
    		//Player Commands
          	plrJoin = "#join";
          	plrLeave = "#leave";
    		plrSpectate = "#spec";
    		plrStuck = "#stuck";
    		
          if(pPlayer->GetSession()->HasGMPermissions() )
    		{
    			if(Message == gmEventStart)
    			{   
    				char Msg[255];
    				sprintf(Msg, "[Event System] %s has started an event! Type #join to join.", pPlayer->GetName());
    				sWorld.SendWorldText(Msg);
    				
    				EventStarted = true;
    				x = pPlayer->GetPositionX();
    				y = pPlayer->GetPositionY();
    				z = pPlayer->GetPositionZ();
    				mapid = pPlayer->GetMapId();
    			}
    			if(Message == gmEventEnd)
    			{
    				char Msg[255];
    				sprintf(Msg, "[Event System] %s has ended the event!", pPlayer->GetName());
    				sWorld.SendWorldText(Msg);
    				EventStarted = false;
    				x = 0.0;
    				y = 0.0;
    				z = 0.0;
    				mapid = 0;
    			}
    			if(Message == gmRemind)
    			{
    				sWorld.SendWorldText("[Event System] There is an event going! Type #join to join.");
    			}
    			if(Message == gmSetPos)
    			{
    				if(EventStarted)
    				{
    				char msg[255]
    				sprintf(msg, "[Event System] New Event Summon Position. Type #join to Join")
    				sWorld.SendWorldText(msg);
    				x = pPlayer->GetPositionX();
    				y = pPlayer->GetPositionY();
    				z = pPlayer->GetPositionZ();
    				mapid = pPlayer->GetMapId();
    				}
    				else
    				{
    					pPlayer->BroadcastMessage("[Event System] You cannot remap event coordinates when there is no event going on!");
    				}
    			}
    			if(Message == gmSpecOn)
    			{   
    				CanSpectate = true;
    				sWorld.SendWorldText("[Event System] Spectating has been enabled. Type #spec to watch.");
    				sx = pPlayer->GetPositionX();
    				sy = pPlayer->GetPositionY();
    				sz = pPlayer->GetPositionZ();
    				smapid = pPlayer->GetMapId();
    			}
    			if(Message == gmSpecOff)
    			{
    					
    				CanSpectate = false;
    				sWorld.SendWorldText("[Event System] Spectating has been Disabled.");
    				sx = 0.0;
    				sy = 0.0;
    				sz = 0.0;
    				smapid = 0;
    			}
    		} 
    		else 
    		{
    			if(Message == plrJoin && EventStarted)
    			{
    				pPlayer->BroadcastMessage("[Event System] Joining current event.");
    				pPlayer->EventTeleport(mapid, x, y, z);
    			}
    			else
    			{
    				pPlayer->BroadcastMessage("[Event System] No Event is currently going on, you must wait for a GM to start one!");
    			}
    			if(Message == plrLeave && EventStarted)
    			{
    				pPlayer->UnRoot();
    				
    				if(pPlayer->GetTeam() == 1)
    				{
    					pPlayer->BroadcastMessage("[Event System] Leaving event and teleporting to Horde Mall.");
    					pPlayer->EventTeleport(MAPID, X, Y, Z);
    				}
    				else
    				{
    					pPlayer->BroadcastMessage("[Event System] Leaving event and teleporting to Alliance Mall.");
    					pPlayer->EventTeleport(MAPID, X, Y, Z);
    				}
    			else
    			{
    				pPlayer->BroadcastMessage("[Event System] You cannot leave an event that is currently not underway!");
    			}
    			if(Message == plrSpectate && EventStarted)
    			{
    				if(CanSpectate)
    				{
    					pPlayer->EventTeleport(smapid, sx, sy, sz);
    					pPlayer->SetMovement(MOVE_ROOT,1);
    				} 
    				else 
    				{ // IF spectating is disabled then ...
    					pPlayer->BroadcastMessage("[Event System] Spectating has been disabled.");
    				}
    			}	
    		if(Message == plrStuck)
    		{
    			//let's revive them before we teleport them
    			pPlayer->ResurrectPlayer(NULL);
    			pPlayer->EventTeleport(530, -1835.797852, 5423.517578, -12.427971);
    			pPlayer->BroadcastMessage("[Stuck System] Initiated, Sending to Shattrath.");
    		}
    	  }
       }
       
       
    
       void SetupEventCmd(ScriptMgr * mgr)
       {
          EventStarted = false;
          CanSpectate = false;
          mgr->register_hook(SERVER_HOOK_EVENT_ON_CHAT, (bool *) EventOnChat);
       }
    in Setup.cpp add:
    Code:
    SetupEventCmd(mgr);
    in Setup.h add:
    Code:
    void SetupEventCmd(ScriptMgr * mgr);
    I'm aware that it can be improved, i'll improve it tomorrow maybe...or i might just leave it up to you all to improve it yourself...
    Last edited by CoolManBob; 02-05-2009 at 12:08 AM.

    [Release] GM Event System
  2. #2
    Vindicated's Avatar Contributor
    Reputation
    226
    Join Date
    Aug 2008
    Posts
    1,067
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    CoolManBob is ftw. +Rape


  3. #3
    alj03's Avatar Contributor
    Reputation
    91
    Join Date
    Feb 2008
    Posts
    1,103
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Madness indeed, +Rep.
    Death to all but Metal.

  4. #4
    Jonthe838's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2008
    Posts
    373
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    im not so very good at scripting so can some1 tell me how this work? thx
    Lines of Coding: |||||||||| Goal 1000
    Current: 677 Achived Goals: 500 Lines


  5. #5
    Alamos's Avatar Member
    Reputation
    5
    Join Date
    Jan 2009
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    didnt test it, but i assume:

    1. Plan an Event (Gnom Run from Ironforge to Stormwind)

    2. make the #setpos - for the spectactors like at the finish line in stormwind

    3. make #start

    #start - It Initiates an Event, sends a WorldText, gets your position and writes it to the corresponding variables

    #end - Obviously ends the event, clears the variables

    #remind - Sends a World Text reminding players of an event

    #setpos - remaps the variables to your current position

    #setspec on - Turns spectating mode on

    #setspec off - turns off spectating mode

    Players can join now this quest with some neat commands. i realy like the idea. so you dont have to spam the ress button or the worldports.

  6. #6
    svedin's Avatar Contributor
    Reputation
    124
    Join Date
    Jun 2008
    Posts
    557
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats a insane script ^^

    +Rep

  7. #7
    joestyle2's Avatar Member
    Reputation
    5
    Join Date
    Jan 2008
    Posts
    58
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wow nice +rep

  8. #8
    Clain's Avatar Banned
    Reputation
    179
    Join Date
    Jan 2008
    Posts
    1,396
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice script CMB, written cleanly aswell besides the tabbing :P. Don't have a test server up atm so I can't test it, +Rep though!

    @Jonthe838: Search around, there was a guide on how to compile scripts made recently.

  9. #9
    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)
    nice script this should help some of those novice GMs. Thanks!

  10. #10
    CoolManBob's Avatar Active Member
    Reputation
    92
    Join Date
    Jul 2006
    Posts
    208
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im thinking of writing up some sort of C++/Scripting guides, or doing like a one day course in ventrilo or MSN or something, So keep an eye out!

  11. #11
    Ziddy1337's Avatar Contributor
    Reputation
    136
    Join Date
    Aug 2008
    Posts
    486
    Thanks G/R
    4/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, very nice release mate!
    Have a cookie. A +Rep Cookie!

  12. #12
    Lilltimmy's Avatar Member
    Reputation
    20
    Join Date
    Jun 2007
    Posts
    275
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Doesn't work with ArcEmu for me..

  13. #13
    XxCyanidexX's Avatar Member
    Reputation
    56
    Join Date
    Nov 2008
    Posts
    138
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I get 7 errors when I compile, I edited it to my liking and narrowed it down to 1, which is error C2447: '{' : missing function header (old-style formal list?). Anyone know how I can fix this? +Rep to whoever tells me!

    Code:
       #include "StdAfx.h"
       #include "Setup.h"
       #include <string>
       #include <iostream>
       using namespace std;
    
       static string infoHelp, gmEventStart, gmEventEnd, gmRemind, gmSetPos, gmSpecOn, gmSpecOff, plrJoin, plrLeave, plrSpectate, plrStuck;
       float x,y,z,sx,sy,sz;
       uint32 mapid,smapid;
       bool EventStarted, CanSpectate;
    
    
       void EventOnChat(Player * pPlayer, uint32 Type, uint32 Lang, const char * Message, const char * Misc)
       {
    	   {
         	//GM Commands
    		gmEventStart = ".event start";
          	gmEventEnd = ".end";
    		gmRemind = ".event remind";
    		gmSetPos = ".event setpos";
    		gmSpecOn = ".event setspec on";
    		gmSpecOff = ".event setspec off";
    		gmEventStart = "!event start";
          	gmEventEnd = "!event end";
    		gmRemind = "!event remind";
    		gmSetPos = "!event setpos";
    		gmSpecOn = "!event setspec on";
    		gmSpecOff = "!event setspec off";
    		
    		//Player Commands
          	plrJoin = "!join";
          	plrLeave = "!leave";
    		plrSpectate = "!spec";
    		plrStuck = "!stuck";
    	   }
    	}  
        { 
    		{
    			if(Message == gmEventStart)
    			{   
    				char Msg[255];
    				sprintf(Msg, "An event has been started by %s! Type !join to join!", pPlayer->GetName());
    				sWorld.SendWorldText(Msg);
    				
    				EventStarted = true;
    				x = pPlayer->GetPositionX();
    				y = pPlayer->GetPositionY();
    				z = pPlayer->GetPositionZ();
    				mapid = pPlayer->GetMapId();
    			}
    			if(Message == gmEventEnd)
    			{
    				char Msg[255];
    				sprintf(Msg, "%s has ended the event!", pPlayer->GetName());
    				sWorld.SendWorldText(Msg);
    				EventStarted = false;
    				x = 0.0;
    				y = 0.0;
    				z = 0.0;
    				mapid = 0;
    			}
    			if(Message == gmRemind)
    			{
    				sWorld.SendWorldText("There is an event going on! Type !join to join.");
    			}
    			if(Message == gmSetPos)
    			{
    				if(EventStarted)
    				{
    				char msg[255]
    				sprintf(msg, "New Event Summon Position. Type !join to join!")
    				sWorld.SendWorldText(msg);
    				x = pPlayer->GetPositionX();
    				y = pPlayer->GetPositionY();
    				z = pPlayer->GetPositionZ();
    				mapid = pPlayer->GetMapId();
    				}
    				else
    				{
    					pPlayer->BroadcastMessage("You cannot remap event coordinates when there is no event going on!");
    				}
    			}
    			if(Message == gmSpecOn)
    			{   
    				CanSpectate = true;
    				sWorld.SendWorldText("Spectating has been enabled. Type !spec to watch.");
    				sx = pPlayer->GetPositionX();
    				sy = pPlayer->GetPositionY();
    				sz = pPlayer->GetPositionZ();
    				smapid = pPlayer->GetMapId();
    			}
    			if(Message == gmSpecOff)
    			{
    					
    				CanSpectate = false;
    				sWorld.SendWorldText("Spectating has been disabled.");
    				sx = 0.0;
    				sy = 0.0;
    				sz = 0.0;
    				smapid = 0;
    			} 
    
    			else
    		
    			if(Message == plrJoin && EventStarted)
    			{
    				pPlayer->BroadcastMessage("Joining current event.");
    				pPlayer->EventTeleport(mapid, x, y, z);
    			}
    			else
    			{
    				pPlayer->BroadcastMessage("No Event is currently going on, you must wait for a GM to start one!");
    			}
    			if(Message == plrLeave && EventStarted)
    			{
    				pPlayer->UnRoot();
    				
    				if(pPlayer->GetTeam() == 1)
    				{
    					pPlayer->BroadcastMessage("You have left the event.  You will be teleported to Shattrath.");
    					pPlayer->EventTeleport(530, -1835.797852, 5423.517578, -12.427971);
    				}
    				else
    				{
    					pPlayer->BroadcastMessage("You have left the event.  You will be teleported to Shattrath.");
    					pPlayer->EventTeleport(530, -1835.797852, 5423.517578, -12.427971);
    				}
    			else
    			{
    				pPlayer->BroadcastMessage("You cannot leave an event that is currently not underway!");
    			}
    			if(Message == plrSpectate && EventStarted)
    			{
    				if(CanSpectate)
    				{
    					pPlayer->EventTeleport(smapid, sx, sy, sz);
    					pPlayer->SetMovement(MOVE_ROOT,1);
    				} 
    				else 
    				{ // IF spectating is disabled then ...
    					pPlayer->BroadcastMessage("Spectating is disabled.");
    				}
    			}	
    		if(Message == plrStuck)
    		{
    			//let's revive them before we teleport them
    			pPlayer->ResurrectPlayer(NULL);
    			pPlayer->EventTeleport(530, -1835.797852, 5423.517578, -12.427971);
    			pPlayer->BroadcastMessage("You have been sent to Shattrath.");
    		}
    	  }
       }
       
       
    
       void SetupEventCmd(ScriptMgr * mgr)
       {
          EventStarted = false;
          CanSpectate = false;
          mgr->register_hook(SERVER_HOOK_EVENT_ON_CHAT, (bool *) EventOnChat);
       }
    }

  14. #14
    Illegalpie's Avatar Member
    Reputation
    11
    Join Date
    Jul 2008
    Posts
    240
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How do i do this? Not sure?
    Offering Powerleveling 1$perlevel Aim me Zackattack7230

  15. #15
    ZestyJ's Avatar Contributor
    Reputation
    86
    Join Date
    Mar 2008
    Posts
    169
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats insanely awesome thats pretty sweet. +Rep
    -Zesty
    Formerly Known as Wickedshadow/KingMitch

Page 1 of 3 123 LastLast

Similar Threads

  1. [Release] A event
    By RyeRye in forum WoW EMU General Releases
    Replies: 21
    Last Post: 12-20-2008, 08:16 AM
  2. [Release] Gawain Druid System (shield)
    By [Soul Eater] in forum World of Warcraft Model Editing
    Replies: 10
    Last Post: 10-29-2008, 08:00 PM
  3. [Release/Share] Events (Halloween, Xmas, Darkmoon Faire, Brewfest)
    By Lilltimmy in forum WoW EMU General Releases
    Replies: 11
    Last Post: 09-06-2008, 06:20 PM
  4. [RELEASE] <GM> Ticket System for MMOwned
    By ~SaiLyn~ in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 01-08-2008, 03:11 PM
All times are GMT -5. The time now is 02:06 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