Topics in Category: Snippets - tbaMUD https://tbamud.com Mon, 06 Jul 2020 19:45:34 +0000 Joomla! - Open Source Content Management /media/kunena/images/icons/rss.png Topics in Category: Snippets - tbaMUD en-gb Old Snippets - by: Rumble https://tbamud.com/forum/8-snippets/8-old-snippets#8 https://tbamud.com/forum/8-snippets/8-old-snippets#8
Below is a list of links to previous patches, so that new forum members don't have to trawl through hundreds of posts.

This list is not complete. If you have more to add, please do so...
I have tried to avoid most things that made it into stock tbaMUD.

Apr 23, 2006 created by Maclir: findkey command to show which keys open a particular door
Apr 23, 2006 created by Maclir: finddoor command to show which door(s) a key will open
Nov 13, 2006 created by Rhade: Player-customizable color schemes
Nov 28, 2006 created by Rhade: Split who list to show imms and mortals seperately
Feb 21, 2007 created by Fantebsb: Latin character support
Feb 23, 2007 created by Rhade: Todo Lists
Feb 24, 2007 created by Rhade: history command for reviewing comms history
Feb 26, 2007 created by Rhade: Change leader of group when leader dies (with bug fixes by Jamdog, Khrog and Meddle)
Mar 02, 2007 created by Jamdog: Function to add commas to long numbers (for score)
Mar 13, 2007 created by Rhade: plist command to list all registered players
Mar 30, 2007 created by Jamdog: Forge that 'merges' items, with forgedit OLC
May 09, 2007 created by Jamdog: -- command to clear queued commands (stop spammed spells, etc...)
May 31, 2007 rewritten by Jamdog: afflist and typelist builder/admin commands
Jun 25, 2007 created by Jamdog: Object binding, including admin commands and script functions
Jun 26, 2007 rewritten by Jamdog: A new screen.h file (used in tbaMUD since v3.54)
Jun 28, 2007 created by Jamdog: New 'portal' system, with portal types and oedit options
Jun 30, 2007 created by Jamdog: Sector-type dependant weather system
Jul 02, 2007 created by Geekman: restring command for objects
Aug 05, 2007 rewritten by Jamdog: New news and motd update notifications on prompt
Aug 06, 2007 created by Jamdog: Limit the number of players and Imms from one IP/host
Aug 08, 2007 updated by Jamdog: Allow levels command to specify a range
Jan 08, 2008 created by Geekman: Script text funcs: isabbrev, isname, repeat, count, find, popfront, popback, pushfront, pushback, word, stripcolour
Jan 21, 2008 created by Jamdog: %actor.pref% script addition for player pref flags
Jan 31, 2008 rewritten by Jamdog: Autoquests Patch
Feb 02, 2008 bug fix by Jamdog: Stop followers wandering bug-fix
Feb 05, 2008 rewritten by Jamdog: Automap Patch
Feb 15, 2008 created by Jamdog: moblist builder/admin command
Apr 16, 2008 created by Jamdog: Game Info channel and nogameinfo toggle
May 03, 2008 updated by Jamdog: scan command
May 11, 2008 created by Mordecai: wordat script function ]]>
Snippets Sun, 10 Jun 2012 22:41:03 +0000
IAC GA (request) - by: Enceladus https://tbamud.com/forum/8-snippets/4596-iac-ga-request#8780 https://tbamud.com/forum/8-snippets/4596-iac-ga-request#8780 Snippets Wed, 17 Jun 2020 13:56:36 +0000 How to Add a Wear Slot - by: WhiskyTest https://tbamud.com/forum/8-snippets/23-how-to-add-a-wear-slot#8762 https://tbamud.com/forum/8-snippets/23-how-to-add-a-wear-slot#8762
No dude, when you increase the NUM_WEARS this is how the OLC stuff figures out how many different wear slots are available when you are creating items.]]>
Snippets Sat, 06 Jun 2020 21:42:46 +0000
SPELL and SKILL 1.0 BETA - by: WhiskyTest https://tbamud.com/forum/8-snippets/4537-spell-and-skill-1-0-beta#8753 https://tbamud.com/forum/8-snippets/4537-spell-and-skill-1-0-beta#8753 Snippets Fri, 05 Jun 2020 17:57:54 +0000 Dg_Script question about remote in-game activation - by: Papaya Pete https://tbamud.com/forum/8-snippets/4582-dg-script-question-about-remote-in-game-activation#8712 https://tbamud.com/forum/8-snippets/4582-dg-script-question-about-remote-in-game-activation#8712
That is, at a glance, how I would approach a goal like that. Will it work exactly as expected? Not sure. If you are still stumped, let me know and I can give it a shot.

If you have a group in the room, the room trigger can toss a variable on the player. The mobs doing the hunt can then search through the room for someone with that variable and target that person.]]>
Snippets Fri, 15 May 2020 22:43:41 +0000
TBAMud - Snippets, Patches and Triggers Repository - by: Rumble https://tbamud.com/forum/8-snippets/4544-tbamud-snippets-patches-and-triggers-repository#8619 https://tbamud.com/forum/8-snippets/4544-tbamud-snippets-patches-and-triggers-repository#8619 Snippets Fri, 10 Apr 2020 20:47:01 +0000 TBA-2020 Bug Fix Request - by: thomas https://tbamud.com/forum/8-snippets/4541-tba-2020-bug-fix-request#8612 https://tbamud.com/forum/8-snippets/4541-tba-2020-bug-fix-request#8612 github.com/tbamud/tbamud/issues/86 ]]> Snippets Thu, 05 Mar 2020 18:55:20 +0000 An old snippet (updated) - by: thomas https://tbamud.com/forum/8-snippets/4522-an-old-snippet-updated#8548 https://tbamud.com/forum/8-snippets/4522-an-old-snippet-updated#8548
I seem to recall this pattern being used in Cruel World MUD.]]>
Snippets Sat, 08 Feb 2020 19:10:09 +0000
Shopkeepers: First in, First out, 20 Item Limit Purge - by: Sapphire https://tbamud.com/forum/8-snippets/4530-shopkeepers-first-in-first-out-20-item-limit-purge#8538 https://tbamud.com/forum/8-snippets/4530-shopkeepers-first-in-first-out-20-item-limit-purge#8538
The first trigger addresses a mobile shopkeeper whom spawns with items in a shop product menu which have an unlimited quantity. IE: Midgaard wizard loads a scroll of recall and we want that to always be available.

The second trigger is made for a mobile which has no unlimited item quantities such as a pawn broker type mob.

Note: The text file is part of a compendium of triggers in my personal files. It follows a format I prefer for my own personal use and as such it may or may not be intuitive for others. Even so, the triggers are present for whomever wishes to use them.

Enjoy,
Sapphire]]>
Snippets Wed, 05 Feb 2020 17:37:25 +0000
Lag Initiator Snippet for DG_Scripts - by: Sapphire https://tbamud.com/forum/8-snippets/4509-lag-initiator-snippet-for-dg-scripts#8440 https://tbamud.com/forum/8-snippets/4509-lag-initiator-snippet-for-dg-scripts#8440
Note: I included a fail-safe mechanism for if a builder uses negative integers, or a zero. In the case of this variable, it can be called upon with %actor.lag% to determine an existing wait_state, and if you want to lag a player you can use the nop function. IE: "nop %actor.lag(3)%" would lag a player for 3 rounds.

