SRL Archive - Archive

SRL Scripting Competition #4 Rules & Discussions


Wizzup?

2008-11-29 18:00:08

Challenge: Auto-Responder

SRL has always been about being indistinguishable from regular players. Now's the time to make it even better, and it's up to you to make that happen!

This competition will have two types of entries: an auto responder engine, and a trigger/response dictionary for that engine to use. Since the engine requires more knowledge and experience to make, that reward will be bigger, but this will also give non-SCAR scripters the opportunity to win a competition :)

Guidelines:
- Engine
  • Freestyle competition, you're allowed to write your code in a plugin, include, combination, or anything else. As long as it's easily portable.
  • Should be easy to use and implement, so people should be able to integrate it into FindNormalRandoms; Using functions like SetTimeOut are not a good idea, and generally annoying to implement.
  • Should be efficient! Don't lag up the whole script.
  • Should support saying current levels in the form of $WC for current woodcutting level and similar.
  • Below is a script for editing trigger-response dictionaries. (Attached)
  • You don't have to follow the format of the attached script, but make sure you can convert it to all kinds of formats.
  • Should be coded neatly and have consistent standards (though not necessarily SRL standards)
  • The best input would be a string, but you a free to make it automatically grab the text in Runescape. I don't recommend it though.

- Dictionary
  • Size is always good, the more triggers and responses, the better
  • Personality - Perhaps allowed different modes. (Annoyed, Helpful, Bored, Leetspeak, grammar Nazi)
  • Multiple lists allowed and encouraged for multiple personalities (some people prefer responding like a hick as compared to a noob :D)
  • I encourage you all work on one big dictionary, perhaps make a thread for it, assign a general leader who will manage the dictionary. Maybe you guys can just post your sentences in the Dictionary Editor's standard.
  • Or perhaps you can use a database. (See the note at the end of the page.)
  • Make good use of variables. $wclvl should be used to return the woodcutting level of the active player, $questioner the name of the player saying something and $name could be the name of the current player. Feel free to add more variables like these.

Dictionary Editor (by : Widget):
Below is an attached script to edit the triggers and responses for the dictionaries to be written for this contest. For the dictionaries written the included words should be used as an example, and for the engines written the format be used as a standard for the dictionaries to be parsed. Using this format is optional, but if you decide to use your own format, you must also write a converter or rewrite the saving format to export yours instead.

Prizes!:
  • Runescape money, to the winner, and perhaps some to the ones below the first place too.
  • Some prize to the people who work hard on filling dictionary's.
  • First place will receive a Competition Winner's Cup
  • The winning engine might be used in SRL.
  • Cups will be awarded.

Help with the editor:
.

1 - The triggers that will set off the auto-responder. These are things that other players in rs would say and you would respond to
2 - The possible responses. One of these will be chosen at random if one of the triggers was said by another player.
3 - The list of triggers for the selected trigger set, seperated with semicolons (";"s)
4 - The list of responses for the selected trigger set, seperated with semicolons (";"s)
5 - Add a trigger set or remove the currently selected one
6 - Load a dictionary, saved in INI format
7 - Save your current dictionary in INI format (unless you rewrite it to use a custom format)
Please note: you don't have to use this Dictionary Editor.


Making different systems for dictionaries is also fine, as long as they are easily portable.

And remember … It's all about fun, some might produce better scripts than others, but that's no reason not to participate!


NOTE: If I find some time, I'll try to make a database for responses. This might ease the task ahead of you. It will probably include an online form. (THAT IS: If I find time to do it.)

Final word:
The dictionary and the Engine are separate projects, so just building a large dictionary can also get you a prize. :)
This means that you don't have to write an engine, since writing a good engine can be rather hard. There is no real deadline for this competition yet.
If you think you have a good suggestion for an other competition, don't hesitate to post them, or just PM them to me. Seeing this is a rather complicated project, I think it might be wise to have another competition next to this one.

Credits: Big thanks to Widget, for pushing the competition to this level, and for writing the first BIG draft of the rules, guidelines. He also made the dictionary editor.
EDIT: There will probably also be a more RuneScape *task* related one, soon.

Widget

2008-11-29 18:02:19

Looks nice :D

Good luck to everyone!

Wizzup?

2008-11-29 18:11:24

I edited my post a bit, since I realized this might be a hard assignment. And it can be quite boring. ;)
If you have good idea's for other competitions, don't hesitate to post them! :)

