SRL Archive - Discussions and Debates

New Updates


Jagex_Fagex

2006-10-18 04:28:12

because of the new interface designs and srl needing to be updated and everything.. i was just wondering if there is anything that is buggy or needs to be fixed up to make it work??

Mutant Squirrle

2006-10-18 06:34:20

i think pretty much everything has been fixed

WT-Fakawi

2006-10-18 08:35:34

I believe we still need an intelligent DoEmote. Can you do that jagex_fagex?

warship45

2006-10-18 09:37:06

what did u mean by intelligent??

jsut so i know what i did not do right with mine

Sumilion

2006-10-18 11:29:05

There ya go, one DoEmote for fakawi :) :
{*****************************************************************************
procedure DoEmote(EmoteNumber: Integer);
By: Sumilion
Description: Clicks on an emote specified by EmoteNumber (1 to 37)
*****************************************************************************}

Procedure DoEmote(EmoteNumber: Integer);
Var
Row, X1, Y1, X2, Y2, Others: Integer;
Begin
If (EmoteNumber > 37) or (EmoteNumber < 1) Then Exit;
GameTab(12);
If (EmoteNumber > 20) Then
Begin
If (GetColor(734, 442) = 1777699) Then
Mouse(734, 442, 10, 10, true);
Others := 10;
End Else
If(GetColor(733, 224) = 1777699) Then
Mouse(733, 224, 10, 10, true);
If (EmoteNumber > 4) Then
Begin
Repeat;
Row := Row + 1;
EmoteNumber := EmoteNumber - 4;
Until(EmoteNumber <= 4) or (Row = 10)
End;
If (Row >= 5) Then
Row := Row - 5;
EmoteNumber := EmoteNumber - 1;
X1 := 554 + (43*EmoteNumber);
Y1 := 211 + (49*Row) + Others;
X2 := 592 + (43*EmoteNumber);
Y2 := 257 + (49*Row) + Others;
MouseBox(X1, Y1, X2, Y2, 1);
End;

Don't mind my standards, i just like them the way they are ;)

warship45

2006-10-18 11:54:35

This is the one i made a while ago just after the update came out it is a bit longer than your but does the same job!

i think that you should use sumillion's it is simpler than mine and simpler normal means better

Var
Emotions: array[1..36] of String;
EmotBarcolor,xxx1,yyy1: Integer;

Procedure LoadEmotions;
begin
EmotBarcolor:= 3359309;
Emotions[1]:='Yes';
Emotions[2]:='No';
Emotions[3]:='Bow';
Emotions[4]:='Angry';
Emotions[5]:='Think';
Emotions[6]:='Wave';
Emotions[7]:='Shrug';
Emotions[8]:='Cheer';
Emotions[9]:='Beckon';
Emotions[10]:='Laugh';
Emotions[11]:='Jump';
Emotions[12]:='Yawn';
Emotions[13]:='Dance';
Emotions[14]:='Jig';
Emotions[15]:='Spin';
Emotions[16]:='Headbang';
Emotions[17]:='Cry';
Emotions[18]:='Kiss';
Emotions[19]:='Panic';
Emotions[20]:='Raspbery';
Emotions[21]:='Clap';
Emotions[22]:='Salute';
Emotions[23]:='Gblow';
Emotions[24]:='Gdance';
Emotions[25]:='Glassbox';
Emotions[26]:='Climbrope';
Emotions[27]:='Lean';
Emotions[28]:='Glasswall';
Emotions[29]:='Idea';
Emotions[30]:='Stamp';
Emotions[31]:='Flap';
Emotions[32]:='Slaphead';
Emotions[33]:='Zwalk';
Emotions[34]:='Zdance';
Emotions[35]:='Scared';
Emotions[36]:='Rhop';
end;