In dg_variables.c

Original:


Replace with:
]]>
Snippets Thu, 07 Nov 2019 00:56:17 +0000
Idea: Families and Mentor - by: Papaya Pete https://tbamud.com/forum/8-snippets/4505-idea-families-and-mentor#8425 https://tbamud.com/forum/8-snippets/4505-idea-families-and-mentor#8425
For example, when choosing what kind of family raised the character...

Nobles - 500 coins, but -1 to either str or con (randomly determined)
Craftsmen - 400 coins
Scholars - 300 coins, +1 to int or wis (random)
Commoners - 200 coins
Orphaned - 100 coins, but +25% to swimming/climbing/jumping (random)
Adventurers - 200 coins, +25% to a random adventuring-type skill (find/remove traps, kick, bash, hide, sneak, etc.)

Mentoring would determine how much skill a character starts with, and could even result in a character not needing to run to a guild in order to practice up those skills. These starting skills would be non-weapon skills, as I have a tutorial that allows players to pick whatever weapon suits their style and gives them a decent starting percentage.

Family member (uncle, grandfather, aunt, mother, etc.) - 20% to 4 skills
Lonesome hermit - 35% to 3 skills, -200 reputation (the hermit isn't exactly well-liked)
Guild - 15% to 5 skills, -25 coins (guild dues)
Self-taught - 10% to 3-4 skills, can practice anywhere
Elder/Respected Militia Captain - 25% to 3 skills, +200 reputation

As a side note, I don't have an alignment system (good/evil/neutral); instead there is one's reputation. I wanted it to be a PvE setting, in which you COULD try to be evil but life would get extremely difficult for you fairly quickly (after your reputation tanks enough, towns/villages would rather attack on sight than even let you have a chance to cause any trouble).

Another side note: there are not practice sessions like on stock mud. An old mud I played, Eternal Visions, had a very interesting system using learning points. While I don't care for how they implemented everything (skills are raised through use, which meant spamming a skill a lot to improve it and hoping that it goes up), I liked how it rewarded characters with high intelligence and wisdom (they got more learning points and, I think, it cost less to raise skills). A quick run-down of the Learning Point system: every time you gain XP, you gain LP as well (modified by your int and wis). Whenever you practice at a teacher, it costs x-number of LP, based on what the current skill level is. It starts out cheap and gets very expensive later on.

I wanted to get some thoughts on all of this; is this something any of you have tried out? If so, how did it work out and what pitfalls should I avoid? One thing I am worried about is people attempting to min/max, always choosing nobility and what-not to get the most starting money, the most skills, etc. These numbers are not something I would state so it would be easy to figure out, but given enough time...

I'm sorry if this is a little incoherent; I'm a little under the weather and there's quite a bit of noise around me.]]>
Snippets Sat, 03 Aug 2019 19:52:27 +0000
CircleMUD -> MySQL - by: Blizzard https://tbamud.com/forum/8-snippets/4466-circlemud-mysql#8424 https://tbamud.com/forum/8-snippets/4466-circlemud-mysql#8424

The key piece to versioning being the last 3 fields. modified updates automatically with ON UPDATE so you only have to set the last two during INSERTs. Whenever I do updates to a table, I run a query like this:

Then I insert new rows with a status of current instead of updating existing ones. Note that I'm using MySQL++ in my game, not the MySQL C APIs, a design decision I made back in college in 2001 or so, haha. Right now, "current" and "old" status states are all I have implemented. Haven't implemented revert or anything like that yet, although it is possible to do so manually in SQL followed by a reboot.

Deleted status would be if we wanted to undelete an object, draft and pending are meant for web-OLC, where drafts would be anything unsaved, which would then be published by the editor to a pending state, where the MUD, possibly as part of the game loop, would look for anything in a pending state and update the world accordingly, at least that's how I'm planning it.

I haven't noticed a major lag in game loading times with SQL. Currently I've got zones, rooms, mobs, objects, players and help loading and saving to SQL. I'm running this off of SSD though so database performance should be good, and the database is typically small enough that MySQL should be able to fit the whole thing in RAM. Also important are indexes in SQL. I have any relational columns (typically id) used to reference keys in other tables setup as indexes, as well as anything commonly queried for in WHEREs.]]>
Snippets Fri, 26 Jul 2019 21:08:42 +0000
Intermud Grapevine Chat support - by: Blizzard https://tbamud.com/forum/8-snippets/4503-intermud-grapevine-chat-support#8421 https://tbamud.com/forum/8-snippets/4503-intermud-grapevine-chat-support#8421 Snippets Wed, 24 Jul 2019 10:06:43 +0000 Converting to uppercase in fight.c combat messages? - by: thomas https://tbamud.com/forum/8-snippets/4497-converting-to-uppercase-in-fight-c-combat-messages#8397 https://tbamud.com/forum/8-snippets/4497-converting-to-uppercase-in-fight-c-combat-messages#8397
Your smash obliterates $U$N!

This is the "uppercase next word" flag. Alternatively, add $u after:

Your smash obliterates $N$u!

Which uses the "uppercase previous word" method.]]>
Snippets Thu, 23 May 2019 19:55:35 +0000
Taunt skill - by: Sapphire https://tbamud.com/forum/8-snippets/4486-taunt-skill#8393 https://tbamud.com/forum/8-snippets/4486-taunt-skill#8393 I went ahead and updated the skill in multiple areas. For starters, it does not return (end) when encountering something non-tauntable such as a hidden player, etc. It goes onto the next target to find them. Second, I added in a player counter that begins at 0, and counts the player or mobile attempting the skill. If an Immortal or higher PC is in room, it takes off a number from the count so they are not calculated into the count. If the number is less than or equal to 1, it displays a message for the PC or NPC being the only one in the room. If it's higher than 1, it displays normal messages as it succeeds or fails.

Note: I set this skill up intentionally to display each individual success or fail to the player. This is so a player knows whether or not he was successful in who he hit or didnt hit with the taunt skill. You could take this one step further and display individual names to a player if they miss, but on my mud that would not be good. Primarily because I have multiple invisibility systems in the game and beginning combat does not necessarily break that invisibility depending upon a variety of factors. IE: I don't want my morts using Taunt to find the names of hidden enemies which they must explore the zone to discover. If you wish to remove multiple instances of success/fail, just remove the taunt success lines from the code, "Your taunt is successful," and remove the failure lines. Then put a catchall/one time phrase at the end of the code, right above the very last bracket or something (I think?).

