Ungorge Script
Mayhem
Join Date: 2002-11-28 Member: 10128Members
<div class="IPBDescription">By Mayhem & Comp Addict</div> Well Im gonna try it again. Heres my script to start a menu driven vote. Usage say_team ungorge. This shows the alien team the last 3 gorges to connect. They pick whichever gorge they don't want and it "disposes" of him. With 40 percent of the votes he gets 30 seconds to change lifeforms. With 70 percent he is instantly slayed.
Okay I took off the non linux compatible version and updated it so default user doesnt have to be 0. Heres the NEW File, The old file with comments is still available to anyone who wants it. Email: reed2502@hotmail.com or pm on this forum. Thanks
DOH! I forgot to add this in the readme.txt for ALL of my scripts:
Add this line to adminmod.cfg or server.cfg:
amv_enable_beta "menu1"
Okay I took off the non linux compatible version and updated it so default user doesnt have to be 0. Heres the NEW File, The old file with comments is still available to anyone who wants it. Email: reed2502@hotmail.com or pm on this forum. Thanks
DOH! I forgot to add this in the readme.txt for ALL of my scripts:
Add this line to adminmod.cfg or server.cfg:
amv_enable_beta "menu1"
Comments
DOH Again:
Add this line to adminmod.cfg or server.cfg:
amv_enable_beta "menu1"
I added your ungorge script on my linux ns. Had a few compile errors. So I removed the 5 or six "// don't do x here" etc lines. and it compiled fine. BUT, (lol always a but in these posts) It appears not to be working.
Under admin_version. It lists the plugin as dirpath/pluggin_ungorge.amx(v.). Apposed to saying plugin x (line break) what it does text. Yet admin_gorge will output an enabled/disabled message. But anyone typing ungorge in a say message either team or pub. Doesn't get any responce from plugin at all.
I got a good response to it on my server so I decided to release it. I neglected to test it at all on a linux server (which I dont have access to).
Heres the new version free from comments and with info lines added.
I will note here: reserve_type 0 must be set in your adminmod config file.
That is all, Enjoy
I ported what I felt were the main features of the plugin cause I had about a 1/2 hour to spare. I didn't take a huge look at how he accomplishes this, but here is what this does:
User types 'ungorge' in say_team, and gets a menu containing the names of the first nine gorges it finds. Something Like:
Choose which gorge you do NOT want:
1. Flayra
2. Bob The Plate
3. Tcquest78
0. Exit
(This assumes 3 gorges named Flayra, Bob The Plate, and Tcquest78)
If a user selects one, a vote is started to slay him. Aliens(Marines are never notified) get something like:
Ungorge <Name>?
1. Yes
2. No
Selecting 1 or 2 prints :
* <name> voted for / against
Once all aliens vote or 180 seconds elapse(whichever is first), if the vote has succeeded the gorge gets slayed. Otherwise, nothing happens. I was planning on allowing the gorge to go back to skulk or whatever, but I figured the gorge might waste more res in the time that he has, and if the vote succeeded, he should get his score jacked anyway <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo--> .
Anyway, get it here:
<a href='http://68.5.220.130:27016/ungorge.sma' target='_blank'>http://68.5.220.130:27016/ungorge.sma</a>
<!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->
but I'm not even sure if AMX supports MENUS
<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
Of COURSE AMX supports menus. And a whole lot more that AdminMod doesn't, I might add.
I hope you(Mayhem) don't mind me posting this here, so if you find it inappropriate or something, ask me and I'll delete it.
A question to Tcquest, do the menus in amx use slot1-10 ? I know that NS by default only binds 1-5 and so showing 9 gorges + the exit would possibly not allow the user to select exit or the last 4 gorges. Unless the AMX menus use another means of getting the number? Not sure might wanna check it.
Whos gonna write this for clanmod ? <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
Instructions are in the readme.txt
I will note here: Plugin must come BEFORE plugin_chat.amx in the plugins.ini .. failure to do so will make nextmap work improperly.
Hope you guys enjoy this stuff
Forgot the attachment!
Heres the Map Voting System
DOH
Add this line to adminmod.cfg or server.cfg:
amv_enable_beta "menu1"
that's a parse error in the small c compiler. You need to run a util that will save the .sma in a unix native format to get rid of that one without having to delete all the comments.
dos2unix seems to do the trick and I think it's part of almost every distro.
Yes, I was thinking of doing it the way you had done it, but I had a couple of reason otherwise:
In 30 seconds, a gorge can do a LOT of damage. Like, say, build a sensory on top of a close-to-hive RT or something similar. I'd rather just outright slay him than give him the option to screw the team for 30 seconds and then waste 4 more res evolving to a skulk. While it's true that if he's THAT bad he'd probably get higher than 70%, I don't think if 40% of a team want him slayed he deserves to continue much longer. Also, I do believe if you are gestating your model is different. So if a gorge times it right and gestates, he won't get slayed but will still be a gorge. You probably have a timer in there(to stop too many votes in too short time) as well, so the team gets screwed in that scenario...
Also, a simple yes-or-no vote was better, IMO, in this case. I never really understood why the eject commander vote was so...counter-intuitive(I never know when a vote is being started...) so I've always liked votes that just pop up and tell you that, essentially, it's time to vote.
I guess I also didn't want to code that because of time restraints... ;D
I was also wondering why you limited it to 3 gorges... Know I know, eh? ;D. I guess I'll just force bind them... I am mean, yes, but I don't think anyone has bound them(being 6-0) to different keys...
Also, all menus regardless use the same system because it's a Half-life thing. Just like MOTD boxes(which don't work well with NS, IIRC. The commander gets screwed up and marine right click(or was it alien) gets messed up too)
Edit to avoid post-spammzoring:
<!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->
btw I really admire that you release your source code on your metamod plugins. I know theres a lot more knowledge that goes into making a metamod plugins than adminmod.
<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
Agreed. I lub joo Who[THEM].
<3<3<3<3<3
The first version of gorge used execclient, it actually forced the gorge to evolve into a skulk. People complained about the 4 resources. But it was a sure thing, it repeated until he changed the model, and if say he stood on a ladder forever it slayed him after xx time. And now that you mention it I suppose I'll make the public version of this script just slay the voted gorge. I am taking suggestions on the percentage.. I use 40 because it works well when theres a small amount of people on the alien team. But I'm open to suggestions and I'd like to know what you've set the AMX version to. I've limited it to 3 gorges because: 4 gorges + exit looks odd. I refuse to remap the keys because most servers probably don't want to allow execllient and when I was remapping keys, people were complaining that they had bound "sayings" to 6-10. Another reason might be that if you have more than 3 gorges, I dont care if you have 12 people on your team thats too many! Plus you an always run the script again, It does reset 10 seconds after it finishes.
As for commander voting, Its really messy. Commanders rarely get ejected where I play, but if people request it I'll write the adminmod equivalent of a commander vote kick. The current system "counts" votes for the commander. When the commander reaches a certain percent it kicks him out. Unfortunatly it appears that if the old commander with 3 votes gets out and a new commander gets in. If the new commander gets say 2 more votes he will get kicked for having 5 votes. Thats how I perceive the current vote system. If Im wrong definetly let me know. I think this will get fixed for 1.1... not real sure so let me know if people want this script to be made. Also people will be able to vote more than once per map.... Kinda important in some cases.
Wow, You wrote gorge in like 2 pages... Sad. Perhaps if it wasnt my first real script or if um I didnt have to write MAX_TEXT_LENGTH all over the damn place <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo--> gj tho
the dos2unix thing only fixes problems with compiling lines with "//" comments in them, other than that it doesn't help anything :/
Besides that I don't know of anything weird like that
I included a converted version of the binary, which may or may not work for linux. Im still waiting to hear results from the last version I coverted.
I am truly sorry for any problems you guys have been having. *sigh* Somehow when creating the readme.txt's I forgot to include the most important part. For the menus to work you need to add this line at the end of your server.cfg or adminmod.cfg. Again Im sorry for neglecting such an important part.. lack of sleep mebbe.
So add this to adminmod.cfg or server.cfg:
amv_enable_beta "menu1"
And when you're testing it out make sure thats theres at least 1 gorge or it doesn't do anything.
So final verdict. Works with linux. Thanks for the time and trouble of making the plugin mayhem!
But is it not better to make a plugin that will do a vote before someone evolves to gorge,
something like:
Simu wants to evolve to gorge. Do you agree?
1.yes
2.no