PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: slik_jatt on 19 August, 2004, 23:49:32

Title: Is it possible???
Post by: slik_jatt on 19 August, 2004, 23:49:32
is it possible to have a branch off
with the right click commands, script??

i mean like a branch lets say u put ur cursor over it branches off into new bar .. with 4 more tabs...

heres the code if u guys need to take a look at this.:
___________________________

-- RoboCop 7.X Version <-> Modified byMade by Optimus & TiMeTrAVelleR
-- Script only works togheter with RC7.X or Higher
--
-- USE SCRIPT AT YOUR OWN RISK, IT MAY NOT BE COMPATIBLE WITH ALL CLIENTS

-- Editable Settings --

-- 1=on / 0=off
SendTo = {
  • = 1,   -- Masters
  • [1] = 1,   -- Operators
    [2] = 1,   -- Vips
    [3] = 0,   -- Regs
    [4] = 1,   -- Moderator
    [5] = 1,   -- NetFounder
    [-1] = 1,  -- Users
    }

    sMenu = "RC"

    -- End Editable Settings --

    assert(dofile("tbl/checklevel.tbl"),"tbl/checklevel.tbl not found")

    function OpConnected(user)
       if (SendTo[user.iProfile]==1) then
          customCMDs(user)
          GetRightClickComs(user)
          
          user:SendData("<(??T)????`????????????`????> To Add this hub to favorite type /fav ")
       end
    end

    function NewUserConnected(user)
       if (SendTo[user.iProfile]==1) then
          customCMDs(user)
          -- GetRightClickComs(user)
          
          user:SendData("<(??T)????`????????????`????> To Add this hub to favorite type /fav")
       end
    end

    function GetRightClickComs(user)
       TCopy={}
       for cmd,_ in LevelCheck do
       if LevelCheck[cmd][user.iProfile] == 1 then
       for value,command in RightClick do
       if cmd == value then
       tinsert(TCopy,{value,command})
       end end end end

       sort(TCopy,function(a,b) return (a[1] < b[1]) end)
       for t = 1, getn(TCopy) do
       if TCopy[t] then user:SendData(TCopy[t][2])
       end end TCopy={} collectgarbage() flush()
    end

    function customCMDs(user)
       user:SendData("$UserCommand 1 3 testMusic$<%[mynick]> !test ||")   -- test   
          
    end

    RightClick = {
    [10]="$UserCommand 1 3 Kick User$<%[mynick]> !kick %[nick] %[line:Reason]||",   -- kick
    [20]="$UserCommand 1 3 Ban User$<%[mynick]> !ban %[nick] %[line:Reason]||",   -- ban
    [30]="$UserCommand 1 3 Nameban User$<%[mynick]> !nameban %[nick] %[line:Reason]||",   -- nameban
    [40]="$UserCommand 1 3 Timeban User$<%[mynick]> !timeban %[nick] %[line:hr:mn] %[line:Reason]||",   -- timeban
    [50]="$UserCommand 1 3 Kill User $<%[mynick]> !kill %[nick] %[file] %[line:Reason]||",   -- kill
    [60]="$UserCommand 1 3 Warn User$<%[mynick]> !warn %[nick] %[line:Reason]||",   -- warn
    [70]="$UserCommand 1 3 Flood User$<%[mynick]> !flood %[nick] %[line:Nr] %[line:Reason]||",   -- flood
    [80]="$UserCommand 1 3 Drop User$<%[mynick]> !drop %[nick]||",   -- drop
    [90]="$UserCommand 1 3 Gag User$<%[mynick]> !gag %[nick]||",   -- gag
    [100]="$UserCommand 1 3 UnGag User$<%[mynick]> !ungag %[nick]||",   -- ungag
    [110]="$UserCommand 1 3 INBUILD\\BanIp User$<%[mynick]> !banip %[line:Ipnumber]||",   -- banip
    [120]="$UserCommand 1 3 INBUILD\\Unban User$<%[mynick]> !unban %[nick] %[line:nick/ip]||",   -- unban
    [130]="$UserCommand 1 3 INBUILD\\Nickban User$<%[mynick]> !nickban %[nick] %[line:Reason]||",   -- nickban
    [140]="$UserCommand 1 3 INBUILD\\GetBanlist$<%[mynick]> !getbanlist||",   -- getbanlist
    [150]="$UserCommand 1 3 INBUILD\\Clear Permban$<%[mynick]> !clrpermban||",   -- clrpermban
    [160]="$UserCommand 1 3 INBUILD\\Clear Tempban$<%[mynick]> !clrtempban||",   -- clrtempban
    [170]="$UserCommand 1 3 INBUILD\\Temp Op$<%[mynick]> !op %[nick]||",    -- op
    [180]="$UserCommand 1 3 INBUILD\\Basic Info User$<%[mynick]> !getinfo %[nick]||",   -- getinfo
    [190]="$UserCommand 1 3 INBUILD\\Show Users with that ip$<%[mynick]> !getinfo %[line:Ipnumber]||",   -- ipinfo
    [200]="$UserCommand 1 3 INBUILD\\Show Users within that iprange$<%[mynick]> !iprangeinfo %[line:Ipnumber]||",   -- iprangeinfo
    [220]="$UserCommand 1 3 SETTING\\Restart Hub$<%[mynick]> !restart||",   -- restart
    [230]="$UserCommand 1 3 SETTING\\Restart Scripts$<%[mynick]> !restartscripts||",   -- restartscripts
    [240]="$UserCommand 1 3 SETTING\\Hub Config$<%[mynick]> !hconfig||",   -- hconfig
    [250]="$UserCommand 1 3 SETTING\\Hub Stats$<%[mynick]> !hstat||",   -- hstat
    [260]="$UserCommand 1 3 INFO\\User Info$<%[mynick]> !info %[nick]||",   -- info
    [270]="$UserCommand 1 3 OTHER\\Mass Message$<%[mynick]> !mass %[line:Message]||",   -- mass
    [280]="$UserCommand 1 3 OTHER\\Send Banner$<%[mynick]> !banner %[line:Advert]||",   -- banner
    [290]="$UserCommand 1 3 OTHER\\Send Advertise mesage$<%[mynick]> !sendhubad %[line:main/pm]||",   -- sendhubad
    [300]="$UserCommand 1 3 OTHER\\Talk Whitout Nick$<%[mynick]> !talk %[line:Message]||",   -- talk
    [310]="$UserCommand 1 3 OTHER\\Online Check User$<%[mynick]> !online %[nick]||",   -- online
    [320]="$UserCommand 1 3 OTHER\\Offline Message To User$<%[mynick]> !offline %[nick] %[line:Message]||",   -- offline
    [340]="$UserCommand 1 3 OTHER\\Watch a User$<%[mynick]> !watch %[nick]||",   -- watch
    [350]="$UserCommand 1 3 OTHER\\Watch Off$<%[mynick]> !watchoff||",   -- watchoff
    [360]="$UserCommand 1 3 OTHER\\Show Watchers$<%[mynick]> !getwatch||",   -- getwatch
    [370]="$UserCommand 1 3 OTHER\\Set CommandSpy on/off$<%[mynick]> !cmdspy %[line:on/off]||",   -- cmdspy
    [380]="$UserCommand 1 3 NORMAL\\Topkickers$<%[mynick]> !topkickers||",   -- topkickers
    [390]="$UserCommand 1 3 NORMAL\\TopHubbers Online Time$<%[mynick]> !tophubbers||",   -- tophubbers
    [400]="$UserCommand 1 3 SETTING\\Set Script Minslots$<%[mynick]> !sminslots %[line:user/reg/vip/op/mod/master/founder] %[line:slots]||",   -- sminslots
    [410]="$UserCommand 1 3 SETTING\\Set Script Maxslots$<%[mynick]> !smaxslots %[line:user/reg/vip/op/mod/master/founder] %[line:slots]||",   -- smaxslots
    [420]="$UserCommand 1 3 SETTING\\Set Script Max Hubs$<%[mynick]> !smaxhubs %[line:user/reg/vip/op/mod/master/founder] %[line:hubs]||",   -- smaxshubs
    [430]="$UserCommand 1 3 SETTING\\Set Script Slots/Hubs Ratio$<%[mynick]> !sratio  %[line:user/reg/vip/op/mod/master/founder] %[line:slots]||",   -- sratio
    [440]="$UserCommand 1 3 SETTING\\Set Script MinShare$<%[mynick]> !sminshare %[line:user/reg/vip/op/mod/master/founder] %[line:share] %[line:mb/gb]||",   -- sminshare
    [460]="$UserCommand 1 3 SETTING\\Set Script Maxshare$<%[mynick]> !smaxshare %[line:user/reg/vip/op/mod/master/founder] %[line:share] %[line:mb/gb]||",   -- smaxshare
    [470]="$UserCommand 1 3 SETTING\\Set Hub Minshare$<%[mynick]> !hminshare %[line:Number] %[line:b/kb/mb/gb]||",   -- hminshare
    [480]="$UserCommand 1 3 SETTING\\Set Max Users$<%[mynick]> !hmaxusr %[line:Number]||",   -- hmaxusr
    [490]="$UserCommand 1 3 SETTING\\Set Hub Description$<%[mynick]> !hdesc %[line:Hub_Description]||",   -- hdesc
    [500]="$UserCommand 1 3 SETTING\\Set HubName$<%[mynick]> !chhubname %[line:New Hubname]||",   -- chhubname
    [510]="$UserCommand 1 3 SETTING\\Set RegServer$<%[mynick]> !regserver %[line:New_Reg_Address]||",   -- regserver
    [520]="$UserCommand 1 3 SETTING\\Set Redirect Adress$<%[mynick]> !redirect %[line:Host /Ip]||",   -- redirect
    [530]="$UserCommand 1 3 SETTING\\Set Redirect Full on/off$<%[mynick]> !redirectfull %[line:on/off]||",   -- redirectfull
    [540]="$UserCommand 1 3 SETTING\\Set Auto Redirect on/off$<%[mynick]> !autoredirect %[line:on/off]||",   -- autoredirect
    [550]="$UserCommand 1 3 SETTING\\Set Hub Protect on/off$<%[mynick]> !hubprotect %[line:on/off]||",   -- hubprotect
    [560]="$UserCommand 1 3 OTHER\\Show Blocked Users$<%[mynick]> !getblocked||",   -- getblocked
    [564]="$UserCommand 1 3 OTHER\\Mass Message Blocked Users$<%[mynick]> !massblocked %[line:Message]||",   -- massblocked
    [570]="$UserCommand 1 3 REGISTER\\Reg User$<%[mynick]> !regreg %[nick] %[line:Password]||",   -- regreg
    [580]="$UserCommand 1 3 REGISTER\\Reg Vip$<%[mynick]> !regvip %[nick] %[line:Password]||",   -- regvip
    [590]="$UserCommand 1 3 REGISTER\\Reg Op$<%[mynick]> !regop %[nick] %[line:Password]||",   -- regop
    [594]="$UserCommand 1 3 REGISTER\\Reg Moderator$<%[mynick]> !regmod %[nick] %[line:Password]||",   -- regmop
    [600]="$UserCommand 1 3 REGISTER\\Reg Master$<%[mynick]> !regmaster %[nick] %[line:Password]||",   -- regmaster
    [604]="$UserCommand 1 3 REGISTER\\Reg Founder$<%[mynick]> !regfounder %[nick] %[line:Password]||",   -- regfounder
    [610]="$UserCommand 1 3 REGISTER\\Del Reg User$<%[mynick]> !deluser %[nick]||",   -- deluser
    [620]="$UserCommand 1 3 REGISTER\\Upgrade Reg User$<%[mynick]> !upgrade %[nick] %[line:reg/vip/op/mod/master/founder]||",   -- upgrade
    [650]="$UserCommand 1 3 SETTING\\ResetCounters$<%[mynick]> !resethstat||",   -- resethstat
    [654]="$UserCommand 1 3 LOG\\Clear Nick$<%[mynick]> !clear %[nick]||",   -- clear
    [660]="$UserCommand 1 3 LOG\\ShowIplog$<%[mynick]> !showiplog||",   -- showiplog
    [670]="$UserCommand 1 3 LOG\\ShowKicklog$<%[mynick]> !showkicklog||",   -- showkicklog
    [680]="$UserCommand 1 3 LOG\\ShowBanlog$<%[mynick]> !showbanlog||",   -- showbanlog
    [694]="$UserCommand 1 3 LOG\\ShowWarnlog$<%[mynick]> !showwarnlog||",   -- showwarnlog
    [710]="$UserCommand 1 3 LOG\\Del Kicklog$<%[mynick]> !delkicklog||",   -- delkicklog
    [720]="$UserCommand 1 3 LOG\\Del Banlog$<%[mynick]> !delbanlog||",   -- delbanlog
    [732]="$UserCommand 1 3 LOG\\Del Warnlog$<%[mynick]> !delwarnlog||",   -- delwarnlog
    [734]="$UserCommand 1 3 LOG\\Showlog name/ip$<%[mynick]> !showlog %[line:Name/Ip] ||",    -- showlog
    [740]="$UserCommand 1 3 NORMAL\\Rules$<%[mynick]> !rules||",   -- rules
    [750]="$UserCommand 1 3 NORMAL\\Show hubs in network$<%[mynick]> !network||",   -- network
    [760]="$UserCommand 1 3 NORMAL\\Show faq about DC++$<%[mynick]> !faq||",   -- faq
    [770]="$UserCommand 1 3 NORMAL\\Show your currently IP number$<%[mynick]> !myip||",   -- myip
    [780]="$UserCommand 1 3 NORMAL\\Show all your aviable Info$<%[mynick]> !myinfo||",   -- myinfo
    [790]="$UserCommand 1 3 NORMAL\\Show script version$<%[mynick]> !version||",   -- version
    [800]="$UserCommand 1 3 NORMAL\\Self Register$<%[mynick]> !regme %[line:Password]||",   -- regme
    [810]="$UserCommand 1 3 NORMAL\\Change your own password$<%[mynick]> !repass %[line:New Pass]||",   -- repass
    [820]="$UserCommand 1 3 NORMAL\\Show users from selected profile$<%[mynick]> !showreg %[line:reg/vip/op/mod/master/founder]||",   -- showreg
    [830]="$UserCommand 1 3 NORMAL\\Set away message$<%[mynick]> !away %[line:Message]||",   -- away
    [840]="$UserCommand 1 3 NORMAL\\Back after an away$<%[mynick]> !back||",   -- back
    [850]="$UserCommand 1 3 NORMAL\\Show all away messages$<%[mynick]> !getaways||",   -- getaways
    [860]="$UserCommand 1 3 NORMAL\\Report User to all OP's in PM$<%[mynick]> !report %[nick] %[line:Message]||",   -- report
    [870]="$UserCommand 1 3 NORMAL\\Shows Youre Online Time in Hub$<%[mynick]> !myhubtime|| ",   -- myhubtime
    [880]="$UserCommand 1 3 NORMAL\\Shows Users whit free slots$<%[mynick]> !slots||",   -- slots
    [890]="$UserCommand 1 3 NORMAL\\Shows available redirect addresses$<%[mynick]> !jump||",   -- jump
    [900]="$UserCommand 1 3 NORMAL\\Help Commands$<%[mynick]> !help||",   -- help
    [910]="$UserCommand 1 3 NORMAL\\Show Inbuild Commands$<%[mynick]> !inbuild %||",   -- inbuild

    }


