Jump to content
  • 0
Sign in to follow this  
mrlongshen

Admin custom broadcast.

Question

Index: conf/atcommand_athena.conf===================================================================--- conf/atcommand_athena.conf	(revision 17137)+++ conf/atcommand_athena.conf	(working copy)@@ -56,6 +56,7 @@ 	guildstorage: ["gstorage"] 	accinfo: ["accountinfo"] 	itemreset: ["clearinventory"]+	sann: ["staff","astaff"] }  /* Commands help file */Index: conf/groups.conf===================================================================--- conf/groups.conf	(revision 17137)+++ conf/groups.conf	(working copy)@@ -130,6 +130,7 @@ 		request: true 		go: true 		breakguild: true+		sann: true 	} 	permissions: { 	}@@ -152,6 +153,7 @@ 		users: true 		broadcast: true 		localbroadcast: true+		sann: true 	} 	log_commands: true 	permissions: {@@ -172,6 +174,7 @@ 		unloadnpc: true 		npcmove: true 		addwarp: true+		sann: true 	} 	log_commands: true 	permissions: {@@ -210,6 +213,7 @@ 		marry: true 		divorce: true 		refreshall: true+		sann: true 	} 	log_commands: true 	permissions: {@@ -242,6 +246,7 @@ 		cartlist: true 		itemlist: true 		stats: true+		sann: true 	} 	log_commands: true 	permissions: {Index: src/map/atcommand.c===================================================================--- src/map/atcommand.c	(revision 17137)+++ src/map/atcommand.c	(working copy)@@ -1107,6 +1107,47 @@ }  /*==========================================+ * @sann by Donatien - Lain Ragnarok Online+ * Custom Staff Announce Command for rAthena+ * Rev. 17134+ *------------------------------------------*/+ACMD_FUNC(sann)+{+	nullpo_retr(-1, sd);+	memset(atcmd_output, '0', sizeof(atcmd_output));++	if(!message || !*message) {+			clif_displaymessage(fd, "Please, enter a message (usage: @sann <message>).");+			return -1;+		}+                if(pc_get_group_level(sd) == 1){+		sprintf(atcmd_output, "[Super User] %s : %s", sd->status.name, message);+		intif_broadcast2(atcmd_output, strlen(atcmd_output) + 1, 0xFF9900, 0x190, 12, 0, 0);+                }+                if(pc_get_group_level(sd) == 2){+		sprintf(atcmd_output, "[Super User] %s : %s", sd->status.name, message);+		intif_broadcast2(atcmd_output, strlen(atcmd_output) + 1, 0xFF9900, 0x190, 12, 0, 0);+                }+                if(pc_get_group_level(sd) == 3){+                sprintf(atcmd_output, "[GM] %s : %s", sd->status.name, message);+		intif_broadcast2(atcmd_output, strlen(atcmd_output) + 1,0x01DF01, 0x190, 12, 0, 0);+                }+                if(pc_get_group_level(sd) == 4){+                sprintf(atcmd_output, "[GM] %s : %s", sd->status.name, message);+		intif_broadcast2(atcmd_output, strlen(atcmd_output) + 1,0x01DF01, 0x190, 12, 0, 0);+                }+                if(pc_get_group_level(sd) == 10){+                sprintf(atcmd_output, "[GM] %s : %s", sd->status.name, message);+		intif_broadcast2(atcmd_output, strlen(atcmd_output) + 1,0x01DF01, 0x190, 12, 0, 0);+                }+               else if(pc_get_group_level(sd) == 99){+                 sprintf(atcmd_output, "[Admin] %s : %s", sd->status.name, message);+		intif_broadcast2(atcmd_output, strlen(atcmd_output) + 1,0x99CCFF, 0x190, 12, 0, 0);+               }+	return 0;+}++/*==========================================  *  *------------------------------------------*/ ACMD_FUNC(heal)@@ -9099,7 +9140,8 @@ 		ACMD_DEF2("rmvperm", addperm), 		ACMD_DEF(unloadnpcfile), 		ACMD_DEF(cart),-		ACMD_DEF(mount2)+		ACMD_DEF(mount2),+		ACMD_DEF(sann) 	}; 	AtCommandInfo* atcommand; 	int i;

 

Can someone porting it to hercules ?

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.