Ungorge Script

MayhemMayhem 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"
«1

Comments

  • MayhemMayhem Join Date: 2002-11-28 Member: 10128Members
    edited March 2003
    Here's a simplified script which imitates admin_tsay. Usage: msay or csay followed by the message.

    DOH Again:

    Add this line to adminmod.cfg or server.cfg:
    amv_enable_beta "menu1"
  • MayhemMayhem Join Date: 2002-11-28 Member: 10128Members
    Heres the msay script with an MOTD addon... instructions included <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->
  • MayhemMayhem Join Date: 2002-11-28 Member: 10128Members
    Im still testing my Mapvote System and the Reserved Slots... Hopefully by this weekend I'll have one or the other done <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
  • HtNickoliHtNickoli Join Date: 2002-11-24 Member: 9786Members
    edited February 2003
    Sup Mayhem,

    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.
  • MayhemMayhem Join Date: 2002-11-28 Member: 10128Members
    edited March 2003
    Well thanks for letting me know. I'm not sure why it can't compile the comments... the file compiles fine on my windows machine. In response to the version, I hadn't added the plugin_register info, so I doubt thats the real reason for it not working... I think the problem was I set my default adminmod access differently than you... I removed the checking for that and I fixed the registerinfo. Try compiling it again. Post back here if you still dont have any luck. I do want to fix this for linux <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->


    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.
  • MayhemMayhem Join Date: 2002-11-28 Member: 10128Members
    Well I originally came into this thread to post my latest addition. I finished Reserved Slots! I've tested it on a small server with a single reserved slot. I'm hoping by next week to be able to test it with 2-4 reserved spaces. The script will NOT kick commanders or gorges. Theres instructions inside the zip file, theyre pretty easy to follow. Please send feedback via this forum or to reed2502@hotmail.com (comments, questions, problems).

    I will note here: reserve_type 0 must be set in your adminmod config file.

    That is all, Enjoy
  • SimulationSimulation Join Date: 2002-11-01 Member: 3603Members
    make the gorge plugin for amx please <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->
  • MayhemMayhem Join Date: 2002-11-28 Member: 10128Members
    I've never scripted for AMX and considering its um 6-7 pages long... The source is there if anyones willing to convert it over. The concepts aren't very difficult, but I'm not even sure if AMX supports MENUS. If not you'd have to rework the voting part of the system.. Perhaps change the usage to ungorge <gorges name here> and just output a single vote instead of all the gorges and then have people pick one. Or get AdminMod muhahahahah. Good luck, I'm not ready to learn how to code for AMX, considering I dont intend to use it.
  • masterswordmanmasterswordman Join Date: 2002-12-21 Member: 11303Members
    In any case good job.
  • MayhemMayhem Join Date: 2002-11-28 Member: 10128Members
    Thanks I do appreciate it.. I had posted here with a really early compile and got flamed for "changing" how NS plays. Since then I tested it on my server and got good reviews so I decided maybe peoples opinions have changed... Well at least the actual players like having a small amount of control over their team, much like the marines have over who they want for commander.
  • Tcquest78Tcquest78 Join Date: 2002-12-17 Member: 10949Members
    <!--QuoteBegin--Simulation+Feb 28 2003, 06:37 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Simulation @ Feb 28 2003, 06:37 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->make the gorge plugin for amx please <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo--><!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    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.
  • MayhemMayhem Join Date: 2002-11-28 Member: 10128Members
    edited February 2003
    Nah I dont mind at all. Im glad AMX will have a version of this to work with. I think this feature should've been included from the start. I will note, because Im an adminmod fan, that my script shows 3 gorges to the entire alien team, and whichever gorge recieves the most votes (over 40 percent) gets 30 seconds to change, with a 70 percent vote it instantly slays him. Subtle differences, I just hope you all choose adminmod! I plan on releasing more scripts as I get ideas <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->

    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-->
  • MayhemMayhem Join Date: 2002-11-28 Member: 10128Members
    Sorry to be flooding the forums with scripts... But heres my Map Management plugin for NS. Its currently allowing 40 maps in your rotation. It works by having players "nominate" maps. The script shows the 3 maps that were nominated the most. It adds a random map for the last slot and displays the vote 5 minutes prior to the timelimit. Players can only nominate once per map, and the exact usage is : say <MapName> (EX say ns_eclipse).

    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
  • MayhemMayhem Join Date: 2002-11-28 Member: 10128Members
    edited March 2003
    DOH

    Forgot the attachment!

    Heres the Map Voting System

    DOH
    Add this line to adminmod.cfg or server.cfg:
    amv_enable_beta "menu1"
  • [WHO]Them[WHO]Them You can call me Dave Join Date: 2002-12-11 Member: 10593Members, Constellation
    <!--QuoteBegin--[Ht]Nickoli+Feb 28 2003, 12:07 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> ([Ht]Nickoli @ Feb 28 2003, 12:07 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> 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. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    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.
  • MayhemMayhem Join Date: 2002-11-28 Member: 10128Members
    edited February 2003
    Thanks for the tip, If someone manages to compile these in linux I'd be more than happy to include a linux version.. and 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. Hopefully someone will port these for AMX and Clanmod, I know some people don't like adminmod...
  • Tcquest78Tcquest78 Join Date: 2002-12-17 Member: 10949Members
    edited February 2003
    <!--QuoteBegin--Mayhem+Feb 28 2003, 09:44 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Mayhem @ Feb 28 2003, 09:44 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->and whichever gorge recieves the most votes (over 40 percent) gets 30 seconds to change, with a 70 percent vote it instantly slays him. <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    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
  • Scum_of_the_UniverseScum_of_the_Universe Join Date: 2003-02-06 Member: 13174Members
    How about "suspending" the gorges resources. If you want to stop this being abused, disable the gorge weapons. (picture a team of gorges attacking the marines in the opening game... infact that might work if they heal each other enough... <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo--> )
  • Tcquest78Tcquest78 Join Date: 2002-12-17 Member: 10949Members
    Res editing cannot be done very easily. I've got an AMX Module that adds a native for that, but I don't think there is any easy way for AdminMod people to do so.
  • MayhemMayhem Join Date: 2002-11-28 Member: 10128Members
    edited February 2003
    Tcquest:

    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
  • SpiritMasterSpiritMaster Join Date: 2002-11-07 Member: 7580Members, Reinforced - Shadow
    edited March 2003
    Very handy MOD, just what all servers need <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
  • HtNickoliHtNickoli Join Date: 2002-11-24 Member: 9786Members
    I try'd you new version. And the old version. And recompiled after converting with dos2unix. Same thing. A team or reg say mesage of ungorge does nothing. Oh well. Would have been quite usefull.
  • [WHO]Them[WHO]Them You can call me Dave Join Date: 2002-12-11 Member: 10593Members, Constellation
    <!--QuoteBegin--[Ht]Nickoli+Feb 28 2003, 10:43 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> ([Ht]Nickoli @ Feb 28 2003, 10:43 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> I try'd you new version. And the old version. And recompiled after converting with dos2unix. Same thing. A team or reg say mesage of ungorge does nothing. Oh well. Would have been quite usefull. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    the dos2unix thing only fixes problems with compiling lines with "//" comments in them, other than that it doesn't help anything :/
  • MayhemMayhem Join Date: 2002-11-28 Member: 10128Members
    Yeah Hmm, I'll give all the scripts another test tomorrow... I havent changed them much from the ones I'm currently using. But I do hope to get this working for linux (at least gorge).. Anyone know of scripting considerations that work on windows and not linux ?
  • MayhemMayhem Join Date: 2002-11-28 Member: 10128Members
    Honestly no idea if this will work: Converted my compiled windows amx to linux using adminmods converter... Let me know.
  • [WHO]Them[WHO]Them You can call me Dave Join Date: 2002-12-11 Member: 10593Members, Constellation
    yeah, the functions for retrieving time seem to be wholly incompatible. I don't remember the specifics, but what I do remember is that one method of retrieving system time only worked on windows, and another method only worked in linux. But that was only whole system time (specifically seconds since the epoch).

    Besides that I don't know of anything weird like that
  • MayhemMayhem Join Date: 2002-11-28 Member: 10128Members
    Okay I changed a few things like: gorges no longer get 30 seconds to switch back. If they get 50 percent of the vote they automatically get slayed.

    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.
  • HtNickoliHtNickoli Join Date: 2002-11-24 Member: 9786Members
    OK, I tested thenewest plugin_linuxungorge.amx that you compiled. Works fine. Might have been working all along and the lack of the .cfg entry was the prob. As I mentioned in previous threads, everything seemed to work. Just no responce from the ungorge text in a message.

    So final verdict. Works with linux. Thanks for the time and trouble of making the plugin mayhem!
  • MayhemMayhem Join Date: 2002-11-28 Member: 10128Members
    Im happy to do it. I'm glad you stuck with it while I ironed out the problems. At least I know the adminmod coverter works as advertised <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo--> And I am sorry for the confusion with the cfg entry I dunno what I was thinking when I made all my readme.txt's ...Enjoy
  • SimulationSimulation Join Date: 2002-11-01 Member: 3603Members
    Tcquest78 did you test your amx plugin? it doesnt work good on my server. When i type ungorge, the menu shows up. but no gorge was listed in the menu.

    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
Sign In or Register to comment.