Resolved Local web won't use Lodestones

Discussion in 'Client & Site Support' started by Baddest Man on Earth, Aug 23, 2015.

  1. Code:
    Code (Text):
    1. private void addLodestoneVertices(Web web) {
    2.         for (Lodestone lodestone : Lodestone.values()) {
    3.             LodestoneVertex vertex = new LodestoneVertex(lodestone);
    4.             Coordinate c = lodestone.getPosition().derive(0, -1);
    5.             WebVertex v = web.getVertexNearestTo(c);
    6.             if (v != null) {
    7.                 double dist = Distance.between(c, v.getPosition());
    8.                 if (dist < 3) {
    9.                     double cost = 25 / dist;
    10.                     vertex.addDirectedEdge(v, cost);
    11.                     web.addVertices(vertex);
    12.                     System.out.println("Added: " + lodestone);
    13.                     System.out.println(v.distanceTo(vertex));
    14.                 }
    15.             }
    16.         }
    17.     }
    Output:
    Code (Text):
    1. (11:11:59) Added: Falador
    2. 1.0
    3. (11:11:59) Added: Lumbridge
    4. 1.0
    5. (11:11:59) Added: Port Sarim
    6. 1.0
    7. (11:11:59) Added: Varrock
    8. 1.0
    The bot will walk just fine to wherever I want it to, but even if I'm in Lumbridge, it will walk all the way to Varrock instead of using the lodestone. I rendered the web, and the LodestoneVertex show up as added.
     

Share This Page

Loading...