Jump to content

a script request


Squall

Recommended Posts

i am wondering how to do a timer for 24 hours or is that impossible cause i have an idea of an awsome script k te idea

ok you are an admin or owner and you are going away for e.g 20 mins and you want ppl to know when your comming back so like this you say some thing !setawaytime 20 and it starts timer and the timmer keeps going till you say !setbacktimeoff or something

would that be possible for mtavc i tried making 1 but i dont under stand the timer thanks msn me at [email protected] i will be very great full

bye

Link to comment

see im getting good. hmm i got another problem when i connect to the server.exe wid the MtaMa 2.24 it times out but not the server just the admin script thingi. last night i had some kind of idea but i forgot as soon as i opend wat i wanted lol thats wat get wid short term memeroy loss durrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr "smack" snap out of it Edit: forgot to say

thanks shibz
Link to comment

not to b straight up but heres somethign my freind as u can c westcoast

Welcome To Script Maker

====================================================

Here You Can Add Your Scripts And we Will make

The Script For You.

You Only Have To Write The Following Steps

-The Commands-

1) Command 1 -!setaway (admin and mod only)

Command 2 -!aways (any 1 can say)

Command 3 -!back(admin and mod only)

-The Response-

If Someone Types The Command What Does It Says?

-!setaway ... is set to away for ...

-!aways ... are away for ...

-!back ... is back total time ...

2) Command 1 Response -you have ben set to away for blabla mins/hours

Command 2 Response -the ppl who are away are ... and ... and ...

Command 3 Response -... has returned total time ...

-Special Features-

Do You want Some Special Features

Like writeini's Timers Etc.

Just Post The Special Features In Here

-timer 24 hour

-admins only

-!admin online time

If you Are Ready Making This Script Maker send It Back

To The Person Who sended You

======================================================

Copyright © The WestCoast Customs 2006

http://www.Coast-Serverz.tk

plz do not put script on here jst email me i gona help my goud freind shady
Link to comment

i got a heap of othe bad problems

on *:SIGNAL:mta.command:{ 
 if (!suspect == $3) { 
   var %a = $iif($4,$iif($mta.name($1,$4) != Unknown,$4,$mta.getid($1,$4)),$2) 
   if ($mta.skin($1,$2) == 1) { 
     if (%a == -1) mta.msg $1 $2 Error - Absent ID/Name 
     if (%a == $2) mta.msg $1 $2 Error - Can't suspect yourself 
     else { 
       !writeini " $+ $scriptdir $+ suspectlist.ini" List $mta.name($1,%a) 1 
       mta.say $1 $mta.name($1,%a) has been added to the wanted list. Reason: $iif($5,$5-,None) 
     }      
   } 
   else mta.msg $1 $2 Sorry, you are not a cop. 
 } 
 elseif (!wanted == $3) { 
   var %a = 0,%b 
   while (%a <= $mta.maxplayers($1)) { 
     if ($readini($scriptdir $+ suspectlist.ini,list,$mta.name($1,%a)) == 1) { 
       if (!%b) %b = $mta.name($1,%a) 
       elseif (%b) %b = %b $+ , $mta.name($1,%a) 
     } 
     inc %a 
   } 
   mta.say $1 Wanted Players: $iif(%b,%b,None) 
 } 
} 
on *:SIGNAL:mta.kill:{ 
 if ($readini($scriptdir $+ suspectlist.ini,list,$mta.name($1,$2)) == 1) { 
   if (Cop* iswm $mta.skin($1,$3).name) { 
     mta.msg $1 $3 Killed a wanted player and u get 1000$ of his bounty. 
     !remini " $+ $scriptdir $+ suspectlist.ini" List $mta.name($1,$2) 
     !writeini rpg.ini cash $mta.name($1,$3) $calc($readini(rpg.ini,cash,$mta.name($1,$3)) + 1000) 
   } 
 } 
}

it says ur not cop wen i am and the !skin says BlahBlah skin:diasbeld

*/
alias mta.level !return $iif($readini($mta.dir $+ $1.ini,ID $+ $2,level),$v1,0)
alias mta.spree !return $iif($hget(mta.spree,$mta.name($1,$2)),$v1,0)
alias my.kills !return $iif($readini($scriptdir $+ mta.stats.ini,KILLS,$mta.name($1,$2)),$v1,0)
alias my.deaths !return $iif($readini($scriptdir $+ mta.stats.ini,DEATHS,$mta.name($1,$2)),$v1,0)
alias my.spree !return $iif($readini($scriptdir $+ mta.stats.ini,SPREE,$mta.name($1,$2)),$v1,0)
on *:SIGNAL:mta.command: {
 var %a = $iif($4,$iif($mta.name($1,$4) != Unknown,$4,$mta.getid($1,$4)),$2)
 ;PLAYERS COMMANDS
 if (!admin* iswm $3) {
   var %a = 0,%b,%c
   while (%a <= $mta.maxplayers($1)) {
     if ($mta.level($1,%a) >= 6) %b = $iif(%b,%b $+ $chr(44) $mta.name($1,%a),$mta.name($1,%a)) $+ (Level: $mta.level($1,%a) $+ )
     elseif ($mta.level($1,%a) >= 2) %c = $iif(%c,%c $+ $chr(44) $mta.name($1,%a),$mta.name($1,%a)) $+ (Level: $mta.level($1,%a) $+ )
     !inc %a
   }
   mta.say $1 $iif(%b,Admins: %b,No admins currently present.)
   if (%c) mta.say $1 Moderators: %c
 }
 elseif ($3 == !skin) $iif(%a == -1,mta.msg $1 $2 Error - Absent ID,mta.say $1 $mta.name($1,%a) $+ 's skin: $mta.skin($1,%a).name)
 elseif ($3 == !level) $iif(%a == -1,mta.msg $1 $2 Error - Absent ID,mta.say $1 $mta.name($1,%a) $+ 's level: $mta.level($1,%a))
 elseif ($3 == !ping) $iif(%a == -1,mta.msg $1 $2 Error - Absent ID,mta.say $1 $mta.name($1,%a) $+ 's ping: $mta.ping($1,%a))
 elseif ($3 == !idle) $iif(%a == -1,mta.msg $1 $2 Error - Absent ID,mta.say $1 $mta.name($1,%a) is idle for: $mta.idle($1,%a).time)
 elseif (($3 == !hp) || ($3 == !health)) $iif(%a == -1,mta.msg $1 $2 Error - Absent ID,mta.say $1 $mta.name($1,%a) $+ 's health: $mta.health($1,%a))
 elseif (($3 == !car) || ($3 == !vehicle)) $iif(%a == -1,mta.msg $1 $2 Error - Absent ID,mta.say $1 $iif($mta.vehicle($1,%a).name == foot,$mta.name($1,%a) is currently on foot. Health: $mta.health($1,%a) $+ %,$mta.name($1,%a) is currently $iif($findtok(11 12 13 50,$mta.vehicle($1,%a),1,32),flying,driving) a $mta.vehicle($1,%a).name $+ . $iif($findtok(11 12 13 50,$mta.vehicle($1,%a),1,32),Vehicle,Helicopter) Health: $mta.health($1,%a).vehicle $+ %))
 elseif (!loc* iswm $3) $iif(%a == -1,mta.msg $1 $2 Error - Absent ID,mta.say $1 $mta.name($1,%a) $+ 's location: $mta.area($1,%a))
 elseif ($3 == !time) mta.say $1 Current time: $time($GMT) GMT
 elseif (!count* iswm $3) {
   var %i = 3,%a = 0
   if (($4 isnum) && ($4 <= 5)) %i = $4
   while (%i >= 1) { .timer 1 %a mta.say $1 %i | !dec %i | !inc %a }
   .timer 1 %a mta.say $1 GOGOGO!!!
 }
 elseif ($findtok(!out !in,$3,1,32)) {
   var %a = 0,%b = 0,%c = $findtok(!out !in,$3,1,32)
   while (%a <= $mta.maxplayers($1)) {
     if ($mta.status($1,%a) == %c) %b = %b + 1
     !inc %a
   }
   mta.say $1 There $iif(%b == 1,is,are) %b $iif(%b == 1,player,players) $iif(%c == 1,out,in) game.
 }
 elseif ($3 == !list) {
   if ($findtok(in out,$4,1,32)) {
     var %a = 0,%b,%c,%d
     while (%a <= $mta.maxplayers($1)) {
       if ($4 == in) %b = 2
       elseif ($4 == out) %b = 1
       if ($mta.status($1,%a) == %b) {
         if (!%c) %c = $mta.name($1,%a)
         elseif ($numtok(%c,32) <=  %c = %c $+ , $mta.name($1,%a)
         elseif (!%d) %d = $mta.name($1,%a)
         else %d = %d $+ , $mta.name($1,%a)
       }
       !inc %a
     }
     mta.say $1 $iif(%c,Players $4 $+ -game: %c,There are no Players $4 $+ -Game)
     if (%d) mta.say $1 %d
   }
   else mta.msg $1 $2 Error - Syntax: $3 
 }
 if (!stat* iswm $3) {
   if (%a == -1) mta.msg $1 $2 Error - Absent ID.
   else {
     mta.say $1 Stats for $mta.name($1,%a) - Kills: $mta.kills($1,%a) $+ , Deaths: $mta.deaths($1,%a) $+ , Spree: $mta.spree($1,%a)
     mta.say $1 Overall - Kills: $my.kills($1,%a) $+ , Deaths: $my.deaths($1,%a) $+ , Ratio: $round($calc($my.kills($1,%a) / $my.deaths($1,%a)),4) $+ , Score: $calc($my.kills($1,%a) - $my.deaths($1,%a)) $+ , Best Spree: $my.spree($1,%a)
   }
 } 
 elseif ($mta.level($1,$2) >= 2) {
   if ($mta.level($1,$2) >= 3) {
     if ($mta.level($1,$2) >= 4) {
       if ($mta.level($1,$2) >= 5) {
         if ($mta.level($1,$2) >= 6) {
           if ($mta.level($1,$2) >= 7) {
             if ($mta.level($1,$2) >=  {
               if ($mta.level($1,$2) >= 9) {
                 if ($mta.level($1,$2) >= 10) {
                   ;LEVEL 10 COMMANDS
                   if ($3 == !setlevel) {
                     if (!$5) mta.msg $1 $2 Error - Syntax: !setlevel 
                     elseif (%a == -1) mta.msg $1 $2 Error - Absent ID
                     elseif ($5 !isnum) mta.msg $1 $2 Error - Please enter a numeric admin level.
                     elseif (($5 < 1) || ($5 > 10)) mta.msg $1 $2 Error - $5 is an invalid admin level.
                     elseif ($mta.level($1,%a) == 0) mta.msg $1 $2 Error - $mta.name($1,%a) is not registered with the server
                     else {
                       mta.say $1 $mta.name($1,%a) $+ 's level changed from $mta.level($1,%a) to $5 by $mta.name($1,$2)
                       !writeini " $+ $scriptdir $+ mta.nickserv.ini" $mta.name($1,%a) level $5
                       !writeini " $+ $mta.dir $+ $1.ini" ID $+ %a level $5
                     }
                   }
                   elseif ($3 == !clankick) {
                     mta.say $1 All members of $4 clan kicked by $mta.name($1,$2) $+ ! $iif($5,Reason: $5-,No Reason)
                     var %b = 0
                     while (%b <= $mta.maxplayers($1)) {
                       if (($4 isin $mta.name($1,%b)) && (%b != $2)) mta.kick $1 %b
                       !inc %b
                     }
                   }
                   elseif ($3 == !clanban) {
                     mta.say $1 All members of $4 clan has banned by $mta.name($1,$2) $+ ! $iif($5,Reason: $5-,No Reason)
                     var %b = 0
                     while (%b <= $mta.maxplayers($1)) {
                       if (($4 isin $mta.name($1,%b)) && (%b != $2)) mta.ban $1 %b
                       !inc %b
                     }
                   }
                 }
                 ;LEVEL 9 COMMANDS
                 if ($3 == !subnetban) {
                   if ($2 == %a) mta.msg $1 $2 Error - Can't ban yourself.
                   elseif (%a == -1) mta.msg $1 $2 Error - Absent ID
                   else {
                     var %b = $gettok($mta.ip($1,%a),1-2,46)
                     mta.say $1 $mta.name($1,%a) $+ 's subnet $+(%b $+ .0.0) banned.
                     mta.ban $1 %a
                     mta.addban $1 %b $+ .0.0
                   }
                 }
               }
               ;LEVEL 8 COMMANDS
               if ($3 == !ban) {
                 if (%a == -1) mta.msg $1 $2 Error - Absent ID
                 elseif (%a == $2) mta.msg $1 $2 Error - Can't ban yourself.
                 else {
                   mta.say $1 $mta.name($1,%a) has been banned by $mta.name($1,$2) $+ . $iif($5,Reason: $5-)
                   mta.ban $1 %a $5-
                 }
               }
               elseif ($3 == !addban) {
                 if (*.*.*.* iswm $4) {
                   mta.addban $1 $4
                   mta.say $1 IP ' $+ $4 $+ ' banned.
                 }
               }
             }
             ;LEVEL 7 COMMANDS

           }
           ;LEVEL 6 COMMANDS
           if ($3 == !constant) {
             if ($findtok(off sun cloud rain fog,$4,1,32)) {
               set %constantw $4
               mta.say $1 Constant weather set to: $4
               mta.setweather $1 $replace($4,cloud,1,rain,2,fog,3,sun,0)
             }
           }
         }
         ;LEVEL 5 COMMANDS
         if ($3 == !kick) {
           if (%a == -1) mta.msg $1 $2 Error - Absent ID
           elseif (%a == $2) mta.msg $1 $2 Error - Can't kick yourself.
           else {
             mta.say $1 $mta.name($1,%a) has been kicked by $mta.name($1,$2) $+ . $iif($5,Reason: $5-)
             mta.kick $1 %a
           }
         }
       }
       ;LEVEL 4 COMMANDS
       if ($3 == !slap) {
         if (%a == -1) mta.msg $1 $2 Error - Absent ID
         elseif (%a == $2) mta.msg $1 $2 Error - Can't slap yourself
         else {
           if (($5 isnum) && ($5 <= 5)) .timer $5 0 mta.slap $1 %a
           else mta.slap $1 %a
         }
       }
     }
     ;LEVEL 3 COMMANDS
     if ($3 == !ip) {
       if (%a == -1) mta.msg $1 $2 Error - Absent ID
       else mta.msg $1 $2 $mta.name($1,%a) $+ 's IP: $mta.ip($1,%a)
     }
   }
   ;LEVEL 2 COMMANDS
   if ($3 == !settime) mta.settime $1 $4
   elseif ($findtok(!sun !fog !cloud !rain,$3,1,32)) mta.setweather $1 $replace($3,!cloud,1,!rain,2,!fog,3,!sun,0)

 }
}
on *:SIGNAL:mta.join:{
 if ($findtok(login register admin,$mta.name($1,$2),1,32)) {
   mta.msg $1 $2 Sorry, $+(',$mta.name($1,$2),') is an illegal nick, please change.
   mta.kick $1 $2
 }
 elseif ($readini($scriptdir $+ mta.nickserv.ini,$mta.name($1,$2),level)) {
   var %a = $readini($scriptdir $+ mta.nickserv.ini,$mta.name($1,$2),level)
   if ($mta.ip($1,$2) == $readini($scriptdir $+ mta.nickserv.ini,$mta.name($1,$2),ip)) {
     mta.say $1 $iif(%a >= 6,Admin,$iif(%a >= 2,Moderator,Registered player)) $mta.name($1,$2) auto-logged in. (Status level: %a $+ )
     !writeini " $+ $mta.dir $+ $1.ini" ID $+ $2 level %a
   }
   else {
     mta.msg $1 $2 Nick $+(',$mta.name($1,$2),') is registered with the server. You have 30 seconds to login.
     mta.msg $1 $2 To login type '/msg login '
     $+(.timer,login,$1,$2) 1 30 mta.kick $1 $2
   }
 }
 else mta.msg $1 $2 Hi mta.name($1,$2) Welcome Lithrein dm/rpg/gw Please Register To Support The Cause '/msg register '
}
on *:SIGNAL:mta.pm:{
 if ($3 == login) {
   if (!$4) mta.msg $1 $2 Error - missing password.
   elseif (($left($4,1) == $chr(60)) && ($right($4,1) == $chr(62))) mta.msg $1 $2 Please enter your pass without <> signs
   elseif ($4 != $readini($scriptdir $+ mta.nickserv.ini,$mta.name($1,$2),password)) mta.msg $1 $2 Wrong password.
   else {
     var %a = $readini($scriptdir $+ mta.nickserv.ini,$mta.name($1,$2),level)
     mta.say $1 $iif(%a >= 6,Admin,$iif(%a >= 2,Moderator,Registered player)) $mta.name($1,$2) logged in. (Status level: %a $+ )
     !writeini " $+ $mta.dir $+ $1.ini" ID $+ $2 level %a
     !writeini " $+ $scriptdir $+ mta.nickserv.ini" $mta.name($1,$2) ip $mta.ip($1,$2)
     $+(.timer,login,$1,$2) off
   }
 }
 elseif ($3 == register) {
   if (!$4) mta.msg $1 $2 Error - missing password.
   elseif (($left($4,1) == $chr(60)) && ($right($4,1) == $chr(62))) mta.msg $1 $2 Please enter your pass without <> signs
   else {
     mta.say $1 $mta.name($1,$2) registered and auto-logged in!
     !writeini " $+ $scriptdir $+ mta.nickserv.ini" $mta.name($1,$2) ip $mta.ip($1,$2)
     !writeini " $+ $scriptdir $+ mta.nickserv.ini" $mta.name($1,$2) password $4
     !writeini " $+ $scriptdir $+ mta.nickserv.ini" $mta.name($1,$2) level 1
     !writeini " $+ $mta.dir $+ $1.ini" ID $+ $2 level 1
   }
 }
}
on *:SIGNAL:mta.part:{
 $+(.timer,login,$1,$2) off
}

;CONSTANT WEATHER CHANGE
on *:SIGNAL:mta.event:{
 if ((%constantw) && (%constantw != off)) {
   if (Weather isin $2-) {
     if ($mta.weather($1) != %constantw) mta.setweather $1 $replace(%constantw,cloud,1,rain,2,fog,3,sun,0)
   }
 }
}

;SPAWN MESSAGES
on *:SIGNAL:mta.spawn:{
 mta.say $1 $mta.name($1,$2) spawned as $mta.skin($1,$2).name
}

;STATS LOG
on *:SIGNAL:mta.kill:{
 if (!$hget(mta.spree)) !hmake mta.spree 100
 if ($3 != $2) {
   !writeini " $+ $scriptdir $+ mta.stats.ini" KILLS $mta.name($1,$3) $calc($my.kills($1,$3) + 1)
   !hadd mta.spree $mta.name($1,$3) $calc($mta.spree($1,$3) + 1)
   if ($mta.spree($1,$3) > $my.spree($1,$3)) !writeini " $+ $scriptdir $+ mta.stats.ini" SPREE $mta.name($1,$3) $calc($my.spree($1,$3) + 1)
 }
 !writeini " $+ $scriptdir $+ mta.stats.ini" DEATHS $mta.name($1,$2) $calc($mta.deaths($1,$2) + 1)
 !hdel mta.spree $mta.name($1,$2)
}
on *:LOAD:{
 if (!$exists($scriptdir $+ mta.nickserv.ini)) {
   var %a = $input(Welcome to the 10 levels Admin-Sytem setup $lf $+ Enter your nickname to login with:,eod,Admin-System by lil_Toady),%b = $input(Enter your password:,eod,Admin-System by lil_Toady),%c = $input(Admin-System configured! $lf $+ Nickname: %a $+ , Password: %b ,o,Admin-System by lil_Toady)
   !writeini " $+ $scriptdir $+ mta.nickserv.ini" %a password %b
   !writeini " $+ $scriptdir $+ mta.nickserv.ini" %a level 10
 }
}

and

on *:SIGNAL:mta.command: { 
 if ($3 == !alarm) { 
   if (($mta.vehicle($1,$2).name == foot) || ($mta.vehicle($1,$2).name == Unknown)) mta.msg $1 $2 Error - you need to be in a car 
   elseif ($4 == on) { 
     mta.say $1 Alarm Activated 
     !writeini " $+ $scriptdir $+ alarm.ini" alarm $mta.vehicle($1,$2) on 
   } 
   elseif ($4 == off) { 
     mta.say $1 Alarm DeActivated 
     !writeini " $+ $scriptdir $+ alarm.ini" alarm $mta.vehicle($1,$2) off 
   } 
 } 
} 
on *:SIGNAL:mta.enter:{ 
 if ($readini($scriptdir $+ alarm.ini,alarm,$mta.vehicle($1,$2)) == on) { 
   mta.msg $1 $2 You got 5 seconds to get out of the car or you'll die 
   $+(.timer,$1,.,$2) 1 5 bla.kill $1 $2 
 } 
} 
on *:SIGNAL:mta.exit { 
 $+(.timer,$1,.,$2) off 
} 
alias bla.kill .timer 5 0 mta.slap $1 $2

it dosent work wen i in car and last of all i am making a book and i was trying to make a mta.msg command to mta.name($1,$2) but it nva works i was wondering how to make it a read ini script with diff numbers for diff chapters so when

som 1 goes !book it reads then after that u go !booknext and reeds next chapter
Link to comment

i ahve another guestion i want to make a script iwth seeveral commands but i dont know how for example:

on *:SIGNAL:mta.command:{

!blahblah (this command)works

but now i try to add another(in the same script) command:

on *:SIGNAL:mta.command:{

!blahblah2 (this one dont work

i also try ed to do }

}

between it but taht also doesnt work

Link to comment

lol thanks hmm i need a toutor i can script a lil but i dont under stand much i hav a propasition 4 any 1 who wants to b lvl 10 admin on a dedicatd server only to say wat they mean and what they do and how to write em or is there a toturial 4 dat hmm

Link to comment

i made a script but i need to make for only admin or mod

on *:SIGNAL:mta.command:{
 var %a = $iif($4,$iif($mta.name($1,$4) != Unknown,$4,$mta.getid($1,$4)),$2) 
 if ($3 == !blahhh)
 if (%a == -1) mta.msg $1 $2 Error - Absent ID
 mta.msg $1 $2 balh $mta.name($1,$2) Blah
 ($4 != $readini($scriptdir $+ mta.nickserv.ini,$mta.name($1,$2),level))
   else mta.msg $1 $2 Server: You are not Moderator or Admin.

Link to comment
  • Recently Browsing   0 members

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