• Welcome to Vice City Multiplayer.
 

Computer Information Script

Started by Tommis, June 12, 2007, 05:56:44 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Amenine


thijn

Quote from: rulk on November 26, 2008, 10:43:18 AM

alias vcmp.cpu {
  var %ram = $round($calc($dll(ProcInfo.dll,GetRam,memory) / 1023),0), %ramfree = $round($calc($dll(ProcInfo.dll,GetRam,memoryavail) / 1023),0), %ram.p $dll(ProcInfo.dll,GetRam,p100use), %ram.pfree $dll(ProcInfo.dll,GetRam,p100avail)
  var %ut.mir = $duration($calc($uptime(mirc)/1000),2), %ut.ser = $duration($calc($uptime(server)/1000),2), %ut.sys = $duration($calc($uptime(system)/1000),2)
  var %cpu.proc = $dll(ProcInfo.dll,GetCpu,.), %cpu.mnu = $dll(ProcInfo.dll,GetCpuVendor,.) %cpu.speed = $dll(ProcInfo.dll,GetCpuSpeed,mhz), %cpu.use = $dll(ProcInfo.dll,GetCpuUsage,.)
  vcmp.say $1 Ram - Totall: %ram $+ MB $+ , Free: %ramfree $+ MB $+ , Free: %ram.pfree $+ %
  vcmp.say $1 Uptime - mIRC: %ut.mir $+ , System: %ut.sys
  vcmp.say $1 CPU - Type: $gettok(%cpu.mnu,1,32) $+ , Speed: $round($calc($gettok(%cpu.mnu,3,32) / 1000),2) $+ GHz $+ , Usage: %ram.p $+ %
}



  elseif (!comp* iswm $3) {
    if (%timer.status) vcmp.say $1 Error - This Command can only be used Once every 2 Seconds
    else {
      vcmp.cpu $1
      set %timer.status 1
      !timer 1 2 unset %timer.status
    }
  }

I think it must be somthing like:

alias vcmp.cpu {
  var %ram = $round($calc($dll(ProcInfo.dll,GetRam,memory) / 1023),0), %ramfree = $round($calc($dll(ProcInfo.dll,GetRam,memoryavail) / 1023),0), %ram.p $dll(ProcInfo.dll,GetRam,p100use), %ram.pfree $dll(ProcInfo.dll,GetRam,p100avail)
  var %ut.mir = $duration($calc($uptime(mirc)/1000),2), %ut.ser = $duration($calc($uptime(server)/1000),2), %ut.sys = $duration($calc($uptime(system)/1000),2)
  var %cpu.proc = $dll(ProcInfo.dll,GetCpu,.), %cpu.mnu = $dll(ProcInfo.dll,GetCpuVendor,.) %cpu.speed = $dll(ProcInfo.dll,GetCpuSpeed,mhz), %cpu.use = $dll(ProcInfo.dll,GetCpuUsage,.)
  vcmp.say Ram - Totall: %ram $+ MB $+ , Free: %ramfree $+ MB $+ , Free: %ram.pfree $+ %
  vcmp.say Uptime - mIRC: %ut.mir $+ , System: %ut.sys
  vcmp.say CPU - Type: $gettok(%cpu.mnu,1,32) $+ , Speed: $round($calc($gettok(%cpu.mnu,3,32) / 1000),2) $+ GHz $+ , Usage: %ram.p $+ %
}


and Command:

elseif (comp* iswm $3) {
if (%timer.status) vcmp.say Error - This Command can only be used Once every 2 Seconds
else {
vcmp.cpu
set %timer.status 1
!timer 1 2 unset %timer.status
}
}