Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Spree module

 
Post new topic   Reply to topic Printable version
 View previous topic  <py> Cellphone stats Post :: Post killlvz  View next topic  
Author Message
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Mon Feb 16, 2004 8:34 am    Post subject: Spree module Reply to topic Reply with quote

Spree. Send arena messages at any number of kills with any bong. Some advanced settings too.
Code: Show/Hide
[Spree]
ResetSpreeOnFrequencyChange=0
  ;Changing freq resets the spree (default=0)
ResetSpreeOnShipChange=0
  ;Changing ship resets the spree (default=0)
SpreeEndMinimum=4
  ;If a player on a spree has this many kills and dies..
  ;(default=65535)
SpreeEndMessage=has had their spree cut short
  ;..this message will be displayed..
SpreeEndBong=22
  ;..and this bong played. (default=0)
  ;<name> <SpreeEndMessage> <%SpreeEndBong>
 
Message3=is dominating (3:0)
  ;On 3 consecutive kills, this message will be displayed
Bong3=13
  ;This bong will be played with the message (default=0)
  ;<name> <Message#> <%Bong#>

Versions:
asss-spree.zip v1 (asss-1.1.7)
asss-spree-1.4.zip v1.4
asss-spree-1.5.zip v1.5 (asss-1.3.2)
asss-spree-1.7.zip v1.7 (asss-1.3.6)

Siaons versions:
Spree.rar r1
Hyperspace Spree.rar r2
Hyperspace Spree.zip r3




tested with 1.1.7

asss-spree.zip - 30.46 KB
File downloaded or viewed 127 time(s)


Last edited by Smong on Fri Jun 15, 2007 5:32 am, edited 1 time in total
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:40
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3614
Location: Las Vegas
Offline

PostPosted: Mon Feb 16, 2004 10:44 am    Post subject: Reply to topic Reply with quote

Should maybe think about adding some commands, optional via the .conf files, to see current people with killing sprees, current people with killing sprees >= X, and maybe people's best killing sprees, if you want to deal with stat-saving.
Back to top
View users profile Send private message Add User to Ignore List Send email
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Mon Feb 16, 2004 1:02 pm    Post subject: Reply to topic Reply with quote

maybe remember whose had the most kills in a row -- and a reset timer for that info ? .. just a thought
Back to top
View users profile Send private message Add User to Ignore List
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Tue Feb 17, 2004 10:31 am    Post subject: Reply to topic Reply with quote

Does this look good?
Code: Show/Hide
local helptext_t spree_help =
   "Module: spree\n"
   "Targets: arena, player\n"
   "Args: [<#>]\n"
   "Prints out the target player's current spree and best spree,\n"
   "if no target, yourself, or all players in the current arena\n"
   "with the specified spree or higher\n";

I don't think I will save stats to disk, as any arena can load the module, so there will be a lot of data being stored (I guess that is where the .conf option comes in though...).
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
-Smong-
Guest


Offline

PostPosted: Tue Mar 23, 2004 12:33 pm    Post subject: Reply to topic Reply with quote

OK, I have added ?spree. It shows current, last and best sprees. Either for you, someone else, or the whole arena when specifying a minimum spree count.

I have also added the following %macros: killer, killed, bounty, coord.

Also added the setting ResetSpreeOnFlagWin (default=0).




