PtokaX forum

Archive => Archived 5.1 boards => Finished Scripts => Topic started by: 6Marilyn6Manson6 on 24 July, 2006, 14:32:16

Title: ReG BoT
Post by: 6Marilyn6Manson6 on 24 July, 2006, 14:32:16
--// ReG BoT made by 6Marilyn6Manson6   22/07/2006
------------------------------------------------------
tSetBotName = "ReG"
------------------------------------------------------
function Main()
if tSetBotName ~= frmHub:GetHubBotName() then
frmHub:RegBot(tSetBotName)
end
end
------------------------------------------------------
function ChatArrival(usr, data)
data = string.sub(data,1,string.len(data)-1)
local s,e,cmd = string.find(data, "%b<>%s+(%S+)")
if (usr.iProfile ~= -1) then
usr:SendPM(tSetBotName, "Your can't use !regme command ;).")
end
if (usr.iProfile == -1) then
if (cmd == "!regme") then
local s,e,sPass = string.find(data, "%b<>%s+%S+%s+(%S+)")
if (sPass == nil) then
usr:SendPM(tSetBotName, "Syntax Error, !regme <password>, you must write a password.")
elseif (string.find(sPass, "[%c|\n\r]")) then
usr:SendPM(tSetBotName, "Invalid Password. Try Again.")
elseif (string.find(usr.sName, "[%c|\n\r]")) then
usr:SendPM(tSetBotName, "Your nick is invalid. Please choose a new one.")
else
AddRegUser(usr.sName,sPass,3)
usr:SendPM(tSetBotName, "You are Registered now. Nick: "..usr.sName.." , Password: "..sPass.." . Please reconnect to make effect ;).")
end
end
return 1
end
end
------------------------------------------------------
function ToArrival(usr, data)
local s,e,to,from,text = string.find(data, "%$To:%s(%S+)%sFrom:%s(%S+)%s$(.*)$")
if to == tSetBotName then
ChatArrival(usr, data)
end
end
------------------------------------------------------
--// 6Marilyn6Manson6
Title: Re: ReG BoT
Post by: Herodes on 28 August, 2006, 08:27:39
Marylin: why don't you try generating a password if the user doesn't provide one ?
Title: Re: ReG BoT
Post by: badtrip on 17 September, 2006, 07:36:41
hello,

Can you add to the script this -> people have to agree with Terms & Conditions before they can reg

using terms&condictions.txt  file ???
Title: Re: ReG BoT
Post by: Samantha on 17 September, 2006, 17:13:08
Another quality scripts by 6M6M6 lol
Title: Re: ReG BoT
Post by: Psycho_Chihuahua on 17 September, 2006, 18:08:12
lmfao indeed
Title: Re: ReG BoT
Post by: Genius on 07 March, 2007, 17:54:19
Hi

Its possible addy this message for this script?

Exemple.

User type !regme password and type enter and bot send a private message whit password/nick but don?t send nothing for main chat

I want a message in main chat.

Exemple:  New user are registred in the hub. Welcome xxxx!

Sory about my bad inglish
Title: Re: ReG BoT
Post by: Thor on 07 March, 2007, 18:19:04
Just one line:
usr:SendPM(tSetBotName, "You are Registered now. Nick: "..usr.sName.." , Password: "..sPass.." . Please reconnect to make effect ;).")
SendToAll(tSetBotName,"Welcome new registered user "..usr.sName.."!")
Title: Re: ReG BoT
Post by: Genius on 07 March, 2007, 19:19:51
Hi again

Its possible add this in one script?

EXample

User type !regme password and type enter but if user don?t have Tag Contry bot don?t reg.
And if its possible i want a table for creat Tag Contrys by respective Range IP