.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Cyborg Factory > RealBot > General Forum
General Forum Follow progress, give suggestions, reply to bug report threads here.

Reply
 
Thread Tools
Re: New AMX Plug In For RealBot
Old
  (#11)
Hacker Harry
Guest
 
Status:
Posts: n/a
Default Re: New AMX Plug In For RealBot - 10-03-2004

Quote:
Originally Posted by Terran
[...] You also have to enable the keys for each menu item...
hmm... is that documented somewhere?

Best Bytes®,
Harry
  
Reply With Quote
Re: New AMX Plug In For RealBot
Old
  (#12)
Hacker Harry
Guest
 
Status:
Posts: n/a
Default Re: New AMX Plug In For RealBot - 10-03-2004

Quote:
Originally Posted by |3FX| Bliss
Yes it is set for "u" menu access.

Bliss
hmm.. it seems i have to set "m" also.
this way the amx_rbmm menuitems are no longer greyed out.

i'll continue fiddeling ;-)
Best Bytes®,
Harry
  
Reply With Quote
Re: New AMX Plug In For RealBot
Old
  (#13)
Terran
Member
 
Terran's Avatar
 
Status: Offline
Posts: 431
Join Date: Jan 2004
Default Re: New AMX Plug In For RealBot - 10-03-2004

Quote:
Originally Posted by Hacker Harry
hmm... is that documented somewhere?

Best Bytes®,
Harry
There is a tutorial about menus in the amxmod forums. Or look at the example scripts and study how they do it - like I did .

Well, it's very simple, the keys are defined via set bits in a variable:
Code:
   new keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<9)
   show_menu(id,keys,menuBody)
The "(1<<x)" is a simple bit-shifting operation. And as usual in programs the counting starts at 0 not at 1. Key "1" is 0, key "2" is 1 etc.
The "|" adds the keys together.

If you want key "1" and "0" enabled in your menu:
Code:
   new keys = (1<<0)|(1<<9)
  
Reply With Quote
Re: New AMX Plug In For RealBot
Old
  (#14)
Hacker Harry
Guest
 
Status:
Posts: n/a
Default Re: New AMX Plug In For RealBot - 10-03-2004

Quote:
Originally Posted by Terran
There is a tutorial about menus in the amxmod forums. Or look at the example scripts and study how they do it - like I did .

Well, it's very simple, the keys are defined via set bits in a variable:
Code:
   new keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<9)[...]
thanx, mate,

after hours of frustration i switched over to _your_ script, wich
does exactly what i want. it took me about 15 minutes to set it up.
THANX again!

Best Bytes®,
Harry

P.S ich wuerd' noch reinschreiben welche rechte man haben muss um das
script benutzen zu koennen. i'd also note which rights are nessecary to
execute your amx commands...
  
Reply With Quote
Re: New AMX Plug In For RealBot
Old
  (#15)
Terran
Member
 
Terran's Avatar
 
Status: Offline
Posts: 431
Join Date: Jan 2004
Default Re: New AMX Plug In For RealBot - 10-03-2004

ADMIN_CFG ("h").

I choose this level because a bot strongly interferes with the servers configuration . (And my clanmates have the neccessary access rights anyway...)

And the amx_realbotvote command requires ADMIN_VOTE ("j").

Last edited by Terran; 10-03-2004 at 14:36..
  
Reply With Quote
Re: New AMX Plug In For RealBot
Old
  (#16)
Hacker Harry
Guest
 
Status:
Posts: n/a
Default Re: New AMX Plug In For RealBot - 10-03-2004

Quote:
Originally Posted by Terran
ADMIN_CFG ("h").

I choose this level because a bot strongly interferes with the servers configuration . (And my clanmates have the neccessary access rights anyway...)

And the amx_realbotvote command requires ADMIN_VOTE ("j").
danke ;-)
thanx.

i figured that out myself ;-)
i meant more like "pleasee add that to the docu"

Best Bytes®,
Harry
  
Reply With Quote
Re: New AMX Plug In For RealBot
Old
  (#17)
Terran
Member
 
Terran's Avatar
 
Status: Offline
Posts: 431
Join Date: Jan 2004
Default Re: New AMX Plug In For RealBot - 10-03-2004

I already added it to the documentation for the next release .
  
Reply With Quote
Re: New AMX Plug In For RealBot
Old
  (#18)
|3FX| Bliss
Member
 
Status: Offline
Posts: 13
Join Date: Feb 2004
Default Re: New AMX Plug In For RealBot - 11-03-2004

Its Funny i made the script and had no problems with it at all
  
Reply With Quote
Re: New AMX Plug In For RealBot
Old
  (#19)
Hacker Harry
Guest
 
Status:
Posts: n/a
Default Re: New AMX Plug In For RealBot - 12-03-2004

Quote:
Originally Posted by |3FX| Bliss
Its Funny i made the script and had no problems with it at all
i wouldn't have problems with it either if i wrote it myself
no doubt...you surely wrote a nice script! but for someone who
hasn't fiddled with AMX yet... hmm.. it takes a while to understand
it.

@Terran
the "fillslots" status gets logged every 10 seconds?
(at least when it's set to zero) ...isn't that a bit much?

Best Bytes®,
Harry
  
Reply With Quote
Re: New AMX Plug In For RealBot
Old
  (#20)
Terran
Member
 
Terran's Avatar
 
Status: Offline
Posts: 431
Join Date: Jan 2004
Default Re: New AMX Plug In For RealBot - 12-03-2004

Well, as I'm still developing the script those logging is neccessary for me to see what the script does - and the checks are done every 10 seconds.
If you want get rid of all log messages, edit the "log" function and comment out its content.
Code:
 log(id,text[]) {
 // 	   if (id) {
 // 			   client_print(id,print_console,"[TN-BC|%s] %s", g_botName, text)
 // 	   }
 // 	   log_message("[TN-BC|%s] %s", g_botName, text)
 }
If you only want to disable the "fillslots disabled" logging got to the "checkSlots" function and comment out the second "log" function invocation.
Code:
 public checkSlots() {
 		new snum = g_userCount
 		g_fillSlots = get_cvar_num(g_fillSlotCvar)
 
 		if (g_fillSlots) {
 
 			    // those realbot settings could interfere
 				disableAutoBot()
 
 			    format(g_logLine,80,"number of taken slots: %d/%d (%d %ss)",snum,g_fillSlots,g_botCount,g_botName)
 				log(0,g_logLine)
 
 			    // trivial approach without further checks:
 				if (snum < g_fillSlots) {
 					    addBot(0,2,g_botModel,g_botSkill,"")
 				}
 			    if ((snum > g_fillSlots) && (g_botCount > 0)){
 					    kickBot(0,2)
 				}
 // 	   } else {
 // 			   format(g_logLine,80,"fillslots disabled")
 // 			   log(0,g_logLine)
 		}
 }
Or if you want a bigger interval you have to edit the function set_task in setupCheckSlots. Change the "10.0" to anything you prefer.
Code:
  public setupCheckSlots() {
  		set_task(10.0,"checkSlots",0,"",3,"b")
  }
Afterwards you have to recompile the plugin of course ...

Last edited by Terran; 12-03-2004 at 13:24..
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com