Advertisement
Guest User

Untitled

a guest
Mar 26th, 2015
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 15.30 KB | None | 0 0
  1. program somethingSexy;                          //TODO:
  2. {$DEFINE SMART}                                 //
  3.                                                 //TopNotch antiban
  4.                                                 //Progress Report with paint    .https://villavu.com/forum/showthread.php?t=110720
  5. {$i AeroLib/AeroLib.Simba}                      //A simple GUI                  .https://villavu.com/forum/showthread.php?t=41418
  6. {$i reflection/Reflection.Simba}                //(unfinished) Arrows/Bolts
  7.                                                 //Progressive lvling + cut&string
  8. var                                             //  competitable
  9.   MyPlayer: TReflectLocalPlayer;                //Interactable paint            .https://villavu.com/forum/showthread.php?t=107124
  10.   WhatToDo, ItemMaterial, LongOrShortBows: String;  //Auto-Updater                  .https://villavu.com/forum/showthread.php?t=70271
  11.   PreferredWorld, FletchingItem: Integer;
  12.   EnableAutomaticSwitching, EnableCuttingAndStringing,
  13.   AddFeathersToArrowShafts, OutOfLogs, FinishedScript,
  14.   SkipYewAndMagicShortBows: Boolean;
  15.   whatsTheTime: TReflectTimer;
  16.  
  17. procedure scriptSetup;
  18. begin
  19.   MyPlayer.Active := True;
  20.   MyPlayer.Username := 'anno of war';
  21.   MyPlayer.Password := 'teringturk';
  22.   MyPlayer.Pin := '0000';
  23.   PreferredWorld := 305;
  24.  
  25.   EnableAutomaticSwitching := False;   //
  26.     SkipYewAndMagicShortBows := False;
  27.   EnableCuttingAndStringing := True; //
  28.   AddFeathersToArrowShafts := False; //Set to true for this to work
  29.   WhatToDo := 'cut';                   //Cut, String, Shafts, HeadlessArrows, Arrows, Darts, Bolts
  30.   ItemMaterial := 'yew';        //Normal, Oak, Willow, Maple, Yew, Magic or
  31.                                   //Bronze, Iron, Steel, Mithril, Adamant, Rune, Dragon
  32.   LongOrShortBows := 'long';         //Long, Short
  33. end;
  34.  
  35. procedure setupScript;
  36. begin
  37.   case lowerCase(WhatToDo) of
  38.     'cut':
  39.       case lowerCase(ItemMaterial) of
  40.         'normal': FletchingItem := 1511;
  41.         'oak'   : FletchingItem := 1521;
  42.         'willow': FletchingItem := 1519;
  43.         'maple' : FletchingItem := 1517;
  44.         'yew'   : FletchingItem := 1515;
  45.         'magic' : FletchingItem := 1513;
  46.       end;
  47.  
  48.     'string':
  49.       case lowerCase(LongOrShortBows) of
  50.         'long':
  51.           case lowerCase(ItemMaterial) of
  52.             'normal': FletchingItem := 48;
  53.             'oak'   : FletchingItem := 56;
  54.             'willow': FletchingItem := 58;
  55.             'maple' : FletchingItem := 62;
  56.             'yew'   : FletchingItem := 66;
  57.             'magic' : FletchingItem := 70;
  58.           end;
  59.  
  60.         'short':
  61.           case lowerCase(ItemMaterial) of
  62.             'normal': FletchingItem := 50;
  63.             'oak'   : FletchingItem := 54;
  64.             'willow': FletchingItem := 60;
  65.             'maple' : FletchingItem := 64;
  66.             'yew'   : FletchingItem := 68;
  67.             'magic' : FletchingItem := 72;
  68.           end;
  69.       end;
  70.  
  71.     'shafts':
  72.                    FletchingItem := 1511;
  73.  
  74.     'headlessarrows':
  75.                    FletchingItem := 52;
  76.  
  77.     'arrows':
  78.       case lowerCase(ItemMaterial) of
  79.         'bronze' : FletchingItem := 39;
  80.         'iron'   : FletchingItem := 40;
  81.         'steel'  : FletchingItem := 41;
  82.         'mithril': FletchingItem := 42;
  83.         'adamant': FletchingItem := 43;
  84.         'rune'   : FletchingItem := 44;
  85.         'dragon' : FletchingItem := 11237;
  86.       end;
  87.  
  88.     'darts':
  89.       case lowerCase(ItemMaterial) of
  90.         'bronze' : FletchingItem := 819;
  91.         'iron'   : FletchingItem := 820;
  92.         'steel'  : FletchingItem := 821;
  93.         'mithril': FletchingItem := 822;
  94.         'adamant': FletchingItem := 823;
  95.         'rune'   : FletchingItem := 824;
  96.         'dragon' : FletchingItem := 11232;
  97.       end;
  98.  
  99.     'bolts':
  100.       case lowerCase(ItemMaterial) of
  101.         'bronze' : FletchingItem := 9375;
  102.         'blurite': FletchingItem := 9376;
  103.         'iron'   : FletchingItem := 9377;
  104.         'steel'  : FletchingItem := 9378;
  105.         'mithril': FletchingItem := 9379;
  106.         'adamant': FletchingItem := 9380;
  107.         'rune'   : FletchingItem := 9381;
  108.         'silver' : FletchingItem := 9382;
  109.  
  110.       end;
  111.   end;
  112. end;
  113.  
  114. procedure automaticSwitching;
  115. begin
  116.   if (EnableCuttingAndStringing = True) then
  117.   begin
  118.     if (OutOfLogs = True) then
  119.       WhatToDo := 'string';
  120.   end;
  121.   if(EnableAutomaticSwitching = True) then
  122.   begin
  123.     case MyPlayer.GetSkillLevel(17) of
  124.        1..4:
  125.         begin
  126.           WhatToDo := 'Shafts';
  127.         end;
  128.        5..9:
  129.         begin
  130.           ItemMaterial := 'Normal';
  131.           LongOrShortBows := 'Short';
  132.         end;
  133.       10..19:
  134.           LongOrShortBows := 'long';
  135.       20..24:
  136.         begin
  137.           ItemMaterial := 'Oak';
  138.           LongOrShortBows := 'Short';
  139.         end;
  140.       25..34:
  141.         LongOrShortBows := 'Long';
  142.       35..39:
  143.         begin
  144.           ItemMaterial := 'Willow';
  145.           LongOrShortBows := 'Short';
  146.         end;
  147.       40..49:
  148.         LongOrShortBows := 'Long';
  149.       50..54:
  150.         begin
  151.           ItemMaterial := 'Maple';
  152.           LongOrShortBows := 'Short';
  153.         end;
  154.       55..64:
  155.         LongOrShortBows := 'Long';
  156.       65..69: if (not SkipYewAndMagicShortBows = True) then
  157.         begin
  158.           ItemMaterial := 'Yew';
  159.           LongOrShortBows := 'Short';
  160.         end;
  161.       70..79:
  162.         LongOrShortBows := 'Long';
  163.       80..84: if (not SkipYewAndMagicShortBows = True) then
  164.         begin
  165.           ItemMaterial := 'Magic';
  166.           LongOrShortBows := 'Short';
  167.         end;
  168.       85..99:
  169.         LongOrShortBows := 'Long';
  170.     end;
  171.   end;
  172. end;
  173.  
  174. procedure antiBannelings;
  175. var
  176.   randomAmount: Integer;
  177. begin
  178.   case lowerCase(WhatToDo) of
  179.     'cut': randomAmount := RandomRange(1500, 2000);
  180.     'string': randomAmount := RandomRange(1200, 1500);
  181.     'shafts': randomAmount := RandomRange(1500, 2000);
  182.     //'headlessarrows', 'darts', 'bolts', 'arrows':
  183.     //          randomAmount := RandomRange(1000, 1500);
  184.   end;
  185.  
  186.   case Random(randomAmount) of
  187.      1..15: HoverSkill('Fletching', false);
  188.     16..20: ExamineInv;
  189.     21..30: PickUpMouse;
  190.     31..35: RandomRClick;
  191.     36..60: MMouseOffClient('random');
  192.   end;
  193. end;
  194.  
  195. function TReflectionInventory.checkInvChange(MaxTime: Integer): Boolean;
  196. var
  197.   T: TReflectTimer;
  198.   Temp: TReflectInvItem;
  199. begin
  200.   for I := 0 to ItemCount do
  201.  
  202. end;
  203.  
  204. procedure openTheBank;
  205. var
  206.   Banker: TReflectNpc;
  207.   BankChest: TReflectObject;
  208.   Point: TPoint;
  209.   useOptionBank: String;
  210. begin
  211.   if (lowerCase(WhatToDo) = 'string') or (lowerCase(WhatToDo) = 'cut') or
  212.     (lowerCase(WhatToDo) = 'shafts') then
  213.   begin
  214.     repeat
  215.       if not MyPlayer.IsLoggedIn then
  216.         Exit;
  217.       if Reflect.Bank.IsOpen then
  218.         Exit;
  219.  
  220.       if Banker.Find('Banker') then
  221.       begin
  222.         Point := Banker.GetMSPoint;
  223.       end else
  224.         if BankChest.Find(objGame, 'Bank chest', 20) then
  225.         begin
  226.           Point := BankChest.GetMSPoint;
  227.         end else
  228.           if Banker.Find('Emerald Benedict') then
  229.           begin
  230.             Point := Banker.GetMSPoint;
  231.           end else
  232.             if Banker.Find('Gundai') then
  233.             begin
  234.               Point := Banker.GetMSPoint;
  235.             end else
  236.             begin
  237.               Writeln('Could not find a supported bank');
  238.               TerminateScript;
  239.             end;
  240.  
  241.       Reflect.Mouse.Move(Point, 4, 4);
  242.       Reflect.Mouse.Click(Mouse_Right);
  243.       waitOptionMulti(['Bank Bank', 'Use Bank', 'Bank Emerald', 'Bank Gundai'], 100);
  244.       Wait(RandomRange(50, 150));
  245.       MyPlayer.EnterPin;
  246.       Wait(RandomRange(1000,2000));
  247.     until(Reflect.Bank.IsOpen);
  248.   end;
  249. end;
  250.  
  251. procedure bankTheStuff;
  252. var
  253.   itemForFletching: TReflectBankItem;
  254. begin
  255.   if (lowerCase(WhatToDo) = 'string') or (lowerCase(WhatToDo) = 'cut') or
  256.   (lowerCase(WhatToDo) = 'shafts') then
  257.   begin
  258.     if not MyPlayer.IsLoggedIn then
  259.       Exit;
  260.     if not Reflect.Bank.IsOpen then
  261.       Exit;
  262.  
  263.     case lowerCase(WhatToDo) of
  264.       'shafts':
  265.       begin
  266.         if not Reflect.Inv.Contains([946]) then
  267.           if itemForFletching.Find(946) then
  268.           begin
  269.             itemForFletching.Withdraw(1);
  270.           end else
  271.           begin
  272.             Writeln('Could not find a knife in bank or inventory');
  273.             TerminateScript;
  274.           end;
  275.  
  276.         if (AddFeathersToArrowShafts = True) then
  277.           if not Reflect.Inv.Contains([314]) then
  278.             if itemForFletching.Find(314) then
  279.             begin
  280.               itemForFletching.Withdraw(-1);
  281.             end else
  282.             begin
  283.               Writeln('Could not find feathers in bank or inventory');
  284.               AddFeathersToArrowShafts := False;
  285.             end;
  286.  
  287.         if not Reflect.Inv.Contains([1511]) then
  288.           if itemForFletching.Find(1511) then
  289.           begin
  290.             itemForFletching.Withdraw(-1);
  291.           end else
  292.           begin
  293.             Writeln('Out of logs');
  294.             TerminateScript;
  295.           end;
  296.       end;
  297.  
  298.       'cut':
  299.       begin
  300.         if Reflect.Inv.Contains([946]) then
  301.         begin
  302.           depositItem(2, -1, True);
  303.           if Reflect.Inv.Count > 1 then
  304.             quickDeposit('inventory');
  305.         end else
  306.           quickDeposit('inventory');
  307.  
  308.         if not Reflect.Inv.Contains([946]) then
  309.           if itemForFletching.Find(946) then
  310.           begin
  311.             itemForFletching.Withdraw(1);
  312.           end else
  313.           begin
  314.             Writeln('Could not find a knife in bank or inventory');
  315.             TerminateScript;
  316.           end;
  317.  
  318.         if itemForFletching.Find(FletchingItem) then
  319.         begin
  320.           itemForFletching.Withdraw(-1);
  321.         end else
  322.           if (EnableCuttingAndStringing = True) then
  323.           begin
  324.             OutOfLogs := True;
  325.             Exit;
  326.           end else
  327.           begin
  328.             Writeln('Out of logs');
  329.             TerminateScript;
  330.           end;
  331.       end;
  332.  
  333.       'string':
  334.       begin
  335.         if not Reflect.Inv.IsEmpty then
  336.           quickDeposit('inventory');
  337.  
  338.         if itemForFletching.Find(1777) then
  339.         begin
  340.           itemForFletching.Withdraw(14);
  341.         end else
  342.         begin
  343.           Writeln('Out of Bow strings');
  344.           TerminateScript;
  345.         end;
  346.         if itemForFletching.Find(FletchingItem) then
  347.         begin
  348.           itemForFletching.Withdraw(14);
  349.         end else
  350.         begin
  351.           Writeln('Out of Unstrung bows');
  352.           TerminateScript;
  353.         end;
  354.       end;
  355.     end;
  356.     Reflect.Bank.Close;
  357.   end;
  358. end;
  359.  
  360. procedure fletchTheStuff;
  361. var
  362.   itemForFletching: TReflectInvItem;
  363.   outOfFletchingItem: Boolean;
  364. begin
  365.   if not MyPlayer.IsLoggedIn then
  366.     Exit;
  367.   if Reflect.Bank.IsOpen then
  368.     Exit;
  369.  
  370.   if (lowerCase(WhatToDo) = 'string') or (lowerCase(WhatToDo) = 'cut') or
  371.      (lowerCase(WhatToDo) = 'shafts') or (lowerCase(WhatToDo) = 'arrows') or
  372.      (lowerCase(WhatToDo) = 'headlessarrows') then
  373.   begin
  374.     While Reflect.Inv.Contains([FletchingItem]) do
  375.     begin
  376.       if itemForFletching.Find(FletchingItem) then
  377.       begin
  378.         Reflect.Mouse.Move(itemForFletching.GetPoint, 3, 3);
  379.         Reflect.Mouse.Click(Mouse_Left);
  380.       end else
  381.         outOfFletchingItem := True;
  382.  
  383.       case lowerCase(WhatToDo) of
  384.         'cut':
  385.         begin
  386.           if itemForFletching.Find(946) then
  387.           begin
  388.             Reflect.Mouse.Move(itemForFletching.GetPoint, 3, 3);
  389.             Reflect.Mouse.Click(Mouse_Left);
  390.           end else
  391.             Exit;
  392.  
  393.           case lowerCase(LongOrShortBows) of
  394.             'long':
  395.               if (lowerCase(ItemMaterial) = 'normal') then
  396.               begin
  397.                 Reflect.Mouse.Move(280, 380, 250, 450, Mouse_Right);
  398.               end else
  399.                 Reflect.Mouse.Move(210, 380, 310, 450, Mouse_Right);
  400.             'short':
  401.               if (lowerCase(ItemMaterial) = 'normal') then
  402.               begin
  403.                 Reflect.Mouse.Move(160, 380, 240, 450, Mouse_Right);
  404.               end else
  405.                 Reflect.Mouse.Move(60, 380, 150, 450, Mouse_Right);
  406.           end;
  407.  
  408.           Wait(RandomRange(150, 250));
  409.           Reflect.Text.ChooseOption('Make X', 100);
  410.           Wait(RandomRange(800,1200));
  411.           Reflect.KeyBoard.TypeSend('33', True);
  412.         end;
  413.  
  414.         'string':
  415.         begin
  416.           if itemForFletching.Find(1777) then
  417.           begin
  418.             Reflect.Mouse.Move(itemForFletching.GetPoint, 3, 3);
  419.             Reflect.Mouse.Click(Mouse_Left);
  420.           end else
  421.             Exit;
  422.           Wait(RandomRange(150, 250));
  423.           Reflect.Mouse.Move(215, 395, 305, 455, Mouse_Right);
  424.           Wait(RandomRange(150, 250));
  425.           Reflect.Text.ChooseOption('Make All', 100);
  426.         end;
  427.  
  428.         'shafts':
  429.         begin
  430.           if (outOfFletchingItem = True) then
  431.             Exit;
  432.  
  433.           if itemForFletching.Find(946) then
  434.           begin
  435.             Reflect.Mouse.Move(itemForFletching.GetPoint, 3, 3);
  436.             Reflect.Mouse.Click(Mouse_Left);
  437.           end else
  438.             Exit;
  439.  
  440.           Wait(RandomRange(150, 250));
  441.           Reflect.Mouse.Move(45, 385, 135, 455, Mouse_Right);
  442.           Reflect.Text.ChooseOption('Make X', 100);
  443.           Wait(RandomRange(800, 1200));
  444.           Reflect.KeyBoard.TypeSend('33', True);
  445.         end;
  446.  
  447.         'headlessarrows', 'arrows':
  448.         begin
  449.           if outOfFletchingItem = True then
  450.           begin
  451.             Writeln('Out of items');
  452.             TerminateScript;
  453.           end;
  454.  
  455.           if itemForFletching.Find(314) then
  456.           begin
  457.             Reflect.Mouse.Move(itemForFletching.GetPoint, 3, 3);
  458.             Reflect.Mouse.Click(Mouse_Left);
  459.           end else
  460.             Writeln('No feathers in inventory');
  461.             TerminateScript;
  462.  
  463.           Wait(RandomRange(150, 250));
  464.           Reflect.Mouse.Move(215, 395, 305, 455, Mouse_Right);
  465.           Wait(RandomRange(150, 250));
  466.           Reflect.Text.ChooseOption('Make 10', 100);
  467.         end;
  468.       end;
  469.  
  470.       repeat
  471.         antiBannelings;
  472.         Wait(500);
  473.       until (not Reflect.Inv.Contains([FletchingItem]));// or checkInvChange(MaxWait):Boolean = False
  474.     end;
  475.   end;
  476. end;
  477. //feathers: 314
  478.  
  479. procedure boltsAndDarts;
  480. begin
  481. end;
  482.  
  483. procedure exitOut;
  484. begin
  485.   Reflect.Bank.Close;
  486.   MyPlayer.Logout;
  487. end;
  488.  
  489. begin
  490.   AddOnTerminate('exitOut');
  491.   clearDebug;
  492.   initAL();
  493.   Reflect.Setup;
  494.   scriptSetup;
  495.   MyPlayer.Create;
  496.   if not MyPlayer.IsLoggedIn then
  497.     MyPlayer.ChangeWorld(PreferredWorld);
  498.  
  499.   repeat
  500.     if not MyPlayer.IsLoggedIn then
  501.       MyPlayer.Login;
  502.     automaticSwitching;
  503.     setupScript;
  504.     openTheBank;
  505.     bankTheStuff;
  506.     fletchTheStuff;
  507.     boltsAndDarts;
  508.   until(false);
  509. end.
  510. {
  511. mouse speed
  512. after depositAll doesn't withdraw knife
  513. whatsTheTime.Restart if inventory has changed
  514. after gui maybe > loop bankTheStuff until(inv contains arrayOfInvItems set at beginning of script)
  515. search option in bank
  516. after proggy > stop after X amount of bows/arrows made
  517. worldhop if botworld=true
  518. after gui > set WhatToDo to 'cut' if EnableCuttingAndStringing is True
  519. Change bankerNPC to bankBoothObj//pc bank//duel bank
  520. accept genie random, disable all others
  521. wait for craft-X box to come up (cutting)
  522. wait before right clicking craftBox
  523. move camera up all the way before starting
  524. outOfFletchingItem boolean useage
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement