how would I go about !setnextmap? [message #468636] |
Fri, 08 June 2012 09:28 |
|
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
|
|
I would like to add a Command !setnextmap.
So server owners can manually set the next map if they don't have a bot hooked up with it.
Mainly for testing servers.
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
|
|
|
Re: how would I go about !setnextmap? [message #468651 is a reply to message #468636] |
Fri, 08 June 2012 11:29 |
BillieJoe67
Messages: 35 Registered: March 2012
Karma: 0
|
Recruit |
|
|
If you know the current map id, you can use mlistc <nextmap id> <map name>
If you still want to make a console command for it, adapt Iran's AzazelBot setnextmap command, specifically:
int NextID = Get_Current_Map_Index() + 1;
const char *temp = Get_Map(NextID);
if( temp == NULL)
{
NextID = 0;
}
for(int i = 0;; i++)
{
const char *x = Get_Map(i);
if( x != NULL)
{
if (stristr(x, Msg[2]))
{
if (Set_Map(x, NextID))
{
IRC::Send("PRIVMSG %s :The next map was set to %s.\n", Channel, x);
}
else
{
IRC::Send("PRIVMSG %s :Unknown error trying to set map to %s.\n", Channel, x);
}
return;
}
}
else
{
break;
}
}
You'll need to change the IRC::Send calls to Console_Output, and put it into a command class obviously, but it should work
|
|
|