//Find emotion
Function FindEmotion(Var Tempx,Tempy: Integer;EmotionName: string):Boolean;
var
Emotcheck: Integer;
EmotionsNumber: Integer;
rnd,rnd1,
Checker: Integer;
simplestring: string;
begin
if Emotions[1]='' then begin loademotions; end;
for Emotcheck:= 1 to 36 do
begin
if Lowercase(Emotions[Emotcheck])=Lowercase(EmotionName) then
begin
EmotionsNumber:=Emotcheck;
end;
end;
if EmotionsNumber<1 then
begin
result:=False;
exit;
end;
//Getting x and y of Emotion
result:=True;
GameTab(12);
rnd:=random(5);
rnd1:=random(24);
if EmotionsNumber>20 then
begin
if Getcolor(729,431)<>Emotbarcolor then
begin
Mouse(729+random(10),431+random(10),1,1,True);
end;
simplestring:= FloatToStr(EmotionsNumber/4);
checker:=1;
while StrGet(simplestring,checker)<>'.' do
begin
checker:=checker+1;
end;
simplestring:= StrGet(simplestring, checker+1);
simplestring:= inttostr(10-StrToint(simplestring)-1);
simplestring:= '0.'+simplestring;
Tempy:=216+rnd1+(round(EmotionsNumber/4+(strtofloat(simplestring))-5))*50;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=5 then
begin
EmotionsNumber:=EmotionsNumber-20;
end;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=6 then
begin
EmotionsNumber:=EmotionsNumber-24;
end;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=7 then
begin
EmotionsNumber:=EmotionsNumber-28;
end;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=8 then
begin
EmotionsNumber:=EmotionsNumber-32;
end;
rnd:=542+rnd*EmotionsNumber+(40*EmotionsNumber-rnd);
Tempx:=rnd;
end else begin
if Getcolor(730,224)<>Emotbarcolor then
begin
Mouse(730+random(9),224+random(8),1,1,True);
end;
simplestring:= FloatToStr(EmotionsNumber/4);
checker:=1;
while StrGet(simplestring,checker)<>'.' do
begin
checker:=checker+1;
end;
simplestring:= StrGet(simplestring, checker+1);
simplestring:= inttostr(10-StrToint(simplestring)-1);
simplestring:= '0.'+simplestring;
Tempy:=216+rnd1+(round(EmotionsNumber/4+(strtofloat(simplestring))-1))*50;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=1 then
begin
EmotionsNumber:=EmotionsNumber-4;
end;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=2 then
begin
EmotionsNumber:=EmotionsNumber-8;
end;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=3 then
begin
EmotionsNumber:=EmotionsNumber-12;
end;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=4 then
begin
EmotionsNumber:=EmotionsNumber-16;
end;
rnd:=542+rnd*EmotionsNumber+(40*EmotionsNumber-rnd);
Tempx:=rnd;
end;
end;

//Checks if you can play that Emotion
Function CheckEmotion(EmotionName: string):Boolean;
var
Emotcheck: Integer;
EmotionsNumber: Integer;
rnd,rnd1,Tempx,Tempy: Integer;
Checker: Integer;
simplestring: string;
begin
if Emotions[1]='' then begin loademotions; end;
for Emotcheck:= 1 to 36 do
begin
if Lowercase(Emotions[Emotcheck])=Lowercase(EmotionName) then
begin
EmotionsNumber:=Emotcheck;
end;
end;
if EmotionsNumber<1 then
begin
result:=False;
exit;
end;
//Getting x and y of Emotion
GameTab(12);
rnd:=random(5);
rnd1:=random(24);
if EmotionsNumber>20 then
begin
if Getcolor(729,431)<>Emotbarcolor then
begin
Mouse(729+random(10),431+random(10),1,1,True);
end;
simplestring:= FloatToStr(EmotionsNumber/4);
checker:=1;
while StrGet(simplestring,checker)<>'.' do
begin
checker:=checker+1;
end;
simplestring:= StrGet(simplestring, checker+1);
simplestring:= inttostr(10-StrToint(simplestring)-1);
simplestring:= '0.'+simplestring;
Tempy:=216+rnd1+(round(EmotionsNumber/4+(strtofloat(simplestring))-5))*50;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=5 then
begin
EmotionsNumber:=EmotionsNumber-20;
end;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=6 then
begin
EmotionsNumber:=EmotionsNumber-24;
end;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=7 then
begin
EmotionsNumber:=EmotionsNumber-28;
end;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=8 then
begin
EmotionsNumber:=EmotionsNumber-32;
end;
rnd:=542+rnd*EmotionsNumber+(40*EmotionsNumber-rnd);
Tempx:=rnd;
end else begin
if Getcolor(730,224)<>Emotbarcolor then
begin
Mouse(730+random(9),224+random(8),1,1,True);
end;
simplestring:= FloatToStr(EmotionsNumber/4);
checker:=1;
while StrGet(simplestring,checker)<>'.' do
begin
checker:=checker+1;
end;
simplestring:= StrGet(simplestring, checker+1);
simplestring:= inttostr(10-StrToint(simplestring)-1);
simplestring:= '0.'+simplestring;
Tempy:=216+rnd1+(round(EmotionsNumber/4+(strtofloat(simplestring))-1))*50;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=1 then
begin
EmotionsNumber:=EmotionsNumber-4;
end;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=2 then
begin
EmotionsNumber:=EmotionsNumber-8;
end;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=3 then
begin
EmotionsNumber:=EmotionsNumber-12;
end;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=4 then
begin
EmotionsNumber:=EmotionsNumber-16;
end;
rnd:=542+rnd*EmotionsNumber+(40*EmotionsNumber-rnd);
Tempx:=rnd;
end;
if ((GetColor(Tempx,Tempy)=2700347) or (GetColor(Tempx,Tempy)=2636866)) then
begin
result:=False;
end else begin
result:=True;
end;
end;