PS. Good catch on that no display issue. I didn't catch that when I tested it. Thanks for helping me to improve my own mud! Gotta admit man, a Taunt/Aggro pull type skill is pretty awesome in a mud environment. I also have other skills for tank types such as Group_Retreat, and a Hamstring type skill which prevents enemies from fleeing. The Hamstring skill is a little more complex because I have it set to roll a chance to break free at the end of each combat round. I have no clue how to actually do that on TBAMud because my fight.c code is pretty much entirely re-written from TBAMud's code to allow for a TON of fight mechanic changes/additions. To put that in perspective, TBA's is 31kb and mine is 121kb. Even so, I'm sure you could figure that out with some tinkering, and the code for Act.Offensive.c on Hamstring is fairly straight forward.

]]>
Snippets Fri, 10 May 2019 04:01:13 +0000
Mob Hunting: A Minor Change for a Big (subjective) Improvement - by: Sapphire https://tbamud.com/forum/8-snippets/4496-mob-hunting-a-minor-change-for-a-big-subjective-improvement#8390 https://tbamud.com/forum/8-snippets/4496-mob-hunting-a-minor-change-for-a-big-subjective-improvement#8390
Note: This is from a code that has deviated from TBA through additions for many, many years. Some syntax may need to be altered, but I'm pretty sure this will be a drag-n-drop deal if you wanted to test it. Please give credit where it is due if you use it. Thanks, and I hope this makes another mud more enjoyable. The idea of making mobiles appear smarter always intrigues me as a player!

Original Code pt. 1


Original Code pt. 2 (From void hunt_victim at bottom of graph.c)


Code Change pt. 1


Code Change pt. 2
]]>
Snippets Thu, 09 May 2019 06:44:13 +0000
Tick Timer / Tick Counter addition to TBAMud base if needed - by: Sapphire https://tbamud.com/forum/8-snippets/4495-tick-timer-tick-counter-addition-to-tbamud-base-if-needed#8374 https://tbamud.com/forum/8-snippets/4495-tick-timer-tick-counter-addition-to-tbamud-base-if-needed#8374
Hopefully this works for you if you need it. Let me know how it goes. Please, if you use it, give credit where it's due. Thanks!

Original Code


Updated Code

]]>
Snippets Mon, 06 May 2019 18:48:05 +0000
Area_Make.c - by: Liko https://tbamud.com/forum/8-snippets/4487-area-make-c#8340 https://tbamud.com/forum/8-snippets/4487-area-make-c#8340
I've attached a new area generator. Drop it in to your world folder and it will generate .wld, .zon, .mob, and all those files. It will ask you to input some values and information. It is great for generating world maps or large open areas.

Note: You will still have to manually insert the *.* into the index. Example: 1.wld into the index file in wld.
Note 2: To compile simply type gcc -o filename area_make.c

Let me know what you all think!

File Attachment:

File Name: area_make.txt
File Size: 5 KB
]]>
Snippets Mon, 18 Mar 2019 01:12:19 +0000
Adding onto Damaging Items - by: Papaya Pete https://tbamud.com/forum/8-snippets/4263-adding-onto-damaging-items#8298 https://tbamud.com/forum/8-snippets/4263-adding-onto-damaging-items#8298
Anyways, I'm finally getting around to making some progress over here. As my test character ran around, I started to find some bugs that would crash the mud. One was during a battle with a boar, so i figured it had something to do with damaging an item he was wearing. Looking at the DAMAGE_ARMOR section in the damage_item function, I think the problem might be that it was attempting to damage an item that wasn't meant to be damaged. So, I rewrote it to the following:



Lots of running around and attempting to finish the first quest have resulted in no more crashes so far. I'll update this as I find more mistake I made.]]>
Snippets Thu, 17 Jan 2019 08:17:35 +0000
Cedit and Player Corpses - by: WhiskyTest https://tbamud.com/forum/8-snippets/4423-cedit-and-player-corpses#8283 https://tbamud.com/forum/8-snippets/4423-cedit-and-player-corpses#8283
Fortunately for this one, just ignore the pieces from interpreter.c.
I've updated the patch and spoiler.

The reason (if you're interested) is when I made the diff, it wasn't over a fresh copy of tba so I manually went through and deleted the parts irrelevant to the corpse snippet. As it turns out it would have been quicker to start over haha.. .. .
..
.
That's what you get when you try and take short cuts :D]]>
Snippets Tue, 18 Dec 2018 14:01:50 +0000
Circle Mount patch to tba - by: Sascha https://tbamud.com/forum/8-snippets/4061-circle-mount-patch-to-tba?start=20#8280 https://tbamud.com/forum/8-snippets/4061-circle-mount-patch-to-tba?start=20#8280 Snippets Sun, 16 Dec 2018 05:38:27 +0000 Worn containers - by: Sascha https://tbamud.com/forum/8-snippets/4467-worn-containers#8275 https://tbamud.com/forum/8-snippets/4467-worn-containers#8275 Snippets Sat, 15 Dec 2018 16:54:10 +0000 Code execution delay - by: Kinther https://tbamud.com/forum/8-snippets/4457-code-execution-delay#8258 https://tbamud.com/forum/8-snippets/4457-code-execution-delay#8258 Snippets Thu, 06 Dec 2018 17:00:54 +0000 Targeted RP Emotes Snippet - by: Kinther https://tbamud.com/forum/8-snippets/4429-targeted-rp-emotes-snippet#8235 https://tbamud.com/forum/8-snippets/4429-targeted-rp-emotes-snippet#8235
Great stuff. I am tweaking some of this to add some additional functionality like targeting items in rooms with the token *.

I am curious though how we might be able to alter the / token so that the victim of the emote sees "you" instead of their name in the echo. Based on my playing around with snprintf it doesn't look like it is possible to send an echo to the victim, the room, and the originating character. The act(*, *, *, *, *) function potentially could but I am unsure about passing the formatted string buffers you create here to it.

Any thoughts?]]>
Snippets Thu, 15 Nov 2018 23:24:01 +0000
Trigger Error Oddities - by: Chime https://tbamud.com/forum/8-snippets/4447-trigger-error-oddities#8222 https://tbamud.com/forum/8-snippets/4447-trigger-error-oddities#8222
It doesn't really seem to break anything at least!]]>
Snippets Thu, 11 Oct 2018 08:19:21 +0000
A Couple Handy Defines - by: Chime https://tbamud.com/forum/8-snippets/4450-a-couple-handy-defines#8221 https://tbamud.com/forum/8-snippets/4450-a-couple-handy-defines#8221 Snippets Wed, 10 Oct 2018 18:35:38 +0000 Script debugger - by: Chime https://tbamud.com/forum/8-snippets/4449-script-debugger#8205 https://tbamud.com/forum/8-snippets/4449-script-debugger#8205 Snippets Mon, 10 Sep 2018 18:30:29 +0000 Help With a Snippet Translation - by: Chime https://tbamud.com/forum/8-snippets/4448-help-with-a-snippet-translation#8201 https://tbamud.com/forum/8-snippets/4448-help-with-a-snippet-translation#8201
If somebody were interested in giving a tbaMUD version a go, I'd be immensely grateful.

www.circlemud.org/pub/CircleMUD/contrib/.../rooms/roomsave2.txt ]]>
Snippets Sat, 08 Sep 2018 14:07:05 +0000
Foe condition - by: JTP https://tbamud.com/forum/8-snippets/4365-foe-condition#8199 https://tbamud.com/forum/8-snippets/4365-foe-condition#8199 Snippets Wed, 29 Aug 2018 04:36:09 +0000 Trying to Find a Code Snippet for COMPARE Command - by: Parnassus https://tbamud.com/forum/8-snippets/1244-trying-to-find-a-code-snippet-for-compare-command#8198 https://tbamud.com/forum/8-snippets/1244-trying-to-find-a-code-snippet-for-compare-command#8198 www.circlemud.org/pub/CircleMUD/submissi...ands/compare-new.txt