MylesMadness

2008-11-29 18:58:17

Wait, so if we don't use that auto respond maker thingy we have to make it look like we did? If so, that's the dumbest thing I have ever heard

Hugolord

2008-11-29 19:25:43

erm.. MIGHT enter this one if I have time..

Dan Cardin

2008-11-29 19:47:25

Does it have to be Runescape compatible?

Wizzup?

2008-11-29 20:06:19

From: Dan Cardin
Does it have to be Runescape compatible?


Ah, right. I just added this:
The best input would be a string, but you a free to make it automatically grab the text in Runescape. I don't recommend it though.

EvilChicken!

2008-11-29 20:34:27

Wow, this looks like a really nice competition.

I doubt that I'll make an entry (although I'll probably try ..) but I want to wish everyone good luck, and I'm really hoping for the best of SRL that we'll get a new 'official' responding engine.

Griff

2008-11-29 22:50:33

This looks great. Although I'm a just new member, and I probably won't win, I think I'll enter anyways. (At least we all know that wizzup? can't enter now:D)

-Griff

Sandstorm

2008-11-30 00:17:00

I've been working on one for the past few weeks; am I ok to enter?

Kyle Undefined

2008-11-30 00:18:58

So even if we don't code the Engine itself but make the dictionary we have a shot at this?

~Camo

Sandstorm

2008-11-30 00:25:13

Also, one last question. Say me and Camo Kyle worked together, and implemented the dictionary he made into the base I made, could that count for both of us?

P1nky

2008-11-30 00:33:02

aww why a responder :(

though be good for the community

Naum

2008-11-30 04:38:03

Good luck to everyone participating :)

Dan Cardin

2008-11-30 10:41:17

From: Wizzup?
Ah, right. I just added this:
The best input would be a string, but you a free to make it automatically grab the text in Runescape. I don't recommend it though.


So if i understand correctly, i can make my autoresponder just take in strings…maybe making a chat type thing, as well to show the conversation, without actually having to get the text and whatnot from RS and test it in RS?

if so then quite nifty!

and btw, no offense to widget, but i think the way you format your ini's is kinda pointless. Takes up a lot of space for naught. I just edited it to make it export it as all in one response, and trigger per. I think doing that and exploding it in the responder, is quite a lot easier than having a bunch of for loops.

Wizzup?

2008-11-30 11:04:00

From: Dan Cardin
So if i understand correctly, i can make my autoresponder just take in strings…maybe making a chat type thing, as well to show the conversation, without actually having to get the text and whatnot from RS and test it in RS?

if so then quite nifty!


Yes, that is correct.

Nava2

2008-11-30 11:35:22

Hmm

Might have to finally get my auto responder working to full caliber! :)

Tniffoc

2008-11-30 19:14:55

Just a suggestion for the scripters but, since Lazarus (Delphi) has a thing for interacting with a MySQL Database, why not have a central response database? You would have to find some way to moderate it, but it would be really cool!

EDIT: It would be 1337 to build a form so you could add responses in as a user.

Dan Cardin

2008-11-30 19:58:50

From: Tniffoc
Just a suggestion for the scripters but, since Lazarus (Delphi) has a thing for interacting with a MySQL Database, why not have a central response database? You would have to find some way to moderate it, but it would be really cool!

EDIT: It would be 1337 to build a form so you could add responses in as a user.


thats basically what widget's thing does. You can open then dictionary and add/edit things.

hey Wizzup! do i get extra points for making mine bilingual?

R0b0t1

2008-11-30 19:59:43

Nah, reading from a database like that takes lots of time. It would be better to have a general list of replies stored on the client. (Delphi/Pascal is usually fast, but not that fast)

A G E N T

2008-11-30 21:40:45

From: R0b0t1
(Delphi/Pascal is usually fast, but not that fast)

Moreover, the net connection would slow it down.

This competition looks interesting, and I've got something started. However, I know some "pro" scripter is going to win.
You should make a competition "for the rest of us".

Tniffoc

2008-11-30 22:56:13

