senpai jinkusu Posted September 3, 2015 Posted September 3, 2015 this was driving me nuts lol, i could not get the bot to find my script, until i figured out it only allows up to 1 local script, so i just deleted the other jar i had in there
risky Posted September 3, 2015 Posted September 3, 2015 Pretty sure this had to be limited based on status,vip,sponsor etc because I have 6 or 7 local scripts that are functional.
Eagle Scripts Posted September 3, 2015 Posted September 3, 2015 this was driving me nuts lol, i could not get the bot to find my script, until i figured out it only allows up to 1 local script, so i just deleted the other jar i had in there It has to do something with the scripts' core. if the mainclass in a script is called main.java and in a second script the mainclass is called the same --> one of those two will only appear.
senpai jinkusu Posted September 3, 2015 Author Posted September 3, 2015 this is off topic but i also have another question and i dont want to make another topic, are references to entities still valid after the entity changes (ie. when you chop down a tree and becomes a tree stump that entity changes) , so basically if i could still interact with the same tree instance after it respawns
omni4life Posted September 3, 2015 Posted September 3, 2015 this is off topic but i also have another question and i dont want to make another topic, are references to entities still valid after the entity changes (ie. when you chop down a tree and becomes a tree stump that entity changes) , so basically if i could still interact with the same tree instance after it respawns As long as you're calling them by String (entity name), then yes, after respawn your interaction will still work . Just make sure you use a null check else if you cut them all down problems shall arise.
senpai jinkusu Posted September 3, 2015 Author Posted September 3, 2015 As long as you're calling them by String (entity name), then yes, after respawn your interaction will still work . Just make sure you use a null check else if you cut them all down problems shall arise. if i instantiate it like so ent= getObjects().closest(new Area(...,tree id); and it is not null, i chop it, it respawns, will this still be valid
omni4life Posted September 3, 2015 Posted September 3, 2015 if i instantiate it like so ent= getObjects().closest(new Area(...,tree id); and it is not null, i chop it, it respawns, will this still be valid That's correct, this is the entity declaration I use in my Willow Cutter: Entity tree = objects.closest("Willow"); It seems to work perfectly fine with respawned trees. I'd highly advise you avoid using the trees ID's as they're prone to changing on the fly, especially after updates. 1
senpai jinkusu Posted September 3, 2015 Author Posted September 3, 2015 That's correct, this is the entity declaration I use in my Willow Cutter: Entity tree = objects.closest("Willow");It seems to work perfectly fine with respawned trees. I'd highly advise you avoid using the trees ID's as they're prone to changing on the fly, especially after updates. Im still pretty new when it comes to osbot scripts ( and rs bots in general) but I'll definitely keep that in mind