//Clicks on an emotion
Function PlayEmotion(EmotionName: string):Boolean;
var
Emotcheck: Integer;
EmotionsNumber: Integer;
rnd,rnd1: Integer;
Checker: Integer;
Tempx,Tempy: Integer;
simplestring: string;
begin
if Emotions[1]='' then begin loademotions; end;
for Emotcheck:= 1 to 36 do
begin
if Lowercase(Emotions[Emotcheck])=Lowercase(EmotionName) then
begin
EmotionsNumber:=Emotcheck;
end;
end;
if CheckEmotion(Emotions[EmotionsNumber])=False then
begin
EmotionsNumber:=0;
end;
if EmotionsNumber<1 then
begin
result:=False;
exit;
end;
//Getting x and y of Emotion
result:=True;
GameTab(12);
rnd:=random(5);
rnd1:=random(24);
if EmotionsNumber>20 then
begin
if Getcolor(729,431)<>Emotbarcolor then
begin
Mouse(729+random(10),431+random(10),1,1,True);
end;
simplestring:= FloatToStr(EmotionsNumber/4);
checker:=1;
while StrGet(simplestring,checker)<>'.' do
begin
checker:=checker+1;
end;
simplestring:= StrGet(simplestring, checker+1);
simplestring:= inttostr(10-StrToint(simplestring)-1);
simplestring:= '0.'+simplestring;
Tempy:=216+rnd1+(round(EmotionsNumber/4+(strtofloat(simplestring))-5))*50;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=5 then
begin
EmotionsNumber:=EmotionsNumber-20;
end;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=6 then
begin
EmotionsNumber:=EmotionsNumber-24;
end;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=7 then
begin
EmotionsNumber:=EmotionsNumber-28;
end;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=8 then
begin
EmotionsNumber:=EmotionsNumber-32;
end;
rnd:=542+rnd*EmotionsNumber+(40*EmotionsNumber-rnd);
Tempx:=rnd;
Mouse(Tempx,Tempy,1,1,True);
end else begin
if Getcolor(730,224)<>Emotbarcolor then
begin
Mouse(730+random(9),224+random(8),1,1,True);
end;
simplestring:= FloatToStr(EmotionsNumber/4);
checker:=1;
while StrGet(simplestring,checker)<>'.' do
begin
checker:=checker+1;
end;
simplestring:= StrGet(simplestring, checker+1);
simplestring:= inttostr(10-StrToint(simplestring)-1);
simplestring:= '0.'+simplestring;
Tempy:=216+rnd1+(round(EmotionsNumber/4+(strtofloat(simplestring))-1))*50;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=1 then
begin
EmotionsNumber:=EmotionsNumber-4;
end;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=2 then
begin
EmotionsNumber:=EmotionsNumber-8;
end;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=3 then
begin
EmotionsNumber:=EmotionsNumber-12;
end;
if round(EmotionsNumber/4+(strtofloat(simplestring))-1)=4 then
begin
EmotionsNumber:=EmotionsNumber-16;
end;
rnd:=542+rnd*EmotionsNumber+(40*EmotionsNumber-rnd);
Tempx:=rnd;
Mouse(Tempx,Tempy,1,1,True);
end;
end;

Sumilion

2006-10-18 12:00:05

Dam, that's BIG !
All that for a simple procedure :confused: , i'll check it out sometime ;)

warship45

2006-10-18 12:02:14

lol i know i could not get the maths to work right in my smaller procedure i started with so it ended up like that lol all works now and there is 4 procedures in there
1. loading the names
2. play emots
3. check emots
4. FindEmotion

WT-Fakawi

2006-10-18 16:19:40

-Ai-, Fakawi humbly apologizes to warship45. That's a very elaborate function.

Jagex_Fagex

2006-10-19 04:43:56

so is that all you need fakawi?