Jump to content

Local script not showing up.


bzmake

Recommended Posts

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)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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