Jump to content

Casino


wizard1970

Recommended Posts

How i put a time code in this game for 1 minute

thanks for any help

menu menubar {

=Hangman=

.Hangman ( $+ $group(#hangman) $+ )

..New Game:{ /resetguess }

..Set Word:{ set %originalword $$?="Set Your Word." | set %turnsleft %numberoftries | set %capitalguess $replace(%originalword, a, !, b, @, c, ?, d, $, e, %, f, ^, g, &, h, *, i, /, j, \, k, -, l, =, m, [, n, ], o,;, p, >, q, <, r, 1, s, 2, t, 3, u, 4, v, 5, w, 6, x, 7, y, 8, z, 9) | echo -a 1,1---1,4[Current Word]=[ $+ %originalword $+ ] }

..New Random Word:{ $resetguess }

..-

..Set Number Of Tries:{ set %numberoftries $$?="Number Of Turns?" | set %turnsleft %numberoftries }

..=SCORE IT=:{ $HangmanScore }

..-

..How To Play:{ /ctcpreply $chan TIME 
-- How to play -- 
 1) In order for the game to recognise your guess u must type 
 !hguess [your letter] 
~ For example: "!hguess a" will tell the computer you are guessing the letter a }

..Game Status

...Enable:{ .enable #hangman | .disable #wisperguess | .disable #quietguess | .disable #numberguess | /msg $chan S eTahoma;0 Hangman Started - For a list of game commands, type !hcmds - To Play, type !hguess [your letter] | /echo 0,12 Hangman 0,4 Started !

}

...Disable:{ .disable #hangman | /msg $chan S eTahoma;0 Hangman Terminated - Game Over | /echo 0,12 Hangman 0,4 Ended ! }

..Current Settings

...Word Length $len(%originalword)

...Turns Left %turnsleft

...Total Words $lines(Games/Hangwords.txt)

}

 

 

#hangman on

 

on *:TEXT:*.hangman:#:{ msg $chan S Tahoma;0 $nick , Lets Play HANGMAN :D To Play, type .hg [your letter] EX: ".hg a" means you're guessing the letter: a (Y) For help type: .Hhelp and for other commands: .hcmds ~ Enjoy ;) }

on *:TEXT:*.hcmds:#:{ msg $chan S eTahoma;0 [[ .setword, .newword, .percent, .sayword, .length, .numberofwords, .numberoftries, .Hhelp, .hg ]] }

on *:TEXT:*.setword*:*:{ set %originalword $2- | set %turnsleft %numberoftries | set %capitalguess $replace(%originalword, a, !, b, @, c, ?, d, $, e, %, f, ^, g, &, h, *, i, /, j, \, k, -, l, =, m, [, n, ], o,;, p, >, q, <, r, 1, s, 2, t, 3, u, 4, v, 5, w, 6, x, 7, y, 8, z, 9) | echo -a 1,1---1,4[Current Word]=[ $+ %originalword $+ ] }

on *:TEXT:*.newword:#:{ $resetguess }

on *:TEXT:*.percent:#:{ set %lettersleft4 $calc $len(%capitalguess) | set %percentguess $calc((%lettersleft2 / %lettersleft4) * 100)) | msg $chan [[ %percentguess ]] }

on *:TEXT:*.sayword:#:{ msg $chan [[ %originalword ]] }

on *:TEXT:*.length:#:{ msg $chan [[ $len(%originalword) ]] }

on *:TEXT:*.numberofwords:#:{ msg $chan [[ Total Words: $lines(Games/Hangwords.txt) ]] }

on *:TEXT:*.numberoftries*:#:{ set %numberoftries $2 | set %turnsleft %numberoftries }

on *:TEXT:*.Hhelp*:#:{ /ctcpreply $nick TIME 
-- How to play -- 
1)In order for the game to recognise your guess you must type 
!hguess [your letter] 
~ For example: "!hguess a" will tell the computer you are guessing the letter: a }

on *:TEXT:*.hscore:#:{ $HangmanScore }

 

alias HangmanScore {

set %n 1

/msg $chan [ Scoring HangMan ]]

goto chanscore

:chanscore {

if ($readini(hangmanscores.ini,Scores,$nick($chan,%n)) != $null) {

/msg $chan [ $nick($chan,%n) $+ 's Score: $readini(hangmanscores.ini,Scores,$nick($chan,%n)) ]]

}

if (%n >= $nick($chan,0)) { goto end }

}

inc %n

goto chanscore

:end {

/msg $chan [ Scoring Complete ]

}

}

 

alias resetguess {

set %lettersguessed

set %turnsleft %numberoftries

set %originalword $read(Games\Hangwords.txt)

if (%originalword isin %wordsused) { /resetguess }

%wordsused = %wordsused + %originalword

if ($len(%wordsused) >= 50) { /unset -q %wordsused }

set %capitalguess $replace(%originalword, a, !, b, @, c, ?, d, $, e, %, f, ^, g, &, h, *, i, /, j, \, k, -, l, =, m, [, n, ], o,;, p, >, q, <, r, 1, s, 2, t, 3, u, 4, v, 5, w, 6, x, 7, y, 8, z, 9)

echo -a 1,1---1,4[Current Word]=[ $+ %originalword $+ ]

msg $chan [[ New Word Set ]-[ Length: $len(%originalword) ]

}

 

alias strip {

set %lettersleft $remove(%capitalguess3,_, )

set %lettersleft2 $len(%lettersleft)

set %lettersleft3 $calc($len(%capitalguess) - %lettersleft2)

}

 

alias percent {

set %lettersleft4 $len(%capitalguess)

set %percentguess $calc((%lettersleft2 / %lettersleft4) * 100))

}

 