Even the send_to_char parts have already been changed.

However, it's missing these parts:
This one is mentioned but not explained:


This one is not mentioned that I can see:


The line numbers are not guaranteed, of course, and are subject to change.]]>
Snippets Wed, 29 Aug 2018 02:30:23 +0000
Player Memory System Request - by: Chime https://tbamud.com/forum/8-snippets/4437-player-memory-system-request#8195 https://tbamud.com/forum/8-snippets/4437-player-memory-system-request#8195 Snippets Mon, 27 Aug 2018 22:22:42 +0000 dig north * - by: prool https://tbamud.com/forum/8-snippets/4446-dig-north#8194 https://tbamud.com/forum/8-snippets/4446-dig-north#8194
I made option for command 'dig'

dig direction *

Creates a new room with the first free number

Code:

ACMD(do_dig)
{
char sdir[MAX_INPUT_LENGTH], sroom[MAX_INPUT_LENGTH], *new_room_name;
room_vnum rvnum = NOWHERE;
room_rnum rrnum = NOWHERE;
zone_rnum zone;
int dir = 0, rawvnum;
struct descriptor_data *d = ch->desc; /* will save us some typing */

/* Grab the room's name (if available). */
new_room_name = two_arguments(argument, sdir, sroom);
skip_spaces(&new_room_name);

/* Can't dig if we don't know where to go. */
if (!*sdir || !*sroom) {
send_to_char(ch, "Format: dig <direction> <room> - to create an exit\r\n"
" dig <direction> -1 - to delete an exit\r\n"
" dig <direction> * - to create an exit to next free vnum\r\n");
return;
}

if (*sroom=='*') { // by prool
int r, i, z, j, rnum;
r = GET_ROOM_VNUM(IN_ROOM(ch));
z = r / 100;
//printf("prooldebug: do_dig() room %i zone %i\n",r,z);
for (i=0;i<100;i++) {
j=z*100+i;
rnum=real_room(j);
//printf("#%i %c ", j, (rnum!=NOWHERE)?'+':'-');
if (rnum==NOWHERE) {rawvnum=j; rvnum=j; rrnum=NOWHERE; break;}
else if (i==99) {send_to_char(ch,"This zone is full\r\n"); return; }
}
//printf("\n");

} else { // *sroom != '*'
rawvnum = atoi(sroom);
if (rawvnum == -1)
rvnum = NOWHERE;
else
rvnum = (room_vnum)rawvnum;
rrnum = real_room(rvnum);
}


Further lines without changes

With best regards, Prool]]>
Snippets Sun, 26 Aug 2018 09:22:13 +0000
Handling Extreme Weather - by: Papaya Pete https://tbamud.com/forum/8-snippets/4445-handling-extreme-weather#8193 https://tbamud.com/forum/8-snippets/4445-handling-extreme-weather#8193
Actually, that's similar to what I had in mind, Whiskey! Adding another stat, and it starts at 0; depending on whether a player is in a hot room (desert, humid swamp perhaps) or a cold one (arctic, Frostfall Mountains), the value goes up and down.

For the mountains, as an example, let's say the base value that Temperature drops by is 20. From there, each piece of leather would decrease that by 1 while hide and fur would decrease it by 2 (wearing 5 pieces of fur armor would cut it down to 10, for example). Each piece of metal gear would increase that rate of Temperature drop by 2. Once it hits 100, damage is applied: GET_HIT(ch) = Temperature - 100; That might not seem like much, but given that characters start around with around 11-20hp with no endurance bonuses...

That would mean you'd have 5 ticks to get through the mountains before taking damage (and likely dying). That seems a bit too easy, except in combination with encumbrance. Mountains already eat up a lot of movement points (default is something like 3-5? I can't remember offhand), but if the character is encumbered by lots of armor or other goods, it's going to take him longer to get through those mountains (and having to rest to get movement back is going to be fatal).

I might make the point in which a player takes damage depend on the endurance stat: for every 1 point in endurance, the character can handle +-10 points in the Temperature stat. It severely punishes those with low endurance, but then again I can't think of many players that would treat it like a dump stat.

On the matter of recovery: rate would be 5, plus 1 for each piece of leather and 2 for each piece of hide/fur. In the case of that area I'm working on, I will need to leave a cave or two to allow players to rest and warm up.

Come to think of it... I'm going to have to find out how to not get typical weather messages while in these mountains. "It starts to rain." "Uhhhh it's raining AND snowing?!?!"

Anyways, I appreciate the feedback and the interest. I look forward to moving past the brainstorming stage and coding it all in. :)]]>
Snippets Fri, 24 Aug 2018 15:32:52 +0000
Anyone feel like updating this skill to tba - by: WhiskyTest https://tbamud.com/forum/8-snippets/4444-anyone-feel-like-updating-this-skill-to-tba#8192 https://tbamud.com/forum/8-snippets/4444-anyone-feel-like-updating-this-skill-to-tba#8192 ]]> Snippets Fri, 24 Aug 2018 15:23:15 +0000 A Very Odd Problem: Changing Races - by: Papaya Pete https://tbamud.com/forum/8-snippets/4443-a-very-odd-problem-changing-races#8187 https://tbamud.com/forum/8-snippets/4443-a-very-odd-problem-changing-races#8187
So this is where the problem was at: in shop.h



Alright, so that was something new to me! I didn't expect something like that to be able to happen. I guess we learn something new everyday. :)]]>
Snippets Thu, 16 Aug 2018 15:17:55 +0000
Trapped Items/Disarm Trap - by: Chime https://tbamud.com/forum/8-snippets/305-trapped-items-disarm-trap#8146 https://tbamud.com/forum/8-snippets/305-trapped-items-disarm-trap#8146 Snippets Sun, 22 Jul 2018 15:10:22 +0000 Languages Snippet - by: Chime https://tbamud.com/forum/8-snippets/4431-languages-snippet#8130 https://tbamud.com/forum/8-snippets/4431-languages-snippet#8130
Totally think it'd be doable to add drunk messages with a similar function. Something that replaces "s" with "sh" and such would be hilarious... I know what I'm doing this weekend!]]>
Snippets Wed, 04 Jul 2018 16:21:04 +0000
Repeating Zone Reset Commands - by: Nibiru https://tbamud.com/forum/8-snippets/4415-repeating-zone-reset-commands#8082 https://tbamud.com/forum/8-snippets/4415-repeating-zone-reset-commands#8082
Biru]]>
Snippets Tue, 22 May 2018 16:55:05 +0000
The Return of the Sentinel - by: WhiskyTest https://tbamud.com/forum/8-snippets/4410-the-return-of-the-sentinel#8049 https://tbamud.com/forum/8-snippets/4410-the-return-of-the-sentinel#8049
]]>
Snippets Tue, 08 May 2018 06:28:25 +0000
Event Based Regeneration - by: Sascha https://tbamud.com/forum/8-snippets/4225-event-based-regeneration#7998 https://tbamud.com/forum/8-snippets/4225-event-based-regeneration#7998
I'll hold off on implementing this one then. Rats!]]>
Snippets Sun, 29 Apr 2018 14:22:25 +0000
Bespoke Prompt - by: WhiskyTest https://tbamud.com/forum/8-snippets/4404-bespoke-prompt#7997 https://tbamud.com/forum/8-snippets/4404-bespoke-prompt#7997
1). Yeah sorry, I need to work on including clearer instructions!

