Jump to content

Local script not showing up.


Recommended Posts

Posted

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)

Posted

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

Posted

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?

Posted (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 by Woody
Posted

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? :)

 

Posted

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 smile.png.

 

Thanks!

 

Can I maybe add you on skype? smile.png

 

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.

Posted (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 by shiny greninja

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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