script by Dani_l11 and Flags and game idea by pangaea
Well after alot of help from others I finally got something together here.
Guess the flag game, with over just under 110 flags
Aim of the game:
Once the game is started, the bot will msg a flag slowly into the channel.. the player(s) must /msg the bot the answer.
If someone guesses correctly, the game will award a point, and move onto the next flag randomly.
Thats it in a nutshell... its sorta beta,
Things to note..
You have to be oped to play the game
You get only 2 guesses
You can edit the timer in the script to make the game run slower or faster.
You might wanna +m +k the chan while playing
To install:
You will need to download this:
http://www.fractalscapes.net/designs/mirc/game/flags.rar
Then extract the folder in mirc .. so "mirc/flags/
Load the script below into remote
To Play
!startflag - this starts the game
!stopflag - this will stop the game
IRC Flag Game
script by Dani_l11 and Flags and game idea by pangaea
_____________________________________________________________________
alias fchan return #yourchannel
on *:TEXT:!Startflag:#:{
if ($nick !ishop #) && ($nick !isop #) halt
giveflag
}
on *:TEXT:!Stopflag:#:{
if ($nick !ishop #) && ($nick !isop #) halt
if (%cflag) flagguess *nobody* stop
.timerflag* off
}
alias giveflag {
msg $fchan There will be a new flag which you can all guess! Only 2 attempts per person. To message it do !Flag Country in PM! /msg $me !Flag Country
set %cflag $qt($findfile($mircdirflags,*.txt,$r(1,$findfile($mircdirFlags,*.txt,0))))
.timerflag1 1 3 lineflag %cflag $(|) .timerflag 0 3 lineflag %cflag
}
alias lineflag {
if (!%flagcounter) { inc %Flagcounter 2 | .timer 1 1 lineflag }
else inc %Flagcounter
if (%Flagcounter >= 16) { flagguess *nobody* | halt }
msg $fchan $read(%cflag,%flagcounter)
}
on *:TEXT:!Flag *:?:{
if (!%Cflag) halt
var %actrs = Afganistan|Argentina|Australia|Down under|Austria|Belgium|Benin|Brazil|Bulgaria|Cambodia|Canada|Chad|Chilie|China|Columbia|Costa rica|Croatia|Cuba|Denmark|Djibouti|Dominican republic|East timor|Egypt|England|Estonia|Ethiopia|European Union|Europe|Finland|France|Germany|Greece|Greenland|Hungary|Iceland|India|Indonesia|Iran|Iraq|Ireland|The emerald isle|Paddyland|Home sweet home|Israel|Italy|Jamaica|Japan|Kuwait|Laos|$&
Latvia|Lebanon|Libya|Lithuania|Luxembourg|Madagascar|Malaysia|Malta|Mexico|Mongolia|Morocco|Nepal|Netherlands|Holland|The Netherlands|New zeland|Nicaragua|Niger|Nigeria|North korea|Norway|Pakistan|Palestine|Panama|Peru|Philippines|The philippines|Poland|Puerto rico|Qatar|Romania|Russia|Rwanda|South africa|Samoa|Saudi arabia|Scotland|Senegal|Sierra leone|Singapore|South korea|Somalia|Spain|Sri lanka|Sudan|$&
Suriname|Sweden|Switzerland|Taiwan|Tanzania|Thailand|Tibet|Tonga|Tunisia|Turkey|Uae|United Arab Emirates|Uganda|United kingdom|Britain|Great Britain|UK|Ukraine|United nations|The United Nations|UN|Uraguay|Usa|United state of america|The united state of america|America|Venezuela|Vietnam|Yemen|Yugoslavia
if (!$istok(%actrs,$2-,124)) { msg $nick That's not a valid country! | halt }
if (%flagcounter [ $+ [ $nick ] ] >= 2) halt
inc %flagcounter [ $+ [ $nick ] ]
if ($istok($read(%cflag,1),$2-,124)) { flagguess $nick | msg $nick You've got it! }
else msg $nick That answer is not correct!
}
alias flagguess {
if ($1 == *Nobody*) msg $fchan Nobody guessed the correct flag! It was $gettok($read(%cflag,1),1,124) $+ .
else {
writeini flags.ini score $1 $calc($readini(flags.ini,score,$1) + 1)
msg $fchan $1 guessed the correct flag! It was $gettok($read(%cflag,1),1,124) $+ . Score of $1 $+ : $readini(flags.ini,score,$1)
}
unset %flagcounter*
if ($2 != stop) .timerflag2 1 5 giveflag
.timerflag off
unset %cflag
halt
}
using mIRC press ALT(?) R and make it in a new file (so it is easier to edit later in life) and Copy this and paste it to the new file.