Jump to content

Interaction with a GroundItem on a table

Recommended Posts

I'm working on my first script, a wine of zamorak grabber. Whenever the wine spawns, it calls this block of code:

GroundItem wine = groundItems.closest("Wine of zamorak");
    		if(wine != null){
    			magic.castSpellOnEntity(Spells.NormalSpells.TELEKINETIC_GRAB, wine);

Whenever a wine spawns, however, it first tries to click underneath the table and then clicks the wine in the second run-through. How can I fix this?



I also have trouble when trying to walk from the bank to the temple. Whenever the program decides that the user is not in the temple and does not have a full inventory, it calls:

Position[] pathToWine = {
    			new Position(2954,3378,0), 
    			new Position(2965,3389,0), 
    			new Position(2962,3404,0),
    			new Position(2955,3417,0),
    			new Position(2949,3431,0), 
    			new Position(2947,3447,0), 
    			new Position(2945,3461,0), 
    			new Position(2942,3477,0),
    			new Position(2940,3493,0), 
    			new Position(2941,3508,0), 
    			new Position(2931,3515,0)

The walker, however, only manages to get to one of the positions then clicks at its feet once before stopping. What am I doing wrong?


Thank you,


Edited by bthebrave
Link to comment
Share on other sites

For the walker you should make the distance between tiles shorter. I run into this problem often biggrin.png


Wow. I made the changes so the distance between tiles was shorter, and it worked. That gave me so much pain... Mr. Guru, do you have any advice for the GroundItem issue?

Edited by bthebrave
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...