Squall Posted November 16, 2006 Share Posted November 16, 2006 help on *:SIGNAL:mta.command:{ if($3 == brb) mta.say $1 $mta.name($1,%a) is going away $+ . $iif($5,Reason: $5-) (timer.on ) .timer 0 86400 !writeini " $+ $scriptdir $+ why.ini" away $mta.name($1,$2) elseif ($3 == !away) mta.msg $1 $2 %a = $readini($scriptdir $+ why.ini,away,$mta.name($1,$2)) { elseif ($3 == back) mta.say $1 $mta.name ($1,%a) for $mta.time Link to comment
ImJohnMclane Posted November 16, 2006 Share Posted November 16, 2006 help on *:SIGNAL:mta.command:{ if($3 == brb) mta.say $1 $mta.name($1,%a) is going away $+ . $iif($5,Reason: $5-) (timer.on ) .timer 0 86400 !writeini " $+ $scriptdir $+ why.ini" away $mta.name($1,$2) elseif ($3 == !away) mta.msg $1 $2 %a = $readini($scriptdir $+ why.ini,away,$mta.name($1,$2)) { elseif ($3 == back) mta.say $1 $mta.name ($1,%a) for $mta.time take a know that: change: on *:SIGNAL:mta.command:{ to: on *:SIGNAL:mta.text:{ well repaired script is here: on *:SIGNAL:mta.text:{ if($3 == brb) mta.say $1 $mta.name($1,%a) is going away $+ . $iif($5,Reason: $5-) (timer.on ) .timer 0 86400 !writeini " $+ $scriptdir $+ why.ini" away $mta.name($1,$2) elseif ($3 == !away) mta.msg $1 $2 %a = $readini($scriptdir $+ why.ini,away,$mta.name($1,$2)) { elseif ($3 == back) mta.say $1 $mta.name ($1,$2) is now back I removed: $mta.name ($1,%a) for $mta.time ' goz i just wanna know, wtf is that Cya, I hope that works^^ Link to comment
Squall Posted November 17, 2006 Author Share Posted November 17, 2006 code] on *:SIGNAL:mta.text:{ if($3 == brb) mta.say $1 $mta.name($1,%a) is going away $+ . $iif($5,Reason: $5-) (timer.on ) .timer 0 86400 !writeini " $+ $scriptdir $+ why.ini" away $mta.name($1,$2) elseif ($3 == !away) mta.msg $1 $2 %a = $readini($scriptdir $+ why.ini,away,$mta.name($1,$2)) { elseif ($3 == back) mta.say $1 $mta.name ($1,$2) is now back [/code] you forgot (like i always do) the close braket on *:SIGNAL:mta.text:{ if($3 == brb) mta.say $1 $mta.name($1,%a) is going away $+ . $iif($5,Reason: $5-) (timer.on ) .timer 0 86400 !writeini " $+ $scriptdir $+ why.ini" away $mta.name($1,$2) elseif ($3 == !away) mta.msg $1 $2 %a = $readini($scriptdir $+ why.ini,away,$mta.name($1,$2)) { elseif ($3 == back) mta.say $1 $mta.name ($1,$2) is now back { well i think u did Link to comment
CoZ Posted November 17, 2006 Share Posted November 17, 2006 i think the close bracket { wont work too well Link to comment
*VoLDo* Posted November 18, 2006 Share Posted November 18, 2006 on *:SIGNAL:mta.text:{ if ($3 == brb) { if ($4 == $null) { mta.say $1 $mta.name($1,$2) Will be right back! !writeini $+(",$mta.dir,$1.ini") ID $+ $2 away 1 } else { mta.say $1 $mta.name($1,$2) Will be right back! Reason: $4- !writeini $+(",$mta.dir,$1.ini") ID $+ $2 reason $4- } } if ($3 == back) { !remini $+(",$mta.dir,$1.ini") ID $+ $2 reason !writeini -n $+(",$mta.dir,$1.ini") ID $+ $2 away 0 } } on *:SIGNAL:mta.command: { if ($3 == !away) { var %aa = 0,%bb while %aa <= $mta.maxplayers($1) { if $readini($mta.dir $+ $1.ini,ID $+ %aa,away) == 1 { if %bb == $null { %bb = $mta.name($1,%aa) $+ $iif($readini($mta.dir $+ $1.ini,ID $+ %aa,reason),( $+ $readini($mta.dir $+ $1.ini,ID $+ %aa,reason) $+ )) } else { %bb = %bb $+ , $mta.name($1,%aa) $+ $iif($readini($mta.dir $+ $1.ini,ID $+ %aa,reason),( $+ $readini($mta.dir $+ $1.ini,ID $+ %aa,reason) $+ )) } } !inc %aa } mta.say $1 $iif(%bb == $null,Noone has been Away,Away players: %bb) } } Link to comment
Squall Posted November 18, 2006 Author Share Posted November 18, 2006 can u do it wid a 24 hour timer Link to comment
lil Toady Posted November 18, 2006 Share Posted November 18, 2006 on *:SIGNAL:mta.text:{ if ($readini($mta.dir $+ $1.ini,ID $+ $2,away)) { mta.say $1 $mta.name($1,$2) is back! (Away time: $duration($calc($ctime - $readini($mta.dir $+ $1.ini,ID $+ $2,away))) $+ ) !remini " $+ $mta.dir $+ $1.ini" ID $+ $2 away } elseif ($3 == brb) { mta.say $1 $mta.name($1,$2) will be right back! $iif($4,Reason: $4-) !writeini " $+ $mta.dir $+ $1.ini" ID $+ $2 away $ctime } } on *:SIGNAL:mta.command:{ if ($3 == !away) { var %a = 0 while (%a <= $mta.maxplayers($1)) { if ($readini($mta.dir $+ $1.ini,ID $+ %a,away) { mta.say $1 $mta.name($1,%a) is away for $duration($calc($ctime - $readini($mta.dir $+ $1.ini,ID $+ %a,away))) } !inc %a } } } Link to comment
Squall Posted November 19, 2006 Author Share Posted November 19, 2006 ty toady it got problems wen i say !away it says * /if: invalid format (line 15, brbrb.mrc) and wen i say back after i say brb it dosnt do any thing Link to comment
lil Toady Posted November 19, 2006 Share Posted November 19, 2006 yeh, i forgot a bracket there on *:SIGNAL:mta.text:{ if ($readini($mta.dir $+ $1.ini,ID $+ $2,away)) { mta.say $1 $mta.name($1,$2) is back! (Away time: $duration($calc($ctime - $readini($mta.dir $+ $1.ini,ID $+ $2,away))) $+ ) !remini " $+ $mta.dir $+ $1.ini" ID $+ $2 away } elseif ($3 == brb) { mta.say $1 $mta.name($1,$2) will be right back! $iif($4,Reason: $4-) !writeini " $+ $mta.dir $+ $1.ini" ID $+ $2 away $ctime } } on *:SIGNAL:mta.command:{ if ($3 == !away) { var %a = 0 while (%a <= $mta.maxplayers($1)) { if ($readini($mta.dir $+ $1.ini,ID $+ %a,away)) { mta.say $1 $mta.name($1,%a) is away for $duration($calc($ctime - $readini($mta.dir $+ $1.ini,ID $+ %a,away))) } !inc %a } } } this code works perfect for me, if it's not working for you, thats your prob and i cant help Link to comment
Squall Posted November 20, 2006 Author Share Posted November 20, 2006 yeh it works perfect but would you be able to make it work when they/you log off Link to comment
Recommended Posts