
Originally Posted by
Glee
Oh btw the bots don't work 100%
I'm trying to make my bot sit in certain range. but it doesn't work :( he is still freeroam
ow here you go :) i fixed it in 40 seconds xDDD " edit: forgot something woops (this fix is working)
in genericbot.cs line 154
Code:
case "specified_range":
{
int x = SilverwaveEnvironment.GetRandomNumber(base.GetBotData().minX, base.GetBotData().maxX);
int y = SilverwaveEnvironment.GetRandomNumber(base.GetBotData().minY, base.GetBotData().maxY);
base.GetRoomUser().MoveTo(x,y);
break;
}
woops its late by me remove the stand fix if you added it!! :$(edit)
ps if you have issues with dices and you dont know how to fix :P
Then change
Code:
internal static int GetRandomNumber(int Min, int Max)
{
return RandomNumber.GenerateNewRandom(Min, Max);
}
to (this methode is slower because it can only handle 1 at a time but it doesnt retun the same result because it is locked)
Code:
internal static int GetRandomNumber(int Min, int Max)
{
return RandomNumber.GenerateLockedRandom(Min, Max);
}
or
you can change it to(i saw this methode on stackoverflow
Code:
internal static int GetRandomNumber(int Min, int Max)
{
System.Security.Cryptography.RNGCryptoServiceProvider provider = new System.Security.Cryptography.RNGCryptoServiceProvider();
byte[] data = new byte[4];
provider.GetBytes(data);
return new Random(BitConverter.ToInt32(data, 0)).Next(Min, Max + 1);
}
Edit again ---------------------------
a new simple fix because i saw some theards about it in the help section
the shout bug with wordfilter and wired etc. (automatic alert also... etc xD)
change in shoutevent.cs line 83
Code:
User.OnChat(Colour, Message, true);
to
Code:
User.Chat(Session, Message, true, 1, Colour);
pssht maybe a like or reputation because i need motivation to post fixes :)
@ the post under me its a packed but dont know the wich one at the moment because HabboNL is offline :P