Ok, here is a revised version of my idea. Ad Block Plus for Firefox uses a system of "lists" to put tags on. Maybe the thing could update itself from a central "SRL LIST" (bum bum bum……) when the plugin loads. (Do this by putting this in some funciton that SCAR calls when it loads the plugin. This way, everybody can participate and the script isn't slowed down at runtime. If the user wanted to, he/she could disable the auto-update and decide to stay with the "list" that he/she has at the moment. This way, it's central, so nobody has to do so much dang work.

EDIT: This would still work better with a MySQL database but I think you could use a flat system just as easily.

Wizzup?

2008-12-01 02:22:14

From: R0b0t1
Nah, reading from a database like that takes lots of time. It would be better to have a general list of replies stored on the client. (Delphi/Pascal is usually fast, but not that fast)


Databases are ridiculously fast. ;)

From: Tniffoc
Just a suggestion for the scripters but, since Lazarus (Delphi) has a thing for interacting with a MySQL Database, why not have a central response database? You would have to find some way to moderate it, but it would be really cool!

EDIT: It would be 1337 to build a form so you could add responses in as a user.


Sure, that would be very nice.
On a side note, then don't HAVE TO be integrated into SCAR, so basically you can also make .exe and turn that in (with it's source) and later work on the integration, if that saves you time. But doing it in SCAR would also be leet.

A G E N T

2008-12-01 11:21:46

It seems like the easiest way to get results from a database (in native SCAR) would just be to bounce a request off of a CGI page of some kind. Directly connecting to a database server in SCAR returns something like:

4
5.0.51
????????????dPEGs04T+w7L?????ÿ??Bad handshake

Naum

2008-12-01 12:08:06

So bascially you can write triggers and responses in notepad?

Unrelated : Maybe the next competition can envolve making a quest runner, without using reflection??

Tniffoc

2008-12-01 18:23:58

From: A G E N T
It seems like the easiest way to get results from a database (in native SCAR) would just be to bounce a request off of a CGI page of some kind. Directly connecting to a database server in SCAR returns something like:

4
5.0.51
????????????dPEGs04T+w7L?????ÿ??Bad handshake



This is why I would use a Delphi plugin for SCAR. Delphi has an Interface for interacting with a MySQL Database.

EDIT: I would suggest. Not, I would do.

Narcle

2008-12-01 18:34:17

So I see 3 things for the database being discussed.
  • .ini
  • Notepad
  • MySQL (online)
Correct?

How exactly would we read it? Would we load it into a big array for SCAR to store or actually read from the .ini/online file at the time?

In any case the engine will be the key to loading/reading in a fast and precise manner.

A G E N T

2008-12-01 21:36:45

I think it should be an INI file, standardized as in the script posted on the first post here.

Naum

2008-12-02 02:37:07

Yes an INI file would be much better, as it is much better adapted to the job.
You can have sections like [Trigger] and [Response].

Dan Cardin

2008-12-02 14:50:54

From: A G E N T
I think it should be an INI file, standardized as in the script posted on the first post here.

i disagree that they have to be standardized as up there. I think that that isnt the greatest format, and will leave more work for itself and more work for the engine the way it is. We should be allowed to use whatever format we see fit. I personallu just edited Widget's to work with my format though, to make things easier.

Hugolord

2008-12-02 15:36:59

About the final date of this competition..

can it be like 1st of January?
or something like that, cz some ppl have exams ( for school) around this time…

P1nky

2008-12-02 16:12:38

yeah school exams soon :(

tho mine are starting from JAN 1st

:S

after winter break

Wizzup?

2008-12-02 16:13:35

From: Hugolord
About the final date of this competition..

can it be like 1st of January?
or something like that, cz some ppl have exams ( for school) around this time…


I don't think I set any date yet, I have exams myself too… So yea. I'll set a good date later.

Hugolord

2008-12-02 16:56:51

From: Wizzup?
I don't think I set any date yet, I have exams myself too… So yea. I'll set a good date later.


oh ok thanks Wizzup? ^^:(h):

A G E N T

2008-12-02 16:58:38

From: Dan Cardin
i disagree that they have to be standardized as up there. I think that that isnt the greatest format, and will leave more work for itself and more work for the engine the way it is. We should be allowed to use whatever format we see fit. I personallu just edited Widget's to work with my format though, to make things easier.


Maybe not. But we have to pick some kind of format - besides, that format is alright. I will post the parse code I have for it (it's at my mum's house).

MylesMadness

2008-12-02 21:36:12

But, the .ini file isn't the greatest as:
  • Its not very pretty…
  • You can't use moods and such
  • not the easyest to edit

Wizzup?

2008-12-03 06:58:00

From: Mylesmadness
But, the .ini file isn't the greatest as:
  • Its not very pretty…
  • You can't use moods and such
  • not the easyest to edit


You are free to make your own. :)

