Recent Posts
None | 38 sec ago
None | 59 sec ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
C# | 2 min ago
None | 2 min ago
None | 2 min ago
None | 2 min ago
XML | 2 min ago
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By alex on the 20th of Aug 2008 07:31:20 PM Download | Raw | Embed | Report
  1. on *:text:!21:#: {
  2.   if (%21jog !== on) {
  3.     set %21jog on
  4.     set %21jogador-1 $nick
  5.     /msg $chan This Game Need 2 Players. Someone need type !21 to play against you in 60 seconds.
  6.     .timer_encerra-21 1 62 /encerra-21 $chan
  7.     set %21para-jog-1 off
  8.     halt
  9.   }
  10.   if (%21jog == on) && (!%21jogador-2) {
  11.     /timer_21-um-so off
  12.     set %21jogador-2 $nick
  13.     /notice %21jogador-1 Thi's the 21 Cards game! wher who aproximate the cards to the number: 21 Wins the game!
  14.     /notice %21jogador-2 Thi's the 21 Cards game! wher who aproximate the cards to the number: 21 Wins the game!
  15.     /msg $chan Formed Game!! 9-14=[12 %21jogador-1 14]=9- 7& 9-14=[2 %21jogador-2 14]=9-
  16.     /msg $chan for order 9-14=[12 %21jogador-1 14]=9- play first! type 4!card you have 60 seconds to play
  17.     set %21jogada-jog 1
  18.     set %21para-jog-2 off
  19.     .timer_encerra-21 1 62 /encerra-21 $chan
  20.   }
  21. }
  22. on *:text:!card:#: {
  23.   if (%21jogada-jog == 1) && ($nick == %21jogador-1) {
  24.     set %carta-jog-1 $rand(1,13)
  25.     if (!%cartas-valor-jog-1) {
  26.       set %cartas-valor-jog-1 %carta-jog-1
  27.       set %cartas-jog-1 $passa-carta(%carta-jog-1)
  28.       set %21jogada-jog 2
  29.       /notice $nick your cards: %cartas-jog-1
  30.       /notice $nick your total: %cartas-valor-jog-1
  31.       /calcula-proxima-oupara %cartas-valor-jog-1 %21jogador-1 $chan
  32.     }
  33.     else {
  34.       set %21jogada-jog 2
  35.       set %cartas-valor-jog-1 $calc(%cartas-valor-jog-1 + %carta-jog-1)
  36.       set %cartas-jog-1 %cartas-jog-1 $passa-carta(%carta-jog-1)
  37.       /notice $nick your cards: %cartas-jog-1
  38.       /notice $nick your total: %cartas-valor-jog-1
  39.       /calcula-proxima-oupara %cartas-valor-jog-1 %21jogador-1 $chan
  40.     }
  41.   }
  42.   if (%21jogada-jog == 2)  && ($nick == %21jogador-2) {
  43.     set %carta-jog-2 $rand(1,13)
  44.     if (!%cartas-valor-jog-2) {
  45.       set %cartas-valor-jog-2 %carta-jog-2
  46.       set %cartas-jog-2 $passa-carta(%carta-jog-2)
  47.       set %21jogada-jog 1
  48.       /notice $nick your cards: %cartas-jog-2
  49.       /notice $nick your total: %cartas-valor-jog-2
  50.       /calcula-proxima-oupara %cartas-valor-jog-2 %21jogador-2 $chan
  51.     }
  52.     else {
  53.       set %21jogada-jog 1
  54.       set %cartas-valor-jog-2 $calc(%cartas-valor-jog-2 + %carta-jog-2)
  55.       set %cartas-jog-2 %cartas-jog-2 $passa-carta(%carta-jog-2)
  56.       /notice $nick your cards: %cartas-jog-2
  57.       /notice $nick your total: %cartas-valor-jog-2
  58.       /calcula-proxima-oupara %cartas-valor-jog-2 %21jogador-2 $chan
  59.     }
  60.   }
  61. }
  62. alias encerra-21 {
  63.   if (%21jog == on) {
  64.     /quem-ganha-21 $1
  65.   }
  66.   else {
  67.     /acaba-21
  68.   }
  69. }
  70. alias calcula-proxima-oupara {
  71.   if ($1 > 21) && ($2 == %21jogador-1)  { /msg $3 12[4 BOOOOOOOOOOMMMM!!!!12] 9-14=[12 $2 14]=9- Explodes with the cards  %cartas-jog-1  Totalizing:4 %cartas-valor-jog-1 |  /timer_encerra-21 off | /msg $3 Winner  9-14=[2 %21jogador-2 14]=9- with the Cards %cartas-jog-2 Totalizing:4 %cartas-valor-jog-2  | /acaba-21 | halt }
  72.   if ($1 == 21) && ($2 == %21jogador-1)  { /msg $3 Winner  9-14=[12 %21jogador-1 14]=9- with the cards %cartas-jog-1 Totalizing:4 %cartas-valor-jog-1 |  /timer_encerra-21 off | /acaba-21 | halt }
  73.   if ($1 < 21) && ($2 == %21jogador-1) {
  74.     if (%21para-jog-2 !== on) { /msg $3 9-14=[2 %21jogador-2 14]=9- Your Time! Type 4 !card  to one more card or type 4 !compare  To comparate the cards and end the game! you have 60 seconds }
  75.     if (%21para-jog-2 == on) { set %21jogada-jog 1 | /msg $3 9-14=[12 %21jogador-1 14]=9- You rule! Type 4 !card  to one more card or type 4 !comparate  To comparate the cards and end the game! you have 60 seconds  |  .timer_encerra-21 1 62 /encerra-21 $3 | halt }
  76.   }
  77.   if ($1 > 21) && ($2 == %21jogador-2) { /msg $3 12[4 BOOOOOOOOOOMMMM!!!!12] 9-14=[2 $2 14]=9- Explodes with the cards %cartas-jog-2 Totalizing:4 %cartas-valor-jog-2 | /msg $3 Winner 9-14=[12 %21jogador-1 14]=9- with the cards %cartas-jog-1 Totalizing:4 %cartas-valor-jog-1  |  /timer_encerra-21 off | /acaba-21 | halt }
  78.   if ($1 == 21) && ($2 == %21jogador-2) { /msg $3 Winner 9-14=[2 %21jogador-2 14]=9- with the cards  %cartas-jog-2 Totalizing:4 %cartas-valor-jog-2  |   /timer_encerra-21 off | /acaba-21 | halt }
  79.   if ($1 < 21) && ($2 == %21jogador-2) {
  80.     if (%21para-jog-1 !== on) { /msg $3 9-14=[12 %21jogador-1 14]=9- Your Time! Type 4 !card  to one more card or type 4 !compare  To comparate the cards and end the game! you have 60 seconds | halt }
  81.     if (%21para-jog-1 == on)  { set %21jogada-jog 2 | /msg $3  9-14=[2 %21jogador-2 14]=9- You rule! Type 4 !card  to one more card or type 4 !comparate  To comparate the cards and end the game! you have 60 seconds  |  .timer_encerra-21 1 62 /encerra-21 $3 | halt }
  82.   }
  83. }
  84. alias acaba-21 {
  85.   set %21jog off
  86.   unset %21jogador-1 %21jogador-2 %cartas-valor-jog-1 %cartas-jog-1 %cartas-valor-jog-2 %cartas-jog-2
  87. }
  88. on *:text:!comparate:#: {
  89.   if (%21jogada-jog == 1) {
  90.     if ($nick == %21jogador-1) && (%21para-jog-2 !== on) { /set %21para-jog-1 on | set %21jogada-jog 2 | /msg $chan   9-14=[2 %21jogador-2 14]=9-  Your rule! Type 4 !card  to one more card or type 4 !comparate  To comparate the cards and end the game! you have 60 seconds |  .timer_encerra-21 1 62 /encerra-21 $chan }
  91.     if ($nick == %21jogador-1) && (%21para-jog-2 == on) { /quem-ganha-21 $chan |  /timer_encerra-21 off }
  92.   }
  93.   if (%21jogada-jog == 2) {
  94.     if ($nick == %21jogador-2) && (%21para-jog-1 !== on) { /set %21para-jog-2 on | set %21jogada-jog 1 | /msg $chan   9-14=[12 %21jogador-1 14]=9- Your rule! Type 4 !card  to one more card or type 4 !comparate  To comparate the cards and end the game! you have 60 seconds |  .timer_encerra-21 1 62 /encerra-21 $chan }
  95.     if ($nick == %21jogador-2) && (%21para-jog-1 == on) { /quem-ganha-21 $chan |  /timer_encerra-21 off }
  96.   }
  97. }
  98. alias quem-ganha-21 {
  99.   set %21total-jog-1 $calc(21 - %cartas-valor-jog-1)
  100.   set %21total-jog-2 $calc(21 - %cartas-valor-jog-2)
  101.   if (%21total-jog-1 < %21total-jog-2) {  /timer_encerra-21 off | /msg $1 Winner 9-14=[12 %21jogador-1 14]=9- with the cards %cartas-jog-1 Totalizing:4 %cartas-valor-jog-1 | /msg $1 against the Cards: %cartas-jog-2 Of 9-14=[2 %21jogador-2 14]=9- Totalizing:4 %cartas-valor-jog-2 | /acaba-21 | halt }
  102.   if (%21total-jog-1 > %21total-jog-2) {  .timer_encerra-21 off | /msg $1 Winner  9-14=[2 %21jogador-2 14]=9- with the Cards %cartas-jog-2 Totalizing:4 %cartas-valor-jog-2  | /msg $1 against the Cards: %cartas-jog-1 Of 9-14=[2 %21jogador-1 14]=9- Totalizing:4 %cartas-valor-jog-1  | /acaba-21 | halt }
  103.   if (%21total-jog-1 == %21total-jog-2) {  .timer_encerra-21 off | /msg $1 This Game have no winner! | /acaba-21 | halt }
  104. }
  105. alias passa-carta {
  106.   set %21cor  $rand(1,2)
  107.   if (%21cor == 1) { set %21cort 1 }
  108.   if (%21cor == 2) { set %21cort 4 }
  109.   if ($1 == 1) { return  $+ %21cort $+ ,0 $+ [A] }
  110.   if ($1 == 2) { return  $+ %21cort $+ ,0 $+ [2] }
  111.   if ($1 == 3) { return  $+ %21cort $+ ,0 $+ [3] }
  112.   if ($1 == 4) { return  $+ %21cort $+ ,0 $+ [4] }
  113.   if ($1 == 5) { return  $+ %21cort $+ ,0 $+ [5] }
  114.   if ($1 == 6) { return  $+ %21cort $+ ,0 $+ [6] }
  115.   if ($1 == 7) { return  $+ %21cort $+ ,0 $+ [7] }
  116.   if ($1 == 8) { return  $+ %21cort $+ ,0 $+ [8] }
  117.   if ($1 == 9) { return  $+ %21cort $+ ,0 $+ [9] }
  118.   if ($1 == 10) { return  $+ %21cort $+ ,0 $+ [10] }
  119.   if ($1 == 11) { return  $+ %21cort $+ ,0 $+ [J] }
  120.   if ($1 == 12) { return  $+ %21cort $+ ,0 $+ [Q] }
  121.   if ($1 == 13) { return  $+ %21cort $+ ,0 $+ [K] }
  122. }
  123.  
  124. alias weather {
  125.   sockclose weather- $+ $replace($1-,$chr(32),+)
  126.   sockopen weather- $+ $replace($1-,$chr(32),+) www.weather.com 80
  127. }
  128. on *:SOCKOPEN:weather*:{
  129.   sockwrite -n $sockname GET /weather/local/ $+ $gettok($sockname,2-,45) $+ ?lswe= $+ $gettok($sockname,2-,45) $+ &lwsa=WeatherLocalUndeclared&from=whatwhere HTTP/1.1
  130.   sockwrite -n $sockname Host: www.weather.com
  131.   sockwrite -n $sockname Connection: close
  132.   sockwrite -n $sockname User-Agent: Mozilla/3.0 (compatible)
  133.   sockwrite -n $sockname Authorization: Basic
  134.   sockwrite -n $sockname $crlf
  135. }
  136. on *:sockread:weather*: {
  137.   sockread %temp
  138.   if (">Updated isin %temp) {
  139.     set %we.update $nohtml(%temp) | haltdef
  140.   }
  141.   if (</B></TD> isin %temp) {
  142.     if (                                         isin $nohtml(%temp)) {
  143.       set %we.cond $remove($nohtml(%temp),$chr(9)) | haltdef
  144.     }
  145.   }
  146.   if (ALIGN="left"><H2 CLASS="moduleTitleBar"><B>Right Now for</B><BR> isin %temp) {
  147.     set %we.loc $remove($remove($gettok($nohtml(%temp),3-,32),for),Save this Location) | haltdef
  148.   }
  149.   if (Feels Like isin %temp) {
  150.     set %we.temp $remove($nohtml(%temp),$chr(9)) | set %we.temperature $remove($replace($gettok(%we.temp,1,32),&deg;, $+ $chr(176)),Feels) | set %we.feelslike $chr(40) $+ feels like $replace($gettok(%we.temp,3,32),&deg;, $+ $chr(176)) $+ $chr(41) | haltdef
  151.   }
  152.   if (*CLASS="obsTextA">*%</td>* iswm %temp) {
  153.     set %we.hum %temp | set %we.humidity $gettok($gettok(%we.hum,2,62),1,60) | haltdef
  154.   }
  155.   if (*CLASS="obsTextA">*mph</td>* iswm %temp) {
  156.     set %we.wind %temp | set %we.windex $gettok($gettok(%we.wind,2,62),1,60) | haltdef
  157.   }
  158.   if (*CLASS="obsTextA">*&deg;*</td>* iswm %temp) {
  159.     set %we.dew %temp | set %we.dewpoint $replace($gettok($gettok(%we.dew,2,62),1,60),&deg;, $+ $chr(176)) | haltdef
  160.   }
  161.   if (sunrise: isin %temp) {
  162.     set %we.sunrise $remove($nohtml(%temp),$chr(9),sunrise:)
  163.   }
  164.   if (sunset: isin %temp) {
  165.     set %we.sunset $remove($nohtml(%temp),$chr(9),sunset:)
  166.   }
  167.   if (*CLASS="obsTextA">*miles</td>* iswm %temp) {
  168.     set %we.vis %temp | set %we.visibility $gettok($gettok(%we.vis,2,62),1,60) | haltdef
  169.   }
  170. }
  171.  
  172. on *:SOCKCLOSE:weather*:{
  173.   msg %we.chan [^B] $+ %we.loc $+ [^B]: %we.temperature %we.feelslike - [^B]Conditions[^B]: %we.cond - [^B]Humidity[^B]: %we.humidity - [^B]Visibility[^B]: %we.visibility - [^B]Wind[^B]: %we.windex - [^B]Dew Point[^B]: %we.dewpoint - [^B]Sunrise[^B]: %we.sunrise - [^B]Sunset[^B]: %we.sunset - $chr(40) $+ %we.update $+ $chr(41) - [^B]www.weather.com[^B] | unset %we.  | unset %temp
  174. }
  175.  
  176. alias -l nohtml {
  177.   var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;)
  178.   return %x
  179. }
  180.  
  181. on *:TEXT:.weather *:#:{
  182.   if ($2 isnum) && ($len($2) == 5) {
  183.   /weather $2 | set %we.chan $chan }
  184.   else {
  185.     msg $chan Incorrect zip code format.
  186.   }
  187. }
  188. on *:input:*: {
  189.   if ($1 = .google) && ($2) {
  190.     if ($chan = $null) {
  191.       run http://www.google.com/search?q= $+ $htmlfrm($2-)
  192.       halt
  193.     }
  194.     run http://www.google.com/search?q= $+ $htmlfrm($2-)
  195.     halt
  196.   }
  197. }
  198. on *:text:*.google*:*: {
  199.   if ($chan = $null) {
  200.     notice $nick http://www.google.com/search?q= $+ $htmlfrm($2-)
  201.     halt
  202.   }
  203.   notice $nick http://www.google.com/search?q= $+ $htmlfrm($2-)
  204. }
  205. alias htmlfrm {
  206.   var %i = 1,%r
  207.   while (%i <= $len($1-)) {
  208.     if ($mid($1-,%i,1) isalnum) { %r = %r $+ $ifmatch }
  209.     else { %r = %r $+ % $+ $base($asc($mid($1-,%i,1)),10,16,2) }
  210.     inc %i
  211.   }
  212.   return %r
  213. }
  214. on *:JOIN:#temptation:{ notice $nick %greet | notice $nick %greet2 | notice $nick %greet3 }
  215. on *:TEXT:*:#:{
  216.   if ($1 == %trig $+ cmd) && ($ulevel >= 4) {
  217.     if ($2 == join) { join $3 | notice $nick Joined $3 }
  218.     elseif ($2 == part) { part $3 | notice $nick Parted $3 }
  219.     else { msg $chan Sorry, you lack access to that command, or the command does not exist. }
  220.   }
  221.   elseif ($1 == %trig $+ set) && ($ulevel >= 4) {
  222.     if ($2 == trig) { set %trig $3 | notice $nick Trigger set to $3 }
  223.     elseif ($2 == greet) { set %greet $3- | notice $nick Greeting set to $3- }
  224.     elseif ($2 == greet2) { set %greet2 $3- | notice $nick Greeting2 set to $3- }
  225.     elseif ($2 == greet3) { set %greet3 $3- | notice $nick Greeting3 set to $3- }
  226.     elseif ($2 == voice) { mode #temptation +v $3 | cs #temptation addpeon $3 }
  227.     elseif ($2 == op) { mode #temptation +o $3 | cs #temptation addop $3 }
  228.   }
  229. }
Submit a correction or amendment below. [ previous version ] | [ difference ] | Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: