SRL Archive - OSR Help

HELP with rc script


ogustuce

2012-03-12 21:47:03

i have a good astral script (modified from evlin basic one) i added food support,pouch support and last step is pouch repair support winch is mostly done. my problem is idk how to make the script detects a degraded pouch. eny idea on how to do that?

how can i detect a degraded pouch in inv??

i tried :

-if find degraded pouch DTM in inv then begin Repair pouch procedure but i doesnt work.

- if find degraded pouch color in inv then begin repair pouch procedure but doenst work also.

or maybe didnt do it right in the main loop?

please help, thanks

Lancelot074

2012-03-12 22:57:14

Isn't there text that appears in the chat when the pouch degrades? If so, just detect that and there you go.

Ashaman88

2012-03-12 22:58:24

From: Lancelot074
Isn't there text that appears in the chat when the pouch degrades? If so, just detect that and there you go.


^^ That's how I detect degraded pouches

ogustuce

2012-03-12 23:12:48

kk, good idea. so i presume i should use 'findblackchatmessage'

ogustuce

2012-03-12 23:45:50

i typed:
if FindBlackChatMessage('ecayed') then
begin
RepairPouch;
end;

did i wrote something wrong? because it doesnt seem to detect the word decayed in the chat box

Gucci

2012-03-13 00:30:54

Wouldn't it say degraded?

Nemesis3X

2012-03-13 00:39:37

From: ogustuce
i have a good astral script (modified from evlin basic one) i added food support,pouch support and last step is pouch repair support winch is mostly done. my problem is idk how to make the script detects a degraded pouch. eny idea on how to do that?

how can i detect a degraded pouch in inv??

i tried :

-if find degraded pouch DTM in inv then begin Repair pouch procedure but i doesnt work.

- if find degraded pouch color in inv then begin repair pouch procedure but doenst work also.

or maybe didnt do it right in the main loop?

please help, thanks


Well, your DTM is not well made because in my abyss Script, It always detect when the pouch are degraded with my DTM.

**Special note: it may require more than one DTM sometime since Jagex sometime make the colors change that much that even with a tolerance of 50, your DTM won't work. That's why I got 2 DTM to see if my pouchs are broken. Here is my Code


Procedure RepairPouch;
begin
If FindDTM(RepairP,X,Y,MIx1,MIy1,MIx2,MIy2)then
begin
writeln('We have some pouchs broken!');
NeedToRepair := 1;
end else
If FindDTM(RepairP2,X,Y,MIx1,MIy1,MIx2,MIy2)then
begin
writeln('We have some pouchs broken!');
NeedToRepair := 1;
end;
end;

I am using the Variable NeedToRepair, because I am going to repair my Pouch when I am in the middle of the Abyss.

Edit: I don't know if you are using the Large Pouch, but I made my DTM with it. If you want to test it with my DTMs in your script to see if Pouch are broken. Here are the DTMs.

RepairP := DTMFromString('mlwAAAHicY2dgYJjKxMDQA8TzoHgaE0SsF4j3MjIwHINiEHsbEG+Csi1MDBic7CwZdLXUGCwsDBg8Pe0ZJCXZGeytzRnYgebiwox4MBQAALJzDcI=');
RepairP2 := DTMFromString('mrAAAAHic42BgYOhgYmBoAOImIO4H4i4g7gbiNij9hxGoCEj/YISwWYDsL0D6HRTbWpowONlaMNhbmzGYGuoyWJkZMQQFuTMEOOswSEqyM7ADtePDjAQwDAAAOI8Pjw==');

smurg

2012-03-13 02:26:02

Just sounds like you need to learn how to make a better DTM.

Or you could get the primary color of the degraded pouch that doesn't show up as much on the normal pouch. Once you have the slot of a normal pouch, run CountColorTolerance functions over each and see approximately how much pixels of that color are found on average for each. Then you can just make a conditional statement that when the countcolortolerance output is over a certain amount, then run your fix pouch procedure.