|
|
| Poster |
Thread |
| Diego |
Posted on: 2010/2/24 13:00 |
Just popping in   Joined: 1970/1/1 From: Posts: 0 |
Fruit Game firehorse could help me in this game? I want to leave more than 1 show good fruit and the fruit that was correct and that possible?
alias -l st_fruit {
.ame â?ºâ?ºâ?º Mini Games Disconnected â??â??â??
.disable #slot
.disable #loto
.disable #tripla
.disable #vira
.disable #dados
.disable #fruta
.disable #roleta
.disable #corrida
.disable #as
.disable #spin
.disable #moeda
set %fruit.running 1
mstat *s3 â??â? â?ªâ?£â?¢ Fruit Game â?¢ || â?¢ Minimum p / play: 10 points â?¢â? â?ªâ?£â??
mstat *s3 â??â? â?ªâ?£â?¢ Rules: Each fruit is worth a certain score and can be chosen only once. You must enter one of the following fruit available. Be careful, since it has rotten fruit =) â?¢â? â?ªâ?£â??
mstat *s3 â?â?º Eg. Mamao f 50;. Uva f 25;. F Watermelon 30;. F Strawberry 30;. F Orange 30;. Pineapple f 30; .timerfruitSpam 1 30 BallTosss
}
on *:TEXT:*!ajuda*:#:{
tell $nick !Aposto < aposta > < montante >
tell $nick � Só can make a bet at a time.
}
alias -l fruitplayers {
var %i = 1
while ($getfruitplayer(%i) != $null) { inc %i }
return $calc(%i - 1)
}
alias -l playernum {
var %i = 1
while ($getfruitplayer(%i) != $null) {
if ($1 == $getfruitplayer(%i)) { return %i }
inc %i
}
}
alias -l isfruitplayer { if ($playernum($1)) return $true }
alias -l getfruitplayer { return $fruitvar(player, $1) }
alias -l fruitvar { return $readini(fruitlete.ini, $1, $2) }
alias -l fruitset { writeini fruitlete.ini $1 $2 $3- }
alias -l fruitdel { remini fruitlete.ini $1- }
on ^*:text:*"f*:#: {
if ($isfruitplayer($nick)) { mtime $nick Sorry $nick só You can bet once per round| return }
if ($stx_points($nick) < 0) { mtime $nick You have to score points of trivia $nick your will $stx_points($nick) pontos | return }
if ($3 > $stx_points($nick)) { mtime $nick Not have enough points $nick | halt }
if ($3 > 100) { mtime $nick The maximum bet is 100 ponits | halt }
if ($3 <= 0) { mtime $nick You must bet at least 1 point $nick | halt }
if ($2 >= 1) && ($2 <= 36) {
mstat *s2 â? $nick Apostaste $3 no número $2 â?
fruitset player $calc($fruitplayers + 1) $nick
fruitset Bet $nick $2
fruitset Bid $nick $3
stx_addpoints $nick - $+ $3
tell $nick â? Total points $stx_points($nick) â?
halt
}
if (%fruitbet == 0 ) && ($2 != Mamao) && ($2 != Uva) && ($2 != Melancia) && ($2 != Morango) && ($2 != Laranja) { tell $nick Bet $nick Invalid try again | halt }
if ($2 == mamao) { mstat *s3 $stm (*) $nick (*) played well â?© chose to bet $2 and $3 points! Wait for me move! 8-) | fruitset Bet $nick Mamao }
if ($2 == uva) { mstat *s3 $stm (*) $nick (*) played well â?© chose to bet $2 and $3 points! Wait for me move! 8-) | fruitset Bet $nick Uva }
if ($2 == melancia) { mstat *s3 $stm (*) $nick (*) played well â?© chose to bet $2 and $3 points! Wait for me move! 8-) | fruitset Bet $nick Melancia }
if ($2 == morango) { mstat *s3 $stm (*) $nick (*) played well â?© chose to bet $2 and $3 points! Wait for me move! 8-) | fruitset Bet $nick Morango }
if ($2 == laranja) { mstat *s3 $stm (*) $nick (*) played well â?© chose to bet $2 and $3 points! Wait for me move! 8-) | fruitset Bet $nick laranja }
if ($2 == abacaxi) { mstat *s3 $stm (*) $nick (*)played well â?© chose to bet $2 and $3 points! Wait for me move! 8-) | fruitset Bet $nick abacaxi }
fruitset player $calc($fruitplayers + 1) $nick
fruitset Bid $nick $3
}
alias BallTosss {
set %ball $rand(1,3)
if (%ball == 1) { set %rball Mamao | set %edov 1 }
if (%ball == 2) { set %rball Uva | set %edov 2 }
if (%ball == 3) { set %rball Melancia | set %edov 3 }
if (%ball == 4) { set %rball Morango | set %edov 4 }
if (%ball == 5) { set %rball Laranja | set %edov 5 }
if (%ball == 6) { set %rball Abacaxi | set %edov 6 }
mstat *s3 â??â? â?¼â?£â?¢ Fruit Game Finalizado â?¢â? â?¼â?£â??
if (%ball == 1) { mstat *s3 â??â? â?¼â?£â?¢ Fruta Madura (+ $calc($fruitvar(Bid, %Name) * 5) ) %rball â?¢â? â?¼â?£â?? ï?? Congratulations to who won! (h5) Who lost: (good luck next;)! }
if (%ball == 2) { mstat *s3 â??â? â?¼â?£â?¢ Fruta Madura (+ $calc($fruitvar(Bid, %Name) * 5) ) %rball â?¢â? â?¼â?£â?? ï?? Congratulations to who won! (h5) Who lost: (good luck next ;)! }
if (%ball == 3) { mstat *s3 â??â? â?¼â?£â?¢ Fruta Madura (+ $calc($fruitvar(Bid, %Name) * 5) ) %rball â?¢â? â?¼â?£â?? ï??Congratulations to who won! (h5) Who lost: (good luck next ;)! }
if (%ball == 4) { mstat *s3 â??â? â?¼â?£â?¢ Fruta Madura (+ $calc($fruitvar(Bid, %Name) * 5) ) %rball â?¢â? â?¼â?£â?? ï?? Congratulations to who won! (h5) Who lost: (good luck next ;)! }
if (%ball == 5) { mstat *s3 â??â? â?¼â?£â?¢ Fruta Madura (+ $calc($fruitvar(Bid, %Name) * 5) ) %rball â?¢â? â?¼â?£â?? ï?? Congratulations to who won! (h5) Who lost: (good luck next ;)! }
if (%ball == 6) { mstat *s3 â??â? â?¼â?£â?¢ Fruta Madura (+ $calc($fruitvar(Bid, %Name) * 5) ) %rball â?¢â? â?¼â?£â?? ï?? Congratulations to who won! (h5) Who lost: (good luck next ;)! }
if (%ball >= 7) {
}
var %x 1
while ($getfruitplayer(%x) != $null) {
set %Name $getfruitplayer(%x)
if ($fruitvar(Bet, %Name) == mamao) && (%edov == 1) {
stx_addpoints %Name $calc($fruitvar(Bid, %Name) * 5 )
mstat *s3 $stm %Name won $calc($fruitvar(Bid, %Name) * 5) pontos, Total points â?º $stx_points(%Name) â??
.timer_nextstq 1 10 st question
}
if ($fruitvar(Bet, %Name) == uva) && (%edov == 2) {
stx_addpoints %Name $calc($fruitvar(Bid, %Name) * 5 )
mstat *s3 $stm %Name won $calc($fruitvar(Bid, %Name) * 5) pontos, Total points â?º $stx_points(%Name) â??
.timer_nextstq 1 10 st question
}
if ($fruitvar(Bet, %Name) == melancia) && (%edov == 3) {
stx_addpoints %Name $calc($fruitvar(Bid, %Name) * 5 )
mstat *s3 $stm %Name â?º won $calc($fruitvar(Bid, %Name) * 5) pontos, Total points â?º $stx_points(%Name) â??
.timer_nextstq 1 10 st question
}
if ($fruitvar(Bet, %Name) == morango) && (%edov == 4) {
stx_addpoints %Name $calc($fruitvar(Bid, %Name) * 5 )
mstat *s3 $stm %Name won $calc($fruitvar(Bid, %Name) * 5) pontos, Total points â?º $stx_points(%Name) â??
.timer_nextstq 1 10 st question
}
if ($fruitvar(Bet, %Name) == laranja) && (%edov == 5) {
stx_addpoints %Name $calc($fruitvar(Bid, %Name) * 5 )
mstat *s3 $stm %Name won $calc($fruitvar(Bid, %Name) * 5) pontos, Total points â?º $stx_points(%Name) â??
.timer_nextstq 1 10 st question
}
if ($fruitvar(Bet, %Name) == abacaxi) && (%edov == 6) {
stx_addpoints %Name $calc($fruitvar(Bid, %Name) * 5 )
mstat *s3 $stm %Name won $calc($fruitvar(Bid, %Name) * 5) pontos, Total points â?º $stx_points(%Name) â??
.timer_nextstq 1 10 st question
}
fruitdel player %x
fruitdel bet %Name
fruitdel bid %Name
inc %x
}
if ( %fruit.running = 0 ) { msg %pokerchan S Tahoma;0 A Roleta está fechada | halt }
.ame â?ºâ?ºâ?º Mini Jogos Ligados â??â??â??
.enable #slot
.enable #loto
.enable #tripla
.enable #vira
.enable #dados
.enable #fruta
.enable #roleta
.enable #corrida
.enable #as
.enable #spin
.enable #moeda
.timer_nextstq 1 10 st question
}
|
|
|
| FireHorse |
Posted on: 2010/2/23 11:31 |
Webmaster   Joined: 1970/1/1 From: Posts: 1 |
Re: Fruit Game Help Diego
Not with what little information you have provided, no
|
|
|
| Da®K |
Posted on: 2010/2/22 8:08 |
Just popping in   Joined: 1970/1/1 From: Posts: 0 |
Re: Fruit Game Help
|
|
|
| Diego |
Posted on: 2010/2/20 16:15 |
Just popping in   Joined: 1970/1/1 From: Posts: 0 |
Re: Fruit Game Help I understand all that this game is complicated you do not have a look around?
|
|
|
| FireHorse |
Posted on: 2010/2/20 8:19 |
Webmaster   Joined: 1970/1/1 From: Posts: 1 |
Re: Fruit Game Help Diego
I am going to have to put this in the 'too hard' basket. I am just not familiar with hashtables enough to be making repairs to your code.
Your code does not have any trigger events which means it is incomplete. This also makes it hard for me to determine what the outcome of any given commands are supposed to be
If I had specific parameters I would have been tempted to write the code from scratch but all you have provided is 1 possible outcome. I could have a best guess aproach but then I would have to change the code to suit your requirements and given our language barrier this would be too time consuming for me.
I dont mind assisting you if I can see you trying to fix it or working on smaller projects that I can knock over quickly, but because you have supplied so little information it would take more time than I have available. I am sorry but I need to focus my time on reducing debt not working for free
FireHorse
|
|
|
| Diego |
Posted on: 2010/2/13 0:28 |
Just popping in   Joined: 1970/1/1 From: Posts: 0 |
Re: Fruit Game Help please Fire Horse help
|
|
|
| Diego |
Posted on: 2010/2/9 17:29 |
Just popping in   Joined: 1970/1/1 From: Posts: 0 |
Re: Fruit Game Help exemple
Єήčαήтоѕ?: ░╠₪╣?Fruit Game ?||? Minimum p / play: 23 points ?╠₪╣░ Encantos: ░╠₪╣? Rules: Each fruit is worth a certain score and can be chosen only once. You must enter one of the following fruit available. Beware, since it has rotten fruit =) ?╠₪╣░ Єήčαήтоѕ?: Fruits available are: ? Orange ? Jabuticaba ? Maca ? Maracuja ?Peach ? Pitanga
Ďїєğσ:Maca Єήčαήтоѕ?: Ďїєğσ you chose [Maca]. Wait for the round to be completed
╠☼╣? [Good Fruit/Mature]:: Orange (18) Pitanga (28) Peach (11) Єήčαήтоѕ?: ░╠☼╣? [Rotten Fruit]:: Maracuja (-25) Jabuticaba (-22) Maca (-10) Єήčαήтоѕ?:Ďїєğσ chose Maca, and earn 10 points
|
|
|
| Diego |
Posted on: 2010/2/9 13:17 |
Just popping in   Joined: 1970/1/1 From: Posts: 0 |
Re: Fruit Game Help the game runs a fruit and choose when the round ends the game show ripe fruit giving tips and rotten fruit that takes points
|
|
|
| FireHorse |
Posted on: 2010/2/9 9:54 |
Webmaster   Joined: 1970/1/1 From: Posts: 1 |
Re: Fruit Game Help Not without knowing how it works!
Also ST5 and Tats are completely separate trivia scripts and have very little in common when it comes to code. It is very unlikely one could code a script to work with both trivia scripts
FireHorse
ps. this is an English speaking forum, whilst others may understand your script, I do not, thus making it extremely difficult to interpret the nature of the code
pps. using code tags makes the code easier to read!
|
|
|
| Diego |
Posted on: 2010/2/8 22:22 |
Just popping in   Joined: 1970/1/1 From: Posts: 0 |
Fruit Game Help
alias fruit.preparing {
var %x $fruit.sort
Fruit Game Minimum w / play: 10 points
Rules: Each fruit is worth a certain score and may be selected only once. You must enter one of the following fruit available. Be careful, since it has rotten fruit =)â?© â?º :: %x ::
}
alias fruit.sort {
var %s $rand(1,30), %i 2,%u,%v,%t,%t2,%r,%r2
thset megafruit
thset goodfruits
thset badfruits
thset fplayed
thset powerwinner
%r2 = $rand(1,9)
if (%r2 == 5) thset nfruits $rand(7,8)
else thset nfruits $rand(3,6)
;thset nfruits $rand(7,8)
%r = $iif($thget(nfruits) > 4,a,$rand(a,c))
%t = $rand(1,$thget(nfruits))
%t2 = %t
;thset nfruits $rand(7,8)
thset fruit1 $readini(fruit.ini,fruits,%s) $readini(fruit.ini,nvl $+ $thget(nfruits) $+ %r,%t)
%v = â?¢ ï? $+ $token($thget(fruit1),1,32) $+ ]
if ($token($thget(fruit1),2,32) >= 100) { thset megafruit $token($thget(fruit1),1,32) }
elseif ($token($thget(fruit1),2,32) > 0) { thset goodfruits $token($thget(fruit1),1,32) $+ ( $+ $token($thget(fruit1),2,32) $+ ) }
else { thset badfruits $token($thget(fruit1),1,32) $+ ( $+ $token($thget(fruit1),2,32) $+ ï?© }
while (%i <= $thget(nfruits)) {
%u = $fruit.getfree(30,%s)
%t = $fruit.getfree($thget(nfruits),%t2)
%t2 = %t2 %t
thset $+(fruit,%i) $readini(fruit.ini,fruits,%u) $readini(fruit.ini,nvl $+ $thget(nfruits) $+ %r,%t)
if ($token($thget(fruit $+ %i),2,32) >= 100) { thset megafruit $token($thget(fruit $+ %i),1,32) }
elseif ($token($thget(fruit $+ %i),2,32) > 0) {
if ($thget(goodfruits) == $null) thset goodfruits $token($thget(fruit $+ %i),1,32) $+ ( $+ $token($thget(fruit $+ %i),2,32) $+ )
else thset goodfruits $thget(goodfruits) $+ , $token($thget(fruit $+ %i),1,32) $+ ( $+ $token($thget(fruit $+ %i),2,32) $+ ï?©
}
else {
if ($thget(badfruits) == $null) thset badfruits $token($thget(fruit $+ %i),1,32) $+ ( $+ $token($thget(fruit $+ %i),2,32) $+ )
else thset badfruits $thget(badfruits) $+ , $token($thget(fruit $+ %i),1,32) $+ ( $+ $token($thget(fruit $+ %i),2,32) $+ ï?©
}
%s = %s %u
%v = %v â?¢ ï? $+ $token($thget(fruit $+ %i),1,32) $+ ]
inc %i
}
;echo -a $thget(nfruits)
;echo -a a $thget(megafruit)
;echo -a $thget(goodfruits)
;echo -a $thget(badfruits)
return %v â?¢
}
alias processfruit {
var %x,%j,%k
if (!$isfruit($1-)) return
if (!$user.score($nick) || $user.score($nick) < $iif($thget(nfruits) > 6,25,10)) { tsay Hey, $nick , you must have at least $iif($thget(nfruits) > 6,25,10) points to play this game!! | return }
%x = $fruit.resp
if ($nick isin $thget(fplayed)) {
tsay S Arial;0 Hey, $nick, vocec ja made his move;) ï ?<(*) You picked the fruit[ $+ $fruitplayed $+ ](*)
return
}
var %i 1
while (%i <= $thget(nfruits)) {
if ($1 == $token($thget(fruit $+ %i),1,32)) {
if ($token($thget(fruit $+ %i),3,32) == $null) {
thset fplayed $thget(fplayed) $nick
thset $+(fruit,%i) $thget(fruit $+ %i) $nick
if ($token($thget(fruit $+ %i),2,32) >= 100) thset powerwinner $nick
tsay S Arial;0 $+ (*) $nick (*) you chose the fruit [ $+ $1 $+ ]. Wait for the round to be completed (O)
}
else {
%j = 1
while (%j <= $thget(nfruits)) {
if ($token($thget(fruit $+ %j),3,32) == $null) %k = %k $token($thget(fruit $+ %j),1,32)
inc %j
}
tsay S Arial;0 $+ (*) $nick (*) fruit $token($thget(fruit $+ %i),1,32) has already been chosen by $token($thget(fruit $+ %i),3,32) $+ . Fruit available: $iif(%k,%k,Nenhum)
}
}
inc %i
}
}
alias fruitscore {
tsay S Arial;0 â??â? â?¼â?£â?¢ Fruit Game Finishedâ?¢â? â?¼â?£â??
tsay S Arial;0 â??â? â?¼â?£â?¢ [Good Fruit / Mature] :: $thget(goodfruits) â?¢â? â?¼â?£â??
tsay S Arial;0 â??â? â?¼â?£â?¢ [Rotten Fruit] :: $thget(badfruits) â?¢â? â?¼â?£â?? $iif($thget(nfruits) > 6,$iif($thget(powerwinner) != $null,ï??â?º :: $thget(powerwinner) chose the mega fruit$upper($thget(megafruit)) $+ ! Won $iif($thget(nfruits) == 7,100,125) points! :: [â?«],ï??â?º ::Nobody chose the mega fruit $upper($thget(megafruit)) was worth $iif($thget(nfruits) == 7,100,125) points! :: [â?«]))
;tsay S Arial;0 â??â??[ $+ $thget(Current) $+ ] :: ï? Fruit Game Finished ] ::â??â??ï??â?º [Good Fruit / Mature] :: $thget(goodfruits) :: [â?ª] ï??â?º [Rotten Fruit] :: $thget(badfruits) :: [-] $iif($thget(nfruits) > 6,$iif($thget(powerwinner) != $null,ï??â?º :: $thget(powerwinner) chose the mega fruit $upper($thget(megafruit)) $+ ! Won $iif($thget(nfruits) == 7,100,125) points! :: [â?«],ï??â?º :: Nobody chose the mega fruit $upper($thget(megafruit)) was worth $iif($thget(nfruits) == 7,100,125) points! :: [â?«]))
var %i 1
while (%i <= $thget(nfruits)) {
if ($token($thget(fruit $+ %i),3,32) != $null) {
thset ftemp.cng $token($thget(fruit $+ %i),2,32)
if ($calc($realvar($token($thget(fruit $+ %i),3,32), Score) + $thget(ftemp.cng)) > 0) {
setvar $token($thget(fruit $+ %i),3,32) Score $calc($realvar($token($thget(fruit $+ %i),3,32), Score) + $thget(ftemp.cng))
thset $eval(Score. $+ $token($thget(fruit $+ %i),3,32),1) $calc($thget($eval(Score. $+ $token($thget(fruit $+ %i),3,32),1)) + $thget(ftemp.cng))
}
else {
setvar $token($thget(fruit $+ %i),3,32) Score 0
thset $eval(Score. $+ $token($thget(fruit $+ %i),3,32),1) 0
}
if ($thget(ftemp.cng) == 0) {
if (%i < 6) tsay (*) $token($thget(fruit $+ %i),3,32) (*) chose fruit $token($thget(fruit $+ %i),1,32) and not earned points! ;)
else .timer.fruit. $+ $cid -m 1 500 tsay S Arial;0 (*) $token($thget(fruit $+ %i),3,32) (*) chose fruit $token($thget(fruit $+ %i),1,32) and not earned points! ;)
}
else {
if (%i < 6) tsay (*) $token($thget(fruit $+ %i),3,32) (*) $iif($thget(ftemp.cng) > 0,won $thget(ftemp.cng), lost $calc($thget(ftemp.cng) * -1)) points for the choice of fruit $token($thget(fruit $+ %i),1,32) $+ ! Total points: $user.score($token($thget(fruit $+ %i),3,32))
else .timer.fruit. $+ $cid -m 1 500 tsay S Arial;0 (*) $token($thget(fruit $+ %i),3,32) (*) $iif($thget(ftemp.cng) > 0,ganhou $thget(ftemp.cng), lost $calc($thget(ftemp.cng) * -1)) points for the choice of fruit $token($thget(fruit $+ %i),1,32) $+ ! Total points: $user.score($token($thget(fruit $+ %i),3,32))
}
}
inc %i
}
}
alias -l isfruit {
var %i 1
while (%i <= $thget(nfruits)) {
if ($1 == $token($thget(fruit $+ %i),1,32)) return $true
inc %i
}
return $false
}
alias -l fruitplayed {
var %i 1
while (%i <= $thget(nfruits)) {
if ($nick == $token($thget(fruit $+ %i),3,32)) return $token($thget(fruit $+ %i),1,32)
inc %i
}
return $false
}
;alias -l fruit.fruit {
;var %a,%b,%c
;}
alias -l fruit.getfree {
var %a = $2-, %b = $r(1,$1)
while ($istok(%a,%b,32)) {
var %b = $r(1,$1)
}
return %b
}
|
|
|
|