Jump to content

fAkeN

Members
  • Posts

    276
  • Credits

  • Joined

  • Last visited

  • Feedback

    100%

Posts posted by fAkeN

  1. if (user.DistTo(Char2) < radius_max)
    and not (char2.ismember)
    and not (char2.dead)
    and not (user.clanid = char2.clanid)
    and not ((char2.ClassID = 27) or (char2.ClassID = 103))  // Changed from User to char2
    and (char2.pvp) then 
    begin
        // Your code to target char2
    end;

     

  2. 5 hours ago, panchio said:

    @adr.bot how could i read the system message window? i mean if i would like to catch, record all my damages, pick up or any other consumable actived

     

    I've tried ChatMessage.ChatType= mtSystem but it is not getting anything.

    Use WaitAction instead.

     

    var
      id , p : integer;
    begin
       while (true) do
       begin
          Engine.WaitAction([laSysMsg],id,p);
          print(id);
       end;
    end.

     

  3. var
      PURCHASE_DIALOGS: array of string = ['1st Dialog name','2nd Dialog name'];
    
      StaffID : integer  = 189;
      StaffCount : int64 = 1;
      StaffPrice : int64 = 1800000;
      
    function ItemCounting(id: integer): int64;
    var i: integer;
    begin
      result:= 0;                                          
      for i:= 0 to Inventory.User.Count-1 do begin
        if (Inventory.User.Items(i).ID = id) then
          Inc(result, Inventory.User.Items(i).Count);
      end; 
    end;
    
    procedure OpenStore();
    var i: integer;
    begin
      for i:= Low(PURCHASE_DIALOGS) to High(PURCHASE_DIALOGS) do
        if Engine.DlgSel(PURCHASE_DIALOGS[i]) then delay(500);
    end;
    
    procedure PurchaseCrystallize();
    var
      i: integer;
    begin
      while delay(100) do begin
        if (Engine.Status = lsOnline)
        and (ItemCounting(57) > (StaffPrice*StaffCount)) then begin
          OpenStore();
          Engine.NpcExchange(StaffID, StaffCount);
          for i:= 1 to StaffCount do begin
            if Engine.CrystalItem(StaffID) then delay(200);
          end;
        end else begin
          Print('Havent enough adena for purchase!');
          Engine.BlinkWindow(true);
          Script.Stop;
        end;
      end;
    end;
    
    begin
      PurchaseCrystallize;
    end.

     

  4. Firstly you have to check html dialog

    begin
    	print(Engine.DlgText);
    end.

    Let's say you have

    <html><body><a action="bypass -h npc_268477783_Quest Q362_BardsMandolin">[Bard's Mandolin (In Progress)]</a><br>

    correct code will be this

    begin
    	Engine.BypassToServer('npc_268477783_Quest Q362_BardsMandolin');
    end.

     

    • Like 1
×
×
  • 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