Results 1 to 2 of 2

Thread: What is the deal with DTMs

  1. #1
    Join Date
    Mar 2007
    Location
    Mars, I thought all men were from Mars.
    Posts
    513
    Mentioned
    7 Post(s)
    Quoted
    124 Post(s)

    Default What is the deal with DTMs

    I spent hours building this withdraw method. Setting up all the DTMs and everything. Some DTMs work and some don't. But the thing is, tt only looks for the black edges of an item and as far as I know those edges don't change position. So why would some work and some not work. One of the ones that don't work I tried remaking the DTM 10 times and it still won't work. Could someone please take a look at this and see if they can see what I'm not.

    This script should withdraw any Herblore item in the top 4 rows of the bank. using the command

    Simba Code:
    Get_Item(item: string);

    Simba Code:
    ////////////////////Ignore This Part////////////////////////
    program New;                                              //
    {$DEFINE SMART}                                         //
    {$i srl/srl.scar}
    {$i SRL/SRL/misc/paintsmart.scar}                                        //
    var x,y,next :integer;



                                          //
    const                                                   //
    ////////////////////////////////////////////////////////////
    Select_Task  = 1; // 0 = Clean berbs. 1 = Make potions
    Tolerance = 15;
    AreaSize  = 0;
    AreaShape  = 0;
    ////////////////////////////////////////////////////////////
    ///////////////////Begining of Script///////////////////////
    ////////////////////////////////////////////////////////////


    function SetHerbDTM(Hcolor, Gcolor: integer): integer;
    var
      Sub_Pt: array[0..5] of TDTMPointDef;
      Main_Pt: TDTMPointDef;
      Herb_TDTM: TDTM;
    begin
      Main_Pt.x:=52;
      Main_Pt.y:=103;
      Main_Pt.areasize:=1;
      Main_Pt.areashape:=0;
      Main_Pt.color:=Hcolor;
      Main_Pt.tolerance:=20;

      Sub_Pt[0].x:=59;
      Sub_Pt[0].y:=109;
      Sub_Pt[0].areasize:=1;
      Sub_Pt[0].areashape:=0;
      Sub_Pt[0].color:=Gcolor; //This color is green or brown for clean or grimy
      Sub_Pt[0].tolerance:=20;

      Sub_Pt[1].x:=43;
      Sub_Pt[1].y:=109;
      Sub_Pt[1].areasize:=0;
      Sub_Pt[1].areashape:=0;
      Sub_Pt[1].color:=131072 ;
      Sub_Pt[1].tolerance:=15;

      Sub_Pt[2].x:=53;
      Sub_Pt[2].y:=115;
      Sub_Pt[2].areasize:=0;
      Sub_Pt[2].areashape:=0;
      Sub_Pt[2].color:=131072 ;
      Sub_Pt[2].tolerance:=15;

      Sub_Pt[3].x:=60;
      Sub_Pt[3].y:=113;
      Sub_Pt[3].areasize:=0;
      Sub_Pt[3].areashape:=0;
      Sub_Pt[3].color:=131072 ;
      Sub_Pt[3].tolerance:=15;

      Sub_Pt[4].x:=65;
      Sub_Pt[4].y:=109;
      Sub_Pt[4].areasize:=0;
      Sub_Pt[4].areashape:=0;
      Sub_Pt[4].color:=131072 ;
      Sub_Pt[4].tolerance:=15;

      Sub_Pt[5].x:=47;
      Sub_Pt[5].y:=112;
      Sub_Pt[5].areasize:=0;
      Sub_Pt[5].areashape:=0;
      Sub_Pt[5].color:=131072 ;
      Sub_Pt[5].tolerance:=Tolerance;

      Herb_TDTM.MainPoint := Main_Pt;
      Herb_TDTM.SubPoints := Sub_Pt;
      Result := AddDTM(Herb_TDTM);

    end;

    function SetPotionDTM(Pcolor: integer): integer;
    var
      Sub_Pt: array[0..5] of TDTMPointDef;
      Main_Pt: TDTMPointDef;
      Potion_TDTM: TDTM;
    begin
      Main_Pt.x:=52;
      Main_Pt.y:=107;
      Main_Pt.areasize:=1;
      Main_Pt.areashape:=0;
      Main_Pt.color:=0;
      Main_Pt.tolerance:=255;

      Sub_Pt[0].x:=52;
      Sub_Pt[0].y:=112;
      Sub_Pt[0].areasize:=1;
      Sub_Pt[0].areashape:=0;
      Sub_Pt[0].color:=Pcolor;
      Sub_Pt[0].tolerance:=20;

      Sub_Pt[1].x:=48;
      Sub_Pt[1].y:=104;
      Sub_Pt[1].areasize:=0;
      Sub_Pt[1].areashape:=0;
      Sub_Pt[1].color:=131072 ;
      Sub_Pt[1].tolerance:=15;

      Sub_Pt[2].x:=44;
      Sub_Pt[2].y:=112;
      Sub_Pt[2].areasize:=0;
      Sub_Pt[2].areashape:=0;
      Sub_Pt[2].color:=131072 ;
      Sub_Pt[2].tolerance:=15;

      Sub_Pt[3].x:=44;
      Sub_Pt[3].y:=118;
      Sub_Pt[3].areasize:=0;
      Sub_Pt[3].areashape:=0;
      Sub_Pt[3].color:=131072 ;
      Sub_Pt[3].tolerance:=15;

      Sub_Pt[4].x:=53;
      Sub_Pt[4].y:=121;
      Sub_Pt[4].areasize:=0;
      Sub_Pt[4].areashape:=0;
      Sub_Pt[4].color:=131072 ;
      Sub_Pt[4].tolerance:=15;

      Sub_Pt[5].x:=62;
      Sub_Pt[5].y:=115;
      Sub_Pt[5].areasize:=0;
      Sub_Pt[5].areashape:=0;
      Sub_Pt[5].color:=131072 ;
      Sub_Pt[5].tolerance:=15;

      Potion_TDTM.MainPoint := Main_Pt;
      Potion_TDTM.SubPoints := Sub_Pt;
      Result := AddDTM(Potion_TDTM);

    end;


    procedure Get_Item_Info(Item_Type:string; var Item_Text: TStringArray; var Item_DTM: integer);

    begin
    {********************************************************
    Items list:
    valid arguments:
    Herbs:
    Guam, Marrentill, Tarromin, Harralander, Ranarr, Toadflax,
    SpiritWeed, Irit, Wergali, Avantoe, Kwuarm, Snapdragon,
    Cadantine, Lantadyme, DwarfWeed, Torstol, Fellstalk

    Ingredients:
    Ashes, Blamish_snail_slime, Cactus_spine, Chocolate_dust,
    Chopped_onion, Cockatrice_egg, Coconut_milk, Crushed_birds_nest,
    Eye_of_newt, Frog_spawn, Garlic, Goat_horn_dust,
    Gorak_claw_powder, Dragon_scale_dust, Unicorn_horn_dust,
    Jangerberries, Kebbit_teeth_dust, Limpwurt_root, Magic_roots,
    Mort_myre_fungi, Nail_beast_nails, Nightshade,
    Poison_ivy_berries, Potato_cactus, Red_spiders_eggs, Rubium,
    Silver_dust, Snape_grass, Star_flower, Swamp_tar, Toads_legs,
    White_berries, Wine_of_zamorak, Wimpy_feather, Yew_roots,
    Papaya_fruit, Phoenix_feather, Ground_mud_runes,
    Wyvern_bonemeal, Grenwall_spikes, Morchella_mushroom

    Potions:
    Super_restore, Super_energy, Antifire, Super_attack,
    Super_strength, Super_defence, Magic, Ranging,
    Prayer, Extreme_attack, Extreme_strength, Extreme_defence,
    Extreme_magic, Extreme_ranging

    ****************************************************************}

      case Item_Type of
    ///////////////////////////Beginning of Herb List///////////////////////////////

        'Guam'       : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetHerbDTM(604680 , 671496 );
                           Item_Text :=  ['Clean gua', 'ean guam', 'an guam'];
                         end else
                         begin
                           Item_DTM := SetHerbDTM(872971, 1848385);
                           Item_Text :=  ['Grimy gua', 'imy guam','my guam'];
                         end;
                       end;
        'Marrentill' : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetHerbDTM(873996, 1007373);
                           Item_Text :=  ['Clean mar', 'ean marr', 'an marre'];
                         end else
                         begin
                           Item_DTM := SetHerbDTM(940812, 1848385);
                           Item_Text :=  ['Grimy mar', 'imy marr','my marre'];
                         end;
                       end;
        'Tarromin'   : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetHerbDTM(2709516, 2973965);
                           Item_Text :=  ['Clean tarr', 'ean tarr', 'an tarro'];
                         end else
                         begin
                           Item_DTM := SetHerbDTM(2775820, 1848385);
                           Item_Text :=  ['Grimy tarr', 'imy tarr','my tarro'];
                         end;
                       end;
        'Harralander': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetHerbDTM(810302, 943428);
                           Item_Text :=  ['Clean har', 'ean harr', 'an harra'];
                         end else
                         begin
                           Item_DTM := SetHerbDTM(809019, 1848385);
                           Item_Text :=  ['Grimy har', 'imy harr','my harra'];
                         end;
                       end;
        'Ranarr'     : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetHerbDTM(607786, 741423);
                           Item_Text :=  ['Clean ran', 'ean rana', 'an ranar'];
                         end else
                         begin
                           Item_DTM := SetHerbDTM(674091, 1848385);
                           Item_Text :=  ['Grimy ran', 'imy rana','my ranar'];
                         end;
                       end;
        'Toadflax'   : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetHerbDTM(597000, 663561);
                           Item_Text :=  ['Clean toa', 'ean toad', 'an toadf'];
                         end else
                         begin
                           Item_DTM := SetHerbDTM(597000, 1848385);
                           Item_Text :=  ['Grimy toa', 'imy toad','my toadf'];
                         end;
                       end;
        ////////  SpiritWeed looks diff from other herbs need a diff dtm
        'SpiritWeed' : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA6334636060C863C000FF819811440301A' +
                                       '336909185AE8289811FAA0604183581442E01350640A284801A90' +
                                       '7BCA08A8B10312C504D4B860F317AA1A00E25E09F2');
                           Item_Text :=  ['Clean spi', 'ean spir', 'an spiri'];
                         end else
                         begin
                           Item_DTM := DTMFromString('78DA6334636060C863C000FF819811440301A' +
                                       '336909185AE8289811FAA0604183581442E01350640A284801A90' +
                                       '7BCA08A8B10312C504D4B860F317AA1A00E25E09F2');
                           Item_Text :=  ['Grimy spi', 'imy spir','my spiri'];
                         end;
                       end;
        'Irit'       : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetHerbDTM(2579260, 2843457);
                           Item_Text :=  ['Clean iri', 'ean iri', 'an irit'];
                         end else
                         begin
                           Item_DTM := SetHerbDTM(2579260, 1848385);
                           Item_Text :=  ['Grimy iri', 'imy iri','my irit'];
                         end;
                       end;
        'Wergali'    : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetHerbDTM(2369364, 2632541);
                           Item_Text :=  ['Clean wer', 'ean werg', 'an werga'];
                         end else
                         begin
                           Item_DTM := SetHerbDTM(2435158, 1848385);
                           Item_Text :=  ['Grimy wer', 'imy werg','my werga'];
                         end;
                       end;
        'Avantoe'    : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetHerbDTM(1982227, 2180629);
                           Item_Text :=  ['Clean ava', 'ean avan', 'an avant'];
                         end else
                         begin
                           Item_DTM := SetHerbDTM(2048275, 1848385);
                           Item_Text :=  ['Grimy ava', 'imy avan','my avant'];
                         end;
                       end;
        'Kwuarm'     : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetHerbDTM(539701, 607292);
                           Item_Text :=  ['Clean kwu', 'ean kwua', 'an kwuar'];
                         end else
                         begin
                           Item_DTM := SetHerbDTM(539701, 1848385);
                           Item_Text :=  ['Grimy kwu', 'imy kwua','my kwuar'];
                         end;
                       end;
        'Snapdragon' : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetHerbDTM(472877, 539697);
                           Item_Text :=  ['Clean sna', 'ean snap', 'an snapd'];
                         end else
                         begin
                           Item_DTM := SetHerbDTM(472877, 1782335);
                           Item_Text :=  ['Grimy sna', 'imy snap','my snapd'];
                         end;
                       end;
        'Cadantine'  : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetHerbDTM(1719348, 1851705);
                           Item_Text :=  ['Clean cad', 'ean cada', 'an cadan'];
                         end else
                         begin
                           Item_DTM := SetHerbDTM(1719348, 1848385);
                           Item_Text :=  ['Grimy cad', 'imy cada','my cadan'];
                         end;
                       end;
        'Lantadyme'  : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetHerbDTM(3160584, 3489544);
                           Item_Text :=  ['Clean lan', 'ean lant', 'an lanta'];
                         end else
                         begin
                           Item_DTM := SetHerbDTM(3028743, 1848385);
                           Item_Text :=  ['Grimy lan', 'imy lant','my lanta'];
                         end;
                       end;
        'DwarfWeed'  : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetHerbDTM(537607, 604680);
                           Item_Text :=  ['Clean dwa', 'ean dwar', 'an dwarf'];
                         end else
                         begin
                           Item_DTM := SetHerbDTM(538375, 1848385);
                           Item_Text :=  ['Grimy dwa', 'imy dwar','my dwarf'];
                         end;
                       end;
        'Torstol'    : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetHerbDTM(738313, 806154);
                           Item_Text :=  ['Clean tors', 'ean tors', 'an torst'];
                         end else
                         begin
                           Item_DTM := SetHerbDTM(672009, 1848385);
                           Item_Text :=  ['Grimy tors', 'imy tors','my torst'];
                         end;
                       end;
        'Fellstalk'  : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetHerbDTM(2369827, 2699048);
                           Item_Text :=  ['Clean fell', 'ean fells', 'an fellst'];
                         end else
                         begin
                           Item_DTM := SetHerbDTM(2369827, 1782335);
                           Item_Text :=  ['Grimy fell', 'imy fells','my fellst'];
                         end;
                       end;
    ///////////////////////////////End of Herb List/////////////////////////////////

    ////////////////////////Beginning of Ingredients List///////////////////////////
        'Ashes'      : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA6334616060C86340014BE6CE651001D28' +
                                                     'C40FC1F0818B531D530303031F043D58000A32E902824A0C60848' +
                                                     '1413506342841A33205144408D2590C827A0C6144864E15703005' +
                                                     'D920B8A');
                           Item_Text :=  ['Ashes', 'shes', 'Ash'];
                         end;
                       end;
        'Blamish_snail_slime': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63EC65606038CA8001FE033123880602C' +
                                                     '65620E320BA0A26067EA81A1000AB3946849AB304D47401898B04' +
                                                     'D44C2442CD54207186083527F0AB0100CAF71033');
                           Item_Text :=  ['Blami', 'snail', 'slime'];
                         end;
                       end;
        'Cactus_spine': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63EC676060C861C000FF8198114403012' +
                                                     '3484D3ABA0A26067EA81A10609C0C24328950934B400DC8AE7C02' +
                                                     '6ABA80442101356D44A8E922EC1E0020880D57');
                           Item_Text :=  ['Cact', 'tus sp', 'spine'];
                         end;
                       end;
        'Chocolate_dust': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63DCC6C0C090CB8002027425184480342' +
                                                     '310FF070246909A2C0634C0C4C00F5503028CEB31CDC150B31148' +
                                                     '14125003B2AB98809A5D40A288809A7D40229F809A8340228708B' +
                                                     'B08F81D00C1910F94');
                           Item_Text :=  ['Choco', 'colate', 'ate dust'];
                         end;
                       end;
        'Chopped_onion': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA637CCCC0C090CD8001FE033123880602C' +
                                                     '61B40463EBA0A26067EA81A1060BC0D240A09A8B907248A09A879' +
                                                     '00244A09A8794A849AD740A284809A7740A288809A8F40A280809' +
                                                     'A4F40228F809AAF402203BF1A00C5C5147A');
                           Item_Text :=  ['Chopp', 'ped oni', 'ed onio'];
                         end;
                       end;
        'Cockatrice_egg': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA6314646460C865C000FF8198114403012' +
                                                     '307909589AE8289811FAA060418D981AC3C22D4141150C30D6455' +
                                                     '1050C30764551150230464551350230564951150230D641513A12' +
                                                     '61BBF1A0091F70ACC');
                           Item_Text :=  ['Cockat', 'atrice', 'ice egg'];
                         end;
                       end;
        'Coconut_milk': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63B4656460C8674001F3162E651001D24' +
                                                     '01986FF40C0680E64E530A00126067EA81A10603401B20A895053' +
                                                     '46408D19905549400DC8CD5504D4B80359A504D4381161970B66F' +
                                                     '8A0AB010062880CC6');
                           Item_Text :=  ['Cocon', 'nut mil', 't milk'];
                         end;
                       end;
        'Crushed_birds_nest': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63CC606460C866C000FF8198114403016' +
                                                     '32C909589AE8289811FAA060418A381AC5C026A40E61410509304' +
                                                     '64151150930664151350934F849A52202B9F0835D9F8D50000204' +
                                                     '00D20');
                           Item_Text :=  ['Crush', 'hed bird', 'ushed b'];
                         end;
                       end;
        'Eye_of_Newt': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA639CC2C8C090CD8001FE033123880602C' +
                                                     '67E202B1D5D0513033F540D0830F601595904D44C04B20A09A899' +
                                                     '4A849A5940561E116AB209A8990164A511503309C84AC5AF06003' +
                                                     'FED0E96');
                           Item_Text :=  ['Eye of', 'of new', 'ye of ne'];
                         end;
                       end;
        'Frog_spawn' : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA633CC8C8C090CB8001FE033123880602C' +
                                                     '65D40563EBA0A26067EA81A1060DC0264951150B307C8AA24A066' +
                                                     '3F90554240CD5122D49C00B2CA09A8390F64151250730CC8CA26A' +
                                                     '0E60C61BB00F7FE11C8');
                           Item_Text :=  ['Frog s', 'rog sp', 'g spaw'];
                         end;
                       end;
        'Garlic'     : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA633465606098C98001FE0331238806024' +
                                                     '61D20633ABA0A26067EA81A1000AB9949408D1E909847408D3190' +
                                                     '984F408D35116AEC80C46C22D4CC20A0C616484CC3AF0600FC0C0' +
                                                     'CE6');
                           Item_Text :=  ['Garlic', 'Garli', 'arlic'];
                         end;
                       end;
        'Goat_horn_dust': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA638C67606098C58001FE033123880602C' +
                                                     '60C6C6A9818F8A16A4080311948CC27A00664D702026AC280C43C' +
                                                     '026A4280C41C026A2280C40C22DC3C0DBF1A001CBB0D4C');
                           Item_Text :=  ['Goat', 'horn', 'at hor'];
                         end;
                       end;
        'Gorak_claw_powder': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63EC62606098C98001FE033123880602C' +
                                                     '62620631ABA0A26067EA81A1060AC07127308A80199B390809A76' +
                                                     '20B184809A5E20B198809A09406201013593897033C89CE9F8D50' +
                                                     '0001A930FF0');
                           Item_Text :=  ['Gorak', 'ak claw', 'orak c'];
                         end;
                       end;
        'Dragon_scale_dust': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63DCCEC0C0308B010568DB25338800694' +
                                                     '620FE0F048C1B818CE90C688089811FAA060418D70389D904D46C' +
                                                     '0112F308A8D945849A3D40620E01350781C40C22EC9A865F0D00A' +
                                                     '9450FF2');
                           Item_Text :=  ['Drago', 'on scal', 'agon sc'];
                         end;
                       end;
        'Unicorn_horn_dust': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA637CC2C0C030930105B41559318800694' +
                                                     '620FE0F048C0F808C690C688089811FAA0604186F639A83A1E61E' +
                                                     '90984B40CD2320319F809A6740621E01352F81C46C026ADE02891' +
                                                     '9F8D50000EF0411BA');
                           Item_Text :=  ['Unicor', 'corn hor', 'nicorn'];
                         end;
                       end;
        'Jangerberries': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA631464646098CE8001FE0331238806024' +
                                                     '6909AC9E82A9818F8A16A40809117C89A4A400D07903593801A7E' +
                                                     '206B361176CD23A04608C85A48408D0890359F801A71C26E06001' +
                                                     '4A40B99');
                           Item_Text :=  ['Janger', 'gerberr', 'angerbe'];
                         end;
                       end;
        'Kebbit_teeth_dust': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63B466646098CD8001FE0331238806024' +
                                                     '623206B2ABA0A26067EA81A1060D407B26612A1661E0135A640D6' +
                                                     '42026A2C80AC4504D4D801598B09A87126428D3790359F801A4FC' +
                                                     '27E07001AB40E28');
                           Item_Text :=  ['Kebbit', 'bit tee', 'teeth'];
                         end;
                       end;
        'Limpwurt_root': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63CC60646098C18001FE033123880602C' +
                                                     '618206B0ABA0A26067EA81A10604C00B2661150930A64CD21A026' +
                                                     '0BC85A40404D2190B588809A5222CC2906B2E61150930D644D27A' +
                                                     '0261DC89A8C5F0D00815A0FDD');
                           Item_Text :=  ['Limpw', 'pwurt', 'urt roo'];
                         end;
                       end;
        'Magic_roots': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA639CCAC8C030930103FC076246100D048' +
                                                     'CFDD8D43031F043D58000632F90359B809A2E22D44C01B2161350' +
                                                     'B310C89A47849A5904D4CC01B2A613E12F42E64C02B2E6E257030' +
                                                     '0D8DE1190');
                           Item_Text :=  ['Magic', 'agic r', 'gic roo'];
                         end;
                       end;
        'Mort_myre_fungi': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA633CC0C8C030930103FC076246100D048' +
                                                     'C7B81ACE9E82A9818F8A16A4080710790358B809A5D40D642026A' +
                                                     'F603598B08A8390C64CD25A0E618116ACE12E16690BFE6E357030' +
                                                     '0795211DB');
                           Item_Text :=  ['Mort', 'myre', 'fungi'];
                         end;
                       end;
        'Nail_beast_nails': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA633461606038CC8001FE0331238806024' +
                                                     '6756C6A9818F8A16A40805107489C20A0460F489C26A0C614489C' +
                                                     '23A0C68C08BB6C8870B313116A6C09BB190003BF0E71');
                           Item_Text :=  ['Nail', 'beas', 'st nai'];
                         end;
                       end;
        'Nightshade' : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA634C60606038CA8001FE033123880602C' +
                                                     '63820E320BA0A26067EA81A10608C26424D14903841404D0C9038' +
                                                     '45404D3C90B844404D1A116AF281C469026A7209BB1900244D101' +
                                                     '6');
                           Item_Text :=  ['Night', 'ghtsha', 'shade'];
                         end;
                       end;
        'Poison_ivy_berries': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63EC62606038CC8001FE033123880602C' +
                                                     '61620E320BA0A26067EA81A10606C0412C708A86907126709A8E9' +
                                                     '0612A709A89908244E12503399083553B1F91D4DCD6C207188809' +
                                                     'A9940623F0135CD40E2147E3500A418144F');
                           Item_Text :=  ['Poison', 'son ivy', 'ivy berr'];
                         end;
                       end;
        'Potato_cactus': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63DCCEC0C070840103FC076246100D048' +
                                                     'C1B808C83E82A9818F8A16A4000ACE60801359B80C409026AB600' +
                                                     '89D304D46C2742CD5E207192809AC340E21001357B089B0300393' +
                                                     '01301');
                           Item_Text :=  ['Potat', 'ato cact', 'cactus'];
                         end;
                       end;
        'Red_spiders_eggs': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA637CC4C0C07094010564A6A6328800694' +
                                                     '620FE0F048CF7818C430C688089811FAA060418EF00891304D43C' +
                                                     '0012A708A87902244E1350F38208BBDE02892304D4BC2442CD53C' +
                                                     '27E0700B2FD14D8');
                           Item_Text :=  ['Red sp', 'd spide', 'spider'];
                         end;
                       end;
        //Need to do a few quest for these skip for now
        'Rubium'     : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63E467646038CC8001FE0331238806024' +
                                                     '666206B3FBA0A26067EA81A1000AB3948400D3B907588801A4E20' +
                                                     'EB280135C240D605026A2480AC8B04D4C8025997885043C83D924' +
                                                     '0D601FC6A0004540E18');
                           Item_Text :=  ['Rubi', 'ubiu', 'bium'];
                         end;
                       end;
        'Silver_dust': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63E467646038CC8001FE0331238806024' +
                                                     '666206B3FBA0A26067EA81A1000AB3948400D3B907588801A4E20' +
                                                     'EB280135C240D605026A2480AC8B04D4C8025997885043C83D924' +
                                                     '0D601FC6A0004540E18');
                           Item_Text :=  ['Silve', 'lver du', 'ver dus'];
                         end;
                       end;
        'Snape_grass': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63B466646038CA8001FE0331238806024' +
                                                     '6636C6A9818F8A16A4080510FC83A48849AFD04D4980059E708A8' +
                                                     'B105B24E1350E34884392035C78950739408350708A8F1266C0E0' +
                                                     '0A93C10D3');
                           Item_Text :=  ['Snape', 'ape gra', 'e grass'];
                         end;
                       end;
        'Star_flower': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63CC64646038CC8001FE033123880602C' +
                                                     '63820EB08BA0A26067EA81A10608C01B24E10509300649D26A026' +
                                                     '19C83A43404D06907581809A5C20EB3C01354544B8A704C83A4E4' +
                                                     '04D05B63044550300C91011A6');
                           Item_Text :=  ['Star', 'ar flow', 'flower'];
                         end;
                       end;
        'Swamp_tar'  : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA639CC2C8C070900103FC076246100D048' +
                                                     'C13B1A96162E087AA0101C63E20EB1001355D40D671026A7A81AC' +
                                                     '5304D44C03B22E1250331DC83A4D40CD1CC26E0600E34D1051');
                           Item_Text :=  ['Swamp', 'wamp t', 'mp tar'];
                         end;
                       end;
        'Toads_legs' : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63DCCDC8C070840105AC5EB2984104480' +
                                                     '36518FE0301E30E20EB28031A6062E087AA0101C68340D601026A' +
                                                     '8E63DA85A1E60490759C809AA340D629026A0E01596709A8D94BD' +
                                                     '81C00E58312CE');
                           Item_Text :=  ['Toad', 's leg', 'legs'];
                         end;
                       end;
        'White_berries': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA633461606078CF8001FE0331238806024' +
                                                     '63D20E30DBA0A26067EA81A1060D4C1660E9A1A2D20F195801A63' +
                                                     '20F197801A1B20F19B801A0720F183801A4722DCE34C84BF4076B' +
                                                     'DC6AF060084921152');
                           Item_Text :=  ['White', 'ite berr', 'hite be'];
                         end;
                       end;
        'Wine_of_zamorak': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA638C616060F8C08001FE033123880602C' +
                                                     '62820E333BA0A26067EA81A10600C0512DF8850F389809A0C20F1' +
                                                     '8E083584CC4926C23D0940E20701351140E21701356140E2377E3' +
                                                     '500C25B12D8');
                           Item_Text :=  ['Wine of', 'of zamo', 'zamor'];
                         end;
                       end;
        'Wimpy_feather': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63EC61606078CF8001FE033123880602C' +
                                                     '66620E303BA0A26067EA81A10606C02129F09A86901125F09A8E9' +
                                                     '22424D3F90F84640CD0C22D4CC21C2AE2940E22D7E35003D23131' +
                                                     '6');
                           Item_Text :=  ['Wimpy', 'impy f', 'py feat'];
                         end;
                       end;
        'Yew_roots': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63DCC1C0C0F09E0103FC076246100D048' +
                                                     'C1B818CB7E82A9818F8A16A4080710390F84C40CD2620F183809A' +
                                                     'ED40E2370135FB80C42F026A0E0289EF44A8F940849AF7F8D5000' +
                                                     '05C0D14AB');
                           Item_Text :=  ['Yew ro', 'ew roo', 'Yew r'];
                         end;
                       end;
        'Papaya_fruit': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA637CC8C0C0F08E0103FC076246100D048' +
                                                     'CAF808C57E82A9818F8A16A4080F12D90784B40CD7B20F19E801A' +
                                                     '905B3E1150F31948FC2242CD1F026A5E02896F04D43C01125F08A' +
                                                     '8B94FD85F00F68A1845');
                           Item_Text :=  ['Papay', 'paya f', 'a frui'];
                         end;
                       end;
        'Phoenix_feather': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA631462646078CB8001FE0331238806024' +
                                                     '61E20EB1DBA0A26067EA81A10606407B23E1050C306647D25A086' +
                                                     '0BC8FA4E408D2090F58B801A3120EB1B0135E240D627026AA480A' +
                                                     'C8F04D4C8110E1F0065110FD6');
                           Item_Text :=  ['Phoen', 'oenix', 'nix fea'];
                         end;
                       end;
        'Ground_mud_runes': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63B4656460F8CC8001FE0331238806024' +
                                                     '61320EB3DBA0A26067EA81A10603404B23E1250630C647D23A006' +
                                                     '64D74F026A2C8850E30464FD20A0C61DC8FA42849A0F04D47812E' +
                                                     '11E5038FFC1AF06005E6F12EA');
                           Item_Text :=  ['Groun', 'nd mud', 'mud rune'];
                         end;
                       end;
        'Wyvern_bonemeal': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA63CC60646078CF8001FE033123880602C' +
                                                     '65820EB2DBA0A26067EA81A10608C01B2BE10500332E727013529' +
                                                     '40D63F026AF28950530C64FD26A0A614C8FA4E849A4F04D494100' +
                                                     'E1F001D5D136B');
                           Item_Text :=  ['Bonem', 'onemea', 'nemeal'];
                         end;
                       end;
        'Grenwall_spikes': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA639CC2C8C0F0860103FC076246100D048' +
                                                     'C7D40D66B74154C0CFC503520C0D801647D27A00664CE2F026A26' +
                                                     '03593F08A8990E64FD26A066361176CD03B23E10A18680DF01799' +
                                                     '41368');
                           Item_Text :=  ['Grenwa', 'wall spi', 'spike'];
                         end;
                       end;
        'Morchella_mushroom': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := DTMFromString('78DA633CC0C8C0F0960103FC076246100D048' +
                                                     'CBB80ACD7E82A9818F8A16A4000ACE61D116A3E1150B30FC8FA4E' +
                                                     '40CD5E20EB3701358780ACBF04D41C26C2AEE344F80BA4E60D7E3' +
                                                     '500A92F16A7');
                           Item_Text :=  ['Morch', 'ella mu', 'mushro'];
                         end;
                       end;
    ////////////////////////////End of Ingredients List/////////////////////////////

    ///////////////////////////Beginning of Potions List////////////////////////////
        'Super_restore': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetPotionDTM(6176913);
                           Item_Text :=  ['Super rest', 'uper rest', 'per restor'];
                         end;
                       end;
        'Super_energy ': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetPotionDTM(8275612);
                           Item_Text :=  ['Super ener', 'uper ener', 'per energ'];
                         end;
                       end;
        'Antifire'   : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetPotionDTM(7737432);
                           Item_Text :=  ['Antifi', 'ntifir', 'tifire'];
                         end;
                       end;
        'Super_attack' : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetPotionDTM(12664636);
                           Item_Text :=  ['Super att', 'uper att', 'per attac'];
                         end;
                       end;
        'Super_strength': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetPotionDTM(11382454);
                           Item_Text :=  ['Super str', 'uper str', 'per stren'];
                         end;
                       end;
        'Super_defence': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetPotionDTM(3709112);
                           Item_Text :=  ['Super def', 'uper def', 'per defen'];
                         end;
                       end;
        'Magic'        : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetPotionDTM(10189381);
                           Item_Text :=  ['Magic po', 'agic pot', 'gic poti'];
                         end;
                       end;
        'Ranging'    : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetPotionDTM(12359482);
                           Item_Text :=  ['anging pot', 'nging poti', 'anging potio'];
                         end;
                       end;
        'Prayer'     : begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetPotionDTM(9289018);
                           Item_Text :=  ['Prayer pot', 'rayer pot', 'ayer poti'];
                         end;
                       end;
        'Extreme_attack': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetPotionDTM(11052400);
                           Item_Text :=  ['xtreme att', 'treme att', 'reme atta'];
                         end;
                       end;
        'Extreme_strength': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetPotionDTM(11842748);
                           Item_Text :=  ['xtreme str', 'treme str', 'reme stre'];
                         end;
                       end;
        'Extreme_defence': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetPotionDTM(2083032);
                           Item_Text :=  ['xtreme def', 'treme def', 'reme defe'];
                         end;
                       end;
        'Extreme_magic': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetPotionDTM(12893757);
                           Item_Text :=  ['xtreme mag', 'treme mag', 'reme magi'];
                         end;
                       end;
        'Extreme_ranging': begin
                         if(Select_Task = 1)then
                         begin
                           Item_DTM := SetPotionDTM(3119241);
                           Item_Text :=  ['xtreme ran', 'treme ran', 'xtreme rang'];
                         end;
                       end;
    ///////////////////////////////End of Potions List//////////////////////////////

      end;
    end;


    {function Store_Item(item: string,
    begin

    end; }



    function Find_Item(var x, y: integer; item: string): Boolean;
    var
      rightcount, downcount, Slotx, Sloty, DTM: integer;
      text: TStringArray;
    begin
      Slotx := 31;
      Sloty := 85;
      rightcount := 0;
      downcount := 0;
      Get_Item_Info(item, text, DTM);
      repeat
        repeat
          SMART_DrawBoxEx(True, IntToBox(Slotx, Sloty, Slotx + 44, Sloty + 44), clRed);
          if(FindDTM(DTM, x, y, Slotx, Sloty, Slotx + 50, Sloty + 50))then
          begin
            for next:=0 to high(text) do
              writeln(text[next]);
            MMouse(x - 5, y - 5, 10, 10);
            sleep(1000+random(500));
            writeln('found guam dtm, checking color');
          end;
          Slotx := Slotx + 44;
          rightcount := rightcount + 1;
          sleep(50);
        until(IsUpTextMultiCustom(text))or(rightcount >= 10)
        rightcount := 0;
        Sloty := Sloty + 44;
        Slotx := 31;
        downcount := downcount + 1;
        sleep(50);
      until(IsUpTextMultiCustom(text))or(downcount >= 4)
      if(IsUpTextMultiCustom(text))then Result:= true;
      ClearRSCanvas(SMART_Canvas.canvas);
    end;


    procedure Get_Item(item: string);
    var
    DTM,i: integer;
    text: TStringArray;
    begin
      if(Find_Item(x,y,item))then
      begin
        //Store_Item(x,y,item)
        Mouse(x, y, 0, 0, false);
        if(OptionsExist(['draw-14', '14'], false))then
          //(WaitOption('14', 2000 + random(500)))then
        begin
          Writeln('Option Withdraw-14 found');
          ChooseOption('Cancel');
          //ChooseOption('14');
        end else
        begin
          Mouse(x, y, 0, 0, false);
          Writeln('Option Withdraw-14 not found');
          if(OptionsExist(['draw-X', 'X'], true))then
          begin
            Writeln('Option Withdraw-X found');
            //ChooseOption('X');
            sleep(1000+random(1000));
            //TypeSend('14');
          end else
          begin
            Writeln('Option Withdraw-X not found');
          end;
        end;
      end else writeln('Could not find ' + item);
    end;


    {********************************************************
    Items list:
    valid arguments:
    Herbs:
    Guam, Marrentill, Tarromin, Harralander, Ranarr, Toadflax,
    SpiritWeed, Irit, Wergali, Avantoe, Kwuarm, Snapdragon,
    Cadantine, Lantadyme, DwarfWeed, Torstol, Fellstalk

    Ingredients:
    Ashes, Blamish_Snail_Slime, Cactus_spine, Chocolate_Dust,
    Chopped_onion, Cockatrice_egg, Coconut_milk, Crushed_birds_nest,
    Eye_of_Newt, Frog_spawn, Garlic, Goat_horn_dust,
    Gorak_claw_powder, Dragon_scale_dust, Unicorn_horn_dust,
    Jangerberries, Kebbit_teeth_dust, Limpwurt_root, Magic_roots,
    Mort_myre_fungi, Nail_beast_nails, Nightshade,
    Poison_ivy_berries, Potato_Cactus, Red_spiders_eggs, Rubium,
    Silver_dust, Snape_grass, Star_flower, Swamp_tar, Toads_legs,
    White_berries, Wine_of_Zamorak, Wimpy_feather, Yew_roots,
    Papaya_fruit, Phoenix_feather, Ground_mud_runes,
    Wyvern_bonemeal, Grenwall_spikes, Morchella_mushroom

    Potions:
    Super_Restore, Super_Energy, Antifire, Super_Attack,
    Super_Strength, Super_Defence, Magic_Potion, Ranging_Potion,
    Prayer, Extreme_Attack, Extreme_Strength, Extreme_Defence,
    Extreme_Magic, Extreme_Ranging

    ****************************************************************}


    begin
    ClearDebug();
    Smart_Server := 44;
    SetupSRL();
    //Withdraw_Herbs('Guam');
    Get_Item('Yew_roots')


    end.

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Tbh.. the shapes of the items DO change.. -_- As you can see in the inventory and the bank.. jagex has stated that it's a bug but we all know that it's to target us..

    If your making DTM's use a lot of points INSIDE the object.. the black outline thing only works on the right side and the bottom right.. As those are the only spots I've NOTICED doesn't change.. The left, top, bottom all change shape.. but the right and bottom right seems to stay static no matter what.

    Because of this Notification, I have DTM's from 4 weeks ago that are still running PERFECTLY.. they are all for runes and potions though.. Not herbs.
    I am Ggzz..
    Hackintosher

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •