Prime - Amber Tweaks and Scripting API

Forum for alternative clients, mods & discussions on the same.

Re: Prime - Amber Tweaks and Scripting API

Postby Paradoxs » Thu Mar 23, 2017 12:19 am

tirioll wrote:Please update :)
Code: Select all
0.3:null

java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to java.lang.String
   at haven.CharWnd$Quest$Box.uimsg(Unknown Source)
   at haven.CharWnd$Quest$DefaultBox.uimsg(Unknown Source)
   at NumenQuest.uimsg(ancquest.cjava:30)
   at haven.UI.uimsg(Unknown Source)
   at haven.RemoteUI.run(Unknown Source)
   at haven.MainFrame.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Also "Prime.WithScripts.rar" in release 1.1.1 does not start, seems that a bunch of files are missing. Is it supposed to be extracted on top of "Prime.rar" contents?



Can't fix an error without more information, Prime seems to be running just fine.

Prime with scripts rar file was somehow packaged wrong. The program I made must have skipped over the files without telling me, I'll look at making it print out better logs so I catch this in the future
User avatar
Paradoxs
 
Posts: 294
Joined: Tue Aug 25, 2015 7:16 am

Re: Prime - Amber Tweaks and Scripting API

Postby tirioll » Thu Mar 23, 2017 3:49 am

Paradoxs wrote:
tirioll wrote:Please update :)
Code: Select all
0.3:null
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to java.lang.String
   at haven.CharWnd$Quest$Box.uimsg(Unknown Source)
   at haven.CharWnd$Quest$DefaultBox.uimsg(Unknown Source)
   at NumenQuest.uimsg(ancquest.cjava:30)
   at haven.UI.uimsg(Unknown Source)
   at haven.RemoteUI.run(Unknown Source)
   at haven.MainFrame.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Can't fix an error without more information, Prime seems to be running just fine.

It runs, but crashes when I try to log in. Similar was happening with outdated Amber after Numen quests release. Do you have ancestral shrine on the char you are testing with?
Code: Select all
...
at NumenQuest.uimsg(ancquest.cjava:30)
...
User avatar
tirioll
 
Posts: 144
Joined: Thu Nov 21, 2013 4:05 pm

Re: Prime - Amber Tweaks and Scripting API

Postby Paradoxs » Fri Mar 31, 2017 6:59 am

tirioll wrote:
Paradoxs wrote:
tirioll wrote:Please update :)
Code: Select all
0.3:null
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to java.lang.String
   at haven.CharWnd$Quest$Box.uimsg(Unknown Source)
   at haven.CharWnd$Quest$DefaultBox.uimsg(Unknown Source)
   at NumenQuest.uimsg(ancquest.cjava:30)
   at haven.UI.uimsg(Unknown Source)
   at haven.RemoteUI.run(Unknown Source)
   at haven.MainFrame.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Can't fix an error without more information, Prime seems to be running just fine.

It runs, but crashes when I try to log in. Similar was happening with outdated Amber after Numen quests release. Do you have ancestral shrine on the char you are testing with?
Code: Select all
...
at NumenQuest.uimsg(ancquest.cjava:30)
...


Thats update will be releasing soon with the v8 update.
User avatar
Paradoxs
 
Posts: 294
Joined: Tue Aug 25, 2015 7:16 am

Re: Prime - Amber Tweaks and Scripting API

Postby nmbr1stunna23 » Fri Apr 14, 2017 3:49 pm

Does anyone have a couple of extended examples of scripting with this client i could look at? Even a simple tree bot would be great! I just am looking for some further reference to learn from :)
nmbr1stunna23
 
Posts: 10
Joined: Fri Feb 03, 2017 7:33 pm

Re: Prime - Amber Tweaks and Scripting API

Postby mrfrump » Sun Apr 16, 2017 7:27 pm

nmbr1stunna23 wrote:Does anyone have a couple of extended examples of scripting with this client i could look at? Even a simple tree bot would be great! I just am looking for some further reference to learn from :)


Code: Select all
#loadLib(../FrumpAPI.js);

var SETTING_DISTANCE_RADIUS = 250;
var setup = false;
var TreeList = [];

function main(){
  if(!setup){
    var MapObjects = getMapObjects();
    for (var MapObject = 0; MapObject < MapObjects.length; MapObject++) {
        if(MapObjects[MapObject].FullName.contains("tree") && distance(getCoords(),MapObjects[MapObject].Coords) < SETTING_DISTANCE_RADIUS){
          if(MapObjects[MapObject].FullName.contains("stump") || MapObjects[MapObject].FullName.contains("log")){
            continue;
          }
          else{
            TreeList.push(MapObjects[MapObject]);
          }
        }
    }
    setup = true;
    print(TreeList.length + " trees found");
  }

  while(!isStopped()){
    waitForTask();//if doing task lets not continue
    while(isMoving()){
      sleep(500);//lets not do shit whilst moving
    }
    if(getStamina() < 20){
      drink();
      sleep(500);
      chooseOption("Drink");//incase we missed it
      continue;
    }
    if(getEnergy() < 21){
      print(getEnergy());
      print("Out of Energy, Your about to start dying bro.");
      exit();
      return;
    }

    var nearestTree = findClosest(TreeList);
    if(nearestTree == null){
      print("Out of trees, stopping....");
      exit();
      continue;
    }
    if(__FindGob(nearestTree.Id) == null){
      print("tree dead");
      for(var x = 0 ; x < TreeList.length; x++){
        if(TreeList[x].Id == nearestTree.Id){
          TreeList.splice(x, 1 );
        }
      }
      continue;
    }
    if(!inReach(nearestTree.Coords)){
      pfClick(nearestTree, Prime.MouseButton.Left);
      print("not in reach of tree, lets go there.");
    }
    else{
      print("Chop Chop!");
      pfClick(nearestTree, Prime.MouseButton.Left);
      pfClick(nearestTree, Prime.MouseButton.Right);
      sleep(500);
      chooseOption("Chop");
    }
    sleep(1000);
  }
  exit();
}
Last edited by Granger on Sun Apr 16, 2017 8:28 pm, edited 1 time in total.
Reason: hint: code tag ;)
mrfrump
 
Posts: 11
Joined: Mon Aug 17, 2015 1:57 pm

Re: Prime - Amber Tweaks and Scripting API

Postby Thedrah » Wed Apr 19, 2017 10:29 am

anyone got a way for a script to exit a boat? ctrl doesn't wanna work
i can't seem to finagle my way to get my guy out of a boat

btw: great client but when's the next update coming? :3
  ▲
▲ ▲
Thedrah
 
Posts: 936
Joined: Fri Apr 08, 2011 2:20 am
Location: behind you

Re: Prime - Amber Tweaks and Scripting API

Postby Thedrah » Mon May 01, 2017 5:42 am

now i can hearth while in a boat due to recent patch

but... is this client now dead?..
i liked it... still using it but i know one day a patch will make it useless :cry:
  ▲
▲ ▲
Thedrah
 
Posts: 936
Joined: Fri Apr 08, 2011 2:20 am
Location: behind you

Re: Prime - Amber Tweaks and Scripting API

Postby newaccountlol » Thu Oct 19, 2017 6:22 pm

Please update. Would love to practice coding with this
newaccountlol
 
Posts: 87
Joined: Sat Jan 07, 2017 8:02 am

Previous

Return to The Wizards' Tower

Who is online

Users browsing this forum: Faravidus and 8 guests