PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: Krysalis on 25 June, 2005, 23:22:22

Title: [RegShow 1.1]
Post by: Krysalis on 25 June, 2005, 23:22:22
--++++++++++++++++++++++++++++++++++++++++++++++++++++
--RegShow 1.0 by ??? (Don?t know author, tell me, the i will put in++++
--Convertet to Lua5 by Krysalis+++++++++++++++++++++++++++++
--Little changes by Krysalis (1.1)++++++++++++++++++++++++++++++++
--Shows reguser sortet by Profiles+++++++++++++++++++++++++++
--Shows +reguser in alphabetical Order+++++++++++++++++++++++
--++++++++++++++++++++++++++++++++++++++++++++++++++++


--++++++++++++++++++++++++++++++++++++++++++++++++++++
--Set to everything you want+++++++++++++++++++++++++++++++
--++++++++++++++++++++++++++++++++++++++++++++++++++++
command = "+regusers"
BotName = "??????RegUser?????"
Owner = "Krysalis"

--++++++++++++++++++++++++++++++++++++++++++++++++++++
--Change [Profiles] to your personal PtokaX Profiles+++++++++++++
--++++++++++++++++++++++++++++++++++++++++++++++++++++

PROFILE = {
   ["Anw?rter"] = "\r\n   ???Anw?rter??? ",
   ["User"] = "\r\n   ???User??? ",
   ["Stammie"] = "\r\n   ???User??? ",
   ["D-User"] = "\r\n   ???D?User???",
   ["Vip"] = "\r\n   ???VIP?User???",
   ["S-Vip"] = "\r\n   ???S-VIP?User???",
   ["Superuser"] = "\r\n   ???Super?User??? ",
   ["PHO"] = "\r\n   ???Partner?Hub?Operator??? ",
   ["Moderator"] = "\r\n   ???Moderator???",
   ["Operator"] = "\r\n   ???Operator???",
   ["S-Operator"] = "\r\n   ???S-Operator???",
   ["Master"] = "\r\n    ???Master???"
   }

function ChatArrival(curUser,data)
   data = string.sub(data,1,string.len(data)-1)
s,e,cmd = string.find(data,"%b<>%s+(%S+)")
cmd = string.lower(cmd)
if (cmd==command) then
       Msg = "\r\n"
ShowRegistered(curUser.sName)
       curUser:SendData(BotName, Msg)
return 1
  end
end

--++++++++++++++++++++++++++++++++++++++++++++++++++++
--Change [Profiles] to your personal PtokaX Profiles+++++++++++++
--++++++++++++++++++++++++++++++++++++++++++++++++++++

function ShowRegistered()
ViewRegs("Master")
ViewRegs("S-Operator")
ViewRegs("Operator")
ViewRegs("Moderator")
ViewRegs("PHO")
ViewRegs("S-Vip")
ViewRegs("Vip")
ViewRegs("Superuser")
ViewRegs("D-User")
ViewRegs("Stammie")
ViewRegs("User")
ViewRegs("Anw?rter")
Msg = Msg.."\r\n\tEnd of List"
end


function ViewRegs(Level)
   tabelle = nil
   if tonumber(Level) then
      if GetProfileName(Level) then
         Level = GetProfileName(Level)
         tabelle = GetUsersByProfile(Level)
      end
   else
      tabelle = GetUsersByProfile(Level)
   end
   if type(tabelle) == "table" then
      if table.getn(tabelle) == 0 then
         Msg = Msg.."\r\n ".."Kein User gereggt mit Profil: "..Level.."\r\n"
      else
-- SendToNick(Owner, tempMsg)
         Msg = Msg.."\r\n"..PROFILE[Level]
         Msg = Msg.."\r\n????????????????????????????????????????"
         for i=1,table.getn(tabelle) do
            local _,_,ProfileName = string.find(tabelle[i],"(%S+)")
            Msg = Msg.."\r\n "..i..".  "..ProfileName..""
         end
         Msg = Msg.."\r\n????????????????????????????????????????"
         Msg = Msg.."\r\n "
      end
   else
      Msg = Msg.."\r\n ".."Kein User gereggt mit Profil: "..Level.."\r\n"
   end

end
[/SIZE]  

Seen a request for a while, so give it a try.
Best Regards
Title:
Post by: Psycho_Chihuahua on 26 June, 2005, 00:38:29
you've missed an "end" at the end ;)
Title:
Post by: Krysalis on 26 June, 2005, 09:39:41
yes, missed to copy ,-) Fixed first Post.

Greets