Page 1 of 1
Function getname from journal, how?
Posted: 16.03.2016 23:38
by Ladok
Hello,
how can I get name from journal?
if (InJournalBetweenTimes('attacking you',gtime,Now) <> -1) then begin
uosay('\ Help guild, '+IntToStr(GetName(InJournal('attacking you'))+' is Killing me.');
gtime := Now; gtime2 := Now;
end;
anything like that, in Injection we use: uo.getserial(UO.JournalSerial(uo.InJournal(...
in stealth I didnt find how to do that,
anyone can help me?
thx =)
Re: Function getname from journal, how?
Posted: 16.03.2016 23:43
by drabadan
Ladok wrote:Hello,
how can I get name from journal?
if (InJournalBetweenTimes('attacking you',gtime,Now) <> -1) then begin
uosay('\ Help guild, '+IntToStr(GetName(InJournal('attacking you'))+' is Killing me.');
gtime := Now; gtime2 := Now;
end;
anything like that, in Injection we use: uo.getserial(UO.JournalSerial(uo.InJournal(...
in stealth I didnt find how to do that,
anyone can help me?
thx =)
You can use events to handle journal messages. In it's params there is SenderName in which you'l have your name.
Code: Select all
evSpeech : [Text,SenderName,SenderID]
program eventTest;
procedure SpeechEventHandler(Text,SenderName : String; SenderID : Cardinal);
begin
AddToSystemJournal(Text + ' ' + Name);
end;
begin
SetEventProc(evSpeech, 'SpeechEventHandler');
while not dead do
wait(1000);
end.
Re: Function getname from journal, how?
Posted: 17.03.2016 0:22
by Vizit0r
Ladok wrote:Hello,
how can I get name from journal?
if (InJournalBetweenTimes('attacking you',gtime,Now) <> -1) then begin
uosay('\ Help guild, '+IntToStr(GetName(InJournal('attacking you'))+' is Killing me.');
gtime := Now; gtime2 := Now;
end;
anything like that, in Injection we use: uo.getserial(UO.JournalSerial(uo.InJournal(...
in stealth I didnt find how to do that,
anyone can help me?
thx =)
InJournalBetweenTimes
+
function LineID : Cardinal;
=
profit!
Re: Function getname from journal, how?
Posted: 17.03.2016 0:55
by Ladok
better then this is impossible! profit
did it!
if (InJournalBetweenTimes('attacking you',gtime,Now) <> -1) then begin
uosay('\Help '+GetName(LineID)+' is killing me');
...
best and easir way...
thanks too much genius
Vizit0r wrote:Ladok wrote:Hello,
how can I get name from journal?
if (InJournalBetweenTimes('attacking you',gtime,Now) <> -1) then begin
uosay('\ Help guild, '+IntToStr(GetName(InJournal('attacking you'))+' is Killing me.');
gtime := Now; gtime2 := Now;
end;
anything like that, in Injection we use: uo.getserial(UO.JournalSerial(uo.InJournal(...
in stealth I didnt find how to do that,
anyone can help me?
thx =)
InJournalBetweenTimes
+
function LineID : Cardinal;
=
profit!