Jump to content

Solution for slow scripts


SanZoR

Recommended Posts

Hey,

Do anybody know how to fix "slow scripts" problem? I have tried these stuff below:

-----

1. Clearing all .ini's

2. Reloading scripts very often.

3. Reconnecting MTA:mA very often.

4. Closing mIRC for few minutes, and load scripts again (Yes, this worked, but only for few minuts!)

-----

What i should do? :cry:

I run my scripts with very good computer, so computer specs are not a problem...

Please help me with this! :(

PS. Scripts are online 24/7

Link to comment

Mm, im still on my GUS modification :wink:

But i think the problem was money system for DD map winner. But i couldnt fix it myself, so i put my DM script here, if someone can fix or help me with it. Here it goes:

alias mta.end {  
    if (%cplayers == 1) {  
if ($readini(rs.ini,rs,$replace($mta.race($1),$chr(32),-)) == off) { 
      var %a = 0,%b = 0 
      while (%a <= $mta.server($1).cmax) {  
        if ($readini(alive&dead.ini,INFO,%a == Alive)) { 
        if ($mta.nick($1,%a) != $null) {  
        mta.text $1 $mta.nick($1,%a) is winner, and gets one more win and 10$ money! 
          !writeini alive&dead.ini INFO %a DEAD 
          !writeini -n money.ini MONEY $mta.nick($1,$2) $calc($readini(money.ini,MONEY,$mta.nick($1,$2)) + 10) 
          !writeini -n wins.ini WINS $mta.nick($1,%a) $calc($readini(wins.ini,WINS,$mta.nick($1,%a)) + 1) 
          !halt  
        } 
       }  
        !inc %a  
      }  
    }  
  } 
}  
on *:SIGNAL:mta.startrace: { 
var %aa = 0 
  set %cplayers $mta.server($1).players 
  while (%aa <= $mta.server($1).cmax) { 
  !writeini alive&dead.ini INFO %aa Alive 
!inc %aa 
 } 
on *:SIGNAL:mta.endrace: { 
var %a = 0  
  !.remove alive&dead.ini 
!writeini -n bets.ini INFO timer down  
while (%a <= $mta.server($1).cmax) { 
!remini -n bets.ini %a betted 
!remini -n bets.ini %a bet 
!remini -n bets.ini %a money 
!inc %a 
} 
}  
on *:SIGNAL:mta.part: {  
var %a = 0 
  if ($readini(alive&dead.ini,INFO,$2 == Alive)) set %cplayers $calc(%cplayers - 1) 
  !writeini alive&dead.ini INFO $2 DEAD 
  mta.end $1 $2  
}  
on *:SIGNAL:mta.death: {  
  set %cplayers $calc(%cplayers - 1) 
  !writeini alive&dead.ini INFO $2 DEAD  
  mta.end $1 $2  
}  
on *:SIGNAL:mta.connect: {  
  set %cplayers 0  
} 
  
on *:SIGNAL:mta.command:{ 
var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$gus.getid($1,$4)),$2) 
  if ($3 == !players) mta.text $1 Players Alive: %cplayers $+ , Total Players: $mta.server($1).players 
  if ($3 == !gamestat* iswm) { 
var %b = 0 
while (%b <= $mta.server($1).cmax) { 
if ($mta.nick($1,%b) != $null) { 
mta.pm $1 $2 %b - $mta.nick($1,%b) Status: $iif($readini(alive&dead.ini,INFO, %b) == Dead, Dead, Alive) 
} 
!inc %b 
} 
} 
} 
on *:SIGNAL:mta.join: { 
!.timer 2 0 !writeini Alive&Dead.ini INFO $2 dead 
} 

All helps/fixed are welcome!

Thanks in advance!

Link to comment
Mm, im still on my GUS modification :wink:

But i think the problem was money system for DD map winner. But i couldnt fix it myself, so i put my DM script here, if someone can fix or help me with it. Here it goes:

alias mta.end {  
    if (%cplayers == 1) {  
if ($readini(rs.ini,rs,$replace($mta.race($1),$chr(32),-)) == off) { 
      var %a = 0,%b = 0 
      while (%a <= $mta.server($1).cmax) {  
        if ($readini(alive&dead.ini,INFO,%a == Alive)) { 
        if ($mta.nick($1,%a) != $null) {  
        mta.text $1 $mta.nick($1,%a) is winner, and gets one more win and 10$ money! 
          !writeini alive&dead.ini INFO %a DEAD 
          !writeini -n money.ini MONEY $mta.nick($1,$2) $calc($readini(money.ini,MONEY,$mta.nick($1,$2)) + 10) 
          !writeini -n wins.ini WINS $mta.nick($1,%a) $calc($readini(wins.ini,WINS,$mta.nick($1,%a)) + 1) 
          !halt  
        } 
       }  
        !inc %a  
      }  
    }  
  } 
}  
on *:SIGNAL:mta.startrace: { 
var %aa = 0 
  set %cplayers $mta.server($1).players 
  while (%aa <= $mta.server($1).cmax) { 
  !writeini alive&dead.ini INFO %aa Alive 
!inc %aa 
 } 
on *:SIGNAL:mta.endrace: { 
var %a = 0  
  !.remove alive&dead.ini 
!writeini -n bets.ini INFO timer down  
while (%a <= $mta.server($1).cmax) { 
!remini -n bets.ini %a betted 
!remini -n bets.ini %a bet 
!remini -n bets.ini %a money 
!inc %a 
} 
}  
on *:SIGNAL:mta.part: {  
var %a = 0 
  if ($readini(alive&dead.ini,INFO,$2 == Alive)) set %cplayers $calc(%cplayers - 1) 
  !writeini alive&dead.ini INFO $2 DEAD 
  mta.end $1 $2  
}  
on *:SIGNAL:mta.death: {  
  set %cplayers $calc(%cplayers - 1) 
  !writeini alive&dead.ini INFO $2 DEAD  
  mta.end $1 $2  
}  
on *:SIGNAL:mta.connect: {  
  set %cplayers 0  
} 
  
on *:SIGNAL:mta.command:{ 
var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$gus.getid($1,$4)),$2) 
  if ($3 == !players) mta.text $1 Players Alive: %cplayers $+ , Total Players: $mta.server($1).players 
  if ($3 == !gamestat* iswm) { 
var %b = 0 
while (%b <= $mta.server($1).cmax) { 
if ($mta.nick($1,%b) != $null) { 
mta.pm $1 $2 %b - $mta.nick($1,%b) Status: $iif($readini(alive&dead.ini,INFO, %b) == Dead, Dead, Alive) 
} 
!inc %b 
} 
} 
} 
on *:SIGNAL:mta.join: { 
!.timer 2 0 !writeini Alive&Dead.ini INFO $2 dead 
} 

All helps/fixed are welcome!

Thanks in advance!

Link to comment
Mm, im still on my GUS modification :wink:

But i think the problem was money system for DD map winner. But i couldnt fix it myself, so i put my DM script here, if someone can fix or help me with it. Here it goes:

alias mta.end {  
    if (%cplayers == 1) {  
if ($readini(rs.ini,rs,$replace($mta.race($1),$chr(32),-)) == off) { 
      var %a = 0,%b = 0 
      while (%a <= $mta.server($1).cmax) {  
        if ($readini(alive&dead.ini,INFO,%a == Alive)) { 
        if ($mta.nick($1,%a) != $null) {  
        mta.text $1 $mta.nick($1,%a) is winner, and gets one more win and 10$ money! 
          !writeini alive&dead.ini INFO %a DEAD 
          !writeini -n money.ini MONEY $mta.nick($1,$2) $calc($readini(money.ini,MONEY,$mta.nick($1,$2)) + 10) 
          !writeini -n wins.ini WINS $mta.nick($1,%a) $calc($readini(wins.ini,WINS,$mta.nick($1,%a)) + 1) 
          !halt  
        } 
       }  
        !inc %a  
      }  
    }  
  } 
}  
on *:SIGNAL:mta.startrace: { 
var %aa = 0 
  set %cplayers $mta.server($1).players 
  while (%aa <= $mta.server($1).cmax) { 
  !writeini alive&dead.ini INFO %aa Alive 
!inc %aa 
 } 
on *:SIGNAL:mta.endrace: { 
var %a = 0  
  !.remove alive&dead.ini 
!writeini -n bets.ini INFO timer down  
while (%a <= $mta.server($1).cmax) { 
!remini -n bets.ini %a betted 
!remini -n bets.ini %a bet 
!remini -n bets.ini %a money 
!inc %a 
} 
}  
on *:SIGNAL:mta.part: {  
var %a = 0 
  if ($readini(alive&dead.ini,INFO,$2 == Alive)) set %cplayers $calc(%cplayers - 1) 
  !writeini alive&dead.ini INFO $2 DEAD 
  mta.end $1 $2  
}  
on *:SIGNAL:mta.death: {  
  set %cplayers $calc(%cplayers - 1) 
  !writeini alive&dead.ini INFO $2 DEAD  
  mta.end $1 $2  
}  
on *:SIGNAL:mta.connect: {  
  set %cplayers 0  
} 
  
on *:SIGNAL:mta.command:{ 
var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$gus.getid($1,$4)),$2) 
  if ($3 == !players) mta.text $1 Players Alive: %cplayers $+ , Total Players: $mta.server($1).players 
  if ($3 == !gamestat* iswm) { 
var %b = 0 
while (%b <= $mta.server($1).cmax) { 
if ($mta.nick($1,%b) != $null) { 
mta.pm $1 $2 %b - $mta.nick($1,%b) Status: $iif($readini(alive&dead.ini,INFO, %b) == Dead, Dead, Alive) 
} 
!inc %b 
} 
} 
} 
on *:SIGNAL:mta.join: { 
!.timer 2 0 !writeini Alive&Dead.ini INFO $2 dead 
} 

All helps/fixed are welcome!

Thanks in advance!

I need to quote same shit over and over again... Im still looking for help! :arrow:

Link to comment
  • Recently Browsing   0 members

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