Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Pages: 1
Topic closed
Since many people requested another protocol change log. Here it is:
https://gist.github.com/Yonom/cafc8edd9c14a72d0774
This time, I let you post replies to discuss things, but if you are having issues or you have questions, please create a separate topic. I won't be answering "What does variable X do?" questions here.
Regards,
Processor
I have never thought of programming for reputation and honor. What I have in my heart must come out. That is the reason why I code.
Offline
Thanks processor for this update.
Offline
Can understand it's more logical to put new m-index-items in a specific order, yet it might make it a bit easier for bot makers to update their bots if new m-items would be appended at the end of the list.
For the rest it's a great update!
Keep up the good work.
Offline
Can understand it's more logical to put new m-index-items in a specific order, yet it might make it a bit easier for bot makers to update their bots if new m-items would be appended at the end of the list.
For the rest it's a great update!
Keep up the good work.
While it is perfectly possible, the data would become more and more unorganised as the game becomes updated this way. In the long run, programmers would lose more time searching for the data than they lose now by fixing some bits of code.
Offline
wait... so con.Send("init2"); is broken? replaced with "info2"?
Offline
wait... so con.Send("init2"); is broken? replaced with "info2"?
Are you sure you can see between send and messages?
Offline
ninjasupeatsninja wrote:wait... so con.Send("init2"); is broken? replaced with "info2"?
Are you sure you can see between send and messages?
I'm not going to act like a genius, so here's my code.
#region Init
case "init":
MyName = m[12].ToString();
if (m.GetString(0) != MyName)
{
Disconnecting = true;
con.Disconnect();
MessageBox.Show("Sorry, please be owner to connect to world. The reason for this is spam issues", "NinjaBot");
}
WorldName = m.GetString(1);
rot13 = Derot(m.GetString(5));
Admins.Add(m[12].ToString());
con.Send("init2");
break;
#endregion
I believe it's mostly my inexperience, since each player's name is 'nil', and by default when i case "add" a player, i set a blank player before i write in the current playear's data. example:
thingy i;
i.name = "nil";
i.id = 0;
i.name = m.getstring(1);
i.id = m.getint(0);
e.t.c
Player e;
e.name = m.GetString(1);
e.id = m.GetInt(0);
e.gold = 0;
e.gbp = false;
e.x = 0;
e.y = 0;
e.respawnx = 1;
e.respawny = 1;
e.gCommandsDo = new List<string>();
List<Player> tmplist = Players;
foreach (Player i in Players)
{
if (i.name == e.name)
{
tmplist.Remove(i);
}
}
Players = tmplist;
Players.Add(e);
if (wmsg.Checked)
{
string add213 = "";
if (pmwelcome.Checked)
{
add213 = "/pm " + gPlayer(m.GetInt(0)).name + " ";
}
BotSay(add213 + joinmsg.Text + " " + gPlayer(m.GetInt(0)).name + welcomeend.Text);
}
if (ejoin.Checked || EditPeople.Items.Contains(m.GetString(1).ToLower()))
{
con.Send("say", "/giveedit " + gPlayer(m.GetInt(0)).name);
}
if (Wooters.Contains(m.GetString(1)))
{
con.Send("say", "/giveedit " + m.GetString(1));
}
if ((nobomb.Checked && (m.GetString(1).ToLower().StartsWith("ninjabomb") || m.GetString(1).ToLower().StartsWith("ninjabot7"))) || (nobomb.Checked && m.GetString(1).ToLower().StartsWith("onbombbot")))
{
con.Send("say", "/kick " + m.GetString(1) + " No Ninjabot-Bombs allowed!");
}
if (!gjoin.Checked && m.GetString(1).ToLower().StartsWith("guest"))
{
con.Send("say", "/kick " + m.GetString(1) + " No Guests Allowed! Please Login!");
}
try
{
Ban findBn = findBan(m.GetString(1));
if (m.GetString(1) == findBn.who)
{
con.Send("say", "/kick " + m.GetString(1) + " NinjaBot Ban: " + findBn.reason);
}
}
catch { }
try
{
AllPlayers.Items.Add(m.GetString(1));
}
catch { }
try
{
Online.Add(m.GetString(1));
}
catch { }
break;
#endregion
"oh how i tried to catch my errors"
Offline
You don't need to add a "try catch" to catch errors...
And btw. Save on userid instead of username. You know people can change names now.
Offline
You don't need to add a "try catch" to catch errors...
And btw. Save on userid instead of username. You know people can change names now.
And you realize user id is dependant on when the player joined the world, right?
shh i have returned
Offline
User id not user id, err i meen theres 2 id's one is session specific and the other is not.
both get send in init intitally, you just have to pick the right one
Offline
Offline
lol
( ͡° ͜ʖ ͡°)
( ͡° ͜ʖ ͡°)
Offline
Pages: 1
Topic closed
[ Started around 1732372929.0057 - Generated in 0.074 seconds, 12 queries executed - Memory usage: 1.54 MiB (Peak: 1.72 MiB) ]