do_prompt() is used to manually set a prompt, for those that want to string together their own customizations.
Without an argument, do_prompt() should simply return the string that is currently set, or "n/a" if nothing has been set. It may be worth changing the "n/a" to something like "not set - see HELP DISPLAY" ?

Which segues to the missing help information :)


2.) I quickly tested this and couldn't reproduce it. Lets discuss on AtBMUD further.

3.) Absolutely! Remember when expanding this code that you lose any data that exceeds MAX_PROMPT_LENGTH, which is why I raised it by another 100 characters. Also there may be better ways to provide some information that players request, like having ROOMFLAGS turned on will show room vnums etc. Just something to consider before adding additional fields.

char *prompt_str(struct char_data *ch) in comm.c is where you make the changes.

Find an unused letter inside the switch statement

Order doesn't matter, but it's nice to keep it alphabetical for next time you look at it.

Then add your new code block, eg:


Adding room vnums would be very similar, change the case and the zone number for room vnum.]]>
Snippets Sun, 29 Apr 2018 11:58:04 +0000
Baseline RPE/RPI Emotes (Work in Progress!) - by: Chime https://tbamud.com/forum/8-snippets/4367-baseline-rpe-rpi-emotes-work-in-progress#7759 https://tbamud.com/forum/8-snippets/4367-baseline-rpe-rpi-emotes-work-in-progress#7759 Snippets Thu, 22 Mar 2018 22:44:12 +0000 New OLC Craft System - by: Chime https://tbamud.com/forum/8-snippets/175-new-olc-craft-system?start=80#7730 https://tbamud.com/forum/8-snippets/175-new-olc-craft-system?start=80#7730 drive.google.com/open?id=0B40XbRH2Qbx5cmdxR3RoaFR4dDA ]]> Snippets Mon, 19 Mar 2018 23:41:05 +0000 Request: Emote Targeting - by: Chime https://tbamud.com/forum/8-snippets/4359-request-emote-targeting#7712 https://tbamud.com/forum/8-snippets/4359-request-emote-targeting#7712
For example, say there is a player in the room with "a grey-eyed man" as their shortdesc. My shortdesc is "a black-haired man":



The above would display, to me:



To others in the room:



To the target:



Injecting /self into an emote would target yourself. For example:



I would see:



Others would see:



Targeting objects would work similarly, but with a different symbol.

Say I have "a big beachball" worn or in my inventory. I could then do:



Which would output to me as:



And to others as:



I think it would be mad cool for RP games using tbaMUD.]]>
Snippets Sun, 18 Mar 2018 22:45:16 +0000
CyberASSAULT 2007 SRC - by: rudeboyrave https://tbamud.com/forum/8-snippets/4350-cyberassault-2007-src#7657 https://tbamud.com/forum/8-snippets/4350-cyberassault-2007-src#7657 Snippets Tue, 06 Mar 2018 18:06:44 +0000 Old snippet - restring command for object - by: rudeboyrave https://tbamud.com/forum/8-snippets/4345-old-snippet-restring-command-for-object#7652 https://tbamud.com/forum/8-snippets/4345-old-snippet-restring-command-for-object#7652 Snippets Tue, 06 Mar 2018 05:26:09 +0000 Bug/idea/typo resolution - by: Sascha https://tbamud.com/forum/8-snippets/4340-bug-idea-typo-resolution#7609 https://tbamud.com/forum/8-snippets/4340-bug-idea-typo-resolution#7609
I think we all have the experience of players who faithfully report bugs, submit ideas, or even find typos but there's usually a lack of follow-through with letting the player know that the report has been resolved. Players like to be acknowledged, and a friendly atmosphere helps retain players. Here's my idea:

When you resolve a bug/idea/typo, let the system send a message to the player that they would receive upon login, similar to the 'you have mail waiting' message, that would say 'Your bug/idea/typo report (insert title here) has been resolved by (Imm name who resolved it). Thank you!'

That way the player knows there's attention being paid, that they were helpful, they are acknowledged, and they know they haven't been ignored. It also helps to add a post about it somewhere on a forum/site, but that's an out of game practice.

Thoughts? And, anyone want to take this on?]]>
Snippets Tue, 20 Feb 2018 16:06:11 +0000
Will this snippet work as is with tba ? - by: Sascha https://tbamud.com/forum/8-snippets/4013-will-this-snippet-work-as-is-with-tba?start=20#7419 https://tbamud.com/forum/8-snippets/4013-will-this-snippet-work-as-is-with-tba?start=20#7419 Snippets Sun, 21 Jan 2018 19:43:28 +0000 MSDP Inventory - by: zusuk https://tbamud.com/forum/8-snippets/4271-msdp-inventory?start=20#7294 https://tbamud.com/forum/8-snippets/4271-msdp-inventory?start=20#7294



Could be a non-issue for you, since we are a mix of code bases.]]>
Snippets Thu, 04 Jan 2018 07:56:44 +0000
Run command - request - by: JTP https://tbamud.com/forum/8-snippets/4287-run-command-request#7209 https://tbamud.com/forum/8-snippets/4287-run-command-request#7209
used world instead of real_room and some IN_ROOM(ch) instead of ch->in_room

seems to be working, will do some testing]]>
Snippets Wed, 06 Dec 2017 01:15:35 +0000
Parry and Dodge Fix - by: WhiskyTest https://tbamud.com/forum/8-snippets/3722-parry-and-dodge-fix#7164 https://tbamud.com/forum/8-snippets/3722-parry-and-dodge-fix#7164
With the fixes that were discussed it would look like this:


This code also assumes you have added the two new skills SKILL_DODGE and SKILL_PARRY.

Other things:
You'd want to test the balance for the frequency of parry and dodge proccing - currently it has a 15% chance to proc provided the character makes their skill check.

Also doesn't check whether you need a weapon to parry.
Dodge will be tested even if parry was successful earlier.

But a great starting point I think.]]>
Snippets Sun, 26 Nov 2017 02:02:26 +0000
Combat Damage Trigger - by: WhiskyTest https://tbamud.com/forum/8-snippets/4272-combat-damage-trigger#7081 https://tbamud.com/forum/8-snippets/4272-combat-damage-trigger#7081
Here it is, very simple:

In constants.c add this to the end of const char *trig_typesp[]



In dg_scripts.h below the last MTRIG definition add:

then below void hitprcnt_mtrigger(char_data *ch); add


In dg_triggers.c just before void hitprcnt_mtrigger(char_data *ch) add:



In fight.c , just above where hitprcnt_mtrigger(tch); is called, add:


To use, write up your script as normal and set the trigger type to be CombatDamage. The num_arg is the percentage it will trigger per hit.
Example script:


This script will trigger whenever the mob successfully hits another character - in this case it adds an additional 1d3 damage to simulate a venom effect.]]>
Snippets Sat, 11 Nov 2017 20:31:58 +0000
Can I create a conditional based on the mob's position? - by: thomas https://tbamud.com/forum/8-snippets/4266-can-i-create-a-conditional-based-on-the-mob-s-position#7050 https://tbamud.com/forum/8-snippets/4266-can-i-create-a-conditional-based-on-the-mob-s-position#7050
]]>
Snippets Mon, 30 Oct 2017 21:45:00 +0000
Mob Extra Descriptions? - by: Papaya Pete https://tbamud.com/forum/8-snippets/4261-mob-extra-descriptions#7029 https://tbamud.com/forum/8-snippets/4261-mob-extra-descriptions#7029
First one is in medit. Needs the following default case to keep... bad issues from happening.



