None
None
Last edited by darker2k; 06-22-2013 at 11:28 PM.
None
Last edited by darker2k; 06-22-2013 at 11:29 PM.
DTMs aren't reliable for clicking monsters, because the monster is constantly moving.
1) you only waited ONE hour for a reply
2)how is that trolling
3)that doesn't make this the worst forum ever
4)go away
None
Last edited by darker2k; 06-22-2013 at 11:26 PM.
ACA + ATPA's = magic
You keep using that word, I'm not sure it means what you think it means.
Now that that's out of the way, I have a suggestion for your code. Format it properly, this makes it easier for everyone to read, thus making us less likely to help. So currently you have
Formatted properly, it would beSimba Code:procedure FindCorp;
var
corp, x, y:integer;
Begin
corp := DTMFromString('mggAAAHicY2NgYFjDyMDQBMS3gbgXiHcDcQcQcwDxNqC8IpCWAOLXDBBcmhnG4OVszhAb7MIwsTmHoSA1iMHDwZQBF2DEgSEAAGeADQw=');
If FindDTM(corp, x, y, MSX1, MSY1, MSX2, MSY2) Then
Begin
Mmouse(x, y, 5, 5);
Mouse(x, y, 0, 0, False);
ChooseOption('Attac');
FreeDTM(corp);
end;
end;
Simba Code:procedure FindCorp;
var
corp, x, y:Integer;
begin
corp := DTMFromString('mggAAAHicY2NgYFjDyMDQBMS3gbgXiHcDcQcQcwDxNqC8IpCWAOLXDBBcmhnG4OVszhAb7MIwsTmHoSA1iMHDwZQBF2DEgSEAAGeADQw=');
if FindDTM(corp, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 5, 5);
Mouse(x, y, 0, 0, False);
ChooseOption('Attac');
FreeDTM(corp);
end;
end;
Now that it's easier to read, I will make suggestions about the procedure itself.
If you make corp into a global variable and call it at the beginning of your script and free it at the end, then you will only have to call it once. This also allows you to use your DTM freeing procedure with AddOnTerminate, which will prevent it from being left unfreed if the script stops for any reason. Also your procedure loads the DTM, but if it can't find the DTM on the screen it will exit the procedure without freeing it.
I notice that you use MMouse, and then after use Mouse. As it is, your procedure will move the mouse to the DTM, then move it to the DTM again and click. Instead of Mouse, click usingSimba Code:ClickMouse2(False);
Also, your procedure does not do anything if it can't find the DTM. I suggest usingSimba Code:end else
Example of how to use end else:
Simba Code:begin
if FindDTM(DTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 5, 5);
ClickMouse2(False);
ChooseOption('Attac');
WriteLn('We found the DTM and clicked it!');
end else
begin
WriteLn('We could not find the DTM, rotating compass');
MakeCompass('rand'); //Not sure if this works on SS, I have never played it.
end;
end;
None
Last edited by darker2k; 06-22-2013 at 11:26 PM.
Another thing:
Simba Code:ChooseOption('Attac');
I dont think that procedure will also work on SS, but I've never played it so it might aswell surprise me.
Are you using the modern or oldskool cache?
None
Last edited by darker2k; 06-22-2013 at 11:27 PM.
None
Last edited by darker2k; 06-22-2013 at 11:27 PM.
ss.png
That's me at corp. : /
Please tell me what settings you're using and what corp you're at, because I'm bored and in a good mood![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)