30 using System.Threading;
32 using OpenSim.Framework;
33 using pCampBot.Interfaces;
45 private string[] talkarray;
51 talkarray = readexcuses();
56 int walkorrun = Bot.Random.Next(4);
58 Bot.Client.Self.Jump(
false);
61 Bot.Client.Self.Movement.AlwaysRun =
true;
65 Bot.Client.Self.Movement.AlwaysRun =
false;
69 Vector3 newpos =
new Vector3(
Bot.
Random.Next(1, 254), Bot.Random.Next(1, 254),
Bot.
Random.Next(1, 254));
70 Bot.Client.Self.Movement.TurnToward(newpos);
72 Bot.Client.Self.Movement.AtPos =
true;
73 Thread.Sleep(Bot.Random.Next(3000, 13000));
74 Bot.Client.Self.Movement.AtPos =
false;
75 Bot.Client.Self.Jump(
true);
76 string randomf = talkarray[Bot.Random.Next(talkarray.Length)];
77 if (talkarray.Length > 1 && randomf.Length > 1)
78 Bot.Client.Self.Chat(randomf, 0, ChatType.Normal);
84 Bot.Client.Self.Jump(
false);
89 private string[] readexcuses()
91 string allexcuses =
"";
93 string file = Path.Combine(Util.configDir(),
"pCampBotSentences.txt");
94 if (
File.Exists(file))
96 StreamReader csr = File.OpenText(file);
97 allexcuses = csr.ReadToEnd();
101 return allexcuses.Split(Environment.NewLine.ToCharArray());
Random Random
Random number generator.
override void Action()
Action to take when this behaviour is invoked.
Stress physics by moving and bouncing around bots a whole lot.
override void Close()
Close down this behaviour.
string AbbreviatedName
Abbreviated name of this behaviour.
ConnectionState ConnectionState
Is this bot connected to the grid?