2 script requests.
 

2 script requests.

Started by Gboost, 25 April, 2008, 18:34:04

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Gboost

Good day folks,

My script request 1 is to make an Anti advertise bot that disables the mainchat and pm when you advertise, you can unlock it by typing a random number that the bot gave you.
and a possibility to kick the advertiser after x times advertising

my 2nd script request is about vips, i like to have a script where people can request a vip status and a message will apear to the operators that there is an user that want to be vip.
I actually taught about to add a option where the user needs a specified prefix before his nickname before he can request the vip status, and after he requested a vip status, the request will be added in a table

I will see what you people think about this, i hope you can make it and wanna make it

Greetz Gboost

+ Sorry for my english.

Madman

I'm working on the Anti advertise request.. just beacuse i like the code idea...
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

Madman

-- Advertise lock
-- Made by Madman
-- Requested by Gboost

--[[
Al is a bot that blocks user from posting URL's in main/pm.
When user post an URL, they will be added to table,
and won't be removed untill they enter the code they been given.

The code is shown with upper case letters, but should be entred without them
So if a code shows like this 1A1A1A1A1A1 the code to enter is 111111 
--]]

tConfig = {
	Trigs = {
		"www%.",
		"http://",
		"ftp://"
	},
	Bot = "Al",
	KickNr = 3,
}

LockedUsers = {}

function ChatArrival(user,data)
	local data = string.sub(string.lower(data),1,-2)
	if LockedUsers[user.sNick] then
		if string.find(data,LockedUsers[user.sNick]["Code"]) then
			LockedUsers[user.sNick] = nil
			Core.SendToUser(user,"<"..tConfig.Bot.."> You have entred correct code, you have been unlocked and can now post in main and pm")
		else
			Args = {}
			for n in string.gmatch(LockedUsers[user.sNick]["Code"], "(%d)") do
				table.insert(Args,n)
			end
			L = {"A","B","C","D","E","F","G","I","J","K","L","M","N","O","P","Q","R","S","T","U","W","X","Y","Z",}
			Code = Args[1]..L[math.random(table.maxn(L))]..Args[2]..L[math.random(table.maxn(L))]..Args[3]..L[math.random(table.maxn(L))]..Args[4]..L[math.random(table.maxn(L))]..Args[5]..L[math.random(table.maxn(L))]..Args[6]
			Core.SendToUser(user,"<"..tConfig.Bot.."> You have advertised, you can't post in main or pm, until you enter the following code without the letters: " ..Code)
		end
		return true
	end
	for _,v in pairs(tConfig.Trigs) do
		if string.find(data,v) then
			local Code = math.random(236589,998624)
			if LockedUsers[user.sNick] then
				LockedUsers[user.sNick]["Count"] = LockedUsers[user.sNick]["Count"] + 1
				if LockedUsers[user.sNick]["Count"] == tConfig.KickNr then
					Core.Kick(user,tConfig.Bot,"You have advertised " ..tConfig.KickNr.. " of times and was there for kicked!")
				end
				Core.SendToUser(user,"<"..tConfig.Bot.."> You have advertised, you can't post in main or pm, until you enter this code in main: " ..LockedUsers[user.sNick]["Code"])
			else
				LockedUsers[user.sNick] = {}
				LockedUsers[user.sNick]["Code"] = Code
				LockedUsers[user.sNick]["Count"] = 1
			end
			Core.SendToUser(user,"<"..tConfig.Bot.."> Advertising is not allowed, your message was blocked and so have you")
			return true
		end
	end
end

ToArrival = ChatArrival


Give this a try.
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

Gboost

Hee,

Well thank you madman for the fast reply, i will try this script tommorow.
This will take bots away probably too..

Greetz Gboost

+ Sorry for my english.

Gboost

I have tested the script, and it works just fine.
Thank you for the fast reply MadMan, and for the nice script.
For the people that are bored, the other script request is still open ;)

Greetz Gboost

+ Sorry for my english.

SMF spam blocked by CleanTalk