Second bug is one I missed when copying code. Only noticed it when I put a name in and not dialog before exiting the menu; crash occurs when trying to free pointers.



Last thing I noticed, and it's not a major bug, but in order to have ask chains pop up that you've just entered you need to reboot the mud. A quick copyover does the trick.]]>
Snippets Sat, 21 Oct 2017 07:30:50 +0000
Transport Via Plants ("Tree Travel") - Druid Spell Idea - by: zusuk https://tbamud.com/forum/8-snippets/4259-transport-via-plants-tree-travel-druid-spell-idea#6998 https://tbamud.com/forum/8-snippets/4259-transport-via-plants-tree-travel-druid-spell-idea#6998


Here is the manual spell itself, plop in spells.c:



Miscellaneous tasks for a new spell, please adjust to your MUD :)



Then just add the item_type for plants, and then place various "plants" throughout your world as an object in the room

Enjoy!

-Zusuk]]>
Snippets Sun, 15 Oct 2017 12:17:46 +0000
Checking Encumberance - by: Papaya Pete https://tbamud.com/forum/8-snippets/4250-checking-encumberance#6966 https://tbamud.com/forum/8-snippets/4250-checking-encumberance#6966


Seems to be fixed after that. I noticed it when I took of my goods-laden backpack.

On a side note, I also found another couple bugs and a crash with object durability; I was redoing how item damage is done, making a new function that is called. I added in some code, too, reusing some of the OVALs so that object material is more easily stored. Better than using flags. My plan is to add in fire, steam, electrical, etc. damage that will deal different amounts of damage to gear based on the material of the piece of equipment. Not going to have damage dealt to bags and clothes just to be convenient (and a little kinder) to players. Also, doing item damage this way means I can differentiate between, say, copper and iron other than giving one higher durability than the other.]]>
Snippets Sat, 07 Oct 2017 20:34:35 +0000
Switch target skill - by: zusuk https://tbamud.com/forum/8-snippets/4240-switch-target-skill#6941 https://tbamud.com/forum/8-snippets/4240-switch-target-skill#6941
Because you are running the damage() function, you and the new target will automatically engage (if he/she can, if he/she is already targeting someone else, they will continue to do so), and the previous target will continue to fight you because you are not messing with their target.

]]>
Snippets Sun, 01 Oct 2017 18:02:47 +0000
Portal spell help - by: thomas https://tbamud.com/forum/8-snippets/4242-portal-spell-help#6873 https://tbamud.com/forum/8-snippets/4242-portal-spell-help#6873


And yes, the patch above will preserve the checks for entering closed zones. I realize that there might be missing a check for house access, since you could portal past an atrium room and the code currently just checks for this situation - this would solve that:

]]>
Snippets Fri, 08 Sep 2017 23:44:11 +0000
Backup your mud with this shell script! - by: Krell https://tbamud.com/forum/8-snippets/4132-backup-your-mud-with-this-shell-script#6636 https://tbamud.com/forum/8-snippets/4132-backup-your-mud-with-this-shell-script#6636
Anyhow, that's a nice little script though I'd probably change the hash-bang to point at simple Bourne to make it more portable for those of us who don't use BASH. Thanks for posting your script. :-)]]>
Snippets Tue, 18 Apr 2017 00:02:08 +0000
Todo - by: Liko https://tbamud.com/forum/8-snippets/4161-todo#6365 https://tbamud.com/forum/8-snippets/4161-todo#6365
here is a simple todo snippet that allows you to write to the todo file.


Let me know if any issues arise.]]>
Snippets Tue, 06 Dec 2016 04:48:40 +0000
Simple do_equipment sorting - by: Halenbane https://tbamud.com/forum/8-snippets/4160-simple-do-equipment-sorting#6364 https://tbamud.com/forum/8-snippets/4160-simple-do-equipment-sorting#6364 Snippets Tue, 06 Dec 2016 04:39:27 +0000 Percentage Based Mob/Item Loads - by: Barnes https://tbamud.com/forum/8-snippets/4105-percentage-based-mob-item-loads#6119 https://tbamud.com/forum/8-snippets/4105-percentage-based-mob-item-loads#6119 the world more easily to the Builder as well as the imp.

thanks]]>
Snippets Sat, 30 Jul 2016 13:24:21 +0000
Want to make your players squirm? - by: Barnes https://tbamud.com/forum/8-snippets/4107-want-to-make-your-players-squirm#6118 https://tbamud.com/forum/8-snippets/4107-want-to-make-your-players-squirm#6118


]]>
Snippets Thu, 28 Jul 2016 15:28:23 +0000
Ascii Map Add On 0.01 - by: Liko https://tbamud.com/forum/8-snippets/4097-ascii-map-add-on-0-01#6108 https://tbamud.com/forum/8-snippets/4097-ascii-map-add-on-0-01#6108 I have attached a ascii map on that displays other players, npcs, enemies, and objects. It was developed by Vatiken. I added the enemies display.

Enjoy :)

- Liko]]>
Snippets Wed, 13 Jul 2016 03:40:15 +0000
World Generator - by: Liko https://tbamud.com/forum/8-snippets/4093-world-generator#6095 https://tbamud.com/forum/8-snippets/4093-world-generator#6095 I have programmed a World Generator that I use for DBT. I want to publish it.



It does create the new .wld, .zon, and etc files, but it doesn't add it to the indexes yet. I think someone can add that on.
It also sets the rooms to a sector and connects all the rooms.
To use this put it in wld folder.

gcc -o <filename> wld_make.c
./filename]]>
Snippets Sat, 09 Jul 2016 04:56:53 +0000
Undig - by: WhiskyTest https://tbamud.com/forum/8-snippets/4074-undig#6069 https://tbamud.com/forum/8-snippets/4074-undig#6069 It can be separated into its own command if you prefer a unique command for it

in oasis_copy.c
]]>
Snippets Sat, 02 Jul 2016 22:53:34 +0000
Comma V1.03 - by: Liko https://tbamud.com/forum/8-snippets/4072-comma-v1-03#6019 https://tbamud.com/forum/8-snippets/4072-comma-v1-03#6019 I reprogrammed Comma V1.02 to support large numbers as high as long long int.
Enjoy!]]>
Snippets Sat, 18 Jun 2016 04:11:23 +0000
Old patch from 1997 - by: JTP https://tbamud.com/forum/8-snippets/4057-old-patch-from-1997?start=20#5952 https://tbamud.com/forum/8-snippets/4057-old-patch-from-1997?start=20#5952
If anyone have any idea what might have caused it earlier...pls let me know, Thanks.]]>
Snippets Thu, 26 May 2016 00:13:45 +0000
Why doesnt this work ? - by: Krell https://tbamud.com/forum/8-snippets/4023-why-doesnt-this-work#5841 https://tbamud.com/forum/8-snippets/4023-why-doesnt-this-work#5841 Snippets Fri, 06 May 2016 04:21:41 +0000 new item type - by: thomas https://tbamud.com/forum/8-snippets/4012-new-item-type#5733 https://tbamud.com/forum/8-snippets/4012-new-item-type#5733
You could also just repurpose #7 or #14 - no objects are using those atm.]]>
Snippets Fri, 08 Apr 2016 20:10:26 +0000
Flagging a Questmaster for players to see. - by: thomas https://tbamud.com/forum/8-snippets/3870-flagging-a-questmaster-for-players-to-see#5723 https://tbamud.com/forum/8-snippets/3870-flagging-a-questmaster-for-players-to-see#5723