(I expect the forum does something funky with duplicate filenames, so I'm naming this archive different from the old version)

asss-spree-1.4.zip - 35.95 KB
File downloaded or viewed 111 time(s)
Back to top
Qndre's Metaspace
Guest


Offline

PostPosted: Thu Apr 08, 2004 5:34 am    Post subject: Reply to topic Reply with quote

rampage.dl for MERV, it does nearly the same, doesn't it?
Back to top
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Thu Apr 08, 2004 7:39 am    Post subject: Reply to topic Reply with quote

This spree module is for asss, rampage.dll is a mervbot plugin and if it uses *arena will not function correctly on asss.

I believe mine is better because my macros don't have to end in %, it shows your last spree, it shows your current streak (not # kills needed for next title/message) and you can see who else in the arena has a high spree.

I am thinking of making it display the spree messages at a random amount of kills, because it gets boring if at say 5 kills you get the message everytime.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Siaon
Novice


Age:42
Joined: Dec 04 2002
Posts: 49
Offline

PostPosted: Sat Apr 24, 2004 7:08 pm    Post subject: Reply to topic Reply with quote

Ugh, had no idea there was something like this already, basically did everything all over, except with the ini values. If there's still an interest I guess I could post mine too.
_________________

Yesterday was history, Tomorrow's a mystery. Today is a gift, that's why it's called the present.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
ExplodyThingy
Server Help Squatter


Age:37
Gender:Gender:Male
Joined: Dec 15 2002
Posts: 528
Location: Washington DC
Offline

PostPosted: Sat Apr 24, 2004 8:52 pm    Post subject: Reply to topic Reply with quote

Post it. The beauty of open source development is that people use whatever version they want.
_________________
There are no stupid question, but there are many inquisitive idiots.
Loot

Dr Brain> I hate clean air and clean water. I'm a member of Evil Conservitive Industries
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Siaon
Novice


Age:42
Joined: Dec 04 2002
Posts: 49
Offline

PostPosted: Sat Apr 24, 2004 9:03 pm    Post subject: Reply to topic Reply with quote

I've encapsulated the whole .ini idea, just rounding down some minor changes and I'll attach it here as well.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Siaon
Novice


Age:42
Joined: Dec 04 2002
Posts: 49
Offline

PostPosted: Sat Apr 24, 2004 10:11 pm    Post subject: Reply to topic Reply with quote

Here it is, now also supports bongs that can be configured in the .ini

[Edit] Smong's version seems to support some things in my todo list, also has a different way of giving the messages, while I arena for each kill after the treshold, he appears to only message for message<number> with the message behind it(I like the system, but it's lacking, I think I'm going to merge the idea though) [/Edit]

Ow and smong, I think it will look and work better if you remove the separate line for the sound and simply let people add %<number> to the message, much more efficient and consistent, it's what I'll do tomorrow icon_smile.gif




Archive containing everything you need, except for the linux users, but since you guys like to do stuff yourself anyway - the source's in here too ofcourse

Spree.rar - 18.64 KB
File downloaded or viewed 95 time(s)
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Siaon
Novice


Age:42
Joined: Dec 04 2002
Posts: 49
Offline

PostPosted: Sun Apr 25, 2004 12:14 pm    Post subject: Reply to topic Reply with quote

Adding the option

OnlyTrackHighestKillingSpree

so only the person with the highest current killing spree gets to be displayed.

[Edit]
I liked a lot of your options, Smong, but I do a lot differently: I don't have a spreeend value, instead if you had a spree message display it will also display a spreeend message for you, otherwise it wont.
[/Edit]

[Edit]
Rewrote your stringreplace function, also gave it a more compliant name
Code: Show/Hide
int strrpl(char *string, const char *source, const char *dest)
{
    char buf[256];
    int number = 0;

    while (strstr(string, source))
    {
        strncpy(buf, string, strstr(string, source) - string);
        buf[strstr(string, source) - string] = '\0';
        strcat(buf, dest);
        strcat(buf, strstr(string, source) + strlen(source));
        strcpy(string, buf);
        number++;
    }

    return number;
}

It also returns just how many instances it replaced, which is usefull for adding sound in the same message, which I now also support, further I liked your message system a lot, so I basically copy-catted that, saved me some thinking time too, because I was still thinking on how to implement macroes, it hadnt even crossed my mind to go use %killer etc., I had something like %s in mind.
Code: Show/Hide
[Spree]
ResetKillingSpreeOnFreqChange=1
ResetKillingSpreeOnShipChange=1
KillingSpreeMessage2=%killer is on a killing spree(%kills:%deaths)!%104
KillingSpreeMessage4=%killer is unstoppable(%kills:%deaths)!%2
KillingSpreeMessage6=%killer laughed at %killed's efforts!(%kills:%deaths)%13

Notice how the sound's in the message(Just like in subspace itself), I get it out of the message again by doing:
Code: Show/Hide
char sound;
int i;

for (i = 255; i >= 0; i--)
        {
            strcpy(buf, "%");
            itoa(i, buf3, 10);
            strcat(buf, buf3);
            if (strrpl(buf2, buf, ""))
                sound = i;
        }

[/Edit]
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Siaon
Novice


Age:42
Joined: Dec 04 2002
Posts: 49
Offline

PostPosted: Mon Apr 26, 2004 10:23 am    Post subject: Reply to topic Reply with quote

Module as attachment(Win32 bin only, *nix users build your own)



Hyperspace Spree.rar - 20.5 KB
File downloaded or viewed 92 time(s)
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
-Smong-
Guest


Offline

PostPosted: Tue Apr 27, 2004 2:31 pm    Post subject: Reply to topic Reply with quote

Nice work.

I don't see a need for %kills and %deaths if after 1 death the spree is ended (maybe you have some minimum deaths option, I don't know).

