Jump to content

Recommended Posts

Posted

hey ya guys, i would like to ask you, if there is any possibility how to make a script, that would report about your char, for eg.

 

i will pm on my spoil from another char with any security asnwer, like

 

howmanyitems? - and my spoil should asnwer, how many items does it have....idk -> im away from home and left my spoiler spoiling some materials or enchants, log anywhere on another char, then PM my spoil, how many items or enchants does it have....i tried something about AI answer, but i wasnt successful... and for another informations -> live / dead (but it isnt necessary, i made a script, that would automatically return it back) and anything else would be appreciated...thx

  • 2 weeks later...
Posted

heh, my script for hlapex or l2phx

// 'status.txt' При получении в приват "status" бот отвечает
// (c) dmitry501

VAR
  CurrHP, CurrMP, CurrCP: Integer;
  UserID, ObjectID, textType : Integer;
  CharName, Message : String;
  i, j, aCount: Integer;
  AttrID, AttrValue : Integer;
  
procedure Init;
begin
  CurrHP := 0;
  CurrMP := 0;
  CurrCP := 0;
  UserID := 0;
end;

BEGIN
  if FromClient then exit;
  if pck[1]=#$4A then begin //Say2
    i:=2;
    ObjectID:=ReadD(i);
    textType:=ReadD(i);
    CharName:=ReadS(i);
    Message:=ReadS(i);
    if (textType=2) AND (Message = 'status') then begin
      buf:=#$38;
      WriteS('HP='+IntToStr(CurrHP)+' MP='+IntToStr(CurrMP)+' CP='+IntToStr(CurrCP));
      WriteD(2);
      WriteS(CharName);
      SendToServer;
    end;
  end;

  if pck[1]=#$04 then UserID:=ReadD(18); //UserInfo

  if pck[1]=#$0E then begin //StatusUpdate
    i:=2;
    ObjectID:=ReadD(i);
    aCount:=ReadD(i);
    if (ObjectID=UserID) AND (aCount>0) then
        for j:=1 to aCount do begin
          AttrID:=ReadD(i);
          AttrValue:=ReadD(i);
          if AttrID= 9 then CurrHP := AttrValue;
          if AttrID=11 then CurrMP := AttrValue;
          if AttrID=33 then CurrCP := AttrValue;
        end;
  end;
END.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...