61
Off Topic / Re: The top 12 reasons I'm liking Notepad++ so far
« on: December 04, 2011, 04:05:06 AM »
the only problem is that notepad++ has no auto indent, right?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
set %_jindex #jindex
set %HealingFlag #false
set %heal_timeout #sCnt + 6
repeat
if #jindex >= %_jindex
{
scanjournal %_jindex
if state in #journal
{
set %mortal #true
set %healingflag #true
}
if not_damaged in #journal || must_wait in #journal || #scnt > %heal_timeout
{
set %healingflag #true
}
if you_finish_applying in #journal || stop_the_bleeding in #journal || little in #journal
{
set %healingflag #true
}
set %_jindex %_jindex + 1
}
until %HealingFlag = #true
set %bandagetimer #scnt
set %Factiontime #scnt
repeat
gosub Bandageself
wait 1
until = #false
Sub BandageSelf
if #hits < #maxhits && #scnt > %bandagetimer
{
finditem ZLF C_
for #findindex 1 #findcnt
{
event property #findid
if Enchanted in #property && #scnt > %Factiontime
{
set #lobjectid #findid
set %Factiontime #scnt + 12
break
}
set #lobjectid #findid
}
if #findcnt > 0
{
event macro 17
target
event macro 23
set %bandagetimer #scnt + 12
}
}
return
While (not Dead) and (GetQuantity(FindTypeEx(BollaBalls, BollaBallsColor, Storage, false)) >= MinimumBollaBalls) and (GetQuantity(FindTypeEx(LeatherType, LeatherColor, Storage, false)) >= MinimumLeather) and (GetQuantity(FindTypeEx(Ingottype, IngotColor, Storage, false)) >= MinimumIngots) do
onst Host = $000F7F27;
var p : TPathArray;
c : Integer;
i : Integer;
MeditTime : Cardinal;
Friend: array of Cardinal;
res : Boolean;
procedure Medit;
begin
if WarMode = true then SetWarMode(false);
if Mana < MaxMana then
begin
if ((Timer > (MeditTime + (11 * 1000))) or (MeditTime = 0)) then
begin
UseSkill('Meditation');
MeditTime :=Timer;
end;
end;
end;
procedure PrecastGH;
begin
if not TargetPresent then
begin
if (Count($0F85) > 0) and (Count($0F84) > 0) and (Count($0F86) > 0) and (Count($0F8D) > 0) and (Mana > 10) then
begin
Cast('Greater heal');
WaitForTarget(2000);
end;
end;
end;
procedure Cure;
begin
if TargetPresent then CancelTarget;
if (Count($0F84) > 0) and (Count($0F85) > 0) and (Mana > 5) then
begin
Cast('Cure');
WaitForTarget(2000);
res := CheckLoS(getX(self), getY(self), getZ(self) + 15, getX(Friend[i]), getY(Friend[i]), getZ(Friend[i]) + 15, WorldNum);
if TargetPresent and (getDistance(Friend[i]) < 11) and (Mana > 5) and res then TargetToObject(Friend[i]);
end;
end;
procedure Checktarget;
begin
Friend := [$000DC8C1, $000DCFE0, $000F7F27];
for i := 0 to Length(Friend) -1 do
begin
res := CheckLoS(getX(self), getY(self), getZ(self) + 15, getX(Friend[i]), getY(Friend[i]), getZ(Friend[i]) + 15, WorldNum);
if IsPoisoned(Friend[i]) and res then cure;
if (GetHP(Friend[i]) < (GetMaxHP(Friend[i]) - 3)) and (GetHP(Friend[i]) > 0) and TargetPresent and (getDistance(Friend[i]) < 11) and (Mana > 10) and res then TargetToObject(Friend[i]);
end;
end;
begin
losOptions := losTypeRunUO;
while not dead do
begin
wait(50);
if getDistance(Host) > 4 then
begin
c := GetPathArrayFrom(PredictedX, PredictedY, PredictedZ, GetX(Host), GetY(Host), 1, True, p);
if c > 0 then StepQ(CalcDir(PredictedX, PredictedY, p[0].X, p[0].Y), True);
end;
PrecastGH;
Checktarget;
Medit;
end;
end.
procedure WriteToFile(filepath: string; data: string);
var mode: Word;
begin
if FileExists(filepath) then mode := fmOpenReadWrite
else mode := fmCreate;
with TFileStream.Create(filepath,mode) do
try
Seek(0,soFromEnd);
WriteBuffer(data,Length(data));
finally
Free;
end;
end;
function status(str : String) : String;
begin
result := '???';
// if BMSearch(1, str, 'This house is fairly worn.') > 0 then result := 'fairly'; // just had too amny fairlys on the tests
if BMSearch(1, str, 'This house is greatly worn.') > 0 then result := 'greatly';
if BMSearch(1, str, 'This house is in danger of collapsing.') > 0 then result := 'idoc';
end;
procedure checkStatus;
var s : String;
begin
s := status(journal(lineIndex));
if s <> '???' then
begin
writeToFile('C:\Idocs3.txt', intToStr(getX(finditem)) + ' ' + intToStr(getY(finditem)) +' ' + s + ' ' + DateTimeToStr(Now) +#13#10);
UOsay('M!!!!');
end;
end;
function findTypes(types : array of word; container : cardinal) : cardinal;
var
f : integer;
begin
result := 0;
for f := 0 to getArrayLength(types) - 1 do
if (findType(types[f], container) <> 0) then
begin
result := finditem;
break;
end;
end;
var lastTime : TDateTime;
begin
findDistance := 25 // maximum distance
findVertical := 128 // maximum vertical distance
while not Dead do
begin
FindTypes([$0BD2,$0BA4,$0BA6,$0BA8,$0BAA,$0BAC,$0BAE,$0BB0,$0BB2,$0BB4,$0BB6,$0BB8,$0BBA,$0BBC,$0BBE,$0BC0,$0BC2,$0BC4,$0BC6,$0BC8,$0BCA,$0BCC,$0BCE,$0BD0,$0BD2,$0BD4,$0BD6,$0BD8,$0BDA,$0BDC,$0BDE,$0BE0,$0BE2,$0BE6,$0BE8,$0BEA,$0BEC,$0BEE,$0BF0,$0BF2,$0BF4,$0BF6,$0BF8,$0BFA,$0BFC,$0BFE,$0C00,$0C02,$0C04,$0C06,$0C08,$0C0A,$0C0C,$0C0E], ground)
if finditem <> 0 then
begin
lastTime := now;
wait(100);
clickOnObject(finditem);
if waitJournalLine(lastTime, 'This house is', 3000) then checkStatus;
ignore(finditem);
end;
wait(500);
end;
End.
Sub Loot
set #targcurs 1
while #targcurs = 1
wait
exevent drag #ltargetid 99999
exevent dropc #backpackid
return