PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: Genius on 12 September, 2005, 22:10:57

Title: Problem in the script 2
Post by: Genius on 12 September, 2005, 22:10:57
Hi ppl

I have a problem in this script


--## Iniciu do Script LUA 5 ##--
--## Script adaptado DvdRip.sytes.net por [NT]Genius ##--


kb = 1024
mb = 1024 ^ 2
gb = 1024 ^ 3

MinShare = 10240*mb -- in MBs
MinSlots = 3
MaxHubs = 6
tImmune = { ["[SP]????r??h??"] = 1, ["[SP]_minimal_man_"] = 1, ["[TL]TheThunder"] = 1, ["[SP]-?DiOsPiRo?-"] = 1, ["[TVT](???fLuSh???)"] = 1, ["[SP]????????r??"] = 1 } --## Non-Operators Immune List (["nick"] = 1) ##--

DoShareUnits = function(intSize)
   if intSize ~= 0 then
      local tUnits = { "Bytes", "KB", "MB", "GB", "TB" }
      intSize = tonumber(intSize);
      local sUnits;
      for index = 1, table.getn(tUnits) do
         if(intSize < 1024) then sUnits = tUnits[index]; break; else intSize = intSize / 1024; end
      end
      return string.format("%0.1f %s",intSize, sUnits);
   else
      return "nothing"
   end
end

ConnectToMeArrival = function(curUser,data)
   if not curUser.bOperator then
      if not tImmune[curUser.sName] then
         if curUser.iShareSize < MinShare then
            return curUser:SendPM("*** --=( Boas, voss? tem pouca partilha. O minimo ? de [ "..DoShareUnits(MinShare).." ] = [ 10gb ]. Abra o seu espirito de partilha, e d? mais algum contributo. At? l? ficar? impossibilitado de efectuar downloads. )=--  --=( DvdRip.sytes.net )=--"),1
         elseif curUser.iSlots < MinSlots then
            return curUser:SendPM("*** --=( Boas, voss? tem poucas slots abertas. O minimo ? de "..MinSlots.." slots. Abra 3 a 5 slots para puder efectuar downloads no Hub. )=--  --=( DvdRip.sytes.net )=--"),1
         elseif (curUser.iNormalHubs + curUser.iRegHubs) > MaxHubs then
            return curUser:SendPM("*** --=( Boas, Voss? esta ligado a demasiados Hubs. O limite maximo ? de "..MaxHubs..". Pf Desligue-se de alguns. At? l? fica impossibilitado de efectuar downloads. )=--  --=( DvdRip.sytes.net )=--"),1
         end
      end
   end
end

RevConnectToMeArrival = ConnectToMeArrival

--## Fim do Script LUA 5 ##--



Ppl no receive this messages


curUser:SendPM("*** --=( Boas, voss? tem pouca partilha. O minimo ? de [ "..DoShareUnits(MinShare).." ] = [ 10gb ]. Abra o seu espirito de partilha, e d? mais algum contributo. At? l? ficar? impossibilitado de efectuar downloads. )=--  --=( DvdRip.sytes.net )=--"),1
         elseif curUser.iSlots < MinSlots then
            return curUser:SendPM("*** --=( Boas, voss? tem poucas slots abertas. O minimo ? de "..MinSlots.." slots. Abra 3 a 5 slots para puder efectuar downloads no Hub. )=--  --=( DvdRip.sytes.net )=--"),1
         elseif (curUser.iNormalHubs + curUser.iRegHubs) > MaxHubs then
            return curUser:SendPM("*** --=( Boas, Voss? esta ligado a demasiados Hubs. O limite maximo ? de "..MaxHubs..". Pf Desligue-se de alguns. At? l? fica impossibilitado de efectuar downloads. )=--  --=( DvdRip.sytes.net )=--"),1


Please chenge the script cod and make a new

EX: user login in the hub and receive this

Hi user xxx your ip is xxx your share is xxx
You need open 3 slots and max hub 6
God downloads

Sory about my bad inglish
Title:
Post by: Genius on 12 September, 2005, 22:15:06
Hi

Please make this too in the script

ex:

Min version dc++
min version odc
min version strongdc
min version ldc++

If user dont have the min version dc cant downloads. and receive a message on login

Its possible make this?