I had some trouble coding my replace string function, I hope yours is tested thoroughly.

This prototype is confusing:
int strrpl(char *string, const char *source, const char *dest) ;
Looks like you put the text from the conf in 'source', an empty char buffer in 'dest' (even though it is const) and I have no idea what for 'string'. I guess old/new would be good param names, but I'm not sure if new is a reserved keyword.

Any chance of uploading a .zip version? Oh and since you said it is a win32 binary, can you compile the latest asss release and give it to explody so he can loot it?
Back to top
Siaon
Novice


Age:42
Joined: Dec 04 2002
Posts: 49
Offline

PostPosted: Tue Apr 27, 2004 3:41 pm    Post subject: Reply to topic Reply with quote

-Smong- wrote:
Nice work.

I don't see a need for %kills and %deaths if after 1 death the spree is ended (maybe you have some minimum deaths option, I don't know).

I had some trouble coding my replace string function, I hope yours is tested thoroughly.

This prototype is confusing:
int strrpl(char *string, const char *source, const char *dest) ;
Looks like you put the text from the conf in 'source', an empty char buffer in 'dest' (even though it is const) and I have no idea what for 'string'. I guess old/new would be good param names, but I'm not sure if new is a reserved keyword.

Any chance of uploading a .zip version? Oh and since you said it is a win32 binary, can you compile the latest asss release and give it to explody so he can loot it?


Yes, I was building in support for more then a single death to end a killing spree icon_smile.gif

I agree with the parameter naming, good thinking, I basically tried to take these from the string.h, was thinking like: it works on string replacing const source with const dest, but it can probably use a better naming.

I didn't have any problems at all with writing it, I'm pretty sure it's 100% foolproof(Except that it doesn't do memory overflow checks)

And last but not least, the source is ofcourse included, so the linux people can compile their own binary(I currently don't have linux installed, I'm not a linux fan)

I'll attach a zipped version to this post btw.

I'm still adding more features, and have my todo list to work off, also wanted to say your spree module was really handy(If you compare my old module to this one, you'll see many improvements, some of which where derived in one form of the other from your brainstorm)

Anyway, if you'd like to work together, give me a message, I like the way you did certain things(Though obviously not all, I for one would never do a while(1) loop with an if clause in it icon_smile.gif, don't know if that can be considered as good/bad coding though, but still you seem really creative and that's something into which I can release some energy as well)




Hyperspace Spree.zip - 22.13 KB
File downloaded or viewed 112 time(s)
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Siaon
Novice


Age:42
Joined: Dec 04 2002
Posts: 49
Offline

PostPosted: Sun May 02, 2004 8:41 am    Post subject: Reply to topic Reply with quote

Edit: Some bugs in this because of my bad renaming, will fix this asap.

Code: Show/Hide
int strrpl(char *dest, const char *source, const char *target)
{
    int number = 0;
    char buf[512];

    if (strstr(target, source))
        return -1;

    while (strstr(dest, source))
    {
        strncpy(buf, dest, strstr(dest, source) - dest);
        buf[strstr(dest, source) - dest] = '\0';
        strcat(buf, dest);
        strcat(buf, strstr(dest, source) + strlen(source));
        strcpy(dest, buf);
        number++;
    }

    return number;
}


