SRL Archive - SRL Old School RuneScape

Uptext fix


Awkwardsaw

2013-08-07 21:07:12

Simply copy and replace this function:
Function P07_GetUpText: String;
Var
WhiteT,BlueT,YellowT,OrangeT,FoundText: String;
Begin
WhiteT:=GetTextAtExWrap(8, 8, 80, 21, 0, 5, 1, 14541281, 55, 'UpChars07');
BlueT:=GetTextAtExWrap(35, 8, 210, 21, 0, 5, 1, 13423640, 65, 'UpChars07'); //line that changed
YellowT:=GetTextAtExWrap(35, 8, 150, 21, 0, 5, 1, 1235160, 40, 'UpChars07');
OrangeT:=GetTextAtExWrap(35, 8, 150, 21, 0, 5, 1, 4687583, 53, 'UpChars07');
FoundText:=WhiteT + ' ' + BlueT + YellowT + OrangeT;
FoundText:= ReplaceWrap(FoundText, '.', '',[rfReplaceAll]);
FoundText:= ReplaceWrap(FoundText, '/', '',[rfReplaceAll]);
FoundText:= ReplaceWrap(FoundText, '\', '',[rfReplaceAll]);
FoundText:= ReplaceWrap(FoundText, ',', '',[rfReplaceAll]);
FoundText:= ReplaceWrap(FoundText, '*', '',[rfReplaceAll]);
FoundText:= ReplaceWrap(FoundText, '^', '',[rfReplaceAll]);
FoundText:= ReplaceWrap(FoundText, '"', '',[rfReplaceAll]);
Result:=FoundText;
End;

Basically all I did was make the box bigger, so it could find all of the uptext. The old box wasn't even close to finding the blue text I needed ;)

Flight

2013-08-07 21:15:03

Have you seen this thread?:
http://villavu.com/forum/showthread.php?t=103865

Even in that order of the default uptext grabbing (WhiteT + ' ' + BlueT + YellowT + OrangeT) it's not complete. In the instance you were to use an item on an player/NPC/object a section of your text would never be seen simply because of that restrictive ordering. If you take a look at the thread I mentioned before you'll see there's no need for that at all, instead make a TPA of every bit of text printed at the top, combine all of the TPAs and let that handy little "GetTextATPA" do the rest of the work.

Awkwardsaw

2013-08-07 21:30:13

From: Flight
Have you seen this thread?:
http://villavu.com/forum/showthread.php?t=103865

Even in that order of the default uptext grabbing (WhiteT + ' ' + BlueT + YellowT + OrangeT) it's not complete. In the instance you were to use an item on an player/NPC/object a section of your text would never be seen simply because of that restrictive ordering. If you take a look at the thread I mentioned before you'll see there's no need for that at all, instead make a TPA of every bit of text printed at the top, combine all of the TPAs and let that handy little "GetTextATPA" do the rest of the work.


well then y u no add it to include? :p

DannyRS

2013-08-08 13:30:57

This will haunt me till the day I die ^^

From: Olly
Eh, uptext should be alot better when simba 994 gets released, since we can actually use simba's uptext finding.


are we still not there?

Olly

2013-08-08 15:20:55

No, iirc we will all move to 1000 soon. :)

Naveed123

2013-09-05 07:43:02

Should be sustained by the administraitor and am:norris:

samerdl

2013-09-10 08:45:35

needs to add..

GreenT := GetTextAtExWrap(8, 8, 400, 21, 0, 5, 1, 120577, 65, 'UpChars07');

The green text is when you have a spell ready to be Cast, 'Curse' will be green. :)