Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#51 Before February 2015

Happychubbybubby
Guest

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

Hmmm... I will try updating. Thanks again for your help //forums.everybodyedits.com/img/smilies/smile

[EDIT] Ok, works now. Thanks!

Last edited by Happychubbybubby (Jul 22 2013 12:56:39 am)

#52 Before February 2015

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

TakoMan02 wrote:
Squad wrote:

I'm currently running .NET Framework 4.0, and I have tried multiple times to download .NET Framework 4.5 so I can use this SDK. Any ideas? I've tried completely redoing the Framework too.

Hm... it should be using 4.0 already.

https://github.com/Seist/Skylight/blob/ … csproj#L12

I would recommend reinstalling the SDK.

I don't know when the last time the puush download link was updated. You could have downloaded it before I downgraded from 4.5 to 4.0, which would create a problem.

Re-downloaded, works brilliantly. Thanks.


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#53 Before February 2015

capasha
Member
Joined: 2015-02-21
Posts: 4,066

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

Maybe something for the sdk? http://pastebin.com/Q6frEeg7

Offline

#54 Before February 2015

Tako
Member
From: Memphis, Tennessee, USA
Joined: 2015-08-10
Posts: 6,663
Website

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

doh wrote:

Maybe something for the sdk? http://pastebin.com/Q6frEeg7

I actually already had a list, but forgot to sync it up. But thanks for the efforts.


Yeah, well, you know that's just like, uh, your opinion, man.

Offline

#55 Before February 2015

Happychubbybubby
Guest

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

Hi again... :rolleyes:

I've got everything up and running. Except for one thing.

I'm making a rename the room command, I.E. !name.
To do this, I tried:

if(args[0] = !name) { MyBot.Push.Title(args[1]); }

But upon doing this, realised that if the room name was more than one word, it would only take the first word.
I tried lots of different things, but could come up with no way of determining the length of "args", considering it is a []string.
If anyone could help me, that would be great thanks //forums.everybodyedits.com/img/smilies/smile

#56 Before February 2015

Buzzerbee
Forum Admin
From: Texas, U.S.A.
Joined: 2015-02-15
Posts: 4,575

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

I'm assuming you're splitting the string by spaces.

An easy way to go about doing this is by using the substring method, or the replace method. I'm about to go to bed and don't really feel like explaining this in detail, but it's really easy so try googling it.


TdQRyz3.png
https://wiki.everybodyedits.com/images/5/5d/135_bee

Offline

#57 Before February 2015

Happychubbybubby
Guest

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

Ok... Thanks for your help anyway.
[EDIT]
I figured out what substring does.
I'm gonna need more detail. Not today, but sometime.
I tried, and it tells me substring doesn't exist.

I have to leave for now, good night. If anyone could explain in detail what I should do, I will talk tomorrow.

Last edited by Happychubbybubby (Jul 30 2013 4:47:27 am)

#58 Before February 2015

skullz17
Member
Joined: 2015-02-15
Posts: 6,699

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

You can always just use a different character for the split, like a dash, so then it will be something like !name-HBC's Boss.

However, I'm a progamming nub so I'm not sure if you should take my advice.


m3gPDRb.png

thx for sig bobithan

Offline

#59 Before February 2015

xXExpress0Xx
Guest

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

Happychubbybubby wrote:

But upon doing this, realised that if the room name was more than one word, it would only take the first word.
I tried lots of different things, but could come up with no way of determining the length of "args", considering it is a []string.
If anyone could help me, that would be great thanks //forums.everybodyedits.com/img/smilies/smile

You would need to use String.Join in order to get the full name.

if (args[0] == "!name") {     MyBot.Push.SetTitle(String.Join(' ', args.Skip(1))); }

That will make one string out of your arguments, separated by a space (' ').
The `args.Skip(1)` will return a new array without the "!name" argument because it shouldn't be in the title.

Last edited by xXExpress0Xx (Jul 30 2013 6:31:21 am)

#60 Before February 2015

Tako
Member
From: Memphis, Tennessee, USA
Joined: 2015-08-10
Posts: 6,663
Website

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

Thanks to gustav9797, who ported the physics engine to C#, I will be working on implementing precise characteristics, like X, Y, speed, etc.

If you're not convinced that's an important feature, try to think of some of the possibilities:
     ? change your trail color (by placing blocks and then replacing them)
     ? actually move your bot fluently; have it complete challenges or give players a hint
     ? estimate how far they have traveled (up to 9 decimal places)
     ? reliably know where players are, and act accordingly
           ? tell when they hit a key, collect a coin, etc.
           ? open and close a door as they move (something you can't really do)
and much more. Not pivotal, but definitely a big improvement. It will take a week or so to work out, since physics are very complicated (and I have other obligations aside from flash games).

Also, you can expect more support for minimap colors in the somewhat near future.


Yeah, well, you know that's just like, uh, your opinion, man.

Offline

#61 Before February 2015

Mylo
Master Developer
From: Drama
Joined: 2015-02-15
Posts: 829

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

Takoman, i would like this sooo much, but sadly it comes to late. Its so sad seeing this game die. And its so sad too to see you put so much effort in it. If this would came out like 1 year before oh my god, imaging what these people could have done..

Offline

#62 Before February 2015

Buzzerbee
Forum Admin
From: Texas, U.S.A.
Joined: 2015-02-15
Posts: 4,575

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

TakoMan02 wrote:

i'm imprting phsycsi to skylight! yahy!!!1

YEEEES. I'm going to do magic with this, I can't wait!


TdQRyz3.png
https://wiki.everybodyedits.com/images/5/5d/135_bee

Offline

#63 Before February 2015

Happychubbybubby
Guest

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

xXExpress0Xx wrote:

You would need to use String.Join in order to get the full name.

if (args[0] == "!name") {     MyBot.Push.SetTitle(String.Join(' ', args.Skip(1))); }

That will make one string out of your arguments, separated by a space (' ').
The `args.Skip(1)` will return a new array without the "!name" argument because it shouldn't be in the title.

Thanks a lot //forums.everybodyedits.com/img/smilies/smile

I tried and fiddled and got it to work to some extent.
Now what I am left with is:

MyBot.Push.SetTitle(String.Join(line args.Skip(1)));                     MyBot.Push.Say("New world title - " + String.Join(line, args.Skip(1)) + ".");

When I do this, it still includes !name somewhere along the line in the title, even if I change the integer in args.Skip().

BTW:

string line = c.Message.ToLower(); string[] args = line.Split(' ');

just to clarify.

Getting there. Any more help?

Last edited by Happychubbybubby (Jul 31 2013 1:45:26 am)

#64 Before February 2015

Krock
Guest

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

@Happychubbybubby:
I would do it this way:

string line = c.Message.ToLower(); string[] args = line.Split(' '); string newName = ""; for(int i = 1; i < args.Length; i++){   newName += args[i] + ' '; } MyBot.Push.SetTitle(newName);

Done

#65 Before February 2015

xXExpress0Xx
Guest

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

Happychubbybubby wrote:

I tried and fiddled and got it to work to some extent.
Now what I am left with is:

MyBot.Push.SetTitle(String.Join(line args.Skip(1)));                     MyBot.Push.Say("New world title - " + String.Join(line, args.Skip(1)) + ".");

When I do this, it still includes !name somewhere along the line in the title, even if I change the integer in args.Skip().

The problem might be because you are passing `line` as the first argument to `String.Join`. Instead, you should pass a character like ' ' (space). That will be the character between each argument.

Here is an example:

string[] fruits = { "Apple", "Orange", "Banana" }; Console.WriteLine(String.Join(" ", fruits)); //This should output: Apple Orange Banana Console.WriteLine(String.Join(", ", fruits)); //While this will output: Apple, Orange, Banana

Here is some more information about `String.Join`.

Last edited by xXExpress0Xx (Jul 31 2013 5:58:54 am)

#66 Before February 2015

DarkMax116
Guest

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

Sounds like something I might experiment with later.

#67 Before February 2015

Happychubbybubby
Guest

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

Krock wrote:

@Happychubbybubby:
I would do it this way:

string line = c.Message.ToLower(); string[] args = line.Split(' '); string newName = ""; for(int i = 1; i < args.Length; i++){   newName += args[i] + ' '; } MyBot.Push.SetTitle(newName);

Done

Thanks so much. Works almost perfectly now. +1.

xXExpress0Xx wrote:
Happychubbybubby wrote:

I tried and fiddled and got it to work to some extent.
Now what I am left with is:

MyBot.Push.SetTitle(String.Join(line args.Skip(1)));                     MyBot.Push.Say("New world title - " + String.Join(line, args.Skip(1)) + ".");

When I do this, it still includes !name somewhere along the line in the title, even if I change the integer in args.Skip().

The problem might be because you are passing `line` as the first argument to `String.Join`. Instead, you should pass a character like ' ' (space). That will be the character between each argument.

Here is an example:

string[] fruits = { "Apple", "Orange", "Banana" }; Console.WriteLine(String.Join(" ", fruits)); //This should output: Apple Orange Banana Console.WriteLine(String.Join(", ", fruits)); //While this will output: Apple, Orange, Banana

Here is some more information about `String.Join`.

Yes, I understand. I know what you're trying to do, and I understand the logic //forums.everybodyedits.com/img/smilies/tongue. I Appreciate the help, but it just didn't work in my bot. Thanks anyway for the effort //forums.everybodyedits.com/img/smilies/smile

All done and working. Thanks guys!

#68 Before February 2015

Buzzerbee
Forum Admin
From: Texas, U.S.A.
Joined: 2015-02-15
Posts: 4,575

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

Although I respect my fellow programmers, I highly suggest you do it a different way. It would be much easier to do it like this:

//... string chatMessage = m.GetString(1); //... if (chatMessage.StartsWith("!name ") { MyBot.Push.Title(chatMessage.Substring(6)); } //...

It may be a bit flawed, but it should work as a great, easy alternative.

Last edited by BuzzerBee (Aug 1 2013 3:22:16 am)


TdQRyz3.png
https://wiki.everybodyedits.com/images/5/5d/135_bee

Offline

#69 Before February 2015

!Sigg✚
Guest

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

Tako is thy God.

Tako, thanks for putting in all this work for us (and continue working) I would hug you, but the next best thing a rep is all I can give.

#70 Before February 2015

Happychubbybubby
Guest

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

Hi.

Not needing help, but reporting a glitch.

I have a certain amount of commands that respond to chat in game.
For example:

if (args[0] == "!help")             {                 MyBot.Push.Say(c.Speaker.Name + ": " + "Help: !help !version !creator //etc.");             } if (args[0] == "!version")             {                 MyBot.Push.Say(c.Speaker.Name + ": " + "This is version 1.0.0 Beta.");             } if (args[0] == "!creator")             {                 MyBot.Push.Say(c.Speaker.Name + ": " + "The creator of this bot is HappyChubbyBubby.");             }

Out of all these commands, only !version works.

I have checked my spelling.
I have checked the code.

Why does this happen? C# doesn't report an error, but the MyBot.Push.Say() doesn't come up in the level!
TakoMan02 (or anyone else, for that matter), if you could help, that would be great.

I hope I haven't made another stupid error. I hate that...

[EDIT]
Only just read the last couple of posts.

BuzzerBee wrote:

Although I respect my fellow programmers, I highly suggest you do it a different way. It would be much easier to do it like this:

//... string chatMessage = m.GetString(1); //... if (chatMessage.StartsWith("!name ") { MyBot.Push.Title(chatMessage.Substring(6)); } //...

It may be a bit flawed, but it should work as a great, easy alternative.

Thanks for the suggestion.
I haven't tried it yet, but does it recognise capital and lowercase letters? I am currently trying Krock's suggestion, and it works but doesn't recognise capital letters.
If it does, I will give it a try.

Last edited by Happychubbybubby (Aug 2 2013 3:56:15 am)

#71 Before February 2015

skullz17
Member
Joined: 2015-02-15
Posts: 6,699

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

Actually, I have the same problem as HCB, whenever I make a new command, I get no errors and it looks fine, but it doesn't work when I'm debugging. Actually I made a two new commands, !removeblock and !help, but only !removeblock works, !help doesn't.

I had this problem before, and Tako said it was fine when I PMed him, but it didn't work for me. However I rewrote the code in a new C# project exactly the same and then it worked. This will hopefully work again, but for now I want to add more commands before I rewrite it.


m3gPDRb.png

thx for sig bobithan

Offline

#72 Before February 2015

Buzzerbee
Forum Admin
From: Texas, U.S.A.
Joined: 2015-02-15
Posts: 4,575

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

Happychubbybubby wrote:
BuzzerBee wrote:

Although I respect my fellow programmers, I highly suggest you do it a different way. It would be much easier to do it like this:

//... string chatMessage = m.GetString(1); //... if (chatMessage.StartsWith("!name ") { MyBot.Push.Title(chatMessage.Substring(6)); } //...

It may be a bit flawed, but it should work as a great, easy alternative.

Thanks for the suggestion.
I haven't tried it yet, but does it recognise capital and lowercase letters? I am currently trying Krock's suggestion, and it works but doesn't recognise capital letters.
If it does, I will give it a try.

Here, I can make it work a little better for your bot:

//... if (args[0].ToLower().StartsWith("!name ") { MyBot.Push.Title(args[0].Substring(6)); } //...

Updated so that it works with any case, and uses your "args[0]" string.

Last edited by BuzzerBee (Aug 2 2013 9:22:11 am)


TdQRyz3.png
https://wiki.everybodyedits.com/images/5/5d/135_bee

Offline

#73 Before February 2015

capasha
Member
Joined: 2015-02-21
Posts: 4,066

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

Would be better if skylight had it's own forum. This thread is getting huge soon. And have the tutorials how to use skylight on that forum.
Scrolling through this thread just to understand how to use skylight takes forever.

Last edited by doh (Aug 2 2013 9:58:36 am)

Offline

#74 Before February 2015

Tako
Member
From: Memphis, Tennessee, USA
Joined: 2015-08-10
Posts: 6,663
Website

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

Sounds like a good idea. I have my pages set to 50 posts so I didn't realize it was getting lengthy.

http://skylight.lefora.com
I'll spam topics later. Not much to see now. Make an account if you feel so inclined.


Yeah, well, you know that's just like, uh, your opinion, man.

Offline

#75 Before February 2015

Happychubbybubby
Guest

Re: [API] [Beta] Skylight: Make bots with ease (Redux Nov 2015)

TakoMan02: Did you read my earlier post?

Why do some commands work, while others don't? Is it something to do with the SDK, my coding, or a plain C# glitch?

Please help.

Tako1448089601560510

Board footer

Powered by FluxBB

[ Started around 1732485834.6424 - Generated in 0.333 seconds, 13 queries executed - Memory usage: 1.79 MiB (Peak: 2.05 MiB) ]