Show Posts

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.


Messages - camotbik

Pages: 1 ... 3 4 [5] 6 7 ... 24
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?

62
New member introductions / Re: Hello ScriptUO
« on: December 03, 2011, 12:13:49 PM »
Welcome to SUO.

63
New member introductions / Re: Hello Fellow UO Addicts!
« on: December 03, 2011, 03:56:00 AM »
Welcome to SUO.

64
Site News / Re: Please welcome the new Elites!
« on: December 03, 2011, 03:41:50 AM »
Congradulations, both of you deserved this.

65
Scripting Chat / Re: ZLF =[ How to proced?
« on: December 01, 2011, 05:24:25 AM »
I took a closer look at your journal scaning block it looks kind of F up.. This example doesnt contain all the messages it's just a way to show you how to use journal scaning in a secure way. ( i added the brackets to 1liners, so you would understand(if you got problems with them)).
Code: [Select]
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

66
Scripting Chat / Re: ZLF =[ How to proced?
« on: November 30, 2011, 07:59:19 PM »
I dont know why you want to work with journal, coz in any way, there should be a bandage delay that doesnt change.. Right?
Code: [Select]
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

Update: Right. Now I remembered that you got bleed on OSI shards, so that's why you use the journal. Well it's easy to implement a journal scan in there. Just write if you need help with that.
ps; your gotos make your script hard to read.. you could use subs to make it more readable.

67
Scripting Chat / Re: ZLF =[ How to proced?
« on: November 30, 2011, 06:52:16 AM »
what about bandage timer? ))

68
Script Debug / Re: simple for you, but hard for this newbe
« on: November 30, 2011, 04:53:31 AM »
congrads, but next time please put your code in to the code tags

69
New member introductions / Re: Hello to the Community
« on: November 25, 2011, 12:03:05 PM »
Hello and welcome.

70
Stealth archive / Re: Stealth script corner.
« on: November 25, 2011, 03:21:34 AM »

71
Stealth archive / Re: Stealth script corner.
« on: November 25, 2011, 02:21:17 AM »
I see the begin and end as brackets in easyuo, just you have to know that on else we don't put ; in the end of the line.

Few features that I like in stealth.
*Journal loging in to a file from the menu.
*Move function in map from the menu - *look bellow.
*Server setup - you can login on your characters from any computer and look how are they doing
*The best built in reconnect I have seen.
And of course the flexibility and speed of pascal.
Code: [Select]
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




72
Stealth archive / Stealth script corner.
« on: November 22, 2011, 06:28:11 AM »
Hello there. As there is no section for stealth scripts, i made this little thread. People that are not familiar with stealth client - it is a non-graphical script client for uo, but if you want you can attach the graphical client as well. It has a mass of possibilities, and the script language(pascal) is pretty easy to learn.

The first script I want to demonstrate is support script in pvp - a healer runs behind the host char with a precasted greater heal and heals every one from the friendlist when theyre health comes down to 94% (23). Cures as well when needed. + the best bonus is line of sight check, so for example if your friend is behind a wall but < 10 tiles from you, you wont try to cast on him.
Code: [Select]
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.

The other script is a idoc finder, that stores results in a file, [ xy, state, date ], when an greatly or idoc found yells M! so if you want you could mark a rune near the house.
Code: [Select]
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.

I'm still a newbie at pascal, so don't judge hard.

ps; you can check house signs that are 25 tiles away from your character, so you have a big advantage..

73
Script Snippets / Loot from target
« on: November 21, 2011, 03:59:30 AM »
Those who have used sallos(play uo ) know the sexy feature that lets you select(target) an item, and the client moves it for you in to your backpack. This is very usefull in pvp, as you not always want to loot all the stuff in a body, as autolooters do.

Code: [Select]
Sub Loot
  set #targcurs 1
  while #targcurs = 1
    wait
  exevent drag #ltargetid 99999
  exevent dropc #backpackid
return

74
Off Topic / Re: Just to say "Thank you"
« on: November 18, 2011, 11:49:07 PM »
And thank you my dear friend.

75
New member introductions / Re: My introductory
« on: November 18, 2011, 11:43:32 PM »
Welcome

Pages: 1 ... 3 4 [5] 6 7 ... 24