Page 1 of 1

about journal scan, another problem!

Posted: 05.01.2013 9:33
by TheEnd
Is there any method to get the string of journal?
e.g: when somebody in my sight, i can get the Player's Name, Guild, and so on.

Thanks

Re: about journal scan, another problem!

Posted: 05.01.2013 18:57
by Crome696
TheEnd wrote:Is there any method to get the string of journal?
e.g: when somebody in my sight, i can get the Player's Name, Guild, and so on.

Thanks
Try to use http://stealth.od.ua/Doc:Api/HighJournal to get the amount of Lines and use http://stealth.od.ua/Doc:Api/Journal to read the line. Create a List of Visible Mobiles via FindType and then compare the Property with the Lines..

Re: about journal scan, another problem!

Posted: 05.01.2013 19:37
by TheEnd
ive read your the Script that Unmoving Necromancy Trainer, its great!

about my problem, can you give me an simple example?

Re: about journal scan, another problem!

Posted: 06.01.2013 9:24
by Crome696
TheEnd wrote:ive read your the Script that Unmoving Necromancy Trainer, its great!

about my problem, can you give me an simple example?
Never did myself yet in comparing, but i just looked at osi if a player appear.
If you uncheck "Show Cliloc Text in Journal" and then check in Stealth Journal You see: cliloc# $001005BD.

If you convert 1005BD to Integer you get 1050045 as Value. If you open now UO Fiddler and check this Value you get :
~1_PREFIX~~2_NAME~~3_SUFFIX~ as Content. I would need to check myself how to read those Parameters out with Journal but if you Scan for Body Types (Human, Elfes,Gargoyles,Morphed Forms) then create a TClilocRec Object with each Result you also should be able to read full Character Details out ( Only what client can see). A Sample how handle TClilocRec and how to read you can see in my Unit "Propertyhandling" at unmoving Necromancy Trainer

Each Property have a Cliloc ( even Names ) and specific Parameters so even " Names" or GuildTag have a Cliloc with Content ( The Text what Client Displays).

To be honest : Stealth can handle nearly all Client offer , its just sometimes not easy to find the way how to do :)

Re: about journal scan, another problem!

Posted: 06.01.2013 20:04
by Boydon
I would approach differently.

You have LowJournal and HighJournal to scan the journal using Journal: when you use the latter you can take advantage of the LineID to know who said that phrase (you also have a bunch of Line* functions to get other info).

After I would use GetTooltipRec as Chrome is suggesting. ;)

Re: about journal scan, another problem!

Posted: 07.01.2013 13:11
by TheEnd
Boydon wrote:I would approach differently.

You have LowJournal and HighJournal to scan the journal using Journal: when you use the latter you can take advantage of the LineID to know who said that phrase (you also have a bunch of Line* functions to get other info).

After I would use GetTooltipRec as Chrome is suggesting. ;)
thank you, Boydon.
i just want to get the simple Info: the Player's name and Guild when someone in my sight.
i've written the simple code, but how can i get the current playerID? and ignore the same player in set time?

Code: Select all

procedure Scan() //????
begin
  ..................
end;

function autoConnect():Integer;
begin
  while not Connected() do 
  begin
    if not Connected() then
    begin
      Connect();
      Wait(10000);
      Continue;
    end;
  end;
end;

begin
  //$0190 -- man
  //$0191 -- Woman
  //$025D -- ElfMan
  //$025E -- ElfWoman
  //$029A -- GargoyleMan
  //$029B -- GargoyleWoman
  PlayerTypes := [$0190, $0191, $025D, $025E, $029A, $029B];
  
  //t := 0;
  //sTime := Now;
  autoConnect;
  while Connected() do
  begin
    autoConnect;
    scan();
  end;
end.

Re: about journal scan, another problem!

Posted: 07.01.2013 15:07
by Boydon
Ok, so you don't need to scan journal.
Just loop on your array PlayerTypes using FindType with Ground() as container and then with GetFindedList you have all the IDS matching your criteria. Then with GetName you can have the name, and for the guild you'll need to go with Tooltip scan.

Remember to have a FindDistance of at least 15 tiles (20 is the maximum)

Re: about journal scan, another problem!

Posted: 07.01.2013 21:34
by Crome696
Don´t forget to add special Forms like Necroform, Lichform , Horrfic beast , Animal Forms...
For AnimalTypes ( about Form ) make a name Filter like to exclude normal Animals:)