idk its my first thingy if it dont work im sorry lol
on *:TEXT:!talk:#:{ msg $chan Pfft im not your slave i dont listen to you i only take commands from jankins. }
on *:TEXT:!talk2:#:{ msg $chan you love me dont you $nick ! }
on *:TEXT:!talk3:#:{ msg $chan Hey imma sexy bot. }
on *:TEXT:!talk4:#:{ msg $chan Well well its jankins. . }
on *:TEXT:!talk5:#:{ msg $chan You all love jankins. }
on *:TEXT:!talk6:#:{ msg $chan $nick you want beer. }
on *:TEXT:!talk7:#:{ describe $chan passes $nick a beer. }
on *:TEXT:!talk8:#:{ msg $chan Cool. }
on *:TEXT:!talk9:#:{ msg $chan Are you that bored $nick ! }
on *:TEXT:!talk0:#:{ msg $chan :O omfg you horny lil bugger $nick ! }
on *:TEXT:!talkk:#:{ describe $chan punches $nick in the face. }
With regex and goto, jankins' snippet gets cut down to a few bytes:
on $*:text:/^[.!](talk{1,2})$|talk([0]|[2-9])$/iS:#:{
if !%c { inc -u5 %c
var %msg msg # | goto $regml(1)
:0 | %msg :O omfg you horny lil bugger $nick $+ ! | halt
:2 | %msg you love me dont you $nick $+ ! | halt
:3 | %msg Hey imma sexy bot. | halt
:4 | %msg Well well its jankins. | halt
:5 | %msg You all love jankins. | halt
:6 | %msg $nick you want beer. | halt
:7 | describe # passes $nick a beer. | halt
:8 | %msg Cool. | halt
:9 | %msg Are you that bored $nick $+ ! | halt
:talkk | describe # punches $nick in the face. | halt
:talk | %msg Pfft im not your slave i dont listen to you $&
i only take commands from jankins. | halt
}
}
Aurora801, your regex can be shortened to:
on $*:TEXT:/^[.!]text([1-5])$/Si:#:{
And you need to place a dollar sign to make sure the number ends as is. Or else it will match 51 5blah or anything that follows it.
As you can see, jankins' code doesn't match for the number 1 but it matches 0 and the rest of numbers up to 9. Also it matches for the word talk with a single or double letter k at the end.
Lastly, a little trigger control is needed because this sort of script is prone to being flooded or spammed.
Heh. Go you, dude. My very first script was something like
on *:TEXT:**:#: { msg $chan someone needs to spell correctly!! }
which sucked, because it triggered on everything. I think after this try some regex. I'm not to heed with th whole $reg* shit but here's an example of the event trigger
on $*:TEXT:/^[.!]text(1|2|3|4|5)/Si:#:
this will check for either ".text" or "!text" followed by a number from one to five. This probably isn't the best way to do regex with numbers like that, but I'm just starting regex now. What you could do after it is "set %text $right(&1,1)" then have something check for what %text is, and send the appropriate.
wtf ? calm down didnt you hear when he said IT WAS HIS FIRST give the kid some credit >:\
good job but yea i agree with the text file, a 1 liner is the best kind of liner :) good job and good luck in teh future :P
I don't care if it was his first or not, it's still crap. My first scripting efforts were rather crappy as well, and people critisized me, which made me want to become better.
If someone can't handle getting some critique, sucks to be him. I'm not going to stop doing it, and again, I don't care if he's new or not.
No, what i mean is, the return has no relevance to the next part of the script (msg or describe)
I would understand if the first 2 in the %say were describes only so it would only describe them & msg the rest, but your second set of randoms (1-9 and 1-2) cover the same messages... there's no logic! it's just at random describe/msg
In the original script there are some that need msgin & some describing.. Just saying :)
you dont need a txt
var %say = Pfft im not your slave i dont listen to you i only take commands from jankins.,you love me dont you $nick $+ !,Hey imma sexy bot.,Well well its jankins. .,You all love jankins.,$nick you want beer.,Cool.,Are you that bored $nick $+ !,:O omfg you horny lil bugger $nick $+ !
var %act = punches $nick in the face.,passes $nick a beer.
on *:TEXT:!talk*:{ var %x = $r(1,2)
if (%x == 1) msg $chan $gettok(%say,$r(1,9),44)
elseif (%x == 2) describe $chan $gettok(%act,$r(1,2),44)
}
Errm knoeki Do you know how i can make it in to like a quote script so it will read from Like.A .txt file please Tell me if you do but i think you told the person who made it and i Quote "on *:TEXT:!text:#: { msg # $read(text.txt) }" <== would work would it Bro? Oh and to the coder nice go i would rate it 4 outta 10 :)