PDA

View Full Version : TBKAntiBan(Talk, Respond : Boolean); [!ELITE!]



turbobk
01-29-2008, 02:05 PM
TBKAntiBan : Betav1


Beta v1 Released!


Last Updated:

January 30th, 2008.

Please Rep++ me if you like. :)


OVER 900 lines of Elite AntiBan.



The procedure includes:

1. Elite Anti-Ban.

2. Random Talking.

3. Automatic Responding.

--------------------------


Use:

TBKAntiBan(Talk, Respond : Boolean);
{Set Talk to 'True' to randomly talk sometimes.}
{Set Respond to 'True' to use the Automatic Responder.}


Well this is one of my very 1st procedures.
RUNS Perfect!



Please leave FEEDBACK!

Hope you like it.

TurboBk. :)

Negaal
01-29-2008, 03:16 PM
Well, glad, you did something, but about talking and compass turning...


You are responing to yourself, add something like:
if......................................then
then in not FindBlackChatMessage(Player[currentplayer].nick) then
begin
...


Well, some scripts are made to work in specific angle...So before you could do something like that

Deg := Rs_GetCompassAngleDegrees


And end of antiban:

For i := 0 to 3 do
Case i of
1 := if InRange(Round(Deg), 315, 45) then
if not InRange(Rs_GetCompassAngleDegrees, 315, 45) then
MakeCompass('N');
2 : ...
and so on...



GJ though:D

turbobk
01-29-2008, 07:57 PM
Ok Negaal, Thanks alot for the advice.

I've fixed up the Responder.

But I don't quite understand the:

Deg := Rs_GetCompassAngleDegrees


For i := 0 to 3 do
Case i of
1 := if InRange(Round(Deg), 315, 45) then
if not InRange(Rs_GetCompassAngleDegrees, 315, 45) then
MakeCompass('N');
2 : ...
and so on...

Can you please give me a little more help on it, or point me in the direction of a tutorial or something.

Thanks again. :)

MylesMadness
01-29-2008, 08:17 PM
He talking about using the Deg := Rs_GetCompassAngleDegrees to detect where the compass was when it started then have a function move it back likeMakeCompass(FloatToStr(Deg))

turbobk
01-29-2008, 09:04 PM
Hmmm. I think I know what you mean, but I can't find any tutorials about it. :(

I learn best from doing things myself, but I love the help.

I couldnt find any tutorials about it so I tryed something myself.
I don't know if it'll work lol but from what you guys are saying it sounds
like this Procedure that I made just before.

procedure CompassPos;
begin
Deg := Rs_GetCompassAngleDegrees
begin
for i := 0 to 3 do
case i of
0 : if (not(InRange(Rs_GetCompassAngleDegrees, 315, 45))) then
MakeCompass('N');
1 : if (not(InRange(Rs_GetCompassAngleDegrees, 45, 135))) then
MakeCompass('E');
2 : if (not(InRange(Rs_GetCompassAngleDegrees, 135, 225))) then
MakeCompass('S');
3 : if (not(InRange(Rs_GetCompassAngleDegrees, 225, 315))) then
MakeCompass('W');
end;
MakeCompass(FloatToStr(Deg));
end;
end;

MylesMadness
01-29-2008, 09:40 PM
Yep thats right. You have to define Deg somewhere as a extended.

turbobk
01-29-2008, 09:44 PM
Yep thats right. You have to define Deg somewhere as a extended.

Omg your joking right?

I didn't even know what I was doing...
Was just playing around lol.

Well this is my second week of scripting and I think I'm going alright lol.

As for the:
procedure CompassPos;
begin
Deg := (rs_GetCompassAngleDegrees);
begin
for i := 0 to 3 do
case i of
0 : if (not(InRange(rs_GetCompassAngleDegrees, 315, 45))) then <-- This line has ERROR! :o
MakeCompass('N');
1 : if (not(InRange(rs_GetCompassAngleDegrees, 45, 135))) then
MakeCompass('E');
2 : if (not(InRange(rs_GetCompassAngleDegrees, 135, 225))) then
MakeCompass('S');
3 : if (not(InRange(rs_GetCompassAngleDegrees, 225, 315))) then
MakeCompass('W');
end;
MakeCompass(FloatToStr(Deg));
end;
end;

