PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: Markitos on 06 June, 2005, 15:15:39

Title: Right click help
Post by: Markitos on 06 June, 2005, 15:15:39
I usa a right click and sometimes i get this error RightClicker.lua:17: attempt to call global `AdimCMD' (a nil value)

-- Editable Settings --
sBotName = "botname"
sMenu = "botname"

-- End Editable Settings --

function NewUserConnected(user)
if (user.iProfile) == 3 then RegCommands(user)
elseif (user.iProfile) == 2 then VIPCommands(user)

else UserCommands(user)
end
end

function OpConnected(user)
if (user.iProfile) == 1 then OpCommands(user)
elseif (user.iProfile) == 0 then AdimCMD(user)
else NewUserConnected(user)
end
end

function UserCommands(user)
user:SendData("$UserCommand 0 3 |") -- Separator
user:SendData("$UserCommand 1 3 (???Z?n? H????)$<%[mynick]> !faq||")
        user:SendData("$UserCommand 0 3 Commandos Para Usu?rios\\") -- Separator
        user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\Jogos\\Jumble\\a.join - Entrar no jogo$<%[mynick]> a.join ||")
        user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\Jogos\\Jumble\\a.leave - Deixar o jogo$<%[mynick]> a.stop ||")
        user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\Jogos\\Jumble\\a.help - Ajuda$<%[mynick]> a.help ||")
        user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\Jogos\\Jumble\\a.scores - Pontua??es$<%[mynick]> a.scores ||")
        user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\Jogos\\Jumble\\a.myscore - Sua Pontua??o$<%[mynick]> a.myscore ||")
        user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\Jogos\\Jumble\\a.hint - Dica$<%[mynick]> a.hint ||")
        user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\Geral\\!requisitos - Requisitos$<%[mynick]> !requisitos||")
        user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\Geral\\!myhubtime - Seu tempo online no hub$<%[mynick]> !myhubtime||")
        user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\Geral\\!rules - Regras$<%[mynick]> !rules||")
   user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\Geral\\!version - Vers?o do script$<%[mynick]> !version||")        
        user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\Geral\\!showreg - Users por profile (reg/vip/op/mod/master/founder)$<%[mynick]> !showreg %[line:reg/vip/op/mod/master/founder]||")        
   user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\Geral\\!faq - Tutorial Do Dc++$<%[mynick]> !faq||")
        user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\Network\\!mznet - MZ Network$<%[mynick]> !mznet||")        
        user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\!away - Ausentar-Me Do Hub$<%[mynick]> !away %[line:Escreva A Sua Mensagem]||")
   user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\!back - Retornar Do Ausente$<%[mynick]> !back||")
        user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\!regme - Registar-Me$<%[mynick]> !regme %[line:Escreva A Password]||")
   user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\!help - Comandos De Ajuda$<%[mynick]> !help||")
   user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\!myip - Ver Meu N?mero De IP$<%[mynick]> !myip||")
       

end

function RegCommands(user)
UserCommands(user)
          user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\Geral\\!repass - Mudar sua password$<%[mynick]> !repass %[line:Escreva O Nick] %[line:Escreva A Mensagem]||")
                user:SendData("$UserCommand 1 3 Commandos Para Usu?rios\\Geral\\!offline - Offline message$<%[mynick]> !offline %[Mensagem]||")
end


Respectfully...
Title:
Post by: Dessamator on 06 June, 2005, 16:05:50
well, that happens because ur missing a function with the "adim" 's or master's commands !!

hint:
QuoteRegCommands(user) --> function RegCommands(user)
AdimCMD(user) --> ?
Title:
Post by: Markitos on 06 June, 2005, 16:20:47
QuoteOriginally posted by Dessamator
well, that happens because ur missing a function with the "adim" 's or master's commands !!

hint:
QuoteRegCommands(user) --> function RegCommands(user)
AdimCMD(user) --> ?

But can i just delete this elseif (user.iProfile) == 0 then AdimCMD(user) ?

Respectfully
Title:
Post by: Dessamator on 06 June, 2005, 16:37:38
yep !
Title: Markitos try this one
Post by: (NL)waarom on 06 June, 2005, 16:51:57
--Fun-Menu rightclicker
Bot = "Commandos Para Usu?rios"   -- your main bot here
SendComm = 1    -- Send user command [right click] "1"=yes "0"=no
fMenu = "Commandos Para Usu?rios" -- funMenu Name

SetTo = {
 
Title:
Post by: Markitos on 06 June, 2005, 17:37:39
Thnks dessamator nd (NL)waarom for the help!!!
Title:
Post by: Dessamator on 06 June, 2005, 18:04:48
ur welcome !
Title:
Post by: (NL)waarom on 06 June, 2005, 19:07:26
Your Welkom
Title: i have ths part 1
Post by: ?Tr??T_???? on 18 July, 2005, 17:34:01
-- RightClicker for RoboCopv10.01
-- Made by Optimus & TiMeTrAVelleR
-- Optimized and fixed some stuff by [']['?N]Azim
-- Best is not to use it for normal users takes to much bandwidth

aMenu = "Quick Commands"
cMenu = "Hub Control"
eMenu = "Logs"
gMenu = "Misc"
sMenu = "']['h? ?impl? N?']['w?rK"
iMenu = "Hub Security"
kMenu = "Regs"
xMenu = "Games"
yMenu = "']['h? ?impl? N?']['w?rK"



SendTo = { --> 1=on/0=off
[on/off]$<%[mynick]> !cmdspy %[line:on/off]",
["sminslots"]="$UserCommand 1 3 "..cMenu.."\\Config\\Slots/Hubs\\Set script minslots$<%[mynick]> !sminslots %[line:user/reg/vip/op/mod/master/founder] %[line:slots]",
["smaxslots"]="$UserCommand 1 3 "..cMenu.."\\Config\\Slots/Hubs\\Set script maxslots$<%[mynick]> !smaxslots %[line:user/reg/vip/op/mod/master/founder] %[line:slots]",
["smaxhubs"]="$UserCommand 1 3 "..cMenu.."\\Config\\Slots/Hubs\\Set script max hubs$<%[mynick]> !smaxhubs %[line:user/reg/vip/op/mod/master/founder] %[line:hubs]",
["sratio"]="$UserCommand 1 3 "..cMenu.."\\Config\\Slots/Hubs\\Set script slots/hubs ratio$<%[mynick]> !sratio %[line:user/reg/vip/op/mod/master/founder] %[line:slots]",
["sminshare"]="$UserCommand 1 3 "..cMenu.."\\Config\\Sharing/Users\\Set script minshare$<%[mynick]> !sminshare %[line:user/reg/vip/op/mod/master/founder] %[line:share] %[line:mb/gb]",
["smaxshare"]="$UserCommand 1 3 "..cMenu.."\\Config\\Sharing/Users\\Set script maxshare$<%[mynick]> !smaxshare %[line:user/reg/vip/op/mod/master/founder] %[line:share] %[line:mb/gb]",
["hmaxusr"]="$UserCommand 1 3 "..cMenu.."\\Config\\Sharing/Users\\Set max users$<%[mynick]> !hmaxusr %[line:Number]",
["chhubname"]="$UserCommand 1 3 "..cMenu.."\\Config\\Other\\Set hubname$<%[mynick]> !chhubname %[line:New Hubname]",
["chopchat"]="$UserCommand 1 3 "..cMenu.."\\Config\\Other\\Set Op-Chat name$<%[mynick]> !chopchat",
["regserver"]="$UserCommand 1 3 "..cMenu.."\\Config\\Other\\Set regserver address$<%[mynick]> !regserver %[line:New_Reg_Address]",
["autoregister"]="$UserCommand 1 3 "..cMenu.."\\Config\\Other\\Set autoregister [on/off]$<%[mynick]> !autoregister %[line:on/off]",
["hubprotect"]="$UserCommand 1 3 "..cMenu.."\\Config\\Other\\Set hub protection [on/off]$<%[mynick]> !hubprotect %[line:on/off]",
["slimiter"]="$UserCommand 1 3 "..cMenu.."\\Config\\Other\\Set script bandwidth limiter$<%[mynick]> !slimiter %[line:user/reg/vip/op/mod/master/founder] %[line:limiter]",
["follow"]="$UserCommand 1 3 "..cMenu.."\\Config\\Other\\Set kick/ban/etc messages [on/off]$<%[mynick]> !follow %[line:On/Off] ",
["redirect"]="$UserCommand 1 3 "..cMenu.."\\Config\\Redirecting\\Set hub redirect address$<%[mynick]> !redirect %[line:Host /Ip]",
["redirectfull"]="$UserCommand 1 3 "..cMenu.."\\Config\\Redirecting\\Set hub redirect full [on/off]$<%[mynick]> !redirectfull %[line:on/off]",
["addredirect"]="$UserCommand 1 3 "..cMenu.."\\Config\\Redirecting\\Add new address to redirect list$<%[mynick]> !addredirect %[line:Url/Ip]",
["delredirect"]="$UserCommand 1 3 "..cMenu.."\\Config\\Redirecting\\Remove address from redirect list$<%[mynick]> !delredirect %[line:Url/Ip]",
["showredirect"]="$UserCommand 1 3 "..cMenu.."\\Config\\Redirecting\\Show all listed redirect addresses$<%[mynick]> !showredirect",
["autoredirect"]="$UserCommand 1 3 "..cMenu.."\\Config\\Redirecting\\Set hub auto redirect users [on/off]$<%[mynick]> !autoredirect %[line:on/off]",

--eMenu = "LOG MENU"
["showbanlog"]="$UserCommand 1 3 "..eMenu.."\\Bans\\Show the banlog$<%[mynick]> !showbanlog",
["delbanlog"]="$UserCommand 1 3 "..eMenu.."\\Bans\\Delete the banlog$<%[mynick]> !delbanlog",
["delkicklog"]="$UserCommand 1 3 "..eMenu.."\\Kicks\\Delete the kicklog$<%[mynick]> !delkicklog",
["showkicklog"]="$UserCommand 1 3 "..eMenu.."\\Kicks\\Show the kicklog$<%[mynick]> !showkicklog",
["delwarnlog"]="$UserCommand 1 3 "..eMenu.."\\Warns\\Delete the warnlog$<%[mynick]> !delwarnlog",
["showwarnlog"]="$UserCommand 1 3 "..eMenu.."\\Warns\\Show the warnlog$<%[mynick]> !showwarnlog",
["showlog"]="$UserCommand 1 3 "..eMenu.."\\Other\\Showlog user/ip$<%[mynick]> !showlog %[line:name/ip] ",
["clear"]="$UserCommand 1 3 "..eMenu.."\\Other\\Clear logs/bans user$<%[mynick]> !clear %[nick]",
["showiplog"]="$UserCommand 1 3 "..eMenu.."\\Other\\Show the iplog$<%[mynick]> !showiplog",

--gMenu = "MISC"
["slots"]="$UserCommand 1 3 "..gMenu.."\\Info\\Show users whit free slots$<%[mynick]> !slots",
["version"]="$UserCommand 1 3 "..gMenu.."\\Info\\Show the script version$<%[mynick]> !version",
["network"]="$UserCommand 1 3 "..gMenu.."\\Info\\Show the network info$<%[mynick]> !network",
["myip"]="$UserCommand 1 3 "..gMenu.."\\Info\\Show your currently IP$<%[mynick]> !myip",
["myinfo"]="$UserCommand 1 3 "..gMenu.."\\Info\\Show all your available info$<%[mynick]> !myinfo",
["getblocked"]="$UserCommand 1 3 "..gMenu.."\\Blocked\\Show current blocked users$<%[mynick]> !getblocked",
["massblocked"]="$UserCommand 1 3 "..gMenu.."\\Blocked\\Send mass message to blocked users$<%[mynick]> !massblocked %[line:Message]",
["kickblocked"]="$UserCommand 1 3 "..gMenu.."\\Blocked\\Kick current blocked users$<%[mynick]> !kickblocked ",
["myhubtime"]="$UserCommand 1 3 "..gMenu.."\\Stats\\Show your total online time$<%[mynick]> !myhubtime",
["topkickers"]="$UserCommand 1 3 "..gMenu.."\\Stats\\Show current topkickers$<%[mynick]> !topkickers",
["tophubbers"]="$UserCommand 1 3 "..gMenu.."\\Stats\\Show current tophubbers$<%[mynick]> !tophubbers",
["away"]="$UserCommand 1 3 "..gMenu.."\\Away\\Set my away message$<%[mynick]> !away %[line:Message]",
["back"]="$UserCommand 1 3 "..gMenu.."\\Away\\Restore my away message$<%[mynick]> !back",
["getaways"]="$UserCommand 1 3 "..gMenu.."\\Away\\Show all current away messages$<%[mynick]> !getaways",
["flood"]="$UserCommand 1 3 "..gMenu.."\\Other\\Flood user$<%[mynick]> !flood %[nick] %[line:Nr] %[line:Reason]",
["online"]="$UserCommand 1 3 "..gMenu.."\\Other\\Set online check [user/ip]$<%[mynick]> !online %[line:nick/ip]",
["offline"]="$UserCommand 1 3 "..gMenu.."\\Other\\Set offline message to user$<%[mynick]> !offline %[nick] %[line:Message]",
["faq"]="$UserCommand 1 3 "..gMenu.."\\Other\\Show faq about DC++$<%[mynick]> !faq",

--kMenu = "REG MENU"
["regreg"]="$UserCommand 1 3 "..kMenu.."\\Register\\Register user as REG$<%[mynick]> !regreg %[nick] %[line:Password]",
["regvip"]="$UserCommand 1 3 "..kMenu.."\\Register\\Register user as VIP$<%[mynick]> !regvip %[nick] %[line:Password]",
["regop"]="$UserCommand 1 3 "..kMenu.."\\Register\\Register user as OP$<%[mynick]> !regop %[nick] %[line:Password]",
["regmod"]="$UserCommand 1 3 "..kMenu.."\\Register\\Register user as MOD$<%[mynick]> !regmod %[nick] %[line:Password]",
["regmaster"]="$UserCommand 1 3 "..kMenu.."\\Register\\Register user as MASTER$<%[mynick]> !regmaster %[nick] %[line:Password]",
["regfounder"]="$UserCommand 1 3 "..kMenu.."\\Register\\Register user as FOUNDER$<%[mynick]> !regfounder %[nick] %[line:Password]",
["deluser"]="$UserCommand 1 3 "..kMenu.."\\Change Reg\\Delete registerd user$<%[mynick]> !deluser %[nick]",
["upgrade"]="$UserCommand 1 3 "..kMenu.."\\Change Reg\\Upgrade/Downgrade registerd users$<%[mynick]> !upgrade %[nick] %[line:reg/vip/op/mod/master/founder]",
["repass"]="$UserCommand 1 3 "..kMenu.."\\Change Reg\\Change your own password$<%[mynick]> !repass %[line:New Pass]",
["getpass"]="$UserCommand 1 3 "..kMenu.."\\Other\\Get password registerd user$<%[mynick]> !getpass %[nick]",
["showreglog"]="$UserCommand 1 3 "..kMenu.."\\Other\\Show the registerlog$<%[mynick]> !showreglog",
["regme"]="$UserCommand 1 3 "..kMenu.."\\Other\\Register me at this hub$<%[mynick]> !regme %[line:Password]",
["showreg"]="$UserCommand 1 3 "..kMenu.."\\Other\\Show all users by profile$<%[mynick]> !showreg %[line:reg/vip/op/mod/master/founder]",
["unbot"]="$UserCommand 1 3 "..kMenu.."\\Other\\Remove old botnames from userlist$<%[mynick]> !unbot %[nick]",
Title: part 2
Post by: ?Tr??T_???? on 18 July, 2005, 17:34:37
}
InbuildCmds = {
["banip"]="$UserCommand 1 3 "..aMenu.."\\Ban\\Banip user$<%[mynick]> !banip %[line:Ipnumber]",
["unban"]="$UserCommand 1 3 "..iMenu.."\\Ban Controls\\Unban user$<%[mynick]> !unban %[nick] %[line:nick/ip]",
["nickban"]="$UserCommand 1 3 "..iMenu.."\\Ban Controls\\Nickban user$<%[mynick]> !nickban %[nick] %[line:Reason]",
["getbanlist"]="$UserCommand 1 3 "..iMenu.."\\Ban Controls\\Getbanlist$<%[mynick]> !getbanlist",
["clrpermban"]="$UserCommand 1 3 "..iMenu.."\\Ban Controls\\Clearpermban$<%[mynick]> !clrpermban",
["clrtempban"]="$UserCommand 1 3 "..iMenu.."\\Ban Controls\\Cleartempban$<%[mynick]> !clrtempban",
["gettempbanlist"]="$UserCommand 1 3 "..iMenu.."\\Ban Controls\\Gettempbanlist$<%[mynick]> !gettempbanlist",
["tempunban"]="$UserCommand 1 3 "..iMenu.."\\Ban Controls\\Unban tempbanned user$<%[mynick]> !tempunban %[nick]",
["tempban"]="$UserCommand 1 3 "..iMenu.."\\Ban Controls\\Tempban user for x minutes$<%[mynick]> !tempban %[nick]",
["getinfo"]="$UserCommand 1 3 "..iMenu.."\\Info\\Basic info user$<%[mynick]> !getinfo %[nick]",
["ipinfo"]="$UserCommand 1 3 "..iMenu.."\\Info\\Show users with that ip$<%[mynick]> !getinfo %[line:Ipnumber]",
["userinfo"]="$UserCommand 1 3 "..iMenu.."\\Info\\Info user$<%[mynick]> !userinfo %[nick]",
["iprangeinfo"]="$UserCommand 1 3 "..iMenu.."\\Info\\Show users within that iprange$<%[mynick]> !iprangeinfo %[line:Ipnumber]",
["restart"]="$UserCommand 1 3 "..iMenu.."\\Hub Controls\\Restart hub$<%[mynick]> !restart",
["restartscripts"]="$UserCommand 1 3 "..iMenu.."\\Hub Controls\\Restart scripts$<%[mynick]> !restartscripts",
["reloadtxt"]="$UserCommand 1 3 "..iMenu.."\\Hub Controls\\Reload the hub textfiles$<%[mynick]> !reloadtxt",
["topic"]="$UserCommand 1 3 "..iMenu.."\\Other\\Change the hub topic$<%[mynick]> !topic %[line:Topic]",
["gag"]="$UserCommand 1 3 "..iMenu.."\\Other\\Gag user$<%[mynick]> !gag %[nick]",
["ungag"]="$UserCommand 1 3 "..iMenu.."\\Other\\Ungag user$<%[mynick]> !ungag %[nick]",
["op"]="$UserCommand 1 3 "..iMenu.."\\Other\\Give user temperory op status$<%[mynick]> !op %[nick]",
}

customCMDs = function(user) --// You can put your custome commands here
-- remove the (--) if using the jumble program
user:SendData("$UserCommand 1 3 "..xMenu.."\\Trivia\\Start Trivia$<%[mynick]> tbstart||")
user:SendData("$UserCommand 1 3 "..xMenu.."\\Trivia\\Stop Trivia$<%[mynick]> tbstop||")
user:SendData("$UserCommand 1 3 "..xMenu.."\\Trivia\\Join Trivia$<%[mynick]> tbjoin||")
user:SendData("$UserCommand 1 3 "..xMenu.."\\Trivia\\Hint$<%[mynick]> tbhintme||")
user:SendData("$UserCommand 1 3 "..xMenu.."\\Trivia\\Save Scores$<%[mynick]> tbhelp||")
user:SendData("$UserCommand 1 3 "..xMenu.."\\Trivia\\Load Scores$<%[mynick]> tbhelp||")
user:SendData("$UserCommand 1 3 "..xMenu.."\\Trivia\\Trivia Scores$<%[mynick]> tbscores||")
user:SendData("$UserCommand 1 3 "..xMenu.."\\Trivia\\Trivia Help$<%[mynick]> tbhelp||")
user:SendData("$UserCommand 1 3 "..xMenu.."\\Jumble\\Start Jumble$<%[mynick]> a.start|")
user:SendData("$UserCommand 1 3 "..xMenu.."\\Jumble\\Stop Jumble$<%[mynick]> a.stop|")
user:SendData("$UserCommand 1 3 "..xMenu.."\\Jumble\\Display a Phrase$<%[mynick]> a.phrase|")
user:SendData("$UserCommand 1 3 "..xMenu.."\\Jumble\\Join Jumble$<%[mynick]> a.join|")
user:SendData("$UserCommand 1 3 "..xMenu.."\\Jumble\\Jumble Scores$<%[mynick]> a.scores|")
user:SendData("$UserCommand 1 3 "..xMenu.."\\Jumble\\Jumble Help$<%[mynick]> a.help|")
user:SendData("$UserCommand 1 4 zCUSTOMBadFile $$To: %[nick] From: %[mynick] $<%[mynick]> The follwing file is not allowed in here %[file]||")
end
Title: right click
Post by: ?Tr??T_???? on 18 July, 2005, 17:35:07
hope it helpps :D