PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: kbeh273300 on 30 October, 2003, 05:44:04

Title: help!! web reg script
Post by: kbeh273300 on 30 October, 2003, 05:44:04
i have a script that i want to use but i have a problem i was hopeing someone could help me out please.
the problem i have is that the script creates a new profile for a user that has been reged via the web but my hub bot cb4.3c-fix doesnt understand so i cant upgrade there status.is there anyway i someone can mode the script to work with a profile that is already there like newbie? so that when it reges the user the user will be given the newbie status that my script can understand? btw the profile for newbie is 4


function Main()
   SetTimer(60000)
   StartTimer()
   AddProfile("User", 2147500032)
end


function OnTimer()
--// Read a complete RegUserQueue.dat file line for line and print them in the mainchat
   readfrom("../RegUserQueue.dat")
   while 1 do
      local line = read()
      
      if (line == nil) then
         break
      else
         AddRegUser(strsub(line, 1, strfind(line, "|") - 1), strsub(line, strfind(line, "|") + 1), GetProfileIdx("User"))
      end
   end
   readfrom()
--// call readfrom() at the end to close the file


--// Purge the RegUserQueue.dat file
   writeto("../RegUserQueue.dat")
   write("")
   writeto()
--// call writeto() at the end to close the file
end


--// function NewUserConnected(curUser)
   --// if (curUser.iProfile = -1 and [curUser.sName ~= "zSearch[moglo]" or curUser.sName ~= "7www.glosearch.tk"]) then
      --// This is where we would kick non registered users but not GloSearch users!
   --// end
--// end

-----------------------------------------------------------------
also it is supose to print in main chat i think that user has been reged ?