It's Go Fish.
When you load it right click and open the Go Fish dialog. Add any channels you want it to work on and how many points you want it to go up to.
New: You can also now add the amount of time before !skip can be used and which theme you would like to use.
To play:
One person types !gf
Anyone who wants to join types !gofish
To start the game the captain has to type !gf again
Once the game is started (starting with the captain) players type
!gofish # Name (ex. !gofish 7 Blitzjager or !gofish Q Blitzjager)
Hope you enjoy it and hope there isn't many bugs :X
Update
To do
on *:LOAD: {
set %gofishcards A 2 3 4 5 6 7 8 9 10 J Q K
set %gofishpoints 5
set %gofishskiptime 60
set %gofishthemes 11,12 12,11 03,12 03,02 09,02
guser admiral $$?="Set the name of the bot master" 2
echo -a Right click and open the Go Fish dialog and add any channels you want Go Fish to work on.
}
menu * {
Go Fish: GoFish
}
alias GoFish { dialog $iif($dialog(GoFish),-v,-m) GoFish GoFish }
dialog GoFish {
title "<°)))))>< Go fish! ><(((((°>"
size -1 -1 133 95
option dbu
edit "", 1, 7 9 62 10
box "Channels", 99, 4 1 125 37
list 4, 74 9 50 25, size vsbar
button "Add", 2, 8 22 27 12
button "Rem", 3, 41 22 27 12
box "Points to win", 98, 4 64 42 26
combo 5, 8 73 34 34, edit edit vsbar drop
button "Ok", 6, 99 66 25 11, ok
button "Cancel", 7, 99 79 25 11, cancel
combo 8, 54 74 34 34, edit vsbar drop
box "Skip time", 9, 50 64 42 26
combo 10, 9 48 32 30, edit vsbar drop
button "Test", 13, 99 47 25 11
;edit "", 11, 41 48 83 11, read
box "Theme", 12, 4 40 125 23
}
on *:dialog:GoFish:*:*: {
if ($devent == init) {
didtok GoFish 4 44 %gofishchans
didtok GoFish 5 32 3 5 7 10 15 20
didtok GoFish 8 32 5 10 15 30 45 60 90 120 999
didtok GoFish 10 32 %gofishthemes
}
if ($devent == sclick) {
if ($did == 2) {
if ($left($did(1),1) != $chr(35)) && ($did(1)) {
didtok GoFish 4 44 $chr(35) $+ $did(1)
did -r GoFish 1
}
else {
didtok GoFish 4 44 $did(1)
did -r GoFish 1
}
}
if ($did == 3) {
did -d GoFish 4 $did(4,1).sel
}
if ($did == 10) {
;did -ra GoFish 11 $did(10) $+ <°)))))>< Go fish! ><(((((°>
echo -a $did(10) $+ <°)))))>< Go fish! ><(((((°>
}
if ($did == 13) {
if ($mid($did(10),1,1) == $chr(3)) && ($mid($did(10),4,1) == $chr(44)) && ($mid($did(10),2,2) isnum 00-15) && ($mid($did(10),5,2) isnum 00-15) && ($len($did(10)) == 6) {
echo -a $did(10) $+ <°)))))>< Go fish! ><(((((°>
}
else { echo -a To add custom themes: In the themes box hit Control+K followed by 2 numbers(00-15) followed by a comma, and then 2 more numbers(00-15) }
}
if ($did == 6) {
set %gofishchans $didtok(GoFish,4,44)
if ($did(5) isnum) { set %gofishpoints $did(5) }
if ($did(8) isnum) { set %gofishskiptime $did(8) }
if ($did(10)) {
if ($mid($did(10),1,1) == $chr(3)) && ($mid($did(10),4,1) == $chr(44)) && ($mid($did(10),2,2) isnum 00-15) && ($mid($did(10),5,2) isnum 00-15) && ($len($did(10)) == 6) {
set %gofishthemes $addtok(%gofishthemes,$did(10),32)
set %gofishtheme $did(10)
}
else { echo -a To add custom themes: In the themes box hit Control+K followed by 2 numbers(00-15) followed by a comma, and then 2 more numbers(00-15) }
}
}
}
}
on *:TEXT:*:#: {
if ($istok(%gofishchans,$chan,44)) {
if (!%gofishact) {
if ($1 == !gf) && (!%captain) {
set %captain $nick
set %fishermen $addtok(%fishermen,$nick,32)
set %gofishchan $chan
inc %gofishplayers
.msg # $iif(%gofishtheme != $+(01,$chr(44),00),%gofishtheme) $+ $nick is now the captain. To go fishing with them type !gofish
}
if ($1 == !gf) && ($nick != %captain) { .notice $nick %captain has already started a game in %gofishchan }
if ($chan == %gofishchan) {
if ($1 == !gofish) {
if ($istok(%fishermen,$nick,32) == $false) {
.notice $nick You are going fishing with %fishermen
set %fishermen $addtok(%fishermen,$nick,32)
inc %gofishplayers
.msg $chan $iif(%gofishtheme != $+(01,$chr(44),00),%gofishtheme) $+ There are now %gofishplayers people on the fishing trip.
}
}
if (%gofishplayers >= 2) && ($nick == %captain) && ($1 == !gf) {
set %gofishact 1
var %x 1
while (%x <= %gofishplayers) {
while ($numtok(%gofishhand. [ $+ [ %x ] ],32) < 5) {
set %gofishhand. [ $+ [ %x ] ] $addtok(%gofishhand. [ $+ [ %x ] ],$gettok(%gofishcards,$rand(1,13),32),32)
}
.notice $gettok(%fishermen,%x,32) Your hand is [ %gofishhand. [ $+ [ %x ] ] ]
inc %x
set %gofishy 1
set %gofishturn $gettok(%fishermen,%gofishy,32)
}
.msg $chan $iif(%gofishtheme != $+(01,$chr(44),00),%gofishtheme) $+ The fishing trip has started. /¯! Go fish %captain $+ ! (Up to %gofishpoints points)
}
if ($1 == !shipwreck) {
.msg %gofishchan $iif(%gofishtheme != $+(01,$chr(44),00),%gofishtheme) $+ The weather was too bad for fishing so %captain went to play Uno.
unset %captain %gofishchan %gofishact %gofishy %gofishscores %gofishturn %gofishplayers %fishermen %gofishhand*
}
}
}
if (%gofishact) {
if ($1 == !gofish) {
if ($chan == %gofishchan) {
if (%gofishturn == $nick) {
if ($istok([ %gofishhand. [ $+ [ $findtok(%fishermen,$nick,1,32) ] ,$2,32) ] == $true) {
if ($istok(%gofishcards,$2,32) == $true) && ($istok(%fishermen,$3,32) == $true) && ($3 != $nick) {
if ($istok([ %gofishhand. [ $+ [ $findtok(%fishermen,$3,1,32) ] ,$2,32) ] == $true) {
inc %gofish $+ $nick
.msg # $iif(%gofishtheme != $+(01,$chr(44),00),%gofishtheme) $+ $nick caught a fish! $nick has caught [ % $+ [ gofish $+ [ $nick ] ] ] fish! Go again $nick $+ . ( $+ %gofishskiptime seconds)
if ([ % $+ [ gofish $+ [ $nick ] ] ] >= %gofishpoints) {
.msg $chan $iif(%gofishtheme != $+(01,$chr(44),00),%gofishtheme) $+ The trip is over and $nick has caught the most fish!
var %z 1
while (%z <= %gofishplayers) {
set %gofishscores $addtok(%gofishscores,$gettok(%fishermen,%z,32) $+ : $+ [ % $+ [ gofish $+ [ $gettok(%fishermen,%z,32) ] ] ],32) ~
inc %z
}
.msg $chan $iif(%gofishtheme != $+(01,$chr(44),00),%gofishtheme) $+ %gofishscores
unset %captain %gofishchan %gofishact %gofishy %gofishscores %gofishturn %gofishplayers %gofishhand*
while ($numtok(%fishermen,32) > 0) {
unset %gofish [ $+ [ $gettok(%fishermen,1,32) ] ]
set %fishermen $deltok(%fishermen,1,32)
}
unset %fishermen
.timergfskip off
halt
}
set %gofishhand. [ $+ [ $findtok(%fishermen,$nick,1,32) ] ] $remtok(%gofishhand. [ $+ [ $findtok(%fishermen,$nick,1,32) ] ],$2,1,32)
set %gofishhand. [ $+ [ $findtok(%fishermen,$3,1,32) ] ] $remtok(%gofishhand. [ $+ [ $findtok(%fishermen,$3,1,32) ] ],$2,1,32)
if ($numtok([ %gofishhand. [ $+ [ $findtok(%fishermen,$nick,1,32) ] ] ],32) == 0) {
while ($numtok([ %gofishhand. [ $+ [ $findtok(%fishermen,$nick,1,32) ] ] ],32) < 3) {
set %gofishhand. [ $+ [ $findtok(%fishermen,$nick,1,32) ] ] $addtok(%gofishhand. [ $+ [ $findtok(%fishermen,$nick,1,32) ] ],$gettok(%gofishcards,$rand(1,13),32),32)
}
}
if ($numtok([ %gofishhand. [ $+ [ $findtok(%fishermen,$3,1,32) ] ] ],32) == 0) {
while ($numtok([ %gofishhand. [ $+ [ $findtok(%fishermen,$3,1,32) ] ] ],32) < 3) {
set %gofishhand. [ $+ [ $findtok(%fishermen,$3,1,32) ] ] $addtok(%gofishhand. [ $+ [ $findtok(%fishermen,$3,1,32) ] ],$gettok(%gofishcards,$rand(1,13),32),32)
}
}
.notice $nick Your hand is [ %gofishhand. [ $+ [ $findtok(%fishermen,$nick,1,32) ] ] ]
}
elseif ($istok([ %gofishhand. [ $+ [ $findtok(%fishermen,$3,1,32) ] ,$2,32) ] == $false) {
var %draw $gettok(%gofishcards,$rand(1,13),32)
if (%draw == $2) {
.msg $chan $iif(%gofishtheme != $+(,$chr(44),00),%gofishtheme) $+ Fish, fish, you got your wish!
set %gofishhand. [ $+ [ $findtok(%fishermen,$nick,1,32) ] ] $remtok(%gofishhand. [ $+ [ $findtok(%fishermen,$nick,1,32) ] ],$2,1,32)
inc %gofish $+ $nick
if ([ % $+ [ gofish $+ [ $nick ] ] ] >= %gofishpoints) {
.msg $chan $iif(%gofishtheme != $iif(%gofishtheme != $+(01,$chr(44),00),%gofishtheme) $+ The trip is over and $nick has caught the most fish!
var %z 1
while (%z <= %players) {
set %gofishscores $addtok(%gofishscores,$gettok(%fishermen,%z,32) $+ : $+ [ % $+ [ gofish $+ [ $gettok(%fishermen,%z,32) ] ] ],32) ~
inc %z
}
.msg $chan $iif(%gofishtheme != $+(01,$chr(44),00),%gofishtheme) $+ %gofishscores
unset %captain %gofishchan %gofishact %gofishy %gofishscores %gofishturn %gofishplayers %gofishhand*
while ($numtok(%fishermen,32) > 0) {
unset %gofish [ $+ [ $gettok(%fishermen,1,32) ] ]
set %fishermen $deltok(%fishermen,1,32)
}
unset %fishermen
.timergfskip off
}
else {
.msg # $iif(%gofishtheme != $+(01,$chr(44),00),%gofishtheme) $+ $nick has caught [ % $+ [ gofish $+ [ $nick ] ] ] fish! Go again $nick $+ . ( $+ %gofishskiptime seconds)
.notice $nick Your hand is [ %gofishhand. [ $+ [ $findtok(%fishermen,$nick,1,32) ] ] ]
}
halt
}
while (%draw isin [ %gofishhand. [ $+ [ $findtok(%fishermen,$nick,1,32) ] ] ]) {
var %draw $gettok(%gofishcards,$rand(1,13),32)
if (%draw == $2) {
.msg $chan $iif(%gofishtheme != $+(01,$chr(44),00),%gofishtheme) $+ Fish, fish, you got your wish!
set %gofishhand. [ $+ [ $findtok(%fishermen,$nick,1,32) ] ] $remtok(%gofishhand. [ $+ [ $findtok(%fishermen,$nick,1,32) ] ],$2,1,32)
inc %gofish $+ $nick
if ([ % $+ [ gofish $+ [ $nick ] ] ] >= %gofishpoints) {
.msg $chan $iif(%gofishtheme != $+(01,$chr(44),00),%gofishtheme) $+ The trip is over and $nick has caught the most fish!
var %z 1
while (%z <= %gofishplayers) {
set %gofishscores $addtok(%gofishscores,$gettok(%fishermen,%z,32) $+ : $+ [ % $+ [ gofish $+ [ $gettok(%fishermen,%z,32) ] ] ],32) ~
inc %z
}
.msg $chan $iif(%gofishtheme != $+(01,$chr(44),00),%gofishtheme) $+ %gofishscores
unset %captain %gofishchan %gofishact %gofishy %gofishscores %gofishturn %gofishplayers %gofishhand*
while ($numtok(%fishermen,32) > 0) {
unset %gofish [ $+ [ $gettok(%fishermen,1,32) ] ]
set %fishermen $deltok(%fishermen,1,32)
}
unset %fishermen
.timergfskip off
}
else {
.msg # $iif(%gofishtheme != $+(01,$chr(44),00),%gofishtheme) $+ $nick caught a fish! $nick has caught [ % $+ [ gofish $+ [ $nick ] ] ] fish! Go again $nick $+.
.notice $nick Your hand is [ %gofishhand. [ $+ [ $findtok(%fishermen,$nick,1,32) ] ] ]
}
halt
}
}
set %gofishhand. [ $+ [ $findtok(%fishermen,$nick,1,32) ] ] $addtok(%gofishhand. [ $+ [ $findtok(%fishermen,$nick,1,32) ] ],%draw,32)
.notice $nick You drew %draw
inc %gofishy
if (%gofishy > %gofishplayers) {
set %gofishy 1
}
set %gofishturn $gettok(%fishermen,%gofishy,32)
.msg # $iif(%gofishtheme != $+(01,$chr(44),00),%gofishtheme) $+ <°)))))>< Go fish! ><(((((°> It is %gofishturn $+ 's turn. ( $+ %gofishskiptime seconds)
.notice %gofishturn Your hand is [ %gofishhand. [ $+ [ $findtok(%fishermen,%gofishturn,1,32) ] ] ]
}
}
else { .notice $nick !gofish <Card> <Nick> }
}
elseif ($2) { .notice $nick You do not have that card. }
}
}
set %gofishskip 0
.timergfskip off
.timergfskip 1 %gofishskiptime /set %gofishskip 1
}
elseif ($1 == !hand) {
var %x 1
while (%x <= %gofishplayers) {
set %gofishhand $addtok(%gofishhand,$gettok(%fishermen,%x,32) $+ : $+ $numtok([ %gofishhand. [ $+ [ %x ] ] ],32),32)
inc %x
}
.notice $nick Your hand is [ %gofishhand. [ $+ [ $findtok(%fishermen,$nick,1,32) ] ] ] $+ . %gofishhand
unset %gofishhand
}
elseif ($1 == !skip) && (%gfskip == 1) {
var %gofishsturn %gofishturn
inc %gofishy
if (%gofishy > %gofishplayers) {
set %gofishy 1
}
set %gofishturn $gettok(%fishermen,%gofishy,32)
set %gofishskip 0
.msg # $iif(%gofishtheme != $+(01,$chr(44),00),%gofishtheme) $+ %gofishsturn drank too much rum and passed out. It is %gofishturn $+ 's turn. ( $+ %gofishskiptime seconds)
.timergfskip 1 %gofishskiptime /set %gofishskip 1
}
elseif ($1 == !shipwreck) {
if ($nick == %captain) || ($nick isop %gofishchan) {
.msg $chan $iif(%gofishtheme != $+(01,$chr(44),00),%gofishtheme) $+ The ship hit an iceberg. Everyone got in the lifeboat except for %captain who went down with the ship.
var %z 2
while (%z <= %gofishplayers) {
set %gofishscores $addtok(%gofishscores,$gettok(%fishermen,%z,32) $+ : $+ [ % $+ [ gofish $+ [ $gettok(%fishermen,%z,32) ] ] ],32) ~
inc %z
}
.msg $chan $iif(%gofishtheme != $+(01,$chr(44),00),%gofishtheme) $+ %gofishscores
unset %captain %gofishchan %gofishact %gofishy %gofishscores %gofishturn %gofishplayers %gofishhand*
while ($numtok(%fishermen,32) > 0) {
unset %gofish [ $+ [ $gettok(%fishermen,1,32) ] ]
set %fishermen $deltok(%fishermen,1,32)
}
unset %fishermen
set %gofishskip 0
.timergfskip off
halt
}
}
if (%gofishtheme != 01,00) && ($1 == !notheme) {
set %gofishtheme 01,00
.msg $chan Theme disabled
}
}
}
if ($ulevel == admiral) {
if (($1 == !addcom) && ($2 ison $chan) && ($ulist($address($2,2),commodore,1) == $null)) {
guser commodore $2 2
.notice $nick $2 is now a commodore.
}
if ($1 == !delcom) && ($ulist($address($2,2),commodore,1)) {
ruser commodore $2 2
.notice $nick $2 is no longer a commodore.
}
}
if ($ulevel == commodore) || ($ulevel == admiral) {
if ($1 == !skiptime) && ($2 isnum) {
set %gofishskiptime $2
.notice $nick The skip time is now $2
}
if ($1 == !points) && ($2 isnum) {
set %gofishpoints $2
.notice $nick Points to win Go Fish is now set to $2
}
}
if ($nick isop $chan) {
if (!%endis. $+ $chan) && ($1 == !enablegf) {
set -u900 %endis. $+ $chan 1
msg $chan Go Fish enabled for $chan (Cannot be disabled for 15 mins)
set %gofishchans $addtok(%gofishchans,$chan,44)
}
if (!%endis. $+ $chan) && ($1 == !disablegf) {
set -u900 %endis. $+ $chan 1
msg $chan Go Fish disabled for $chan (Cannot be enabled for 15 mins)
set %gofishchans $remtok(%gofishchans,$chan,1,44)
}
}
}
I was just having a bad week. :P
I haven't updated this script but I added !enablegf/!disablegf (so that ops can turn it on/off) and !notheme (For if someone sets +c)
I figured I wouldn't update this until I changed the vars so now, and I'm now lying this time, I'll post an updated script sometime today. :P
If there's any minor options you'd like added please tell me soon so you don't have to wait a week.
I just played a game perfectly. I removed the colour from the notices, I'll make some of the vars more unique and I'll look into playing against the bot.
I'm not sure what your problem is but I know there's a problem in your script with either line 167 or 195.
&HelpDesk » BourneIdent:BourneIdent ~~ BourneIdent187:BourneIdent187 ~~
ok so i got everything working that you have but there seems to be a big flaw i found
[04:13pm] « ~BourneIdent » !gf
[04:13pm] « &HelpDesk » BourneIdent is now the captain. To go fishing with them type !gofish
[04:13pm] « @BourneIdent187 » !gofish
[04:13pm] « &HelpDesk » There are now 2 people on the fishing trip.
[04:13pm] « ~BourneIdent » !gf
[04:13pm] -&HelpDesk- Your hand is 4 5 Q 2 A
[04:13pm] « &HelpDesk » The fishing trip has started. /¯! Go fish BourneIdent!
[04:13pm] « ~BourneIdent » !gofish 4 BourneIdent187
[04:13pm] -&HelpDesk- You drew 6
[04:13pm] « &HelpDesk » <°)))))>< Go fish! ><(((((°> It is BourneIdent187's turn. (30 seconds)
[04:14pm] « @BourneIdent187 » !gofish 9 BourneIdent
[04:14pm] « &HelpDesk » <°)))))>< Go fish! ><(((((°> It is BourneIdent's turn. (30 seconds)
[04:14pm] -&HelpDesk- Your hand is 4 5 Q 2 A 6
[04:14pm] « ~BourneIdent » !gofish a BourneIdent187
[04:14pm] « &HelpDesk » Fish, fish, you got your wish! Go again BourneIdent! (30 seconds)
[04:14pm] « &HelpDesk » The trip is over and BourneIdent has caught the most fish!
[04:14pm] « &HelpDesk » BourneIdent:BourneIdent ~~ BourneIdent187:BourneIdent187 ~~
[04:14pm] « &HelpDesk » BourneIdent caught a fish! BourneIdent has caught BourneIdent fish! Go again BourneIdent
everytime the game ends after no more then two turns even though the other player doesn't have the card you ask for and even if he does no matter what you set the points at
I have this running on 6.17 and it works. =/ (cleared the vars and made a new script with what I have posted here)
I'm not sure why it's crashing but if it's saying you don't have that card I'm thinking you missed changing a var somewhere in line 120-122 or 156.
Updated it so that you don't have to open the dialog to change options.
It's just a small thing so I don't think there should be any bugs but with my luck who knows.
I knew about the !shipwreck not working if the game hadn't started, not sure why I didn't fix it yet. :X
And I didn't try changing my name but I didn't think it would be screwed up if you changed back. I'll look into it.
I'm also going to make it so that people can choose the points it goes to and stuff but I wasn't sure if I should make it everyone or just the people that you add to a 'trusted list'.
!shipwreck should work now.
Hi there, I'm rather new to this part of IRC - and I've come upon a problem. So being new to this I wasn't sure if it was something I was doing wrong, or soemthing wrong with the snippet.
When someone starts a game, and no one else responds - the person who started the game can no longer !shipwreck. <on that note, neither can ops.
Also, if the captain changes their nick their captainship appears to be null and void.
No matter how hard i rack my brain, I can't get the game to end. Or start for that matter....
Psychokinetic ;)