SRL Archive - First Scripts

[CPM] CnCPowerMiner


CnC

2012-10-17 20:02:24

Hey, guys. I've been working on this all day!

I'm proud of it.


So, i've made a mining script.

And.
It's..
Like..
I don't know.

How to set it up: When you're typing your username and password in it, you go down to Integers[0]:= 0000000; and change it to that color. You get the color by clicking the dropper thing in the top, and clicking on the ore that you want.


So, That's why YOU need to tell ME what I need to fix on it.


Sooo… Yeah..


Download it.. now.


UPDATE!

1.0A: Initial release.

1.0B: Added antiban. Noticed that it's not clicking. Anybody know why?

Footy

2012-10-17 20:04:19

I'll read through it, however for people who want to use it, tell them how to set it up, where to start, what to equip, etc. :)

CnC

2012-10-17 20:04:44

Ok! I'll do it now.

Vinyl Scratch

2012-10-17 20:18:02

Not bad.. You could do with some more.. creativity in your thread, but the script is not bad at all. I won't be able to test it until tomorrow.

Olly

2012-10-17 22:30:48

I suggest you ask to get this moved to "first scripts" you will get more feedback there :)

CnC

2012-10-18 20:39:05

Oh. How do I do that?

[XoL]

2012-10-18 21:05:13

From: CnC
Oh. How do I do that?


It is already there!
Hmm, I would suggest adding some fail safes and more randomization also antiban!

BraK

2012-10-18 21:05:30

Good job on releasing your first script hopefully you get some great feedback. Don't take it personally the way they say it. Some of the members are a bit rough around the edges when dealing with others. :)

Lol @ R4nd0m Moved it ;)

xtrapsp

2012-10-19 08:07:20

Quite a small script but good for a first one. Try looking into anti-ban etc :)

Overall for a first script its good!

The Killer

2012-10-19 11:00:08

may i suggest that you add the colours yourself so they have the option of picking iron, copper etc
it's just good practise really

CnC

2012-10-23 17:36:03

Oh. I'll do that. Thanks, BraK.

xtrap, I'll do antiban!

XoL, I'll get that done too!


Thanks for the feedback, guise!

Benny

2012-10-23 18:09:59

Nice script for a first attempt. Maybe implement some random antiban (increase it greatly) - ask footy for his amazing one that has only been used in his scripts and yeah just streamline it a bit more with some failsafes

CnC

2012-10-23 19:45:23

Working on it now. Thanks, Guys!

Footy

2012-10-23 19:50:43

Keep up the great work! It's people with great attitudes like yours that makes great scripters! Keep working, keep learning, and keep asking questions!

CnC

2012-10-24 00:06:03

Alright, Footy! I will. I'm almost done with the update. I've got school tomorrow, so I'll finish and update this tomorrow.

I'll play around with the other stuff that people have suggested. I'll see if I can make it where it's multi-choice. Anyway, I'm off! Gotta go.. Well, not learn. I already know this stuff. :I Google, you..

Ashaman88

2012-10-24 00:23:58

Very nice for a first script!

CnC

2012-10-25 17:09:12

Thanks, Ash!


Btw.. UPDATE! So, could someone help me with the not clicking problem?

<3, I love all of you, you're so nice.

Footy

2012-10-25 17:17:15

Could you explain your problem a little more? Whats not clicking? At what point in the script?

E: reading over your script:

Random(4) will produce a random integer between 0 and 3. Not 1 and 4. I know it doesn't really make sence, but you just have to roll with it. So instead of your antiban things being 1:, 2:, 3:, 4:, make them 0:, 1:, etc…

When you move your mouse off the screen, you are doing it with 0 randomness at all. I doubt anyone would ever mve their mouse to exactly 0, 0 when moving the mouse off the screen. Add some X randomness or Y randomness, not both though.

Typing in the chat and trying to talk to players is a bad idea… Unless you have some crazy database of answers and stuff, its just not a good thing to try. I've never tried to do it, it will actually make you seem more bot like.

You shouldn't be doing an antiban thing every time you call your procedure. Instead of case random(4) of, try case random(100) of. that way, roughly 1/25 times, you will do something random.

Thats all I have for now, I just quickly read through it. Please explain this not clicking issue though, and me or someone else will show you whats wrong.

E: Figured out your problem.

You are looking for the generic rock color I believe with your findobj, and then trying to find another color inside a box. The problem is, you never define this box. I would either use Players[Currentplayer].Integers[0] In your findobj and skip the second bit, or create a box around your current pos position like this:

 getmousepos(x, y);
Box := IntToBox(X - 10, Y - 10, X + 10, Y + 10);

That would get yours current mouse pos, then create a 20x20 box around it. Any more questions? Feel free to ask!

CnC

2012-10-25 22:06:56

OH!
Ok! I'll fix that now! Last forum I was on a couple years back, if I had made a mistake like that, I'd have been treated like I was stupid. :\