ERROR IS:
Line 383: [Error] (12650:59): Type mismatch in script C:\*******\SCAR 3.14\Scripts\TBKAntiBan.scar

MylesMadness
01-29-2008, 09:56 PM
Thats the make compass line isn't it...
Edit: Dur on my part. didn't read
EditEdit:It because rs_GetCompassAngleDegrees returns a Extended and the function needs a integer.
EditEditEdit:Fixed:procedure CompassPos;
begin
Deg := rs_GetCompassAngleDegrees;
begin
for i := 0 to 3 do
case i of
0 : if not(InRange(round(rs_GetCompassAngleDegrees), 315, 45)) then
MakeCompass('N');
1 : if not(InRange(round(rs_GetCompassAngleDegrees), 45, 135)) then
MakeCompass('E');
2 : if not(InRange(round(rs_GetCompassAngleDegrees), 135, 225)) then
MakeCompass('S');
3 : if not(InRange(round(rs_GetCompassAngleDegrees), 225, 315)) then
MakeCompass('W');
end;
MakeCompass(FloatToStr(Deg));
end;
end;

Negaal
01-29-2008, 09:57 PM
MakeCompass(FloatToStr(Deg));

Remove this


Deg := (rs_GetCompassAngleDegrees);

and cut this to beginning of antiban

turbobk
01-29-2008, 10:06 PM
Ok done all that, but still doesn't solve the problem.. Hmm.

This is the error line.
0 : if (not(InRange(rs_GetCompassAngleDegrees, 315, 45))) then
Line 27: [Error] (12294:59): Type mismatch in script

MylesMadness
01-29-2008, 10:12 PM
I posted your fix up above Negaal

turbobk
01-29-2008, 10:20 PM
Woot fixed!

Thanks ALOT 'Mylesmadness' and 'negaal'.


I won't ever forget how kind you guys are for helping. :)

turbobk
01-29-2008, 10:23 PM
I'm going to add MORE lines to the 'Random Talking' and fix up the 'Automatic Responder' a bit more.

When it's done I'll post.

Please give it a run a tell me what you think.

P1nky
01-30-2008, 03:50 AM
you removed the script why???? aww i wanted to seeeeeeeee

turbobk
01-30-2008, 04:11 AM
Lol sorry P1nky.

I basically re-wrote the whole thing.


TBKAntiBan Beta v1 - Released.

vcvv
01-30-2008, 06:11 AM
Where is it released?
Also, what do we use this in?
Do we put it in any script?

Negaal
01-30-2008, 06:24 AM
I posted your fix up above Negaal

MakeCompass(FloatToStr(Deg));
Lol?
Basically it's like that:
For example...
MakeCompass(94.5676);

Input needs to be string not extended

and what's the point getting Deg right before compass fixing?

Uh, I t said to turbobk wrong...
It will basically change compass to all angles... E, S, W...

I don't know what I done...:duh:


Edit:
This may work:

I posted your fix up above Negaal

MakeCompass(FloatToStr(Deg));
Lol?
Basically it's like that:
For example...
MakeCompass(94.5676);

Input needs to be string not extended

and what's the point getting Deg right before compass fixing?

Uh, I t said to turbobk wrong...
It will basically change compass to all angles... E, S, W...

I don't know what I done...:duh:

I have no idea how to figure out facing when you're N.

Edit:
This at beginning

Deg := Round(rs_getcompassangledegrees);
if (deg > 315 and deg =< 0) or (deg >= 0 and deg < 45) then Facing := 'N';
if deg > 45 and deg < 135 then Facing := 'E';
if deg > 135 and deg < 225 then Facing := 'S';
if deg > 225 and deg < 315then Facing := 'W';


