[size=16]Is it possible to get it to pull US/ENG title only?[/size]
As in no mater where the BOT/you're located it will pull US/ENG title ?
I've got My bot hosted on server in France and would like it to pull US/ENG title no mater what movie you search for.
As it is now when it's a movie that isn't ENG/US it will pull it either French or original title... would like it to pull US/ENG no mater what.
This possible or am I gonna have to get it in either French and/or the original title ?
So the above is the same as having a remini for each topic ? If I do a
tokenize 32 R1 R2 R3 R4 R5 And.so.on
remini Whatever.ini $* whatever
It wil remove whatever entry in all the "topics" listed in the tokenize ?
EDiT
A yes or no would have been appreciated... but am gonna try it next time I re-code My fail @Jethro
That did the trick... don't get them here any more anyways...
Thanks for the quick "update" @FordLawnmower
Am guessing your talking about the same thing as @incognitus
Removed since script has been updated
That's the same version as I PM'eD him... hope this helps @Kilim
Simply add a @ to the on $:TEXT: event so it looks like this -> @$:TEXT:
on @$*:TEXT:/^[!@.]define( |$)/iS:*:{
if (!$($+(%,-,$site,.,$cid,.,$nick),2)) && ($regex($nick($chan,$nick).pnick,/(!|~|&|@)/)) { inc -u3 $+(%,-,$site,.,$cid,.,$nick) | var %ud = $+(ud,$str($ticks,3))
$+(sock,$iif($sock(%ud),close,open) %ud api.urbandictionary.com 80) | sockmark %ud $replace($strip($2-),$chr(32),+) sockwrite -nt %ud .msg $iif(#,#,$nick) }
}
Above will only work if the user is OP'eD (@)
NOTE: Have "only" added the text event here... you'll need the rest of the script for it to work.
EDiT
I might have misunderstood you... the above will only work if the bot / host ( client running the script ) is OP'eD (@) and come to think of it that wasn't what you asked for I'm guessing ?
on *:sockopen:ud*:{ tokenize 32 $sock($sockname).mark
if ($sockerr) { $5-6 Socket Error! | halt }
$2-4 GET $+(/v0/define?term=,$1) HTTP/1.0
$2-4 Host: $+($sock($sockname).addr,$str($crlf,2))
$2-4 Connection: close
}
on $*:TEXT:/^[!@.]define( |$)/iS:*:{
if (!$($+(%,-,$site,.,$cid,.,$nick),2)) && ($regex($nick($chan,$nick).pnick,/(!|~|&|@)/)) { inc -u3 $+(%,-,$site,.,$cid,.,$nick) | var %ud = $+(ud,$str($ticks,3))
$+(sock,$iif($sock(%ud),close,open) %ud api.urbandictionary.com 80) | sockmark %ud $replace($strip($2-),$chr(32),+) sockwrite -nt %ud .msg $iif(#,#,$nick) }
}
on *:sockread:ud*:{ sockread &ud
tokenize 32 $sock($sockname).mark
if ($sockerr) { $5-6 Socket Error! }
elseif (no_results isin $bvar(&ud,1-).text) { $5-6 $qt($1) is undefined! }
elseif ($regex($bvar(&ud,1-).text,/"definition":"(.*)/)) { tokenize 34 $regml(1) | $gettok($sock($sockname).mark,5-6,32) $regsubex($1,/\Q\r\n\E/g,$chr(32)) }
;*** Use the one below and comment the one above out if you only want 1 line ( sockclose added to the one below )
elseif ($regex($bvar(&ud,1-).text,/"definition":"(.*)/)) { tokenize 34 $regml(1) | $gettok($sock($sockname).mark,5-6,32) $regsubex($1,/\Q\r\n\E/g,$chr(32)) | sockclose $sockname }
}
The above will "only" work if the user is OP'eD (@) or above
And have added a extra line with sockclose in case people only want the first definition.
Thanks for sharing... here is a quick edit
on *:TEXT:!DiceGame*:#: {
if (($2 !isnum) || ($3 !isnum) || ($4 == $nick) || ($4 !ison $chan)) { .notice $nick You need someone to play against! | return }
var %DiceGameRolled 1 | var %DiceGameAdded 1
;*** Rolls
while (%DiceGameRolled <= $2) { var %DiceGamePlayer1 $instok(%DiceGamePlayer1,$rand(1,$3),%DiceGameRolled,32) | var %DiceGamePlayer2 $instok(%DiceGamePlayer2,$rand(1,$3),%DiceGameRolled,32) | inc %DiceGameRolled }
;*** Total
while (%DiceGameAdded <= $2) { var %RollTime $gettok(%DiceGamePlayer1,%DiceGameAdded,32) | var %RollTotalPlayer1 $calc(%RollTotalPlayer1 +%RollTime) | var %RollTime $gettok(%DiceGamePlayer2,%DiceGameAdded,32) | var %RollTotalPlayer2 $calc(%RollTotalPlayer2 +%RollTime) | inc %DiceGameAdded }
msg # $+([,$mNiCK($nick) vs. $mNiCK($4),]) Dice roll with $mNUM($2) $+(15,$chr(40),,$mNUM($3),-SiDED15,$chr(41),) $+(dice,$iif($2 > 1,s),...) $&
$mNiCK($iif(%DiceGamePlayer1 > %DiceGamePlayer2,$nick,$4)) is the winner... rolled $iif(%RollTotalPlayer1 > %RollTotalPlayer2,%DiceGamePlayer1 $+(15,$chr(40),,$v1,15,,$chr(41),) vs. %DiceGamePlayer2 $+(15,$chr(40),,$v2,15,,$chr(41),),%DiceGamePlayer2 $+(15,$chr(40),,$v2,15,,$chr(41),) vs. %DiceGamePlayer1 $+(15,$chr(40),,$v1,15,,$chr(41),))
}
Not sure if the original or any of the pasted edits above are working @James405
But a quick search here on hawkee should give you at least a couple of working ones.
And you can always try the SRU edit http://www.hawkee.com/snippet/9506
Not tested... but I like the idea... only use mIRC for bot tho.
KVirc > mIRC
is %spam made by mIRC or did you made it yourself?
Like Abcdefmonkey said... it's just a variable created to make sure the !wale doesn't flood channels.
What are the options of spam? What do it consider as spam?
That all depends on where you implement it... in the example I gave it will consider all !wale's as "SPAM".
So once someone has done !wale there is a 1 minute wait (60 seconds) before anyone else can do it again.
Your welcome... I'm still a NUB tho... but regarding flood protection ->
Simply make something like
if (%SPAM-Wale) { halt }
inc -u60 %SPAM-Wale
Then add it... in My EDiT I would implement it here ->
;*** Wale section
elseif (%SPAM-Wale) { halt }
else { inc -u60 %SPAM-Wale | inc %allc
if ($strip($2) == CallMe) { inc %callmec | CallMe # }
elseif ($strip($2) == COOL) { inc %coolc | CoolWale # }
elseif ($strip($2) == LOL) { inc %lolc | LoLWale # }
elseif ($strip($2) == NRML) { inc %nrmlc | Wale # }
elseif ($strip($2) == HEART) { inc %heartc | HeartWale # }
elseif ($strip($2) == LOVE) { inc %winc | LoveWale # }
elseif ($strip($2) == WiN) { inc %winc | WinWale # }
elseif ($strip($2) == FAiL) { inc %failc | FailWale # }
}
And I think you will be able to find help for pretty much everything here... but else http://www.mirc.net
or just google your problem. And the is always /help in mIRC
^ I haven't tested your script... but don't think there is anything wrong..
just the way it's written... would be cleaner to combined all of the text events to one single on :TEXT:
instead of having several on :TEXT: events
Tell me a little bit about else/elseif/if (very little bit i think i know most of it and do it need end if?)
what do this mean? (!$2) i know $2 but why !?
and do you exactly mean with $strip?
I'll try to... but not sure how to explain... but here goes ->
if - is for checking whatever
elseif - is used to "speed" up the script... when using elseif
else - is used if everything else fails
Ex.
on *:TEXT:!Whale*:#: {
if ($strip($2) == $nick) { msg # This is just for testing }
elseif ($nick == $strip($2)) { msg # This is just for testing }
else { msg # Sorry... no such luck }
}
I know it's a weird example...
But if it was made with just
if - statements both the if and elseif would have replied back
when using if first and the elseif for everything else... only the matched text will "activate" and not anything after.
And (!$2) = ($2 == $null)
It's if 2nd word isn't there / only one word
$strip($2) strips the text for both color and bold + underscore
If you need more help and don't feel like waiting on reply... feel free to drop by #Coders on "My" server ;)
Here is a EDiT of the orginal script... not tested... but if your lucky it's working...
;*** Manually part
menu channel {
.wales
..failwale:failwale #
..winwale:winwale #
..lovewale:lovewale #
..heartwale:heartwale #
..wale:wale #
..lolwale:lolwale #
..coolwale:coolwale #
..callme:callme #
}
;*** Other people part
on *:TEXT:!wale*:#: {
;*** !Wale
if (!$2) { .notice $nick try !wale help . }
;*** !Wale Credits
elseif ($strip($2) == CREDiTs) { msg # Everythin is made by DFSFOT except the wales.
msg # If you know who the wales made, say it Me and I change it you can get this script at www.hawkee.com (search for funny wale script)
}
;*** !Wale help
elseif ($strip($2) == HELP) {
.notice $nick welcome to wale help
.notice $nick Example: !wale <command>
.notice $nick -
.notice $nick wale show commands:
.notice $nick "fail" for failwale (failwale is used %failc times)
.notice $nick "win" for winwale (winwale is used %winc times)
.notice $nick "love" for lovewale (lovewale is used %lovec times)
.notice $nick "heart" for heartwale (heartwale is used %heartc times)
.notice $nick "nrml" for normal wale (normalwale is used %nrmlc times)
.notice $nick "lol" for lolwale (lolwale is used %lolc times)
.notice $nick "cool" for coolwale (coolwale is used %coolc times)
.notice $nick "callme" for call me wale (callme wale is used %callmec times)
.notice $nick -
.notice $nick other commands:
.notice $nick "stats" shows the stats
.notice $nick "credits"
.notice $nick thank you for using!
}
;*** !Wale stats
elseif ($strip($3) == STATS) {
.notice $nick stats:
.notice $nick failwale is used $iif(%failc,$v1,0) time(s)
.notice $nick winwale is used $iif(%winc,$v1,0) time(s)
.notice $nick lovewale is used $iif(%lovec,$v1,0) time(s)
.notice $nick heartwale is used $iif(%heartc,$v1,0) time(s)
.notice $nick normalwale is used $iif(%nrmlc,$v1,0) time(s)
.notice $nick lolwale is used $iif(%lolc,$v1,0) time(s)
.notice $nick coolwale is used $iif(%coolc,$v1,0) time(s)
.notice $nick callme wale is used $iif(%callmec,$v1,0) time(s)
.notice $nick all together = $iif(%allcc,$v1,0) time(s)
}
;*** Wale section
else { inc %allc
if ($strip($2) == CallMe) { inc %callmec | CallMe # }
elseif ($strip($2) == COOL) { inc %coolc | CoolWale # }
elseif ($strip($2) == LOL) { inc %lolc | LoLWale # }
elseif ($strip($2) == NRML) { inc %nrmlc | Wale # }
elseif ($strip($2) == HEART) { inc %heartc | HeartWale # }
elseif ($strip($2) == LOVE) { inc %winc | LoveWale # }
elseif ($strip($2) == WiN) { inc %winc | WinWale # }
elseif ($strip($2) == FAiL) { inc %failc | FailWale # }
}
}
;*** Aliases
alias failwale {
msg # ▄███████████▄▐█▄▄▄█▌
msg # ████▌▄▌▄▐▐▌██▌▀▀██▀
msg # ██▄█▌▄▌▄▐▐▌▀██▄▄█▌
msg # ▄▄▄█████████████▀
msg # ^_^this wale is used %failc times^_^
}
alias winwale {
msg # ▄███████████▄▐█▄▄▄█▌
msg # ███▌█ █▐▐▌▀█▐▌▀▀██▀
msg # ██▄▌▀ ▀▐▐▌█▄▐█▄▄█▌
msg # ▄▄▄█████████████▀
msg # ^_^this wale is used %winc times^_^
}
alias lovewale {
msg # ▄███████████▄▐█▄▄▄█▌
msg # ███▌█▌▄▐▌█▐▌▄▌▀▀██▀
msg # ██▄▌▀▌▀▐▌█▐▌▄█▄▄█▌
msg # ▄▄▄██████▄█▄▄███▀
msg # ^_^this wale is used %lovec times^_^
}
alias heartwale {
msg # ▄███████▓▓█▓▓██▄▐█▄▄▄▄█▌
msg # ████████▓▓▓▓▓███▌▀▀██▀▀
msg # ████▄████▓▓▓█████▄▄█▌
msg # ▄▄▄▄▄█████▓████████▀
msg # ^_^this wale is used %heartc times^_^
}
alias wale {
msg # ▄██████████████▄▐█▄▄▄▄█▌
msg # ████████████████▌▀▀██▀▀
msg # ████▄████████████▄▄█▌
msg # ▄▄▄▄▄██████████████▀
msg # ^_^this wale is used %nrmlc times^_^
}
alias lolwale {
msg # ▄██████████████▄▐█▄▄▄▄█▌
msg # ██████▌█▌▄▐▌████▌▀▀██▀▀
msg # ████▄█▌▀▌▀▐▌▀████▄▄█▌
msg # ▄▄▄▄▄██████████████▀
msg # ^_^this wale is used %lolc times^_^
}
alias coolwale {
msg # ▄██████████████▄▐█▄▄▄▄█▌
msg # ██████▌▄▌▄▐▌▄▐▌█▌▀▀██▀▀
msg # ████▄█▌▀▌▀▐▌▀▐▌▀█▄▄█▌
msg # ▄▄▄▄▄██████████████▀
msg # ^_^this wale is used %coolc times^_^
}
alias callme {
msg # ▄██████████████▄▐█▄▄▄▄█▌
msg # ██████▌▄▌▄▐▌█▌██▌▀▀██▀▀
msg # ████▄█▌▀▌▄▐▌▀▌▀███▄█▌
msg # ▄▄▄▄▄██████████████▀
msg # ▄██████████████▄▐█▄▄▄▄█▌
msg # ██████▌▄▀▄▐▌__██▌▀▀██▀▀
msg # ████▄█▌███▐▌▀▀████▄█▌
msg # ▄▄▄▄▄██████████████▀
msg # ^_^this wale is used %callmec times^_^
}
NOTE: Haven't added anything to the script... just re-wrote it.
Would suggest using flood protection
Something like this I think they mean ?
on 1:Text:!wale*:#: {
;*** !Wale
if (!$2) { notice $nick try !wale help . }
;*** !Wale help
elseif ($strip($2) == HELP) {
/notice $nick welcome to wale help
/notice $nick Example: !wale <command>
/notice $nick -
/notice $nick wale show commands:
/notice $nick "fail" for failwale (failwale is used %failc times)
/notice $nick "win" for winwale (winwale is used %winc times)
/notice $nick "love" for lovewale (lovewale is used %lovec times)
/notice $nick "heart" for heartwale (heartwale is used %heartc times)
/notice $nick "nrml" for normal wale (normalwale is used %normalc times)
/notice $nick "lol" for lolwale (lolwale is used %lolc times)
/notice $nick "cool" for coolwale (coolwale is used %coolc times)
/notice $nick "callme" for call me wale (callme wale is used %callmec times)
/notice $nick -
/notice $nick other commands:
/notice $nick "stats" shows the stats
/notice $nick "credits"
/notice $nick thank you for using!
}
;*** !Wale stats
elseif ($strip($3) == STATS) {
/notice $nick stats:
/notice $nick failwale is used %failc time(s)
/notice $nick winwale is used %winc time(s)
/notice $nick lovewale is used %lovec time(s)
/notice $nick heartwale is used %heartc time(s)
/notice $nick normalwale is used %normalc time(s)
/notice $nick lolwale is used %lolc time(s)
/notice $nick coolwale is used %coolc time(s)
/notice $nick callme wale is used %callmec time(s)
/notice $nick all together = %alllc times
}
}