Widget

2008-12-04 04:18:49

I was thinking moods would be in separate .inis, you could just pick one in some config thing or randomly :)

I also tried to make it easy to edit, you're welcome to change my script if you want though

Sandstorm

2008-12-04 22:05:58

Did you guys take the idea of moods and personalities from me? :P.

Anyways, mines going well, just need to add frills (if possible o.o).

Brain

2008-12-04 22:32:28

wow, this looks great. I can't wait for a super amazing auto-responder in all the scripts….better have a huge dictionary of responses…since we all don't want to be saying the same things :)

Macros

2008-12-05 17:32:38

Nice! I was thinking of recommending an AutoTalker for the next comp. The SRL community could really do with a pro one =)

Nose Smasher

2008-12-06 02:43:32

:Sigh…: :( I was excited to see Comp #4 was finally out… but when I saw the topic, it was like sadness had hit my face immediately… Oh well, maybe I'll enter #5 ;)

Good Luck all :)

Blumblebee

2008-12-15 16:11:18

question, whats the other arguments like $WC is obiiously your wcing level, but as for mining smithing ect could someone fill me in please?

Dan Cardin

2008-12-15 19:24:55

well i completely forgot about this. but i did compile myself quite a nice abse for my dictionary. So here you are!

[General]
Type=Trigger-Response Dictionary
Version=1
Author=Dan Cardin
[Row]
Rows=1
Trigger0=Goeie dag;Tungjatjeta;Yatasay;Ahlan bik;Voghdzuyin;hola;kaixo;Horas;Pryvitańnie;Nomoskar;Oki;Selam;Dez-mat;Zdrávejte;Mingala ba;Hola;Hafa dai;Oh-see-YOH;Nín hao;Bonjou;Zdravo;Nazdar;Iiti;Kotáka;Saluton;Tere;Hallo;Bula;Helo;Hei;Goede morgen;Bonjour;Hoi;Ola;Gamardžoba;Guten Tag;Mauri;Geia;Inuugujoq;Kem cho;Sannu;Aloha;Shalóm;Namasté;Szia;Halló;Hai;Kiana;Dia is muire dhuit;Buongiorno;Kónnichi wa;Salam;Annyeonghaseyo;Na;Sabai dii;Ave;Es mīlu tevi;Labas;Selamat petang;Ni hao;Kia ora;Yokwe;Kwe;sain baina uu;niltze;Yá'át'ééh;Namaste;Salâm;Witajcie;Olá;Kâils;Aroha;Salut;Privét;Talofa;Namo namah;ćao;Nazdar;Zdravo;Hola;Jambo;Hej;Sälü;Halo;Selam;Sàwàtdee kráp;Dumela;Merhaba;Pryvít;Adaab arz hai;Chào;Glidis;Helo;Sawubona;
Response0=Goeie dag;Tungjatjeta;Yatasay;Ahlan bik;Voghdzuyin;hola;kaixo;Horas;Pryvitańnie;Nomoskar;Oki;Selam;Dez-mat;Zdrávejte;Mingala ba;Hola;Hafa dai;Oh-see-YOH;Nín hao;Bonjou;Zdravo;Nazdar;Iiti;Kotáka;Saluton;Tere;Hallo;Bula;Helo;Hei;Goede morgen;Bonjour;Hoi;Ola;Gamardžoba;Guten Tag;Mauri;Geia;Inuugujoq;Kem cho;Sannu;Aloha;Shalóm;Namasté;Szia;Halló;Hai;Kiana;Dia is muire dhuit;Buongiorno;Kónnichi wa;Salam;Annyeonghaseyo;Na;Sabai dii;Ave;Es mīlu tevi;Labas;Selamat petang;Ni hao;Kia ora;Yokwe;Kwe;sain baina uu;niltze;Yá'át'ééh;Namaste;Salâm;Witajcie;Olá;Kâils;Aroha;Salut;Privét;Talofa;Namo namah;ćao;Nazdar;Zdravo;Hola;Jambo;Hej;Sälü;Halo;Selam;Sàwàtdee kráp;Dumela;Merhaba;Pryvít;Adaab arz hai;Chào;Glidis;Helo;Sawubona;
that has "hello" in 100 languages :). Wow i really hope i win!

