Clans

Login to reply  Page: « < 1 of 2 > »
11 Sep 2009 - 13:571883
For Jamdog! :)
Jamdog Hello!

I would like your help on two things:

Firstly
In the mud where I am "GOD", use your house system. However, there is a bug in your system. I wonder if you know how to fix ... The problem is that households do not save the content object containers. Every time I restart the mud (or copyover), all items inside containers in the houses are scattered on the floor! You know fix this?

Second
I know you have a robust system of clans. Could you pass it?

Thank you for your attention!
Hugs from Brazil!
pesquisar


16 Sep 2009 - 10:441889
Hi olan,
Sorry it's taken me a few days to find your note. I've had to take a break from MUD'ing due to health problems, and someone else actually spotted the post and told me about it.
1) The house save files should have the same format as player rent files, because it uses the same funcs (objsave_save_obj_record to save and objsave_parse_objects to load). Containers are done so that the stuff in the containers has a 'where' field of -1. If you have a container within a container, the contents of that nested container will have a 'where' of -2, etc...
Personally, I've not had any problems with this, and the 2 funcs listed above should be stock code.

2) My clan code is actually written by myself, Mystic and Kearney for AderonMUD, but I have managed to squeeze it into Paragon, Astoria and TrigunMUD. I have never made a 'patch' for it mainly because it has worked a little differently in each MUD, but I guess I could do that for you. It is a complete clan system, with OLC for clan leaders and imm command for clan management. It also allows players to claim zones for their clan, so that members of opposing clans pay a small tax on every kill in that zone. It is a massive piece of code (clan.c is the largest file on almost every MUD I've added it to), and takes a lot to add it all in, so will take me at least a few days to make the patch, but I'll post a download URL when it's done ;)


__________________
18 Sep 2009 - 03:211895
Ohhh

Jamdog!

Dude! I will be eternally grateful to you for this! Not only me, but a lot of "nerds" Brazilian .. eheeheheheheh

I spent what you said (the homes), the implementer of the mud (the Drefs), it will take a look!

Finally, I would just remind you that you have created a User on our mud ... whenever you want to be there, you're more than welcome! The address is:
arkadiamud.com.br
port: 2442

Thanks again!

Finally, we wish you a speedy recovery of his health!


14 Oct 2009 - 19:061935
Er.. sorry my persistence...

Jamdog?


23 Nov 2009 - 16:522107
:(


09 Feb 2010 - 03:092323
Jamdog?


10 Apr 2010 - 15:312460
Definitely would appreciate this code patch if you made it! Been looking for something. Have an old clan.c file from about 1999, but it is hell trying to merge that code in (and make it compile in gcc4 since the code is poorly written).


__________________
Al'Aman Shadar (Shadows of the Dragon)
Wheel of Time based MUD
tbaMUD base code (of course)
shadowmud.org:8086 (not live just yet)
10 Apr 2010 - 21:222462
First, Sorry olan, I had stuff going on IRL, which meant this got put to one side, and I couldn't get on tbamud.com much to watch this.

Thanks to mrurl's reminder though, I am now working on this. Since my last post in this thread, the whole clans system has been rewritten from scratch (by me) to make it MUCH more efficient, and has been thoroughly tested in Trigun MUD. This also allowed me to fix some of the minor bugs in the original version.

Anyways, I have just installed Cygwin on my shiny new Windows 7 OS, and ./configure'd a fresh tbaMUD 3.61, and am ready to start (again). When it's done, I'll let y'all kow, but to tempt you, here's a list of features:
* New zone claim system, includes diplomacy skills
* clan who shows all clan members and their rank
* clan where shows online clan members and their location
* clan edit OLC for Imms and clan leaders to set clan ranks and privs
* Clan leaders can award clan points (CP) to clan members, for whatever they want to use CP for.
* clantalk communication channel
* clanset imm command for non-OLC changes
* clan banking system
* clan spells/skills, so all clan members gain certain skills
* clan wars/allies (incomplete, for expansion)
* clan taxes and enrolment fees (for clan members)
* Tax paid to your clan by members of other clans in your clan's zone
* Clanhall Guards
* %actor% clan/rank variables for scripts

I'm sure there is more than that, but that list will have to do for now. I should probably write full documentation for this clan system, but it would take me a while to do that, and you guys want my code, so I'm just gonna get on with the patch for now.

*Jamdog disappears into his Cygwin window*


__________________
11 Apr 2010 - 01:442464
Sweet. Thanks! That is pretty much everything I needed from the old guilding code that I have... Only thing I didn't see listed is shadow guilds (guilds that do not display publicly that a member is part of it) and ability to be in multiple guilds.. Lemme know if it includes those or if I need to work on adding that! ^_^


__________________
Al'Aman Shadar (Shadows of the Dragon)
Wheel of Time based MUD
tbaMUD base code (of course)
shadowmud.org:8086 (not live just yet)
11 Apr 2010 - 09:332465
Nope, the system is designed to allow one clan per player. I guess it could be adapted to add more though.

I'm intrigued by the idea of Shadow Guilds though. My system doesn't include them, but it shouldn't be hard to add them. The clan struct doesn't currently have flags, but flags are easy enough to add in tbaMUD.

The mortal clan who and clan where commands only show other players in your clan. You can't see which players are in other clans, unless they log on, as the clan 'abbreviation' is shown on the who list. Clan information is shown in whois, however, so it is possible to see if offline players are in a clan.

While adding clan to a stock tbaMUD, I'm finding that I've added a few nice little utility functions too, so as part of the patch, you'll also get the following cool snippets:
game_info(text_string);Sends a formatted global message to all players. Like send_to_all, but adds "{NEWS}: " on the front, so all game info messages look the same.

ch = new_char();When you need a fresh blank char struct in the code, you no longer need to remember the CREATE format, or have to remember to add the specials struct - this does it all for you.

increase_gold(ch, amount);Replace all your GET_GOLD(ch) += xxx; lines with this func, and you gain several benefits. Firstly, you code looks neater and easier to read. Secondly, your player's gold will never overflow, leaving them with negative money. Thirdly, players get a message when they have reached the maximum. Also includes decrease_gold, increase_bank and decrease_bank.

ch = is_playing(player_name);Look for a player by their name, and if they are online, return a char_data pointer. If offline, then returns NULL.

sprintf(txt, "%s", add_commas(number));The add_commas function is great for use in player's score. It simply converts a number to a string, adding commas where appropriate to make it more readable. For example, it would take the number 12345678 and return a pointer to the string "12,345,678"




__________________
13 Apr 2010 - 00:262469
Just a quick update...

I've just run my freshly patched tbaMUD 3.61 for the first time, and it compiled cleanly and didn't crash, which is a good sign. I'd like to thoroughly test it before release. Unfortunately, clan code really needs a lot of players to test it with, but I'll do what I can...

I've created a first-draft .patch file, and have read through it once to check it. I'll re-read it tomorrow, when I'm more awake, but it looks good so far.

I've also thrown together a readme.txt type file to go with the patch, which I'd recommend reading before you apply the patch. I've uploaded this text file to my Skydrive, and will upload the patch to the same folder hopefully within 24 hours!


__________________
13 Apr 2010 - 02:492470
Wow.. nice... lots of very nice utils! Yea.... Will need to modify it for shadow guilds and multi as well.. Need to be able to have someone in lets say the city guard (but also secretly part of an assassains guild)... Would like the "primary" guilds to always display on the who list and such, but never display the "secret" guilds... shouldnt be too hard to tweak that from what you are saying tho! ^_^


__________________
Al'Aman Shadar (Shadows of the Dragon)
Wheel of Time based MUD
tbaMUD base code (of course)
shadowmud.org:8086 (not live just yet)
13 Apr 2010 - 20:572472
OK, here goes...
Finally, here is my first clans patch. Sorry to everyone who has waited patiently for this. This should patch cleanly into a recent stock tbaMUD.

First, the link to the folder on My Skydrive.

Inside that folder are 6 files, these are:
Clans.zip - The full patch, and the only file you should need to download. Contains the 5 file listed below.

clans patch.txt - A ReadMe-style text file with lots of information about this patch. I recommend reading this before patching.

clans help.txt - For all you lazy people out there, I've included all the clans in-MUD help information in a handy text file for your copy/pasting pleasure! For anyone unfamiliar with the clans system, this can be used as a clan-system manual.

clans.patch - The actual patch file, which when used with the *nix patch command will add the clans system to your MUD, or you could open it in a text editor and manually patch each line.

clan.c - 4240 lines of clan code, just drop it into your src folder and cross your fingers.

clan.h - Defines, Structures and Function Prototypes that are all required for the clans patch to work. Drop this one into your src folder too!

As this is a first-version of the patch, I'm kinda expecting people to come back with lists of bugs and problems. I'd be happy to help fix these bugs as they arise, just let me know, either on this post, by PM on this site, or my email address is in the clan patch.txt file, put tbaMUD in the subject so I don't think it's spam.

Enjoy!


__________________
13 Apr 2010 - 23:042473
Great work as usual Jamdog. We can get it up and running on TBA's player port to test it out and I'm sure a few others would volunteer to help.


__________________
Rumble
The Builder Academy
tbamud.com 9091
13 Apr 2010 - 23:342474
No problem, I'll patch it into the SVN in the morning...


__________________
14 Apr 2010 - 09:562475
Sorry, patching into the SVN may have to wait (unless someone else wants to do it before I get chance).

I've just heard that I'm moving house this week, get the new house keys tomorrow, so busy packing today, and it may be a few days before I can get back onto the internet.


__________________
14 Apr 2010 - 21:492476
Jamdog Hello!

Dude, I have no words to express such gratitude for your work!

Simply FANTASTIC!

You can be sure that I, and hundreds more Brazilians will get the best possible all this your work!

Excuse my insistence. However, the expectation was huge!

Anyway ... THANK YOU VERY MUCH THE SAME!


17 Apr 2010 - 16:202480
Hey Jamdog, nice Clan code, and thank you.

I also had to update my Makefile as follows.

-  LIBS =  -lcrypt
+  LIBS =  -lcrypt -lm 
To link math to the gcc compiler

Regards,
Sokol



Last edited by sokol (17 Apr 2010 - 16:20)
18 Apr 2010 - 04:122483
Hmm... whenever I edit a clan's description inside the olc editor, it works fine, but when you try to save (/s) your work, it seems to wait for another input, then when you press anything after that, it crashes olc and goes back to the prompt. Any ideas?


__________________
Al'Aman Shadar (Shadows of the Dragon)
Wheel of Time based MUD
tbaMUD base code (of course)
shadowmud.org:8086 (not live just yet)
21 Apr 2010 - 03:162505
i think i might set it up as an array of clans per character... so only the rank and such of your first would appear on the who list and things, but it wouldnt be hard to modify it to show all your clans on your score with a simple loop. This way if you REALLY are evil you can have your primary clan be assassains for example. Think something like this would work with your code? from what ive seen it dosent look too hard to do... just change the clantalk command to have its first argument be the clan you want to talk to (and assume clan 1 if you dont specify a valid clan)


__________________
Al'Aman Shadar (Shadows of the Dragon)
Wheel of Time based MUD
tbaMUD base code (of course)
shadowmud.org:8086 (not live just yet)
30 Apr 2010 - 20:472553
After:
  /*-------------------------------------------------------------------*/
  case CLANEDIT_NAME:

And before:
  /*-------------------------------------------------------------------*/
  case CLANEDIT_DESC:

There should be a case CLANEDIT_ABREV, as shown in the menu here:
    case '2':
      if (CHK_CP(CP_TITLE)) {
        write_to_output(d, "Enter new clan name abbreviation : ");
        OLC_MODE(d) = CLANEDIT_ABBREV;
If you try to edit the clan abrev, it hits default and throws an error. Also, the main menu in olc displays the name, not the abrev (which is why in clan info it shows (null) for the abrev)
    write_to_output(d, "%s2%s) Abbreviation: %s\r\n",
                         cyn, nrm, OLC_CLAN(d)->clan_name);


__________________
Al'Aman Shadar (Shadows of the Dragon)
Wheel of Time based MUD
tbaMUD base code (of course)
shadowmud.org:8086 (not live just yet)

Last edited by mrurl42 (30 Apr 2010 - 21:07)
20 May 2010 - 22:282604
bug fix
clan.c
do_clantalk

   for (i = descriptor_list; i; i = i->next) {
    if (STATE(i) != CON_PLAYING)
      continue;

+	if (!i->character)
+	  continue;

    imm = FALSE;
    if (GET_LEVEL(i->character) >= LVL_GOD)


20 May 2010 - 23:032605
More Fixes

   case CLANEDIT_NAME:
    if (OLC_CLAN(d)->clan_name)
      free(OLC_CLAN(d)->clan_name);
    if (*arg)
      OLC_CLAN(d)->clan_name = strdup(arg);
    else
      OLC_CLAN(d)->clan_name = NULL;
    OLC_VAL(d) = 1;
    clanedit_disp_menu(d);
    return;

+  /*-------------------------------------------------------------------*/
+  case CLANEDIT_ABBREV:
+    if (OLC_CLAN(d)->abrev)
+      free(OLC_CLAN(d)->abrev);
+    if (*arg)
+      OLC_CLAN(d)->abrev = strdup(arg);
+    else
+      OLC_CLAN(d)->abrev = NULL;
+    OLC_VAL(d) = 1;
+    clanedit_disp_menu(d);
+    return;


and

  if (CHK_CP(CP_TITLE)) {
    write_to_output(d, "%s1%s) Clan Title  : %s\r\n",
                         cyn, nrm, OLC_CLAN(d)->clan_name);
  }

  if (CHK_CP(CP_TITLE)) {
    write_to_output(d, "%s2%s) Abbreviation: %s\r\n",
-                          cyn, nrm, OLC_CLAN(d)->clan_name);
+                         cyn, nrm, OLC_CLAN(d)->abrev);
  }


20 May 2010 - 23:042606
..
..



Last edited by drefs (22 May 2010 - 02:01)
21 Feb 2011 - 22:113858
Clan help
Ive hand patched this code into a tbamud base code before about a 1 year ago. But when I tired to hand patch it in now, I get tons of errors in the clan.h file like
clan.h:75: error: expected specifier-qualifier-list before `zone_vnum'
clan.h:88: warning: `struct char_data' declared inside parameter list
clan.h:88: warning: its scope is only this definition or declaration, which is p
robably not what you want
clan.h:94: error: expected specifier-qualifier-list before `clan_vnum'
clan.h:117: error: expected `=', `,', `;', `asm' or `__attribute__' before `real
_clan'
clan.h:118: error: expected `=', `,', `;', `asm' or `__attribute__' before `get_
clan_by_name'
clan.h:119: error: expected `)' before `c'
clan.h:120: error: expected `)' before `c'
clan.h:121: error: expected `=', `,', `;', `asm' or `__attribute__' before `high
est_clan_vnum'
clan.h:122: error: expected `=', `,', `;', `asm' or `__attribute__' before `add_
clan'
clan.h:123: error: expected `=', `,', `;', `asm' or `__attribute__' before `remo
ve_clan'
clan.h:126: error: expected `=', `,', `;', `asm' or `__attribute__' before `set_
clan'
clan.h:128: error: expected `=', `,', `;', `asm' or `__attribute__' before `auto
_appoint_new_clan_leader'
clan.h:129: error: expected `=', `,', `;', `asm' or `__attribute__' before `is_a
_clan_leader'
clan.h:133: warning: data definition has no type or storage class
clan.h:133: warning: type defaults to `int' in declaration of `ACMD'
clan.h:133: warning: parameter names (without types) in function declaration
clan.h:134: warning: data definition has no type or storage class
clan.h:134: warning: type defaults to `int' in declaration of `ACMD'
clan.h:134: warning: parameter names (without types) in function declaration
clan.h:135: warning: data definition has no type or storage class
clan.h:135: warning: type defaults to `int' in declaration of `ACMD'
clan.h:135: warning: parameter names (without types) in function declaration
clan.h:136: warning: data definition has no type or storage class
clan.h:136: warning: type defaults to `int' in declaration of `ACMD'
clan.h:136: warning: parameter names (without types) in function declaration
clan.h:137: warning: data definition has no type or storage class
clan.h:137: warning: type defaults to `int' in declaration of `ACMD'
clan.h:137: warning: parameter names (without types) in function declaration
clan.h:138: warning: data definition has no type or storage class
clan.h:138: warning: type defaults to `int' in declaration of `ACMD'
clan.h:138: warning: parameter names (without types) in function declaration
clan.h:139: warning: data definition has no type or storage class
clan.h:139: warning: type defaults to `int' in declaration of `ACMD'
clan.h:139: warning: parameter names (without types) in function declaration
clan.h:140: warning: data definition has no type or storage class
clan.h:140: warning: type defaults to `int' in declaration of `ACMD'
clan.h:140: warning: parameter names (without types) in function declaration
clan.h:141: warning: data definition has no type or storage class
clan.h:141: warning: type defaults to `int' in declaration of `ACMD'
clan.h:141: warning: parameter names (without types) in function declaration
clan.h:142: warning: data definition has no type or storage class
clan.h:142: warning: type defaults to `int' in declaration of `ACMD'
clan.h:142: warning: parameter names (without types) in function declaration
clan.h:143: warning: data definition has no type or storage class
clan.h:143: warning: type defaults to `int' in declaration of `ACMD'
clan.h:143: warning: parameter names (without types) in function declaration
clan.h:144: warning: data definition has no type or storage class
clan.h:144: warning: type defaults to `int' in declaration of `ACMD'
clan.h:144: warning: parameter names (without types) in function declaration
clan.h:145: warning: data definition has no type or storage class
clan.h:145: warning: type defaults to `int' in declaration of `ACMD'
clan.h:145: warning: parameter names (without types) in function declaration
clan.h:146: warning: data definition has no type or storage class
clan.h:146: warning: type defaults to `int' in declaration of `ACMD'
clan.h:146: warning: parameter names (without types) in function declaration
clan.h:147: warning: data definition has no type or storage class
clan.h:147: warning: type defaults to `int' in declaration of `ACMD'
clan.h:147: warning: parameter names (without types) in function declaration
clan.h:148: warning: data definition has no type or storage class
clan.h:148: warning: type defaults to `int' in declaration of `ACMD'
clan.h:148: warning: parameter names (without types) in function declaration
clan.h:149: warning: data definition has no type or storage class
clan.h:149: warning: type defaults to `int' in declaration of `ACMD'
clan.h:149: warning: parameter names (without types) in function declaration
clan.h:150: warning: data definition has no type or storage class
clan.h:150: warning: type defaults to `int' in declaration of `ACMD'
clan.h:150: warning: parameter names (without types) in function declaration
clan.h:151: warning: data definition has no type or storage class
clan.h:151: warning: type defaults to `int' in declaration of `ACMD'
clan.h:151: warning: parameter names (without types) in function declaration
clan.h:153: warning: data definition has no type or storage class
clan.h:153: warning: type defaults to `int' in declaration of `ACMD'
clan.h:153: warning: parameter names (without types) in function declaration
clan.h:154: warning: data definition has no type or storage class
clan.h:154: warning: type defaults to `int' in declaration of `ACMD'
clan.h:154: warning: parameter names (without types) in function declaration
clan.h:155: error: expected `=', `,', `;', `asm' or `__attribute__' before `zone
_is_clanhall'
clan.h:156: error: expected `=', `,', `;', `asm' or `__attribute__' before `get_
clanhall_by_char'
clan.h:157: warning: `struct char_data' declared inside parameter list
clan.h:158: error: expected `=', `,', `;', `asm' or `__attribute__' before `chec
k_clanpriv'
clan.h:159: warning: `struct char_data' declared inside parameter list
clan.h:163: error: expected `)' before `z_num'
clan.h:167: error: expected `)' before `z'
clan.h:168: error: expected `)' before `z'
clan.h:169: error: expected declaration specifiers or `...' before `zone_vnum'
clan.h:169: warning: `struct char_data' declared inside parameter list
clan.h:170: warning: `struct char_data' declared inside parameter list
clan.h:171: error: expected declaration specifiers or `...' before `clan_vnum'
clan.h:171: warning: `struct char_data' declared inside parameter list
clan.h:172: error: expected `=', `,', `;', `asm' or `__attribute__' before `get_
owning_clan'
clan.h:173: error: expected `=', `,', `;', `asm' or `__attribute__' before `get_
owning_clan_by_char'
clan.h:174: error: expected `)' before `z'
clan.h:175: error: expected `=', `,', `;', `asm' or `__attribute__' before `save
_claims'
clan.h:179: error: expected `)' before `zn'
clan.h:180: error: expected `)' before `zn'
clan.h:181: warning: `struct char_data' declared inside parameter list
clan.h:182: error: expected declaration specifiers or `...' before `clan_vnum'
clan.h:182: warning: `struct char_data' declared inside parameter list
clan.h:183: warning: `struct char_data' declared inside parameter list
clan.h:187: warning: `struct descriptor_data' declared inside parameter list
clan.h:188: warning: `struct descriptor_data' declared inside parameter list
make[1]: *** [comm.o] Error 1
make[1]: Leaving directory `/home/Main/t/src'
make: *** [all] Error 2



Last edited by bobapples (21 Feb 2011 - 22:15)
Login to reply  Page: « < 1 of 2 > »