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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock