Jump to content

points for time you been played on serwer


2paq

Recommended Posts

this gives 2 points for 10 minuts time of play:

- you must play all 10 minutes (time not sumary the time from your last visit)

- dont give if someone have nick Player

pointsfottimefz0.png

it works but yestardey in mIRC say dhat have problem in line wher is write to file ...

please look to this script

Link to comment

why do u use an image to post a script? nobody is able to copy it to try

anyway, i'd do it like that

on *:SIGNAL:mta.join:{
 if ($mta.nick($1,$2) != Player) {
   $+(.timer,mta.points,$1,$2) 0 600 mta.addpoints $1 $2
 }
}
on *:SIGNAL:mta.part:{
 if ($mta.nick($1,$2) != Player) {
   $+(.timer,mta.points,$1,$2) off
 }
}
on *:SIGNAL:mta.disconnect:{
 .timermta.points* off
}
alias mta.addpoints {
 mta.pm $1 $2 You've played for more than 10 minutes and 2 points were added - RESET TIMER!
 !writeini -n " $+ $scriptdir $+ timepoints.ini" TIMEPOINTS $mta.nick($1,$2) $calc($readini($scriptdir $+ timepoints.ini,TIMEPOINTS,$mta.nick($1,$2)) + 2)
}

this will also turn off the timers if you disconnect, it should fix lots off writeini errors in mirc. And those global vars were useless either :P

Edited by Guest
Link to comment

on *:SIGNAL:mta.join:{ 
 if ($mta.nick($1,$2) != Player) { 
   $+(.timer,mta.points,$1,$2) 0 600 mta.addpoints $1 $2 
 } 
} 
on *:SIGNAL:mta.part:{ 
 if ($mta.nick($1,$2) != Player) { 
   $+(.timer,mta.points,$1,$2) off 
 } 
} 
on *:SIGNAL:mta.disconnect:{ 
 .timermta.points* off 
} 
alias mta.addpoints { 
 mta.pm $1 $2 You've played for more than 10 minutes and 2 points were added - RESET TIMER! 
 !writeini -n " $+ $scriptdir $+ timepoints.ini" TIMEPOINTS $mta.nick($1,$2) $calc($readini($scriptdir $+ timepoints.ini,TIMEPOINTS,$mta.nick($1,$2)) + 2) 
}

I think he meant this :roll:

Link to comment
on *:SIGNAL:mta.join:{

if ($mta.name($1,$2) != Player) {

$+(.timer,mta.points,$1,$2) 0 600 mta.addpoints $1 $2

}

}

on *:SIGNAL:mta.part:{

if ($mta.name($1,$2) != Player) {

$+(.timer,mta.points,$1,$2) off

}

}

on *:SIGNAL:mta.disconnect:{

.timermta.points* off

}

alias mta.addpoints {

mta.pm $1 $2 You've played for more than 10 minutes and 2 points were added - RESET TIMER!

!writeini -n " $+ $scriptdir $+ timepoints.ini" TIMEPOINTS $mta.nick($1,$2) $calc($readini($scriptdir $+ timepoints.ini,TIMEPOINTS,$mta.nick($1,$2)) + 2)

}

Link to comment
but what if "Player" change nick??

I think need this (in script lil):

on *:SIGNAL:mta.nick: { 
 if ($mta.nick($1,$2) != Player) $+(!.timermta.points.1.,$2) 0 600 timermta.points $1 $2
} 

Just make sure u match up those timers Cool coz urs is different 2paq,

$+(!.timermta.points,1,$2)

Link to comment

that work and no bug's:

on *:SIGNAL:mta.command: { 
 if ($3 == !tpoints) {
   if ($mta.nick($1,$2) != Player) {
     if ($4 != $null) mta.pm $1 $2 Error - You can chack only yours points!
     else { 
       var %tpoints = $iif($readini($scriptdir $+ points.ini,TIMEPOINTS,$mta.nick($1,$2)),$v1,0)
       mta.text $1 $mta.nick($1,$2) had been played more then $int($calc(%tpoints / 12)) hours and erned for this %tpoints points.
     }
   }
   elseif ($mta.nick($1,$2) == Player) mta.pm $1 $2 Change nick to collect points: Esc --> Settings or /nick 
 } 

on *:SIGNAL:mta.join: {
 if ($mta.nick($1,$2) != Player) $+(!.timermta.points.1.,$2) 0 600 timermta.points $1 $2
}

on *:SIGNAL:mta.nick: { 
 if ($mta.nick($1,$2) != Player) $+(!.timermta.points.1.,$2) 0 600 timermta.points $1 $2
} 

on *:SIGNAL:mta.part: { 
 if ($mta.nick($1,$2) != Player) $+(!.timermta.points.1.,$2) off
}

alias timermta.points {
 mta.pm $1 $2 You've played for more than 10 minutes and 2 points were added - RESET TIMER!
 !writeini -n " $+ $scriptdir $+ points.ini" TIMEPOINTS $mta.nick($1,$2) $iif($readini($scriptdir $+ points.ini,TIMEPOINTS,$mta.nick($1,$2)),$calc($v1 + 2),2)
}

Link to comment
  • Recently Browsing   0 members

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