in act.informative.c in function list_one_char


Somewhere below this line: github.com/tbamud/tbamud/blob/master/src/act.informative.c#L324 ]]>
Snippets Sun, 03 Apr 2016 12:41:33 +0000
Control weather - by: JTP https://tbamud.com/forum/8-snippets/3993-control-weather?start=20#5719 https://tbamud.com/forum/8-snippets/3993-control-weather?start=20#5719 And it made it do the same outcome as the previous players cast of better.

But well i didnt expect it to rain after doing a few better casts.

But just wanted to let you know about my findings, but atleast it now does more then the spell ever has.]]>
Snippets Thu, 31 Mar 2016 04:39:29 +0000
speedwalk questions - by: Kyle https://tbamud.com/forum/8-snippets/4002-speedwalk-questions#5683 https://tbamud.com/forum/8-snippets/4002-speedwalk-questions#5683

how ever just writing speedwalk doesnt ask where people wanna go, where and how would i do that.


I haven't tested it but something like this should accomplish what you desire.

]]>
Snippets Wed, 23 Mar 2016 15:32:50 +0000
New Trigger Variable - Wait State - by: WhiskyTest https://tbamud.com/forum/8-snippets/3973-new-trigger-variable-wait-state#5585 https://tbamud.com/forum/8-snippets/3973-new-trigger-variable-wait-state#5585
It would be worth changing ( PULSE_VIOLENCE / 2) to ( RL_SEC )
I couldn't think of the definition name at the time]]>
Snippets Mon, 08 Feb 2016 23:09:40 +0000
request:multiclass snippet - by: dracmas https://tbamud.com/forum/8-snippets/3978-request-multiclass-snippet#5570 https://tbamud.com/forum/8-snippets/3978-request-multiclass-snippet#5570 Snippets Tue, 26 Jan 2016 17:58:34 +0000 Remove Protocol messages. - by: Fubar https://tbamud.com/forum/8-snippets/3972-remove-protocol-messages#5545 https://tbamud.com/forum/8-snippets/3972-remove-protocol-messages#5545



Comment out:


To:


Changes:


T0 (Do not drop below 4 or it causes some artifacts):



Next, open up interpreter.c find:



Now near the end find:


and Change to:


All done!]]>
Snippets Mon, 28 Dec 2015 14:04:12 +0000
The Lazy Find Door - by: Parnassus https://tbamud.com/forum/8-snippets/3945-the-lazy-find-door#5420 https://tbamud.com/forum/8-snippets/3945-the-lazy-find-door#5420 Snippets Sat, 11 Jul 2015 13:47:01 +0000 Snippet Request: display shopkeeper name/vnum in list_shops() in oasis_list.c - by: Liko https://tbamud.com/forum/8-snippets/3944-snippet-request-display-shopkeeper-name-vnum-in-list-shops-in-oasis-list-c#5417 https://tbamud.com/forum/8-snippets/3944-snippet-request-display-shopkeeper-name-vnum-in-list-shops-in-oasis-list-c#5417

zusuk wrote: Ahhh nevermind, I tested this and it seems to work fine now, so this is now a snippet submission :P


You should still be credited for the fix tho. It could be crashing others. :)]]>
Snippets Thu, 09 Jul 2015 01:02:42 +0000
Scavenger Mobs Help - by: WhiskyTest https://tbamud.com/forum/8-snippets/3936-scavenger-mobs-help#5354 https://tbamud.com/forum/8-snippets/3936-scavenger-mobs-help#5354 try something like this:

]]>
Snippets Tue, 30 Jun 2015 01:34:25 +0000
Relationship Colours - by: Rumble https://tbamud.com/forum/8-snippets/3934-relationship-colours#5341 https://tbamud.com/forum/8-snippets/3934-relationship-colours#5341 Snippets Sat, 13 Jun 2015 13:58:25 +0000 Percent patch - by: cosine_omerta https://tbamud.com/forum/8-snippets/3911-percent-patch#5246 https://tbamud.com/forum/8-snippets/3911-percent-patch#5246
I just noticed the existing patch left out some key parts, and wanted to update it so that it would work for folks. Didn't know if an entirely new patch was the way to go or just to add to the existing one.]]>
Snippets Mon, 09 Mar 2015 23:31:58 +0000
Patch Command - by: dracmas https://tbamud.com/forum/8-snippets/3815-patch-command#5220 https://tbamud.com/forum/8-snippets/3815-patch-command#5220 Snippets Mon, 02 Feb 2015 03:10:03 +0000 Snippets? - by: Papaya Pete https://tbamud.com/forum/8-snippets/3907-snippets#5217 https://tbamud.com/forum/8-snippets/3907-snippets#5217 Snippets Sat, 31 Jan 2015 21:25:46 +0000 Found a linkload snippet - by: dracmas https://tbamud.com/forum/8-snippets/3896-found-a-linkload-snippet#5171 https://tbamud.com/forum/8-snippets/3896-found-a-linkload-snippet#5171
Linkload loads up a player's character into the mud.

Snippet link: www.mudconnect.com/SMF/index.php?topic=74158.0



When I added the snippet into my own code, I placed it in act.wizard.c with other imp commands. But for people new to putting in a command like I am, that's not enough to get it to work. Somewhere in act.h the command needs to be added.

+ means add in the line ACMD(do_linkload); (not +)


Lastly, add in linkload to interpreter.c
]]>
Snippets Tue, 23 Dec 2014 12:22:31 +0000
Classless System? Choosing Skills on Creation - by: Papaya Pete https://tbamud.com/forum/8-snippets/3892-classless-system-choosing-skills-on-creation#5169 https://tbamud.com/forum/8-snippets/3892-classless-system-choosing-skills-on-creation#5169
The potential problem I've noticed regarding calculating saving throws that way is... well, at least with my current formula, most saves are roughly around the same number. I've coupled this with a point-allocation stat system that was posted here on the forums a while back.

I'm planning on repurposing classes, using those instead as a "character type." Each type gives different bonuses and penalties, and allows a player to further customize his character. Example: an intellectual type would have a higher int and wis, but suffer some physical stat penalties, while a brute would have a bonus to str and con, while suffering int and wis penalties. Barbarian types get a bonus to con and a bonus to survival skills, but get a small int penalty and cannot read.

