Jump to content

brb script.. *need help*


QuickBreakdown

Recommended Posts

Whats wrong with this script? Its supposed to be like this, i want if i say.. brb then it sets my status to brb in the ini and if i say back then it removes my status from the ini.... This is my code... but why it doesnt work? :o

on *:SIGNAL:mta.text: { 
  if ($3 == brb) { 
  if ($readini($scriptdir $+ status.ini,players,$mta.nick($1,$2)) == BRB) { 
  mta.pm $1 $2 Your status are already set to "Be right back!" 
  } else 
  mta.text $1 $mta.nick($1,$2) will be right back! $iif($4,Reason: $4-)  
  mta.pm $1 $2 Your status have been set to "Be right back!" 
  !writeini -n status.ini Players $mta.nick($1,$2) BRB 
  } 
  
  if ($3 == back) { 
  if ($readini($scriptdir $+ status.ini,players,$mta.nick($1,$2)) == $null) { 
  mta.pm $1 $2 Your status are not set to "Away!" 
  } else 
  mta.text $1 $mta.nick($1,$2) is back, and better then ever! 
  mta.pm $1 $2 Your status have been reset to normal. 
  !remini -n status.ini Players $mta.nick($1,$2) 
  } 
} 

Link to comment
on *:SIGNAL:mta.text: { 
  if ($3 == brb) { 
    if ($readini($scriptdir $+ status.ini,players,$mta.nick($1,$2)) == BRB) { 
      mta.pm $1 $2 Your status are already set to "Be right back!" 
    } 
    else 
      mta.text $1 $mta.nick($1,$2) will be right back! $iif($4,Reason: $4-)  
      mta.pm $1 $2 Your status have been set to "Be right back!" 
      !writeini -n " $+ $scriptdir $+ status.ini" Players $mta.nick($1,$2) BRB 
    } 
  } 
  elseif ($3 == back) { 
    if (!$readini($scriptdir $+ status.ini,players,$mta.nick($1,$2))) { 
      mta.pm $1 $2 Your status are not set to "Away!" 
    } 
    else 
      mta.text $1 $mta.nick($1,$2) is back, and better then ever! 
      mta.pm $1 $2 Your status have been reset to normal. 
      !remini " $+ $scriptdir $+ status.ini" Players $mta.nick($1,$2) 
    } 
  } 
} 

Link to comment

You forgot the { brackets after the else :wink:

on *:SIGNAL:mta.text: { 
  if ($3 == brb) { 
    if ($readini($scriptdir $+ status.ini,players,$mta.nick($1,$2)) == BRB) { 
      mta.pm $1 $2 Your status are already set to "Be right back!" 
    } 
    else { 
      mta.text $1 $mta.nick($1,$2) will be right back! $iif($4,Reason: $4-) 
      mta.pm $1 $2 Your status have been set to "Be right back!" 
      !writeini -n " $+ $scriptdir $+ status.ini" Players $mta.nick($1,$2) BRB 
    } 
  } 
  elseif ($3 == back) { 
    if (!$readini($scriptdir $+ status.ini,players,$mta.nick($1,$2))) { 
      mta.pm $1 $2 Your status are not set to "Away!" 
    } 
    else { 
      mta.text $1 $mta.nick($1,$2) is back, and better then ever! 
      mta.pm $1 $2 Your status have been reset to normal. 
      !remini " $+ $scriptdir $+ status.ini" Players $mta.nick($1,$2) 
    } 
  } 
}  

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...