Login

Username:

Password:


Lost Password?
Forum Index   -   Topic Index
   Scripting
     Question - Special
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
Diego
Posted on: 2010/10/29 15:55
Just popping in
Joined: 1970/1/1
From:
Posts: 0
Question - Special
put need a code that only let the player has less than 5,000 points playing this game
alias -l st_palavra {
  .
ame â?ºâ?ºâ?º Mini Games Off â??â??â??
  .
disable #slot
  
.disable #loto
  
.disable #tripla
  
.disable #vira
  
.disable #dados
  
.disable #fruta
  
.disable #roleta
  
.disable #corrida
  
.disable #as
  
.disable #spin
  
.disable #moeda
  
if (%artist == ON) { 
    
msg # Artists game already in progress. Please wait until this one has finished :D 
    
return 
  } 
  .
timer1 1 2 mstat *$+ $rand(1,5$stm  â??â??â??  Question Special RequirementPossess less than 5000 points  â??â??â??
  .
timer2 1 3 mstat *$+ $rand(1,5$stm   â??â??â?? $gettok($read(songs.txt),1,42â??â??â??
  .
timer3 1 9 mstat *$+ $rand(1,5$stm  â??â??â?? You have 30 Secs to Reply â??â??â??
  
set %answer $gettok($read(songs.txt$readn),2,42
  .
timer5 1 6 mstat *s2 $stm â??â??â?? The first three letters are -----â?º  $left(%answer,3â??â??â??
  .
timer6 1 8 mstat *s2 $stm â??â??â?? One of the last letters are ---- â?º $right(%answer,2â??â??â??
  
set %artists ON 
  
/timer.artists 1 30 end 
  set 
%answer $gettok($read(songs.txt$readn),2,42
  
set %artists ON 
  
/timer.artists 1 30 end 


on ^*:text:*:#: { 
  
if (%artists == ON) { 
    if ($
1- == %answer ) goto one 
      if ($
1- != %answer ) goto two 
        :
one 
        
if ($nick == $me /halt)  
      if ($
1- == %answer) { mstat *$+ $rand(1,5$stm â?º (8$nick One Response  - $1â??  }          
      if ($
1- == %answer) { mstat *$+ $rand(1,5$stm â?º $nick Earn 10000 points stx_addpoints $nick 10000 â?? } 
      .
timerst_next 1 $sts(delay_wrongst question 
      
.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
      
set %artists OFF 
      timer
.artists off 
      
:two 
      
if ($nick isop  halt 
      if ($
1- == %answer halt
      if ($
1- != %answer)  { msg # Sorry $nick that is not right. Try again :) } 
    

  } 



alias end 
  
mstat *$+ $rand(1,5$stm â??â??â?? (oResponse Timeout is next to  :^) â??â??â??
  .
timerst_next 1 $sts(delay_wrongst question
  
.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

  
set %artists OFF 

}

FireHorse
Posted on: 2010/11/6 23:54
Webmaster
Joined: 1970/1/1
From:
Posts: 1
Re: Question - Special
check your braces, looks like you have 1 too many closes. Also check this line

if ($1- == %answer) {mstat *s $+ $rand(1,5) $stm â?º (8) $nick One Response - $1- â??  }

the bit below might be causing a problem, add a space after the {

{mstat

cheers
FireHorse
Diego
Posted on: 2010/11/23 15:02
Just popping in
Joined: 1970/1/1
From:
Posts: 0
Re: Question - Special
Thanks fire horse

is to set limits of points for a player?

FireHorse
Posted on: 2010/11/24 10:20
Webmaster
Joined: 1970/1/1
From:
Posts: 1
Re: Question - Special
Diego

I thought you said the code was not working?

To add a points restriction is very easy

change your code like this

on 
^*:text:*:#: { 
  
if ($stx_points($nick) < 5000) {

then add the rest of your code and be sure to add an extra closing brace for the if statement.

A nice touch would be to add an else like this

else mstat you have too many points $nick to play these games

hope that helps
FireHorse
Diego
Posted on: 2010/11/25 13:02
Just popping in
Joined: 1970/1/1
From:
Posts: 0
Re: Question - Special
this way?



if ($stx_points($nick) < 5000) {
if (
$stx_points($nick) <= 5000) { mstat *$+ $rand(1,5$stm Must be less than 5000 points to playhalt 

Threaded | Newest First Previous Topic | Next Topic | Top

Register To Post