I'm not really sure if this is anything anyone would be interested in. If so, let me know and I'll start working on a file to post onto here.]]>
Snippets Mon, 22 Dec 2014 20:41:30 +0000
sreport (say report) - by: dracmas https://tbamud.com/forum/8-snippets/3895-sreport-say-report#5167 https://tbamud.com/forum/8-snippets/3895-sreport-say-report#5167 Snippets Sun, 21 Dec 2014 23:40:34 +0000 IAW (in another window) AFK copy - by: dracmas https://tbamud.com/forum/8-snippets/3887-iaw-in-another-window-afk-copy#5153 https://tbamud.com/forum/8-snippets/3887-iaw-in-another-window-afk-copy#5153 Snippets Tue, 16 Dec 2014 00:05:49 +0000 Idea using boards - by: dracmas https://tbamud.com/forum/8-snippets/3886-idea-using-boards#5147 https://tbamud.com/forum/8-snippets/3886-idea-using-boards#5147
Only downside is comparing with Ghostmud/rom to make sure I get some parts right. Eventually I suppose it'll be a crossbreed, but that's only going for cosmetics once I work in area files. Working on the conversion is kinda fun lol.]]>
Snippets Sun, 14 Dec 2014 23:48:52 +0000
Relevel - by: Liko https://tbamud.com/forum/8-snippets/3865-relevel#5044 https://tbamud.com/forum/8-snippets/3865-relevel#5044
I just wanted to drop by an and add a snippet I programmed years ago. I call it relevel, but you all probably know it as remort or something it else. It's syntax is relevel <password>. It checks their player name and a password they tell you to set. Again, very bones.

Relevel

Enjoy!]]>
Snippets Tue, 09 Sep 2014 08:43:16 +0000
Mobile Races/Class Snippet - by: WhiskyTest https://tbamud.com/forum/8-snippets/3862-mobile-races-class-snippet#5042 https://tbamud.com/forum/8-snippets/3862-mobile-races-class-snippet#5042 Snippets Sat, 06 Sep 2014 23:28:27 +0000 Cancel a Single Event - by: WhiskyTest https://tbamud.com/forum/8-snippets/3843-cancel-a-single-event#4950 https://tbamud.com/forum/8-snippets/3843-cancel-a-single-event#4950
I also added an "interrupt_events" function which I call in "command_interpreter", so you can have events interrupted or canceled just like how you become un-hidden if you hit enter or do anything else.



]]>
Snippets Sun, 06 Jul 2014 22:52:08 +0000
[Done] Snippet Request for TBA 3.64: Showing Room Names. - by: Calipso https://tbamud.com/forum/8-snippets/3824-done-snippet-request-for-tba-3-64-showing-room-names#4901 https://tbamud.com/forum/8-snippets/3824-done-snippet-request-for-tba-3-64-showing-room-names#4901 Snippets Thu, 15 May 2014 05:58:04 +0000 Snippet Request for TBA 3.64: 1 Million levels. - by: Calipso https://tbamud.com/forum/8-snippets/3823-snippet-request-for-tba-3-64-1-million-levels#4896 https://tbamud.com/forum/8-snippets/3823-snippet-request-for-tba-3-64-1-million-levels#4896 Snippets Wed, 14 May 2014 16:34:59 +0000 Permanent racial spells using race snippet which posted by Liko - by: Coffee https://tbamud.com/forum/8-snippets/3819-permanent-racial-spells-using-race-snippet-which-posted-by-liko#4893 https://tbamud.com/forum/8-snippets/3819-permanent-racial-spells-using-race-snippet-which-posted-by-liko#4893 interpreter.c
- search for void nanny(struct descriptor_data *d, char *arg), within that function also search for
look_at_room(d->character, 0); which is a part of case '1': section. add apply_racial_ability(d->character);
right above apply_racial_ability(d->character);
- save and close interpreter.c

but, this is a correct one
interpreter.c
- search for void nanny(struct descriptor_data *d, char *arg), within that function also search for
look_at_room(d->character, 0); which is a part of case '1': section. add apply_racial_ability(d->character);
right above look_at_room(d->character, 0);
- save and close interpreter.c]]>
Snippets Sun, 11 May 2014 00:42:34 +0000
Comma 1.02 - by: Parnassus https://tbamud.com/forum/8-snippets/3805-comma-1-02#4878 https://tbamud.com/forum/8-snippets/3805-comma-1-02#4878 Snippets Tue, 29 Apr 2014 01:41:57 +0000 Loading standard equipment for new characters. - by: Coffee https://tbamud.com/forum/8-snippets/3816-loading-standard-equipment-for-new-characters#4871 https://tbamud.com/forum/8-snippets/3816-loading-standard-equipment-for-new-characters#4871

File Attachment:

File Name: tbaMUD-Newbie-Equipment.txt
File Size: 2 KB
1. Change void do_start(struct char_data *ch); to void do_start(struct char_data *ch, int newbie); at class.h.

2. Change do_start(victim); to do_start(victim, NO); at the function ACMD(do_advance) in act.wizard.c.

3. Change do_start(d->character); to do_start(d->character, YES); at the function void nanny(struct descriptor_data *d, char *arg) in interpreter.c.

4. Change void do_start(struct char_data *ch); to void do_start(struct char_data *ch, int newbie); at class.c. Also add the following lines at the end of the function.

if (newbie == YES) {
obj_to_char(read_object(40000,VIRTUAL),ch);
obj_to_char(read_object(40001,VIRTUAL),ch);
obj_to_char(read_object(40002,VIRTUAL),ch);
obj_to_char(read_object(40003,VIRTUAL),ch);
obj_to_char(read_object(40004,VIRTUAL),ch);
obj_to_char(read_object(40005,VIRTUAL),ch);
obj_to_char(read_object(40006,VIRTUAL),ch);
obj_to_char(read_object(40007,VIRTUAL),ch);
}

Notes: 40000 to 40007 are the obj vnum for Newbie Equipment which I want new players to have on my tbaMUD.]]>
Snippets Sun, 27 Apr 2014 16:50:04 +0000
Hardcore Mode - by: Papaya Pete https://tbamud.com/forum/8-snippets/3810-hardcore-mode#4849 https://tbamud.com/forum/8-snippets/3810-hardcore-mode#4849
Tomorrow, maybe I can figure out a better way or a way to resolve this problem.]]>
Snippets Wed, 16 Apr 2014 06:13:55 +0000
Item Durability - by: bakarus https://tbamud.com/forum/8-snippets/1760-item-durability?start=20#4774 https://tbamud.com/forum/8-snippets/1760-item-durability?start=20#4774

missing the (obj) after, shoulda been

]]>
Snippets Mon, 24 Mar 2014 03:08:10 +0000
Question on function in Limits.c - by: Papaya Pete https://tbamud.com/forum/8-snippets/3727-question-on-function-in-limits-c#4536 https://tbamud.com/forum/8-snippets/3727-question-on-function-in-limits-c#4536


So I put in some checks when it runs the update_points function to see if a character is majorly or lethally poisoned. Originally I did the damage to a character in hit_gain function, but that kept the message from popping up; you'd take damage and wouldn't realize it (until it's too late). Seems to work well anyways at the moment. Anyways, thanks for reading anyways. :)]]>
Snippets Wed, 27 Nov 2013 08:05:02 +0000
Floats and Ints question - by: Papaya Pete https://tbamud.com/forum/8-snippets/3721-floats-and-ints-question#4528 https://tbamud.com/forum/8-snippets/3721-floats-and-ints-question#4528
... I hope!

]]>
Snippets Sat, 23 Nov 2013 20:22:15 +0000