Results 1 to 6 of 6

Thread: I need help with creating an 3d object in OldschoolRunescape.

  1. #1
    Join Date
    Oct 2014
    Location
    Belgium
    Posts
    33
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Angry I need help with creating an 3d object in OldschoolRunescape.

    Dear Simba members,


    First things first I am trying to create a 3d Object of "Wine Of Zamorak" in Oldschool Runescape

    like I said in the title of this topic I am trying to create a 3d object in Oldschool Runescape

    I followed this thread --> https://villavu.com/forum/showthread.php?t=117106

    on the step Creating an object I got stuck.

    yes, have the Auto Color Aid v2 program.

    when I select the color of the "Wine Of Zamorak" I click on the Wine color red in the Jug, i really don't know which color I have to select bcuz if I choose the color of the jug and I select Mark Best Color it shows everything on the main screen.

    well I made a simple script about finding the wine and clicking on it the mouse started moving like it was on drug and when he found a similar color to red it started spam clicking on it I thought the script would look the name of the object first then click on it but no it just clicking on red colors. i used the guide i mentioned above.

    idk why I get an error now please look this is so far I was able to create an object of an wine of zamorak...

    this the link to the script --> https://bpaste.net/show/28c8c128cd85


    Kind Regards,
    RspsScripter

  2. #2
    Join Date
    Feb 2012
    Location
    Canada
    Posts
    1,157
    Mentioned
    25 Post(s)
    Quoted
    432 Post(s)

    Default

    I haven't attempted to try out the script but by reading the problems you have described and by looking through the code, it appears that you do not have any waits built into the script. By this, I mean that if you happen to successfully begin to search for the wine (which you appear to do), but you do not specify a specific area for you to check apart from the entire Mainscreen, your mouse will find every color that looks like that and hover over it to see if it matches. This can be solved in a couple of ways.

    First, I would recommend you limit the location for which you are looking for the wine and not wanting to look for anything else other than that. This can be done by either selecting a unique colour to the wine (like the grey), or by using the red. But if you are jumping outside of that and hovering over other objects, you can fix this by using a TBox.

    TBox can be created and used as such:
    Simba Code:
    procedure createBox(x1, y1, x2, y2 : Integer);
    var
      T: TBox;
    begin
      T := [x1, y1, x2, y2];
    end;



    Using a TBox to attempt to find this would mean that you cannot afford to move the screen, or you'll never end up finding the wine. So keep that in mind.


    As well, it appears you have missed two major parts in writing the script. Telekinetic Grab is not autocastable, which means that you are attempting to find the object without actually selecting the cast. You can do this on your own using DTM's or by using a TBox on the inventory and search for the purple of the hand and select it there.

    With that, you appear to have the idea incorrect on how the TMSObject.create works. You initialize it as:

    Simba Code:
    Wine_Of_Zamorak.create('Cast', ['Wine_Of', 'Of', 'Wine', 'ine Of'], [createCol(3489149, 0, 0, 815, 736, 32)], 50, 0, 0, 0);

    This is a little incorrect. The first location where you have put 'Cast' is the name of the object that you are creating.
    The second location is the uptext of the object. In this case, you will want something like: ['ine of', 'f zam']
    Third, make sure that the Mincount, height, width, and size Tolerance are something correct to what we need to locate the wine of zammy. Otherwise, it can get filtered out.

    This means, I would try something like this:
    Simba Code:
    Wine_Of_Zamorak.create('Wine', ['ine of', 'f zam'], [createCol(3489149, 0, 0, 815, 736, 32)], 50, 0, 0, 0); //Check the last 4 values and make them unique to the wine

    There are lots of more efficient ways of doing these things, but for a beginner, I would recommend these for now.

  3. #3
    Join Date
    Jan 2012
    Location
    Sydney, Australia
    Posts
    848
    Mentioned
    12 Post(s)
    Quoted
    351 Post(s)

    Default

    Like Stick said, you need to adjust the Object function a little to make the wine more unique. AL allows for 2 colors that are close to each other to be checked together, and you can allow for a min and max color count for the colors to further make the item unique.

    A way of verifying whether you have cast the spell or not is to use the exp bar at the top of the screen. See example below.

    Simba Code:
    Procedure Find_Wine_Of_Zamorak;
    var
      pnt:tpoint;
      ExpShift, FS:integer;
    begin
      if not isSpellSelected then // Checks to see if we have Tele grab ready.
        castSpell('Telekenetic Grab'); // If not, it casts the spell in preperation.
      if Wine_Of_Zamorak.Find(pnt) then
      begin
        ExpShift := getXPBarAmount; //We get the current exp count of our exp bar near the minimap.
        FastClick(Mouse_left);
        while (getXPBarAmount = ExpShift) do // We make a while/do loop to check and see if our spell was successfully cast.
        begin
          wait(100);
          if (FS > 50) then // This is a fail safe counter. We use these to prevent infinite loops. This represents approx. 5 seconds.
            break; // Breaks the loop while/do loop.
          inc(FS):
        end;
        wait(randomrange(2000, 4000));
      end;
    end;

  4. #4
    Join Date
    Oct 2014
    Location
    Belgium
    Posts
    33
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    i made this script please look @ it i putted your tbox procedure in it it still was looking evry where idk why
    i looked up on how to setup a tbox couldnt find any help maybe you can give more info how to setup the tbox and use it? btw this is my script so far in this link --> https://bpaste.net/show/df93afac807e


    This script does look for the color of teh wine and clicks it if its poped up on teh table but the problem is the mouse is looking evry where for the color and the uptext when it find it it will click it but it will click it late and lose the wine (i am manualy clicking self for the telekinetci grab) my next step if i start the script it will go and select cast telekinatic grab and move's to the table. but it has to catch the wine first then i can go the next step.

  5. #5
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,004
    Mentioned
    50 Post(s)
    Quoted
    502 Post(s)

    Default

    Quote Originally Posted by RSPS Scripter View Post
    i made this script please look @ it i putted your tbox procedure in it it still was looking evry where idk why
    i looked up on how to setup a tbox couldnt find any help maybe you can give more info how to setup the tbox and use it? btw this is my script so far in this link --> https://bpaste.net/show/df93afac807e


    This script does look for the color of teh wine and clicks it if its poped up on teh table but the problem is the mouse is looking evry where for the color and the uptext when it find it it will click it but it will click it late and lose the wine (i am manualy clicking self for the telekinetci grab) my next step if i start the script it will go and select cast telekinatic grab and move's to the table. but it has to catch the wine first then i can go the next step.
    I've never used this include, so I can't really comment on how to refine the object finding function, but IMO you should take a few steps back and use simpler tools step by step so you can better understand what specifically isn't working. I can check back tomorrow and add some more useful information when I have the time.


    Simba Code:
    procedure createBox(x1, y1, x2, y2 : Integer);
    var
      T: TBox;
    begin
      T := [338, 132, 420, 214];
    end;

    I think the example you got this from does more harm than good..
    You can use IntToBox(x1, y1, x2, y2); or just square brackets [x1, y1, x2, y2];

  6. #6
    Join Date
    Feb 2017
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    bump

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
  •