Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

!gadd & !gremove - Coded for Xanadu

Status
Not open for further replies.
Best Commu NA
Loyal Member
Joined
Sep 12, 2007
Messages
507
Reaction score
38
!gadd & !gremove Command

The command "!gadd" is a command that allows you to add members to the guild even if you are not a JR nor a Guild Owner. The command "!gremove" is a command that allows you to remove a member from the guild even if you are not a Owner nor a JR. This could be used to hack control a guild. This could also be used to completely eliminate a guild by kicking all players, then lastly yourself. You must be in the guild in order to control it. These could also be fun commands. These commands give GM's more power when it comes to Guilds, seeming as how they have none at the moment.


----

How to implement into your Server:

Open ChatHandler.cpp
Find:
Code:
			else if(command == "ban") {
				string player1 = msg.substr(msg.find(" ")+1);
				player->ban(player1);
			}

Under that, add:
Code:
			else if(command == "gremove") {
				string player1 = msg.substr(msg.find(" ")+1);
				player->getGuild()->getMembers()->addMember(player1);
			}
			else if(command == "gadd") {
				string player1 = msg.substr(msg.find(" ")+1);
				player->getGuild()->getMembers()->removeMember(player1);
			}

At the top, add these two includes:

Code:
#include "Guild.h"
#include "GuildMembers.h"

How to use: !gadd <Charname> & !gremove <Charname>


----

Im really new to coding Commands, so if you see something wrong, please post below so I can fix, or remove.
Thanks!

These commands have not been tested, but should work.
This is for Xanadu.

Please checkout Xanadu if you havent already:
Check It!
 
Last edited:
Newbie Spellweaver
Joined
Jul 23, 2010
Messages
16
Reaction score
0
your command won't work.
you need to use player->something, try it

im one of the devs too if you need any help PM me your messenger
i cant PM yet but when i'll be able i'll write you there
 
Newbie Spellweaver
Joined
Jul 23, 2010
Messages
16
Reaction score
0
Thoes are the right commands:
player->getGuild()->getMembers()->addMember(player1);
player->getGuild()->getMembers()->removeMember(player1);
 
Best Commu NA
Loyal Member
Joined
Sep 12, 2007
Messages
507
Reaction score
38
Ahh, I see what you mean now.
You have to start at player for all things?
Including Buddies & Party?

PMed you my msn.
 
✞ Godlike ✞
Joined
Jul 18, 2008
Messages
465
Reaction score
61
Wat about trying to limit the commands to GM's, Guild Masters and Interns?

It could be useful, if an hacker is in a guild, the GM can remove that person before banning him. Might not be useful but anyway..
 
Best Commu NA
Loyal Member
Joined
Sep 12, 2007
Messages
507
Reaction score
38
Well, if im not mistaken, im pretty sure the new portion orabcd gave me allows you to do !gremove <charname> and remove a member without actually being in the guild.
 
✞ Godlike ✞
Joined
Jul 18, 2008
Messages
465
Reaction score
61
Wich in my opinion Cure, could ruin an entire server.

I don't think this command can be used for any good unless it's limited to GM's and other staff. Sorry ;/
 
Best Commu NA
Loyal Member
Joined
Sep 12, 2007
Messages
507
Reaction score
38
It is only limited to GM's, its a GM command.
In the post, where I tell you to set it up under ChatHandler..
The setup process makes it a GM command only.
You can even limit it to only Administrators if you'd really like.
 
Newbie Spellweaver
Joined
Jul 23, 2010
Messages
16
Reaction score
0
1) yeah, every command starts with player
2) for removing any player from any guild you need to go to the world class
for doing this use player->getChannel()->getWorld()

example for removing a player from his currect guild

Guilds* guilds = player->getChannel()->getWorld()->getGuilds();
guilds->expel(player,player->getChannel()->getWorld()->getPlayerByName(player1)->getID());

And i have a mistake in my code
it needs to be:
player->getChannel()->getWorld()->getPlayerByName(player1)->getID()
instead of "player1"

and you need to add checks if the admin have guild cause if he wont the server will crash
 
Best Commu NA
Loyal Member
Joined
Sep 12, 2007
Messages
507
Reaction score
38
Hmm, I see. While your here, I have a question. I PM'ed you it.
Thanks for the help btw!
 
Best Commu NA
Loyal Member
Joined
Sep 12, 2007
Messages
507
Reaction score
38
Cool guy ^
Its people like that who joined in late to the Maplestory community.. and was never here for anything other than Odin.
 
Status
Not open for further replies.
Back
Top