Aser

2008-12-15 21:28:12

I didn't catch the answer if you could work in teams or not. Can we?

P1nky

2008-12-18 16:48:13

no i doubt this competition is a team project :(

wish i was a junior right now lol i want to join there competition :)

Wizzup?

2008-12-18 17:20:42

I'm quite flexible really. If you want to work in teams then I won't stop you from doing so. You will basically be rated on how much you know, how much we expect you to make, and of course on non-relative rules, too.
If you work in a team, that's alright with me. It's always good to get to know each other better. Cooperation is often the correct way to do so.

Naike

2008-12-23 09:16:56

I'm joining ;)

However, I don't have the time as Dan Cardin. Will that mean -Points in the Dictionary? As i don't have time to make a dictionary for the hole world ;P

Wizzup?

2008-12-27 05:40:21

What about 15 January as deadline?

Cookiemonster37

2009-01-04 00:09:26

Who wants to be on my team?

R0b0t1

2009-01-05 21:41:39

Is there a deadline? I'm working on one, dunno when I should have it done by. If the date passes by, should I bother completing it?

Dan Cardin

2009-01-05 22:28:27

what exactly are you grading the dictionary on? I hope my entry wasnt for naught if its just the number of topics it covers.

MasterKill

2009-01-06 01:02:10

15 January it is imo, I'll pm you my script when it's done wizzup

n3ss3s

2009-01-06 14:01:57

Wizzup, start planning on the next one already! :)

Sir R. M8gic1an

2009-01-06 14:12:14

i already have an idea for the next one :)

~RM

Wizzup?

2009-01-14 12:07:33

Tomorrow is the deadline. Send (PM) it around 23:59 AM GMT +1.
If you are bit late due to either not being home, don't worry, I'm not too strict.
You guys have probably put lots of work in it, and I won't act like a hairsplitter. ;)

Wizzup?

2009-01-16 10:17:33

I have received two scripts. One from N1ke and one from MasterKill.
R0b0t1 was a noob and didn't know the competition ended, so he has send me an incomplete program. (I'll look at it nevertheless. Expect results within a week.)
:p

@R0b0t1, if you have it any time soon, you can still enter if n1ke and Masterkill don't mind…

EvilChicken!

2009-01-16 10:34:18

I'm looking forward to see the result of this competition.

MasterKill has an awesome easy-to-use autoresponder which I bet he has built heavily on, and I've seen N1ke's autoresponder, it's really nifty aswell.

Who will get voting powers in this competition?
Or will the winner be chosen by one person?

Sandstorm

2009-01-16 10:42:45

I sent you one to :(. I can resend it if you need me to.

~Sandstorm

MasterKill

2009-01-16 11:34:06

I don't mind, they can enter. But no one more from now on imo.

Dan Cardin

2009-01-16 16:19:39

what, mine didnt count? I thought posting it in the thread would be fine.

NiCbaZ

2009-01-16 17:14:35

You have to make an auto responder, not just a dictionary.

R0b0t1

2009-01-16 22:36:30

Er, crap. I just PM'ed Wizzup :) It's not done yet, though.

Wizzup?

2009-01-17 11:46:17

From: Sandstorm
I sent you one to :(. I can resend it if you need me to.

~Sandstorm


I totally forgot, sorry. You have send me one too, my bad. (You have send it quite some time ago, so that's why I forgot to list you… :) )

I also got R0b0t1's PM. I'll get to judging soon. :)

EDIT: Also got DanCardin's post now.

Sandstorm

2009-01-17 11:49:31

No problem, it happens ^.^.

Pmed you last night. Hope you got it.

~Sandstorm

Dan Cardin

2009-01-17 14:02:48

From: NiCbaZ
You have to make an auto responder, not just a dictionary.


lies, only a dictionary is acceptable also :). but problem solved now ;)

P1nky

2009-01-29 11:12:44

so, no one has posted here more than 10 days
just wanted to give this a reminder lol

I cant find the deadline also. Is it not set yet?

Naum

2009-01-29 11:14:45

Well the deadline was over 14 days ago :)

MasterKill

2009-01-29 11:16:10

From: ~~Joker~~
so, no one has posted here more than 10 days
just wanted to give this a reminder lol

I cant find the deadline also. Is it not set yet?


Lol, were waiting for the results already. Holding our breath xD

