PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: Themaster on 27 November, 2004, 16:53:38

Title: need a reguser script
Post by: Themaster on 27 November, 2004, 16:53:38
Hello PPL.

I need a reguser script that reguser in a that why

+reguser

Title:
Post by: sylvi on 28 November, 2004, 12:52:29
--=-=-=-=-=-=-=-=-=-=--
-- ADD/DEL USER BOT
-- By NightLitch
-- Delete Part from Snowman's Mean Machine
-- Add Part by myself
-- Hope you all like it...
-- levels (reg, vip, op, master)
-- some bugs fixed....
--=-=-=-=-=-=-=-=-=-=--


http://board.univ-angers.fr/thread.php?threadid=432&boardid=11&styleid=1&sid=f7e065355bfb9b1aea70d52c3361fde6
Title:
Post by: Themaster on 28 November, 2004, 16:56:37
Nope don't work...still need a script that don't get to my table...i think that is there is my problem...

PLZ help me
Title:
Post by: Herodes on 29 November, 2004, 00:32:35
try this 1 out ..
--- MyRegger v1
--- by Herodes

--- atm only registers new users ...
--- doesn't allow users to register a level above theirs .. Masters can register any available level ...
--- protects against faulty nicks n passes ..  ("stollen" from nErboS changePassword script)

regBot = "Regger"
regcmd = "!reg"

function DataArrival(user, data)
if user.iProfile ~= -1 then
if strsub(data, 1,1) == "<" then
data = strsub(data, 1, strlen(data)-1)
s,e,cmd = strfind(data, "%b<>%s+(%S+)")
if cmd == regcmd then
s,e,Lvl,nNick,sPass = strfind(data, "%b<>%s+"..regcmd.."%s+(%S+)%s+(%S+)%s+(%S+)")
if tonumber(Lvl) ~= nil then
Lvl = tonumber(Lvl)
if GetProfiles()[Lvl] then
if nNick and not strfind(nNick, "[%c|\n\r]") then
if sPass and not strfind(sPass, "[%c|\n\r]") then
if user.iProfile == 0 or user.iProfile < Lvl then
AddRegUser(nNick , sPass , Lvl)
SendBack("Registered a New "..GetProfileName(Lvl).." with the nick "..nNick.." and the pass "..sPass, user)
local nUser = GetItemByName(nNick)
if nUser then
SendBack("You have been registered by "..user.sName.." as a "..GetProfileName(Lvl), nUser)
SendBack("Your password is "..sPass.." . If you haven't done so please type /fav in the mainchat and edit the Hub info in your Favourite Hubs window" , nUser)
SendBack("Then dont forget to reconnect ;)", nUser)
end
else
SendBack("You may register a user to a level lower than yours.", user)
SendBack("Presently you're an "..GetProfileName(user.iProfile).." ("..user.iProfile..")", user)
end
else
SendBack("Malformed Pass. Try Again", user)
end
else
SendBack("Malformed Nick. Try Again", user, how)
end
else
local pr = ""
for i,v in GetProfiles() do
if i > user.iProfile then
pr = pr.."("..v..") "..i..", "
end
end
SendBack("The specified profile number does not exist ... any of the following "..pr.." will do", user, how )
end
else
SendBack("Syntax Error! : Use like "..regcmd.." " ,user, how)
end
return 1
end
end
end
end

function SendBack(msg, user, how)
if how == nil then
user:SendData(regBot, msg)
else
user:SendPM(regBot, msg)
end
end
Title:
Post by: Themaster on 30 November, 2004, 00:49:48
Nope it still not work...maybe i must doing like GetArg Function....i don't no
Title:
Post by: Herodes on 30 November, 2004, 13:13:00
well , what I know is that, this script works ..

it all depends on what you need to do and how you explain it ..