And this after antiban:

case facing of
'N' : if not InRange(Round(rs_getcompassangledegrees), 315, 360) and
not InRange(Round(rs_getcompassangledegrees), 0, 45) then MakeCompass(Facing);
'E' : if not InRange(Round(rs_getcompassangledegrees), 405, 495) then MakeCompass(Facing);
'S' : if not InRange(Round(rs_getcompassangledegrees), 495, 585) then MakeCompass(Facing);
'W' : if not InRange(Round(rs_getcompassangledegrees), 585, 675) then MakeCompass(Facing);
end;




It should work... but I'm not sure...

mixster
01-30-2008, 07:10 AM
Lol, Negaal, serious overkill there. The problem was that he was getting rs_getcompassangledegrees when he needed an integer, so myles added a round and that fixed it.
Also, he called the 'deg:=rs_getcompassangledegrees' at the beginning then changed it back at the end ;) the other places he uses it to see at what position he's at and if he's not facing the same way, it turns to a face a random direction tehn turns back to the starting facing position.
Only thing I could say, would be to add a random 5 degrees or so to make it less detectable (as, if every now and then, you turn some other way, then turn back to exact same position, it could be a bit noticable). As long it is little enough to not affect scripts that rely on positioning.

Negaal
01-30-2008, 07:15 AM
How can
MakeCompass(94.5676);work?

and yeah, way too much thinking here...I think totally wrong, so Im out...

turbobk
01-30-2008, 07:18 AM
MakeCompass(FloatToStr(Deg));
Lol?
Basically it's like that:
For example...
MakeCompass(94.5676);

Input needs to be string not extended

and what's the point getting Deg right before compass fixing?

Uh, I t said to turbobk wrong...
It will basically change compass to all angles... E, S, W...

I don't know what I done...:duh:


Edit:
This may work:


MakeCompass(FloatToStr(Deg));
Lol?
Basically it's like that:
For example...
MakeCompass(94.5676);

Input needs to be string not extended

and what's the point getting Deg right before compass fixing?

Uh, I t said to turbobk wrong...
It will basically change compass to all angles... E, S, W...

I don't know what I done...:duh:

I have no idea how to figure out facing when you're N.

Edit:
This at beginning

Deg := Round(rs_getcompassangledegrees);
if (deg > 315 and deg =< 0) or (deg >= 0 and deg < 45) then Facing := 'N';
if deg > 45 and deg < 135 then Facing := 'E';
if deg > 135 and deg < 225 then Facing := 'S';
if deg > 225 and deg < 315then Facing := 'W';


And this after antiban:

case facing of
'N' : if not InRange(Round(rs_getcompassangledegrees), 315, 360) and
not InRange(Round(rs_getcompassangledegrees), 0, 45) then MakeCompass(Facing);
'E' : if not InRange(Round(rs_getcompassangledegrees), 405, 495) then MakeCompass(Facing);
'S' : if not InRange(Round(rs_getcompassangledegrees), 495, 585) then MakeCompass(Facing);
'W' : if not InRange(Round(rs_getcompassangledegrees), 585, 675) then MakeCompass(Facing);
end;




It should work... but I'm not sure...



procedure CompassPos;
begin
Deg := Round(rs_getcompassangledegrees);
if (deg > 315 and deg =< 0) or (deg >= 0 and deg < 45) then Facing := 'N'; <--- Line 403
if deg > 45 and deg < 135 then Facing := 'E';
if deg > 135 and deg < 225 then Facing := 'S';
if deg > 225 and deg < 315 then Facing := 'W';
case facing of
'N' : if not InRange(Round(rs_getcompassangledegrees), 315, 360) and
not InRange(Round(rs_getcompassangledegrees), 0, 45) then MakeCompass(Facing);
'E' : if not InRange(Round(rs_getcompassangledegrees), 405, 495) then MakeCompass(Facing);
'S' : if not InRange(Round(rs_getcompassangledegrees), 495, 585) then MakeCompass(Facing);
'W' : if not InRange(Round(rs_getcompassangledegrees), 585, 675) then MakeCompass(Facing);
end;
end;

