Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: D-J Valhala on 02 March, 2004, 00:03:47
Title: commend's for SuperOp
Post by: D-J Valhala on 02 March, 2004, 00:03:47
high all :P i have added in the Ptokax Prog a SuperOp profile but the robocop do not know that profile so the SuperOp can use ONLY in the Ptokax commend... :\ so can anybody write a script with not a lot of commend just +timeban - Timeban a user with a reason, followed by kick +kill - Permanently the user, followed by kick +info - Show all info about a user and +help will show help from .txt file... and please make that the script will know SuperOp + Master
thank's a lot :)))
Title:
Post by: [NL]trucker on 02 March, 2004, 00:22:28
D-J Valhala
this will not work as far as i know robocop knows only 4 profiles
Master OP Vip reg
so a script with other profiles will not work either or it has to be custom made for use with robo and asfar as i know there is a new version on the way from robocop.
they are testing it now :-))
Title:
Post by: D-J Valhala on 02 March, 2004, 01:47:09
yes i know that so you can write it to know only SuperOp and Master
Title:
Post by: nErBoS on 02 March, 2004, 01:54:56
Hi,
The commands that you are asking exists on robocop ?? if yes why don't you ask to the creator to see if he can add that profile in the bot.
Best regards, nErBoS
Title:
Post by: D-J Valhala on 02 March, 2004, 11:29:05
i asked hem and he can't do that... i dont know why but i think that SuperOp have a defrent profile to each ptokax so he can't add this to robo... 10x
Title:
Post by: [NL]trucker on 02 March, 2004, 11:42:21
the commands exist in robocop but he won,t add diffrent profiles yet.
Title:
Post by: D-J Valhala on 02 March, 2004, 11:46:35
i know that so i ask for a litel script why you think i ask? coz great robo do not know SuperOp and all the add alone profiles in ptokax...
Title:
Post by: nErBoS on 02 March, 2004, 14:37:11
Hi,
Does the commands you requested have the same name and prefix as the commands in robocop ??
Best regards, nErBoS
Title:
Post by: D-J Valhala on 02 March, 2004, 15:42:24
mmm yes but you can change it i dont care what is the commend... 10x :D
Title:
Post by: nErBoS on 02 March, 2004, 23:05:40
Hi,
I suppose that the level of your Super OP is 4 then hope it helps...
if (strsub(data,1,1)=="<") or (strsub(data,1,5+strlen(Bot))=="$To: "..Bot) then data=strsub(data,1,strlen(data)-1) s,e,cmd = strfind(data,"%b<>%s+(%S+)") if (cmd=="-timeban") then TimeBan(user,data) return 1 elseif(cmd=="-kill") then Kill(user,data) return 1 elseif(cmd=="-info") then Info(user, data) return 1 end end end
function TimeBan(user,data) if (user.iProfile == 4 or user.iProfile == 0) then local sec = 1000 local min = sec*60 local h = min*60 local day = h*24 local week = day*7 local month = day*30 local year = day*365 local _,_,usr,bantime,reason = strfind(data, "%b<>%s+%S+%s+(%S+)%s+(%S+)%s+(.+)") local _,_,number,timeformat = strfind(bantime, "(%d+)(%S+)") local timeformat = strlower(timeformat) if (usr ~= nil and reason ~= nil) then if (GetItemByName(userName) ~= nil) then local tobebanned = GetItemByName(usr) if timeformat == "hours" or timeformat == "hour" or timeformat == "h" then tobebanned:SendPM(Bot, "You have been banned for "..number.." hours, because: "..reason) SendToAll(Bot, user.sName.." has banned "..usr.." because: "..reason) tobebanned:TimeBan( (tonumber(number)*h)/min ) elseif timeformat == "days" or timeformat == "day" or timeformat == "d" then tobebanned:SendPM(Bot, "You have been banned for "..number.." days, because: "..reason) SendToAll(Bot, user.sName.." has banned "..usr.." because: "..reason) tobebanned:TimeBan( (tonumber(number)*day)/min ) elseif timeformat == "weeks" or timeformat == "week" or timeformat == "w" then tobebanned:SendPM(Bot, "You have been banned for "..number.." weeks, because: "..reason) SendToAll(Bot, user.sName.." has banned "..usr.." because: "..reason) tobebanned:TimeBan( (tonumber(number)*week)/min ) elseif timeformat == "months" or timeformat == "month" or timeformat == "m" then tobebanned:SendPM(Bot, "You have been banned for "..number.." months, because: "..reason) SendToAll(Bot, user.sName.." has banned "..usr.." because: "..reason) tobebanned:TimeBan( (tonumber(number)*month)/min ) elseif timeformat == "years" or timeformat == "year" or timeformat == "y" then tobebanned:SendPM(Bot, "You have been banned for "..number.." years, because: "..reason) SendToAll(Bot, user.sName.." has banned "..usr.." because: "..reason) tobebanned:TimeBan( (tonumber(number)*year)/min ) else end else user:SendPM(Bot, "The user "..usr.." is not in the Hub.") end else user:SendPM(Bot, "Syntax error, -timeban Best regards, nErBoS
Title:
Post by: D-J Valhala on 02 March, 2004, 23:50:00
nope not working...
Title:
Post by: nErBoS on 03 March, 2004, 00:15:50
Not working ???
Everythig ??? Have you tried with the profile master ??
Best regards, nErBoS
Title:
Post by: [NL]trucker on 03 March, 2004, 00:17:59
lol
robo is just acceptng his own commands
i asked OPtimus and he told me he is going to add them when robo v7 is ready
so they will be availlablle after the release of robo v7
in the meantime you cannot have a script with these commands simply because it will not work.
the prefixes arent added to the script yet.
Title:
Post by: D-J Valhala on 03 March, 2004, 13:25:45
only -info work :)
Title:
Post by: nErBoS on 03 March, 2004, 14:56:44
Hi,
The timeban had a little bug fixed, kill is working for me...
if (strsub(data,1,1)=="<") or (strsub(data,1,5+strlen(Bot))=="$To: "..Bot) then data=strsub(data,1,strlen(data)-1) s,e,cmd = strfind(data,"%b<>%s+(%S+)") if (cmd=="-timeban") then TimeBan(user,data) return 1 elseif(cmd=="-kill") then Kill(user,data) return 1 elseif(cmd=="-info") then Info(user, data) return 1 end end end
function TimeBan(user,data) if (user.iProfile == 4 or user.iProfile == 0) then local sec = 1000 local min = sec*60 local h = min*60 local day = h*24 local week = day*7 local month = day*30 local year = day*365 local _,_,usr,number,timeformat,reason = strfind(data, "%b<>%s+%S+%s+(%S+)%s+(%d+)(%S+)%s+(.+)") if (usr ~= nil and reason ~= nil) then if (GetItemByName(usr) ~= nil) then local tobebanned = GetItemByName(usr) if timeformat == "hours" or timeformat == "hour" or timeformat == "h" then tobebanned:SendPM(Bot, "You have been banned for "..number.." hours, because: "..reason) SendToAll(Bot, user.sName.." has banned "..usr.." because: "..reason) tobebanned:TimeBan( (tonumber(number)*h)/min ) elseif timeformat == "days" or timeformat == "day" or timeformat == "d" then tobebanned:SendPM(Bot, "You have been banned for "..number.." days, because: "..reason) SendToAll(Bot, user.sName.." has banned "..usr.." because: "..reason) tobebanned:TimeBan( (tonumber(number)*day)/min ) elseif timeformat == "weeks" or timeformat == "week" or timeformat == "w" then tobebanned:SendPM(Bot, "You have been banned for "..number.." weeks, because: "..reason) SendToAll(Bot, user.sName.." has banned "..usr.." because: "..reason) tobebanned:TimeBan( (tonumber(number)*week)/min ) elseif timeformat == "months" or timeformat == "month" or timeformat == "m" then tobebanned:SendPM(Bot, "You have been banned for "..number.." months, because: "..reason) SendToAll(Bot, user.sName.." has banned "..usr.." because: "..reason) tobebanned:TimeBan( (tonumber(number)*month)/min ) elseif timeformat == "years" or timeformat == "year" or timeformat == "y" then tobebanned:SendPM(Bot, "You have been banned for "..number.." years, because: "..reason) SendToAll(Bot, user.sName.." has banned "..usr.." because: "..reason) tobebanned:TimeBan( (tonumber(number)*year)/min ) else end else user:SendPM(Bot, "The user "..usr.." is not in the Hub.") end else user:SendPM(Bot, "Syntax error, -timeban TimeBan use like this...
-timeban nerbos 10h byeeee
10h = means 10 hours 10d = means 10 days 10w = means 10 weeks 10m = means 10 months 10y = menas 10 years.