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
Ok. so when i try to have a bot pm
con.Send("say", "/pm " + username + "Commands: !register, !stats, !help ");
it does nothing.
sometimes when in other places a con.Send("say", "/pm " + username + "what ever i want"); works
if (m.Type == "say")
{
if (users.ContainsKey(m.GetInt(0)))
{
string msg = m.GetString(1);
string username = users[m.GetInt(0)];
string[] split = msg.Split(' ');
string command = "";
string[] poss = new string[] { ".", "!", "%", "@", "#", "$" };
if (poss.Contains(split[0].Substring(0, 1)))
{
split[0] = split[0].Remove(0, 1);
msg = msg.Remove(0, 1);
command = split[0];
}
if (string.Compare(command, "stats") == 0)
{
if (username_textBox1.Text == username) //start of stats tree
{
con.Send("say", "/pm " + username + " Stats:" + " Class:" + class_textBox1.Text + " HP:" + health_textBox1.Text + " MP:" + magic_textBox1.Text + " att:" + attack_textBox1.Text + " def:" + defence_textBox1.Text);
}
both of these lines of code are basically the same. the only differences being
if (string.Compare(command, "stats") == 0)
con.Send("say", "/pm " + username + " Stats:" + " Class:" + class_textBox1.Text + " HP:" + health_textBox1.Text + " MP:" + magic_textBox1.Text + " att:" + attack_textBox1.Text + " def:" + defence_textBox1.Text);
and the fack that the code shown above goes on for quite some time with
If()
{
}
else
the last problem is that you can not have two con.Sends in a row
con.Send("say", "/pm " + username + " Welcome to the rpg. If you die you must re-register");
con.Send("say", "/pm " + username + " say !help for help");
it would say the first one but never the second.
what can i do about all this?
color = #1E1E1E
Offline
con.Send("say", "/pm " + username + "Commands: !register, !stats, !help ");
You forgot a space, "Commands into " Commands
con.Send("say", "/pm " + username + " Welcome to the rpg. If you die you must re-register");
con.Send("say", "/pm " + username + " say !help for help");
Should be re-did to:
con.Send("say", "/pm " + username + " Welcome to the rpg. If you die you must re-register");
System.Threading.Thread.Sleep(100);
con.Send("say", "/pm " + username + " say !help for help");
Or, you can do using System.Threading; at the beginning and just do
Thread.Sleep(100);
Offline
con.Send("say", "/pm " + username + " Welcome to the rpg. If you die you must re-register"); System.Threading.Thread.Sleep(100); con.Send("say", "/pm " + username + " say !help for help");
Or, you can do using System.Threading; at the beginning and just do
Thread.Sleep(100);
did not work.
also, where do you mean exactly by beginning?
EDIT: i got it.
Thread.Sleep(100);
(100) was not enough time
color = #1E1E1E
Offline
did not work.
also, where do you mean exactly by beginning?
EDIT: i got it.
Thread.Sleep(100);
(100) was not enough time
Then change delay. Try 750.
Offline
shadowda wrote:did not work.
also, where do you mean exactly by beginning?
EDIT: i got it.
Thread.Sleep(100);
(100) was not enough time
Then change delay. Try 750.
the minimum i need for it to work seems to be 550
color = #1E1E1E
Offline
Pages: 1
[ Started around 1732456351.3578 - Generated in 0.045 seconds, 12 queries executed - Memory usage: 1.46 MiB (Peak: 1.6 MiB) ]