catlover444
2012-05-07 02:19:18
Trying to get this sucker to work correctly. I could have used x, y coordinates for everything but I wanted to be able to quickly add a case/ DTM and have it variable for anything I could do.
Right now it'll compile but won't complete the loop. Once I get it to do a full loop I'll try and incorporate the fail-safes.
Error:
I've tried to google DTM index error and I was told to change the positioning of my FreeDTM to right before the end. But that doesn't resolve it.
Thank you for any help.
Right now it'll compile but won't complete the loop. Once I get it to do a full loop I'll try and incorporate the fail-safes.
program click;
{$DEFINE SRL5}
{$DEFINE CRASHSMART}
{$DEFINE SMART}
{$i SRL/srl.simba}
{$i SPS/sps.simba}
{$i srl/srl/skill/fighting.simba}
{$i SRL/SRL/misc/paintsmart.simba}
{$I SRL/SRL/Misc/Debug.Simba}
const
EEE = 1; //0= NO EEE, 1= EEE
WTU = 1; //1=CMAUL, 2=SSWORD
procedure UseEEE;
var WEP, EXCAL, FSPEC, ESPEC, x, y :integer;
begin
EXCAL:= DTMFromString('m1gAAAHic42JgYOACYiYgZgZiXiAWA2IZIBaGyrExQAA/EIsCsQCSHhDghOoBYWkgXjBzJlQWPzZiIA4wEokRAAC3tAMs'); //EEE
FSPEC := DTMFromString('mKgEAAHic42NgYGgH4nQgLoey+6C4GYiLgTgUiA2BmJEBAkShYhxALI6EhYCYkwE7EIVikJqEZlcGLk52MGZiYmTg4+ViYGVlYeAUZEfBbNysDAysPAyMnAIMIoK8DJI4zCYEGMnEqAAAl6YIVA=='); //FULL SPECIAL
ESPEC := DTMFromString('mFQEAAHic42VgYDBmQIAGIM4D4lAgNgNiFiBmA2IlKD8AiLuBmB2IuaG0IBQLILEZoZgBSoPUWVlZMkhLSzNYWloyMDIyYmAuLm4whrH5BIUYyAGMZGAUAACcDQXE'); // EMPTY SPECIAL
Case WTU of
1:
WEP := DTMFromString('mAAEAAHiclcvBCkBAFIXhg8aCIYVG0bydkvd/AH85C0vz17e650ZJEwbM2LBjxYjOgt4aRCz+6dGi9j14n3Ag47xuL/7JKqsq9O0B53cCxg=='); //CMAUL
2:
WEP := DTMFromString('mfgEAAHicrc1LCoAwEATR9kOEIEQiSgKey0t5AY9rg7UQXOrAYzY1SZY06J7OemvZwZKttqHYbJONFulFV2kWusyOvC/6wH2iLY8/zmOn+qbqn2l+8p4L6VIDzA=='); //SSWORD
end;
begin //Wield EEE
FindDTM(EXCAL, x, y, MIX1, MIY1, MIX2, MIY2);
MMouse(x, y, 5, 5);
//if IsUpText('nhanced') then
//begin
ClickMouse2(MOUSE_LEFT);
FindDTM(WEP, x, y, MIX1, MIY1, MIX2, MIY2)
WaitFindDTM(x, y, WEP, 800);
//end else
// exit;
FreeDTM(EXCAL);
FreeDTM(WEP);
end;
// Switches to Combat tab
Gametab(tab_Combat);
begin //Use Special
FindDTM(FSPEC, x, y, MIX1, MIY1, MIX2, MIY2);
MMouse(x - 60, y, 10, 5);
//if IsUptextMultiCustom(['oggl', 'pec', 'ttack']) then
// begin
ClickMouse2(MOUSE_LEFT);
FindDTM(ESPEC, x, y, MIX1, MIY1, MIX2, MIY2)
WaitFindDTM(x, y, ESPEC, 800); // Verify Special Used
writeln('FOR EXCALIBUR');
;
// end else
// exit;
FreeDTM(ESPEC)
FreeDTM(FSPEC);
end;
Gametab( tab_Inv); // Inventory Tab
begin
begin //Wield Weapon
FindDTM(WEP, x, y, MIX1, MIY1, MIX2, MIY2);
MMouse(x, y, 5, 5);
ClickMouse2(MOUSE_LEFT);
FindDTM(EXCAL, x, y, MIX1, MIY1, MIX2, MIY2);
WaitFindDTM( x, y, EXCAL, 800);
end
FreeDTM(WEP);
FreeDTM(EXCAL);
end;
end;
Procedure TimeEEE;
begin
Case EEE of
0:
exit;
1:
end;
// while(===action) do
begin
UseEEE;
wait(300000);
end;
end;
begin
Smart_Server := 72;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
TimeEEE;
end.Error:
Error: Exception: The given DTM Index[5] doesn't exist at line 79
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]
Successfully saved: C:\Users\Will\Desktop\DTM\useEEE.simbaI've tried to google DTM index error and I was told to change the positioning of my FreeDTM to right before the end. But that doesn't resolve it.
Thank you for any help.