lordsaturn

2009-02-01 02:18:10

@Wizzup

ETA on the results?

NiCbaZ

2009-02-01 03:35:38

Hahah , Im not entering because im to late.. decided to make an autoresponder today.. this is what i came up with :)

Kinda Noobie, i could make it load an array from an ini file, but i just wanted the basic talking stuff.


function QuickChat(QC: array of String): Boolean;
var
II: Integer;
begin
Mouse(74,464,2,2,true);
Wait(300+random(150));
for II := 0 to High(QC) do
begin
Result := ClickText(QC[II], SmallChars, 7, 361, 513, 473, True);
case Result of
True: Wait(1300+random(500));
False: Exit;
end;
end;
end;

function HandleRandoms: boolean; forward;
function Responder: Boolean;
var
I,II, III : Integer;
Lines : Line;
S : String;
Username: String;
Talk: Boolean;
Responce : String;
Text : array of string;


Begin
Talk:= False;
SetArrayLength(Lines,7);
Lines[0].TextIn := ['hi','hello','hello','yo','sup man','ho','hoi'];
Lines[0].TextOut := ['hi','hello','helllo','yo','sup man','ho','hoi','hey dude','hey man','sup dude'];

Lines[1].TextIn := ['wat''s up','wats up','sup','what you doing','wassup','sup'];
Lines[1].TextOut := ['nm and u','not much','nm','not to much','not 2 much','im bored','bored lol','nuthing man'];

Lines[2].TextIn := ['lol','lolz','haha','lmao','rofl'];
Lines[2].TextOut := ['lol','lolz','haha','lolzz','lmao','rofl','haha lol',' ahaha rofl','lol rofl','lol lmao','lmao!!','rofl!!!','rofl Lmao!!!!','rofl lamo..'];

Lines[3].TextIn := ['by','cya','cya later','later','bie','by'];
Lines[3].TextOut := ['cya man','by dude','cya','by by','catchya later'];

Lines[4].TextIn := ['how are you','how r you','how r u','how are u'];

Lines[4].TextOut := ['ok','ok n u','ok and you','ok and how are you','ok thanks','ok thanks n u','ok thanks and you','ok thanks n you',
'ok thanks n you','good','good n u','good and you','good and how are you','good thanks','good thanks n u','good thanks and you','good thanks n you',
'good thanks n you','great','great n u','great and you','great and how are you','great thanks','great thanks n u','great thanks and you',
'great thanks n you','great thanks n you'];

Lines[5].TextIn :=['cooking lvl','cook level','cooking level'];

Lines[6].TextIn :=['fletching lvl','fletching lvl','lvl fletch'];

for I := 0 to 4 do
begin
if HandleRandoms then
Exit;
UserName:= R_LastChatter;
if not GetLastChatText(S) then
Exit;
Text:= Lines[I].TextIn;
if HandleRandoms then
Exit;
for II := 0 to High(Text) do
begin
if Pos(LowerCase(Text[II]), LowerCase(S)) = 1 then
if Pos(Players[CurrentPlayer].Nick,UserName) = 0 then
begin
if HandleRandoms then
Exit;
Talk:= True;
case I of
0..4:
begin
III:= RandomRange(0, High(Lines[i].TextOut));
Responce := Lines[I].TextOut[III];
Writeln(UserName+': '+ Text[II]);
Writeln(Players[CurrentPlayer].Name +': '+ Responce);
end;
end;
end;
end;
if not Talk = true then
Continue;
if HandleRandoms then
Exit;
case I of
0..4:
begin
case random(5) of
0..2:
begin
TypeSend(Responce);
wait(3000+random(1000));
Result:= True;
Exit;
end;
end;
end;
5..6:
begin
case random(6) of
0..2:
begin
if not Talk = True then
Exit;
Inc(Responded);
case I of
5: Result:= QuickChat(['Skills','Cooking','My Cooking level is ...']);
6: Result:= QuickChat(['Skills','Fletching','My Fletching level is ...']);
end;
Exit;
end;
end;
end;
end;
end;
end;

Wizzup?

2009-02-01 06:07:18

Will try to rate it too (if you want me to)
You can't actually enter though.

NiCbaZ

2009-02-01 15:20:28

From: Wizzup?
Will try to rate it too (if you want me to)
You can't actually enter though.

Ok thats cool, as long as im not in the comp :)

massive630