Ow divine.216, you'll love this piece of code - ha ha!

Update for no endless loops, smong, I lost the message in which you suggested better names for the variables, what were they?

Todo: Add overflow protection, as in: Probably add in int len to the parameters and add a check if an overflow would occur(Only possible if strlen dest>strlen source)[/b]
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
divine.216
Guest


Offline

PostPosted: Mon May 03, 2004 11:07 am    Post subject: Reply to topic Reply with quote

I'll skip the critique of that code and say rather that if this kind of thing is going to be used (client macros) it would probably be much more elegant to have a module that lets you register and handles them systematically.
Back to top
-Smong-
Guest


Offline

PostPosted: Wed Nov 24, 2004 6:29 pm    Post subject: Reply to topic Reply with quote

So yeah it's been 5 months and I forgot to upload this onto my website. Anyway here is a new version that can toggle lvz (for killer and arena), although I haven't tested it beyond compile errors.



asss 1.3.2

asss-spree-1.5.zip - 34.29 KB
File downloaded or viewed 76 time(s)
Back to top
-Smong-
Guest


Offline

PostPosted: Sat Apr 09, 2005 12:21 pm    Post subject: Reply to topic Reply with quote

Another update. I merged my macro expander in so the bongs can be defined on the same line as the message.
Quote:
Message2=%2%killer is on a spree (2:0)




asss-1.3.6

asss-spree-1.7.zip - 35.92 KB
File downloaded or viewed 100 time(s)
Back to top
Purge
Episode I > Eposide III
Jar-Jar is kool


Age:34
Gender:Gender:Male
Joined: Sep 08 2004
Posts: 2018
Offline

PostPosted: Wed Jul 13, 2005 11:12 pm    Post subject: Reply to topic Reply with quote

ASSS is in C, so start there.
Back to top
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Thu Jul 14, 2005 7:21 am    Post subject: Reply to topic Reply with quote

Whiskey Tango Foxtrot?
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Purge
Episode I > Eposide III
Jar-Jar is kool


Age:34
Gender:Gender:Male
Joined: Sep 08 2004
Posts: 2018
Offline

PostPosted: Thu Jul 14, 2005 11:19 am    Post subject: Reply to topic Reply with quote

Purge+ wrote:
I guess MGB deleted Quan's bump post...


I'm starting to sound like a moron with Quan's posts deleted. icon_sad.gif
Back to top
View users profile Send private message Add User to Ignore List
tcsoccerman2
Newbie


Gender:Gender:Male
Joined: Mar 17 2007
Posts: 2
Location: PSS CTF Fury
Offline

PostPosted: Tue Mar 20, 2007 7:43 pm    Post subject: help Reply to topic Reply with quote

i know this is an old topic, but what would you do if you wanted to make the mesages appear at 5:0, 10:0, etc instead of 2,3,4:0. also, how owuld you make more messages appear for example up to 5:0. and not to be a nag, what if you want it to go up by 5's till 20(5,10,15,20:0) and then go up by ten's (30,40,50:0) ty so much. need this for my grand opening so yeh ty. great module btw:)

edit: figured all of that out (with common sense lol). now how do i get rid of default messages?? if i can't how do i change them? ty.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Wed Mar 21, 2007 8:41 am    Post subject: Reply to topic Reply with quote

Are you using Siaon's or Smong's?
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Animate Dreams
Gotta buy them all!
(Consumer whore)


Age:36
Gender:Gender:Male
Joined: May 01 2004
Posts: 821
Location: Middle Tennessee
Offline

PostPosted: Wed Mar 21, 2007 11:55 am    Post subject: Reply to topic Reply with quote

He was using Smong's, but I already helped him, and he got everything figured out. I think his main problem was that he was using spree.conf, and then also declaring everything in arena.conf, so he couldn't delete default values easily(since they were being defined twice).
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Custom Projects All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 651 page(s) served in previous 5 minutes.

phpBB Created this page in 0.562969 seconds : 52 queries executed (73.4%): GZIP compression disabled