Pentti
11-14-2006, 04:04 PM
I wasn't sure where to post this, so I post these now here if it's ok.
Here are some usefull anti-ban stuff I made.
If finds playername on the screen it will send random text, if playername has found over 3 times then this logs out and comeas soon back:
procedure TalkingToMeTXT;
begin
Case Random(10)+1 of
1: TypeSend('Right...')
2: TypeSend('What?')
3: TypeSend('Sorry, i dont understand.')
4: TypeSend('What do yuo want?')
5: TypeSend('I have no time')
6: TypeSend('I dont like you')
7: TypeSend('You are getting my nervous')
8: TypeSend('is it possible to be quit for 2 minutes?')
9: TypeSend('yes? I am.')
10: TypeSend('No, you again.')
End;
end;
procedure TalkingToMe;
var CUAM:integer;
begin
If(not(FindBitmapMaskTolerance(NickNameBmp, x, y, 0, 24, 517, 338, 0, 40))) then begin
wait(random(10))
Exit; end;
If(FindBitmapMaskTolerance(NickNameBmp, x, y, 0, 24, 517, 338, 0, 40)) then
begin
TalkingToMeTxt;
CUAM:=CUAM+1
Writeln('Your Name has spotted on the screen '+
'and you successly answered.')
if(CUAM>3) then begin
TypeSend('Nice to talk, but now gtg. See you! :)')
LogOut;
Wait(20000+random(15000))
LogInPlayer;
CUAM:=0
end;
end;
end;
If other player asks your skill it says skill and level of skill:
procedure SayLevel(Skill:string);
var LVLBmp,Lvl:integer;
begin
LvlBmp:=createbitmapmaskfromtext(skill,upchars)
If(FindBitmapMaskTolerance(LvlBmp, x, y, 0, 0, 516, 338, 0, 40))then
begin
Lvl:=GetSkillLevel(Skill)
TypeSend('My '+Skill+' Level is '+inttostr(Lvl))
end;
end;
This says what's your next level of skill every X minutes:
procedure NextLvlEveryMins(Minutes:integer; Skill:string);
var NextLVL:integer;
begin
if ((TimeFromMark(Mark) / 1000) / 60 >= minutes) then
begin
MarkTime(Mark);
NextLVL:=GetSkillLevel(Skill)
TypeSend('My next '+skill+' level is '+inttostr(NextLVL+1)+' cant wait till it')
end;
end;
This responds from chatbox texts and gets playername who asked/said to you something
Function ChatBoxRespond(FromText:String; SayText:String): Boolean;
var GetFromText,GetName:String;
begin
if(IsTextInAreaEx(26,414,336,433,x,y,FromText,50,S mallChars,False,False,0,0,16711680))then
begin
GetName := Lowercase(Trim(GetTextAtEx(20, 415, 45, SmallChars, False, False, 0, 2, 0, 40, True, tr_NormalChars)));
TypeSend(SayText)
writeln(' ')
Writeln(GetName+' said: '+FromText)
Writeln(Players[CurrentPlayer].Name+' said: '+SayText)
writeln(' ')
wait(1200+random(500))
Result:=True;
end;
wait(1)
end;
This works like Chatbox responder, but finds text from Mainscreen:
procedure MSRespond(FromText:String; SayText:String);
var FromTextBmp:integer;
begin
FromTextBmp:=CreateBitMapMaskFromText(FromText,Upc hars)
if(not(FindBitmapMaskTolerance(FromTextBmp, x, y, 0, 24, 517, 338, 0, 40)))then begin
wait(random(10))
FreeBitMap(FromTextBmp)
Exit; end;
if(FindBitmapMaskTolerance(FromTextBmp, x, y, 0, 24, 517, 338, 0, 40))
Then begin
SendText2(SayText+(chr(13)))
FreeBitMap(FromTextBmp)
writeln(' ')
Writeln('Someone said: '+FromText)
writeln('You answered: '+SayText)
writeln(' ')
wait(10+random(10))
end;
end;
You can make your own "respond from text with text"
like this:
Chatbox;
procedure AutoCBRespond;
ChatBoxRespond('Lol','Lmao')
ChatBoxRespond('Hi','Hello')
//etc.
end;
MainScreen;
procedure AutoMSRespond;
MsRespond('Lol','Lmao')
MSREspond('Hi','Hello')
//etc.
end;
Please let me know what do you think about these. :D
Here are some usefull anti-ban stuff I made.
If finds playername on the screen it will send random text, if playername has found over 3 times then this logs out and comeas soon back:
procedure TalkingToMeTXT;
begin
Case Random(10)+1 of
1: TypeSend('Right...')
2: TypeSend('What?')
3: TypeSend('Sorry, i dont understand.')
4: TypeSend('What do yuo want?')
5: TypeSend('I have no time')
6: TypeSend('I dont like you')
7: TypeSend('You are getting my nervous')
8: TypeSend('is it possible to be quit for 2 minutes?')
9: TypeSend('yes? I am.')
10: TypeSend('No, you again.')
End;
end;
procedure TalkingToMe;
var CUAM:integer;
begin
If(not(FindBitmapMaskTolerance(NickNameBmp, x, y, 0, 24, 517, 338, 0, 40))) then begin
wait(random(10))
Exit; end;
If(FindBitmapMaskTolerance(NickNameBmp, x, y, 0, 24, 517, 338, 0, 40)) then
begin
TalkingToMeTxt;
CUAM:=CUAM+1
Writeln('Your Name has spotted on the screen '+
'and you successly answered.')
if(CUAM>3) then begin
TypeSend('Nice to talk, but now gtg. See you! :)')
LogOut;
Wait(20000+random(15000))
LogInPlayer;
CUAM:=0
end;
end;
end;
If other player asks your skill it says skill and level of skill:
procedure SayLevel(Skill:string);
var LVLBmp,Lvl:integer;
begin
LvlBmp:=createbitmapmaskfromtext(skill,upchars)
If(FindBitmapMaskTolerance(LvlBmp, x, y, 0, 0, 516, 338, 0, 40))then
begin
Lvl:=GetSkillLevel(Skill)
TypeSend('My '+Skill+' Level is '+inttostr(Lvl))
end;
end;
This says what's your next level of skill every X minutes:
procedure NextLvlEveryMins(Minutes:integer; Skill:string);
var NextLVL:integer;
begin
if ((TimeFromMark(Mark) / 1000) / 60 >= minutes) then
begin
MarkTime(Mark);
NextLVL:=GetSkillLevel(Skill)
TypeSend('My next '+skill+' level is '+inttostr(NextLVL+1)+' cant wait till it')
end;
end;
This responds from chatbox texts and gets playername who asked/said to you something
Function ChatBoxRespond(FromText:String; SayText:String): Boolean;
var GetFromText,GetName:String;
begin
if(IsTextInAreaEx(26,414,336,433,x,y,FromText,50,S mallChars,False,False,0,0,16711680))then
begin
GetName := Lowercase(Trim(GetTextAtEx(20, 415, 45, SmallChars, False, False, 0, 2, 0, 40, True, tr_NormalChars)));
TypeSend(SayText)
writeln(' ')
Writeln(GetName+' said: '+FromText)
Writeln(Players[CurrentPlayer].Name+' said: '+SayText)
writeln(' ')
wait(1200+random(500))
Result:=True;
end;
wait(1)
end;
This works like Chatbox responder, but finds text from Mainscreen:
procedure MSRespond(FromText:String; SayText:String);
var FromTextBmp:integer;
begin
FromTextBmp:=CreateBitMapMaskFromText(FromText,Upc hars)
if(not(FindBitmapMaskTolerance(FromTextBmp, x, y, 0, 24, 517, 338, 0, 40)))then begin
wait(random(10))
FreeBitMap(FromTextBmp)
Exit; end;
if(FindBitmapMaskTolerance(FromTextBmp, x, y, 0, 24, 517, 338, 0, 40))
Then begin
SendText2(SayText+(chr(13)))
FreeBitMap(FromTextBmp)
writeln(' ')
Writeln('Someone said: '+FromText)
writeln('You answered: '+SayText)
writeln(' ')
wait(10+random(10))
end;
end;
You can make your own "respond from text with text"
like this:
Chatbox;
procedure AutoCBRespond;
ChatBoxRespond('Lol','Lmao')
ChatBoxRespond('Hi','Hello')
//etc.
end;
MainScreen;
procedure AutoMSRespond;
MsRespond('Lol','Lmao')
MSREspond('Hi','Hello')
//etc.
end;
Please let me know what do you think about these. :D