2009-04-11 07:41:06

its been like a month. who won????

MasterKill

2009-04-11 07:49:37

Wizzup is very busy with the forums atm. He'll judge the scripts when he got time.

Be patient ;) It's on his "to do list"

Wizzup?

2009-04-13 13:28:39

From: MasterKill
Wizzup is very busy with the forums atm. He'll judge the scripts when he got time.

Be patient ;) It's on his "to do list"


Yea, working on it.

R0b0t1

2009-04-17 03:54:04

I call last place!

marpis

2009-05-04 15:51:30

Why is this competition still on? :O
I take part with my Autotalk function! I think an Autotalk() function would be much more useful in SRL, because it could be attached to any script (even ones that use smart) and there'd be no need for 2 scars to be ran.

(there are 2 functions i made too)

function posexx(substrarr: TStringArray; str: string): integer;
var
i: integer;
begin
for i:= 0 to High(SUBstrarr) do
begin
result:= pos(lowercase(substrarr[i]), lowercase(str));
if (result > 0) then
exit;
end;
end;

function GetChatboxLine(line: integer): string;
begin
result:= GetChatboxText(line, clBlack) + GetChatboxText(line, clChat) + GetChatboxText(line, clTrade) + GetChatboxText(line, clFriend);
end;


var
RespondedChatLines: TStringArray;

