[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