Dervish
2009-07-02 19:20:33
I worked on this procedure now, before I'm leaving for sweden.
Here it is, the uptexts are blank since I can't check them, and there might be errors since I did it in the notepad…
first string is 'what to not remove (WTNR)' , choices are :
helm , chest , legs , boots , weapon , shield , gloves
2nd is the bank location.
The last boolean is wether you want to bank or not.
I know, I don't have the dtms for the equippement spots, its incomplete but if you could add those and give yourself good credits while I'm away, it'd be nice :).
edit : this is my first piece of scripting since i left, so I guess it sucks. I just thought I'd do this. This might be in SRL already… Don't have anything of scar here except the stuff in my head so if it does, i just wasted 20 minutes.
Here it is, the uptexts are blank since I can't check them, and there might be errors since I did it in the notepad…
first string is 'what to not remove (WTNR)' , choices are :
helm , chest , legs , boots , weapon , shield , gloves
2nd is the bank location.
The last boolean is wether you want to bank or not.
I know, I don't have the dtms for the equippement spots, its incomplete but if you could add those and give yourself good credits while I'm away, it'd be nice :).
edit : this is my first piece of scripting since i left, so I guess it sucks. I just thought I'd do this. This might be in SRL already… Don't have anything of scar here except the stuff in my head so if it does, i just wasted 20 minutes.
Procedure RemoveEquipement(S_WTNR, S_Bank: String, B_Bank : boolean);
var
EHDTM, EPBDTM, EPLDTM, EBDTM, EWDTM, ESDTM, EGDTM, x, y, tries : Integer;
Begin
Gametab(5);
Wait(50+random(25));
If not (S_WTNR = 'helm') then
Begin
If not FindDTM(EHDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
Begin
Writeln('You seem to have a helm on, taking it off...');
MMouse(x-random(3),y-random(3),3,3);
If IsUpText('') then
Begin
GetMousePos(x,y);
Mouse(x,y,0,0,true);
Wait(100+random(200));
If not IsUpText('') then
Writeln('Helm taken off successfully.');
Else;
Begin
Mouse(x,y,0,0,true);
Wait(100+random(200));
If IsUpText('') then
Begin
Mouse(x,y,0,0,true);
Wait(100+random(200));
If IsUpText('') then
Begin
Writeln('Something is wrong, after multiple attempts to take off your helm,');
Writeln('its still there, logging out for player safety.');
End;
End;
End;
End;
End else;
Begin
Writeln('No helm detected.');
End;
End else;
Begin
Writeln('Not removing helm.');
End;
If not (S_WTNR = 'chest') then
Begin
If not FindDTM(EPBDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
Begin
Writeln('You seem to have a chest armor on, taking it off...');
MMouse(x-random(3),y-random(3),3,3);
If IsUpText('') then
Begin
GetMousePos(x,y);
Mouse(x,y,0,0,true);
Wait(100+random(200));
If not IsUpText('') then
Writeln('Chest Armor taken off successfully.');
Else;
Begin
Mouse(x,y,0,0,true);
Wait(100+random(200));
If IsUpText('') then
Begin
Mouse(x,y,0,0,true);
Wait(100+random(200));
If IsUpText('') then
Begin
Writeln('Something is wrong, after multiple attempts to take off your');
Writeln('chest armor, its still there, logging out for player safety.');
End;
End;
End;
End;
End else;
Begin
Writeln('No Chest Armor detected.');
End;
Begin
Writeln('Not removing chest armor.');
End;
If not (S_WTNR = 'legs') then
Begin
If not FindDTM(EPLDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
Begin
Writeln('You seem to have leg armor on, taking it off...');
MMouse(x-random(3),y-random(3),3,3);
If IsUpText('') then
Begin
GetMousePos(x,y);
Mouse(x,y,0,0,true);
Wait(100+random(200));
If not IsUpText('') then
Writeln('Leg armor taken off successfully.');
Else;
Begin
Mouse(x,y,0,0,true);
Wait(100+random(200));
If IsUpText('') then
Begin
Mouse(x,y,0,0,true);
Wait(100+random(200));
If IsUpText('') then
Begin
Writeln('Something is wrong, after multiple attempts to take off your');
Writeln('leg armor, its still there, logging out for player safety.');
End;
End;
End;
End;
End else;
Begin
Writeln('No leg armor detected.');
End;
Begin
Writeln('Not removing leg armor.');
End;
If not (S_WTNR = 'boots') then
Begin
If not FindDTM(EBDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
Begin
Writeln('You seem to have boots on, taking them off...');
MMouse(x-random(3),y-random(3),3,3);
If IsUpText('') then
Begin
GetMousePos(x,y);
Mouse(x,y,0,0,true);
Wait(100+random(200));
If not IsUpText('') then
Writeln('Boots taken off successfully.');
Else;
Begin
Mouse(x,y,0,0,true);
Wait(100+random(200));
If IsUpText('') then
Begin
Mouse(x,y,0,0,true);
Wait(100+random(200));
If IsUpText('') then
Begin
Writeln('Something is wrong, after multiple attempts to take off your boots,');
Writeln('they are still there, logging out for player safety.');
End;
End;
End;
End;
End else;
Begin
Writeln('No boots detected.');
End;
Begin
Writeln('Not removing boots.');
End;
If not (S_WTNR = 'weapon') then
Begin
If not FindDTM(EWDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
Begin
Writeln('You seem to have a weapon on, taking it off...');
MMouse(x-random(3),y-random(3),3,3);
If IsUpText('') then
Begin
GetMousePos(x,y);
Mouse(x,y,0,0,true);
Wait(100+random(200));
If not IsUpText('') then
Writeln('Weapon taken off successfully.');
Else;
Begin
Mouse(x,y,0,0,true);
Wait(100+random(200));
If IsUpText('') then
Begin
Mouse(x,y,0,0,true);
Wait(100+random(200));
If IsUpText('') then
Begin
Writeln('Something is wrong, after multiple attempts to take off your weapon,');
Writeln('its still there, logging out for player safety.');
End;
End;
End;
End;
End else;
Begin
Writeln('No weapon detected.');
End;
Begin
Writeln('Not removing weapon.');
End;
If not (S_WTNR = 'shield') then
Begin
If not FindDTM(ESDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
Begin
Writeln('You seem to have a shield on, taking it off...');
MMouse(x-random(3),y-random(3),3,3);
If IsUpText('') then
Begin
GetMousePos(x,y);
Mouse(x,y,0,0,true);
Wait(100+random(200));
If not IsUpText('') then
Writeln('Shield taken off successfully.');
Else;
Begin
Mouse(x,y,0,0,true);
Wait(100+random(200));
If IsUpText('') then
Begin
Mouse(x,y,0,0,true);
Wait(100+random(200));
If IsUpText('') then
Begin
Writeln('Something is wrong, after multiple attempts to take off your shield,');
Writeln('its still there, logging out for player safety.');
End;
End;
End;
End;
End else;
Begin
Writeln('No shield detected.');
End;
Begin
Writeln('Not removing shield.');
End;
If not (S_WTNR = 'gloves') then
Begin
If not FindDTM(EGDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
Begin
Writeln('You seem to have gloves on, taking them off...');
MMouse(x-random(3),y-random(3),3,3);
If IsUpText('') then
Begin
GetMousePos(x,y);
Mouse(x,y,0,0,true);
Wait(100+random(200));
If not IsUpText('') then
Writeln('Gloves taken off successfully.');
Else;
Begin
Mouse(x,y,0,0,true);
Wait(100+random(200));
If IsUpText('') then
Begin
Mouse(x,y,0,0,true);
Wait(100+random(200));
If IsUpText('') then
Begin
Writeln('Something is wrong, after multiple attempts to take off your gloves,');
Writeln('they are still there, logging out for player safety.');
End;
End;
End;
End;
End else;
Begin
Writeln('No gloves detected.');
End;
Begin
Writeln('Not removing gloves.');
End;
If (B_Bank) then
Begin
Repeat;
OpenBankQuiet(S_Bank);
Wait(50+random(300));
Until(Tries = 3)or(BankScreen);
BankAll;
End;