function Autotalk(seconds: integer): boolean;
var
i, ii: integer;
MyLevels: array [0..23] of integer;
ChatLines: array [0..7] of string;
TSA: TStringArray;
s: string;
responded: boolean;
begin
if (TimeFromMark(TalkTimer) < seconds*1000) then exit;
// Read messages in the chatbox
for i:= 1 to 8 do
ChatLines[i-1]:= GetChatboxLine(i);
// Find triggers
for i:= 7 downto 0 do
begin
if (pos(players[currentplayer].nick, Chatlines[i])>12) or (pos(players[currentplayer].nick, Chatlines[i])=0) then
if not InStrArr(ChatLines[i], RespondedChatLines, false) then
begin
{================================== LEVELS ===========================================================}
if (posexx(['att','att','str','def','rang','magi','healt', 'hp', 'pray'],lowercase(ChatLines[i]))>11) then
begin
responded:= true;
writeln('Answering: Levels');
GetAllLevels;
for ii := 0 to 23 do
Mylevels[ii] := players[currentplayer].Level[ii+1];
// Attack
if pos('att', lowercase(ChatLines[i]))>11 then
begin
TSA:= ['att ', 'attack ', 'attlvl ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[0]);
end;
// Strength
if pos('str', lowercase(ChatLines[i]))>11 then
begin
TSA:= ['str ', 'strength ', 'strlvl ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[1]);
end;
// Defence
if pos('def', lowercase(ChatLines[i]))>11 then
begin
TSA:= ['def ', 'defence ', 'deflvl ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[2]);
end;
// Ranged
if pos('rang', lowercase(ChatLines[i]))>11 then
begin
TSA:= ['rang ', 'ranged ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[3]);
end;
// Prayer
if pos('pray', lowercase(ChatLines[i]))>11 then
begin
TSA:= ['pray ', 'prayer ', 'praylvl ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[4]);
end;
// Magic
if pos('mag', lowercase(ChatLines[i]))>11 then
begin
TSA:= ['mag ', 'magic ', 'maglvl ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[5]);
end;
// Runecrafting
if posexx(['runecraft','rc'], ChatLines[i])>11 then
begin
TSA:= ['rc ', 'runecrafting ', 'rclvl ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[6]);
end;
// HP
if posexx(['hp', 'healt'], lowercase(ChatLines[i]))>11 then
begin
TSA:= ['hp ', 'healt ', 'health ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[7]);
end;
// Agility
if posexx(['agi'], lowercase(ChatLines[i]))>11 then
begin
TSA:= ['agi ', 'agility ', 'agilvl ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[8]);
end;
// Herblore
if posexx(['herb'], lowercase(ChatLines[i]))>11 then
begin
TSA:= ['herb ', 'herblore ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[9]);
end;
// Thieving
if posexx(['thiev', 'thief'], lowercase(ChatLines[i]))>11 then
begin
TSA:= ['thieving ', 'thief ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[10]);
end;
// Crafting
if posexx(['craft'], lowercase(ChatLines[i]))>11 then
begin
TSA:= ['crafting ', 'craft ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[11]);
end;
// Fletching
if posexx(['fletc'], lowercase(ChatLines[i]))>11 then
begin
TSA:= ['fletch ', 'fletching ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[12]);
end;
// Slayer
if posexx(['slay'], lowercase(ChatLines[i]))>11 then
begin
TSA:= ['slayer ', 'slaying ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[13]);
end;
// Mining
if posexx(['minin'], lowercase(ChatLines[i]))>11 then
begin
TSA:= ['mining ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[14]);
end;
// Smithing
if posexx(['smith'], lowercase(ChatLines[i]))>11 then
begin
TSA:= ['smith ', 'smithing ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[15]);
end;
// Fishing
if posexx(['fish'], lowercase(ChatLines[i]))>11 then
begin
TSA:= ['fish ', 'fishing ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[16]);
end;
// Cooking
if posexx(['cook'], lowercase(ChatLines[i]))>11 then
begin
TSA:= ['cooking ', 'cook ', 'cooklvl']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[17]);
end;
// Firemaking
if posexx(['fm', 'firemak'], lowercase(ChatLines[i]))>11 then
begin
TSA:= ['fm ', 'firemaking ', 'fmlvl ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[18]);
end;
// Woodcutting
if posexx(['wc', 'woodcut'], lowercase(ChatLines[i]))>11 then
begin
TSA:= ['wc ', 'woodcut ', 'woodcutting ', 'wclvl ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[19]);
end;
// Farming
if posexx(['farm', 'farmin'], lowercase(ChatLines[i]))>11 then
begin
TSA:= ['farm ', 'farming ']
s:=s + TSA[random(Length(TSA))] + IntToStr(MyLevels[19]);
end;
// S A Y T H E L I N E
s:= Trim(s);
writeln(s);
TypeSend(s);
end else
{================================== MAX HIT ====================================================}
if (posexx(['max hit', 'maxhit'], ChatLines[i])>11) then
begin
responded:= true;
writeln('Answering: Max hit');
TSA:= ['over 9000!!','more than yours nub','i can 1 hit kalphite queen','too much','you cant even imagine it','insane','not your business','wanna try on arena'];
Typesend(TSA[random(Length(TSA))]);
end else
{================================ BOT ACCUSE ===============================================}
if (posexx(['bot', 'auto', 'macro'], ChatLines[i])>11) then
begin
responded:= true;
writeln('Answering: Max hit');
TSA:= ['haha 8P','lololol','couldnt care less actually','ehmm lol','yea right'];
Typesend(TSA[random(Length(TSA))]);
end else
{================================== ABUSE ====================================================}
if (posexx(['noob', 'nuub', 'nob', 'newb'], ChatLines[i])>11) then
begin
responded:= true;
writeln('Answering: Abuse');
TSA:= ['phewt','pfft','yea right','could still pwn u'];
Typesend(TSA[random(Length(TSA))]);
end else
{================================= GREETINGS ===================================================}
if (posexx(['whatup', 'wazzup', 'wazup', 'watap', 'watup', 'what''s up', 'whatsup', 'whats up', 'wasup', 'wassup', 'hi ', 'hello'], ChatLines[i])>11) then
begin
responded:= true;
writeln('Answering: Greetings');
TSA:= ['hi there','yo yo','wasup','whatap','whats up','hello'];
Typesend(TSA[random(Length(TSA))]);
end else
{================================ COMPLIMENTS ================================================}
if (posexx(['nice', 'cool', 'kewl', 'great', 'awesome'], ChatLines[i])>11) and (posexx(['weapon', 'shield', 'armor', 'plate', 'pl8', 'cape', 'helm', 'staff', 'sword', 'gear', 'body', 'leg', 'name'], ChatLines[i])>11) then
begin
responded:= true;
writeln('Answering: Compliments');
TSA:= ['heh thanks','ty','thanks dude','yup','lol','not rly'];
Typesend(TSA[random(Length(TSA))]);
end;
// end of triggers
result:= responded;
if result then
begin
MarkTime(TalkTimer);
SetLength(RespondedChatLines, Length(RespondedChatLines)+1);
RespondedChatLines[High(RespondedChatLines)] := ChatLines[i];
exit;
end;
end;
end;
end;

Method

2009-05-04 17:04:36

The competition isn't "still on". Wizzup? just hasn't finished grading the entries, as far as I know.