bzmake Posted April 17, 2015 Share Posted April 17, 2015 Hey, I just made the chicken killer script as my first script ( to learn ). But when I turn it into a .jar and place it in my custom made folder it doesn't show up in my local scripts list. Is there any way to fix this? Do I need to compile it in a special way? Thanks! Quote Link to comment Share on other sites More sharing options...
Nicholas Posted April 17, 2015 Share Posted April 17, 2015 it probably has something to do with the code. BTW goodluck if you pm me the code i could take a look at it Quote Link to comment Share on other sites More sharing options...
Precise Posted April 17, 2015 Share Posted April 17, 2015 place the .jar file in the following folder: Local Disk\Users\****NAME HERE***\OSBot\Scripts also, make sure you have @ScriptManifest with its details at the top of your script class. Precise. Quote Link to comment Share on other sites More sharing options...
bzmake Posted April 18, 2015 Author Share Posted April 18, 2015 Hmm I think I got the compile right now, it's showing up. But the script is well.... far from working perfectly... I now took the Lesser Demon educational script and I'm trying to refit it to what I want it to do... But I can't really figure out what I'm doing ahaha Is there anyone that is able/wanting to help me out? Maybe through skype (no mic needed) Quote Link to comment Share on other sites More sharing options...
Acinate Posted April 18, 2015 Share Posted April 18, 2015 Hmm I think I got the compile right now, it's showing up. But the script is well.... far from working perfectly... I now took the Lesser Demon educational script and I'm trying to refit it to what I want it to do... But I can't really figure out what I'm doing ahaha Is there anyone that is able/wanting to help me out? Maybe through skype (no mic needed) PM any issues you have and what you are trying to do and I can help out Quote Link to comment Share on other sites More sharing options...
Woody Posted April 18, 2015 Share Posted April 18, 2015 (edited) Learn some java Edited April 18, 2015 by Woody Quote Link to comment Share on other sites More sharing options...
bzmake Posted April 18, 2015 Author Share Posted April 18, 2015 Learn some java It's not really java that is the problem, it's just the API really... Which functions to use etc ahah Quote Link to comment Share on other sites More sharing options...
Woody Posted April 18, 2015 Share Posted April 18, 2015 It's not really java that is the problem, it's just the API really... Which functions to use etc ahah then you should ask how to do something Quote Link to comment Share on other sites More sharing options...
bzmake Posted April 18, 2015 Author Share Posted April 18, 2015 then you should ask how to do something I'm trying to remodel : http://osbot.org/forum/topic/69541-lesser-demon-killer-script-source-with-comments-educational/ Into killing some cows ahaha. In the script itself it can only find one monster?: private static final String NAME = "Lesser demon"; Or is it possible to just create another static string with for example: private static final String NAME = "Cow calf"; Also I want it to take items? So I made an enum: TAKE But how would I go about making it detect the item for example: "cowhide" on the ground and taking it? Quote Link to comment Share on other sites More sharing options...
Woody Posted April 18, 2015 Share Posted April 18, 2015 (edited) I'm trying to remodel : http://osbot.org/forum/topic/69541-lesser-demon-killer-script-source-with-comments-educational/ Into killing some cows ahaha. In the script itself it can only find one monster?: private static final String NAME = "Lesser demon"; Or is it possible to just create another static string with for example: private static final String NAME = "Cow calf"; Also I want it to take items? So I made an enum: TAKE But how would I go about making it detect the item for example: "cowhide" on the ground and taking it? If you think you can use same name to declare 2 different strings, then you need to learn some java. When declaring strings, ints, booleans, give it a name so you know what it is about. Example: private final String cow = "Cow"; or you can create an array of strings and the script will look and find one of the monsters private final String[] monsters = {"Lesser demon", "Cow", "Cow calf"}; In your getState() you could write final GroundItem cowhide = groundItems.closest("Cowhide"); and if(cowhide != null && cowhide.isVisible()) { return state.TAKE; } Use this http://osbot.org/api/ Edited April 18, 2015 by Woody Quote Link to comment Share on other sites More sharing options...
bzmake Posted April 18, 2015 Author Share Posted April 18, 2015 If you think you can use same name to declare 2 different strings, then you need to learn some java. When declaring strings, ints, booleans, give it a name so you know what it is about. Example: private final String cow = "Cow"; or you can create an array of strings and the script will look and find one of the monsters private final String[] monsters = {"Lesser demon", "Cow", "Cow calf"}; In your getState() you could write final GroundItem cowhide = groundItems.closest("Cowhide"); and if(cowhide != null && cowhide.isVisible()) { return state.TAKE; } Use this http://osbot.org/api/ Oh ye there's my mistake. My knowledge of Java is far from the best ahaha, but I want to learn on the way... As I did just now . Thanks! Can I maybe add you on skype? Quote Link to comment Share on other sites More sharing options...
Woody Posted April 18, 2015 Share Posted April 18, 2015 Oh ye there's my mistake. My knowledge of Java is far from the best ahaha, but I want to learn on the way... As I did just now . Thanks! Can I maybe add you on skype? Trust me, learn some java first. You don't have to learn everything, but you should know the basic java. Sorry, my skype is for private use only. Quote Link to comment Share on other sites More sharing options...
nyan Posted April 18, 2015 Share Posted April 18, 2015 (edited) hey man not sure if you tried or not, i didn't read the past posts, but you need to hit refresh on the script selection page everytime. otherwise it just shows you the script history because it only loads local scripts and the sdn on the client load unless done manually. i plan on making some tutorials in the next week or so. keep an eye out for them ;) Edited April 18, 2015 by shiny greninja Quote Link to comment Share on other sites More sharing options...