on *:TEXT:*!hg*:#: {

if ($2- == %originalword) { { %scoring = $readini(hangmanscores.ini,Scores,$nick) | set %scoring2 $calc(%scoring + 1) | writeini hangmanscores.ini Scores $nick %scoring2 | set %nickscore $readini(hangmanscores.ini,Scores,$nick) } /msg $chan S Tahoma;0 [[ $nick got it ]-[ %originalword ]-[ $nick 's Score: %nickscore ]] | /resetguess | halt } else goto onlyone

:onlyone

if ($len($2-) >= 2) { msg $chan S Papyrus;0 [[ $nick only one letter at a time please ]] | halt } else goto notinit

:notinit

if ($2 == $null) { halt } else goto letters

:letters {

if (a isin $2) || if (a isin %originalword) { set %capitalguess $replace(%capitalguess, !, a) }

if (b isin $2) || if (b isin %originalword) { set %capitalguess $replace(%capitalguess, @, B) }

if (c isin $2) || if (c isin %originalword) { set %capitalguess $replace(%capitalguess, ?, c) }

if (d isin $2) || if (d isin %originalword) { set %capitalguess $replace(%capitalguess, $, d) }

if (e isin $2) || if (e isin %originalword) { set %capitalguess $replace(%capitalguess, %, e) }

if (f isin $2) || if (f isin %originalword) { set %capitalguess $replace(%capitalguess, ^, f) }

if (g isin $2) || if (g isin %originalword) { set %capitalguess $replace(%capitalguess, &, g) }

if (h isin $2) || if (h isin %originalword) { set %capitalguess $replace(%capitalguess, *, h) }

if (i isin $2) || if (i isin %originalword) { set %capitalguess $replace(%capitalguess, /, i) }

if (j isin $2) || if (j isin %originalword) { set %capitalguess $replace(%capitalguess, \, j) }

if (k isin $2) || if (k isin %originalword) { set %capitalguess $replace(%capitalguess, -, k) }

if (l isin $2) || if (l isin %originalword) { set %capitalguess $replace(%capitalguess, =, l) }

if (m isin $2) || if (m isin %originalword) { set %capitalguess $replace(%capitalguess, [, m) }

if (n isin $2) || if (n isin %originalword) { set %capitalguess $replace(%capitalguess, ], n) }

if (o isin $2) || if (o isin %originalword) { set %capitalguess $replace(%capitalguess,;, o) }

if (p isin $2) || if (p isin %originalword) { set %capitalguess $replace(%capitalguess, >, p) }

if (q isin $2) || if (q isin %originalword) { set %capitalguess $replace(%capitalguess, <, q) }

if (r isin $2) || if (r isin %originalword) { set %capitalguess $replace(%capitalguess, 1, r) }

if (s isin $2) || if (s isin %originalword) { set %capitalguess $replace(%capitalguess, 2, s) }

if (t isin $2) || if (t isin %originalword) { set %capitalguess $replace(%capitalguess, 3, t) }

if (u isin $2) || if (u isin %originalword) { set %capitalguess $replace(%capitalguess, 4, u) }

if (v isin $2) || if (v isin %originalword) { set %capitalguess $replace(%capitalguess, 5, v) }

if (w isin $2) || if (w isin %originalword) { set %capitalguess $replace(%capitalguess, 6, w) }

if (x isin $2) || if (x isin %originalword) { set %capitalguess $replace(%capitalguess, 7, x) }

if (y isin $2) || if (y isin %originalword) { set %capitalguess $replace(%capitalguess, 8, y) }

if (z isin $2) || if (z isin %originalword) { set %capitalguess $replace(%capitalguess, 9, z) }

set %capitalguess3 $replace(%capitalguess, !, _, @, _, ?, _, $, _, %, _, ^, _, &, _, *, _, /, _, \, _, -, _, =, _, [, _, ], _,;, _, >, _, <, _, 1, _, 2, _, 3, _, 4, _, 5, _, 6, _, 7, _, 8, _, 9, _)

if (%capitalguess3 == %originalword) { { %scoring = $readini(hangmanscores.ini,Scores,$nick) | set %scoring2 $calc(%scoring + 1) | writeini hangmanscores.ini Scores $nick %scoring2 | set %nickscore $readini(hangmanscores.ini,Scores,$nick) } msg $chan S Tahoma;0 [[ $nick got it ]-[ %originalword ]-[ $nick 's Score: %nickscore ]] | resetguess | halt }

if ($2 isin %lettersguessed) { msg $chan S Tahoma;0 [[ Letters Already Used: %lettersguessed ]] | halt }

set %lettersguessed %lettersguessed $2

$strip

$percent

if (%turnsleft == 0) { msg $chan S Tahoma;0 [[Ooops, Looks like you ran out of guesses]-[ Your dude just got hanged ]-[The word was: %originalword $+ ] | resetguess | halt }

if ($2 isin %originalword) { msg $chan S Papyrus;0 [[ %capitalguess3 ]-[ $upper( $2 ) is in it ]-[ Letters Left: %lettersleft3 ]-[ Tries Left: %turnsleft ]] | halt } else

set %turnsleft $calc(%turnsleft - 1)

msg $chan S Papyrus;0 [[ %capitalguess3 ]-[ Letters Left: %lettersleft3 ]-[ Tries Left: %turnsleft ]-[ $2 ]]

}

}

 

#hangman end

 

on *:TEXT:*.addhang*:#: {

if ($2) { write GAMES\hangwords.txt $2- | msg $nick TIME Tnx, your word has been added to hangman :) (Y) }

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...