Code - Printable Version
-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Code (/showthread.php?tid=87526)
Code by Jonte135 on 11-29-2008 at 04:53 PM
Earlier I posted a thread about the same thing and got help, but it was going a little off-topic and if I would continue on that thread it would be like: "Okay done with code." "Could you add..." etc.
Basically what I need is a code that I easily can copy-paste to repeat the same thing over and over. It's a bot script, so I want to be able to do so I can add different types of things it should react on...
Explanation: I will have X amounts of files (2 mostly). One file should be the file that the code should react on that includes 1 or more words separated with enter. If one of the words in the file is "Hello" and I tell the code to react on "Hello" it should answer randomly from another file. So in the "answering file" it could be, separated with enter, these words: "Hey", "Hi", "Hello", "How are you" etc etc. But it should not be case sensitive or what's it's called, so it could be like "hEllo" or even in a sentence: "I would like to say hello to you" or "Hello how are you?" Also, I would want the code to be made so I can that it should react on 2 or more files. Like this: "if (file [bunch of code /me noob] = "hello" ||/&& if (another file [code...] = "you" then [more code]. It should be this when it replies too please (So like if ([code.] = "hello") then [reply with [...] ||/&& I hope you understand.
As I said earlier I should be able to just copy-paste this code so I can jsut edit the files and have the same "function" over and over. I'm sorry if this is a "do it for me" code but I am a noob when it comes to scripting and the fun part for me is just to edit code...
Thanks a ton!
RE: Code by ArkaneArkade on 11-29-2008 at 05:39 PM
quote: Originally posted by Jonte135
I am a noob when it comes to scripting and the fun part for me is just to edit code...
The fun part should be learning.
Anyway, to be a bit more serious, I'm not entirely sure what it is you're meaning. Could be just me, but would you be able to give a small example of the [code...] in these files (feel free to pm if theres a lot).
I'll do what I can, but I'll make no promises, since I'm not the fountain of knowledge on this.
RE: RE: Code by Jonte135 on 11-29-2008 at 05:45 PM
quote: Originally posted by Leroux
quote: Originally posted by Jonte135
I am a noob when it comes to scripting and the fun part for me is just to edit code...
The fun part should be learning.
Anyway, to be a bit more serious, I'm not entirely sure what it is you're meaning. Could be just me, but would you be able to give a small example of the [code...] in these files (feel free to pm if theres a lot).
I'll do what I can, but I'll make no promises, since I'm not the fountain of knowledge on this.
The thing is that that there is no code It's just an example of what I was meaning. See it like this:
First there is the if statement, and [code. (dot else function on forum)] is just code that opens the file, reads it, gets the word and close the file. And ye the fun part is to learn too, but I like to learn by editing if you understand.
RE: Code by matty on 11-29-2008 at 06:03 PM
Why not take previous scripts and try and adapt them to what you want. You wont learn if someone just gives you the code.
RE: RE: Code by Jonte135 on 11-29-2008 at 06:43 PM
quote: Originally posted by matty
Why not take previous scripts and try and adapt them to what you want. You wont learn if someone just gives you the code.
Because I'm a noob
EDIT: And ye basically because I'm not experienced enough and I already tried doing that a little, it didn't work
RE: Code by ArkaneArkade on 11-29-2008 at 11:03 PM
Ok, I'm still a little unclear on what you mean. I kinda agree with matty on editing other scripts... but in fairness I'm still new enough to know what you mean.
Are you talking about a simple bit of [code...].
eg
If someone says "Hey mate", you want to use "Hey", and search in a file for possibilities, eg readfile hey.txt which will give you a reply, such as "hello, yo, whassup", and then the "mate" which will check a second file to get a reply of "man, dude, pal", then stick them together, or are you looking for something more complicated?
RE: RE: Code by Jonte135 on 11-30-2008 at 01:10 PM
quote: Originally posted by Leroux
Ok, I'm still a little unclear on what you mean. I kinda agree with matty on editing other scripts... but in fairness I'm still new enough to know what you mean.
Are you talking about a simple bit of [code...].
eg
If someone says "Hey mate", you want to use "Hey", and search in a file for possibilities, eg readfile hey.txt which will give you a reply, such as "hello, yo, whassup", and then the "mate" which will check a second file to get a reply of "man, dude, pal", then stick them together, or are you looking for something more complicated?
Kinda yes, but it should look for "Hey" in "Hey mate" from a file so "you" say anything else like hello it should react too. And I should be able to do like if "you" say hi AND something else it will react. And the AND or OR thing should be easy to add or remove. Also it should be like this when I reply so it will reply "hello" + "pal" like you said etc.
|