Author Topic: 2 script requests.  (Read 2264 times)

0 Members and 1 Guest are viewing this topic.

Offline Gboost

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
2 script requests.
« on: 25 April, 2008, 18:34:04 »
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.

PtokaX forum

2 script requests.
« on: 25 April, 2008, 18:34:04 »

Offline Madman

  • Scripter
  • Emperor
  • ******
  • Posts: 1 316
  • Karma: +75/-1
Re: 2 script requests.
« Reply #1 on: 25 April, 2008, 19:44:57 »
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

Offline Madman

  • Scripter
  • Emperor
  • ******
  • Posts: 1 316
  • Karma: +75/-1
Re: 2 script requests.
« Reply #2 on: 25 April, 2008, 20:29:18 »
Code: [Select]
-- 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

Offline Gboost

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: 2 script requests.
« Reply #3 on: 27 April, 2008, 01:25:49 »
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.

Offline Gboost

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: 2 script requests.
« Reply #4 on: 28 April, 2008, 18:01:36 »
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.

PtokaX forum

Re: 2 script requests.
« Reply #4 on: 28 April, 2008, 18:01:36 »