Title:
Post by: VidFamne on 20 August, 2004, 00:30:23
Look >>HERE<< (http://dcplusplus.sourceforge.net/wiki/index.php/UserCommand%20command)
Quotetype 1 (raw) uses $<command> for the command title and the command itself<br>Furthermore, clients MAY support sub-menu's using the backslash (\) in <title>, like: <menuname>\<title>. If they do not support it, it will still look decent. (This scheme could also be used to create sub-sub-sub-menu's.) </blockquote> </div><!-- .postbody --> <div class="postheader"> Title: <strong></strong><br> Post by: <strong>slik_jatt</strong> on <strong>20 August, 2004, 01:36:07</strong> </div> <div class="postbody"> thanx for ur reply,<br><br>i just started scripting, and i dont really have a good programing background...<br>can u pls explain further...<br><br>tell me how u would create a sub menu from a title..<br>from the code i have posted.<br><br>it would be great help </div><!-- .postbody --> <div class="postheader"> Title: <strong></strong><br> Post by: <strong>BottledHate</strong> on <strong>23 August, 2004, 22:10:36</strong> </div> <div class="postbody"> are you wanting the menu to be dynamic? so that it is <br>populated with all the current titles and stuff?<br>that could be bandwidth intesive.. cause u'd have to <br>resend all the right clicks everytime something changed.<br><br>as far as just making simple sub menus read up on the<br>dc+++ wiki (http://dcplusplus.sourceforge.net/wiki/index.php/UserCommand%20command) , it explains what to do best.<br><br>-BH </div><!-- .postbody --> </div><!-- #posts --> <div class="print_options"> <strong><a href="http://forum.ptokax.org/index.php?PHPSESSID=gsftal1jqeot581d7r3evcm7f0&action=printpage;topic=2599.0">Text only</a></strong> | <a href="http://forum.ptokax.org/index.php?PHPSESSID=gsftal1jqeot581d7r3evcm7f0&action=printpage;topic=2599.0;images">Text with Images</a> </div><!-- .print_options --> <div id="footer" class="smalltext"><a href="http://forum.ptokax.org/index.php?PHPSESSID=gsftal1jqeot581d7r3evcm7f0&action=credits" title="License" target="_blank" rel="noopener">SMF 2.1.4 © 2023</a>, <a href="https://www.simplemachines.org" title="Simple Machines" target="_blank" rel="noopener">Simple Machines</a></div> </body> </html>