Line 403: [Error] (12670:23): Type mismatch in script

Negaal
01-30-2008, 07:21 AM
if (deg > 315 and deg =< 0) or (deg >= 0 and deg < 45) then Facing := 'N';

Try adding / removing (, )...

if (deg > 315) and (deg =< 0) or (deg >= 0) and (deg < 45) then Facing := 'N';

turbobk
01-30-2008, 07:51 AM
and (deg =< 0) or

I think that's the bit with the error I tryed the fix you gave me but it didnt work :(

Dumpin
01-30-2008, 08:21 AM
like what the hell?
var
i: integer;
Deg: extended;
procedure CompassPos;
begin
Deg := rs_GetCompassAngleDegrees; // why call deg if you didn't use it here
begin // |
for i := 0 to 3 do // |
case i of // |
0 : if not(InRange(round(Deg), 315, 45)) then //<----
MakeCompass('N');
1 : if not(InRange(round(Deg), 45, 135)) then
MakeCompass('E');
2 : if not(InRange(round(Deg), 135, 225)) then
MakeCompass('S');
3 : if not(InRange(round(Deg), 225, 315)) then
MakeCompass('W');
end;
MakeCompass(FloatToStr(Deg));
end;
end;

the smith400
01-30-2008, 09:40 AM
wow, i have no idea what you guys are saying

OFFTOPIC: my teacher is walking around me, she doesnt spot me, but i somehow also finish before the class.

MylesMadness
01-30-2008, 12:12 PM
Why do you need to do that? Makecompass likes degrees and letters so do it the way I told you.

mixster
01-30-2008, 04:08 PM
Myels' way is the easiest - Negaal's way involves quite a lot of extra code and with a large antiban, every line saved is worth it.
Dumpin - he get's the compass angle so that after he moves it round (like you would occassionally (too many double letters there?) do when playing), it moves back to more or less the original direction in case the script uses the direction. It also checks to make sure it isn't already facing that direction, as if you moved it like 10 degrees then back, it looks a bit dodgy (well, kind of).
Lastly, if you do want to use Negaal's method turbobk, then you need to make sure you declare 'Facing' as a string.

Naum
01-30-2008, 07:29 PM
Nice code man i will certainly be using this i think. GJ

turbobk
01-30-2008, 11:34 PM
Nice code man i will certainly be using this i think. GJ

Thnx alot man, I'm glad you like it.

Yeah I tryed to get Negaal's procedure working but I had a bit of trouble with a mismatch.

Well I'm gonna update this as soon as I figure what else it needs.



Use the TBKAntiBan and post the progress of it here.
Example:
* Error's Found.
* If it stuffed up your script, and which script?
* If it ran perfectly.
* What else do you think it needs?
ETC.

Thanks,
TurboBk:)

turbobk
01-30-2008, 11:44 PM
like what the hell?
var
i: integer;
Deg: extended;
procedure CompassPos;
begin
Deg := rs_GetCompassAngleDegrees; // why call deg if you didn't use it here
begin // |
for i := 0 to 3 do // |
case i of // |
0 : if not(InRange(round(Deg), 315, 45)) then //<----
MakeCompass('N');
1 : if not(InRange(round(Deg), 45, 135)) then
MakeCompass('E');
2 : if not(InRange(round(Deg), 135, 225)) then
MakeCompass('S');
3 : if not(InRange(round(Deg), 225, 315)) then
MakeCompass('W');
end;
MakeCompass(FloatToStr(Deg));
end;
end;

Haha thanks for pointing that out to me Dumpin. I don't know what I was doing lol, maybe it was the fact that I was up till 2am trying to get this done. :rolleyes:

..But yeah thank's, It'll be updated in V2.