Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Yandex, DotBot

Members: 0
Guests: 1
Stats
Files
Topics
Posts
Members
Newest Member
481
3,734
19,366
618
Micheal64X
Today's Birthdays
Vintar (28)
Related Links
» SmaugMuds.org » General » Coding » help with number of items in ...
Forum Rules | Mark all | Recent Posts

help with number of items in inventory?
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Apr 22, 2009, 11:03 pm
Go to the top of the page
Go to the bottom of the page

irbobo
Fledgling
GroupMembers
Posts16
JoinedApr 8, 2009

I've been diggin thru the code like crazy trying to find where to set how much a player can hold at a time? Basically want to jack that number way up. I'm working with smaugfuss 1.9
       
Post is unread #2 Apr 23, 2009, 6:08 am
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Grep would help you find it.

I think it's a function in handler.c but I can't remember the name offhand.
       
Post is unread #3 Apr 23, 2009, 8:02 am
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

You're probably going to want to grep for can_carry, just to expand on Zeno's hint. :wink:
       
Post is unread #4 Apr 26, 2009, 10:14 pm
Go to the top of the page
Go to the bottom of the page

irbobo
Fledgling
GroupMembers
Posts16
JoinedApr 8, 2009

Cool.. Well I made some changes to function can_carry_n( CHAR_DATA * ch ) in file handler.c in SmaugFUSS 1.9

changed to:
/*
 * Retrieve a character's carry capacity.
 * Vastly reduced (finally) due to containers		-Thoric
 */
int can_carry_n( CHAR_DATA * ch )
{
   int penalty = 0;
   int carry_minimum = 5;
   int carry_maximum = 200;

   if( !IS_NPC( ch ) && ch->level >= LEVEL_IMMORTAL )
      return get_trust( ch ) * 200;

   if( IS_NPC( ch ) && xIS_SET( ch->act, ACT_IMMORTAL ) )
      return ch->level * 200;

   if( get_eq_char( ch, WEAR_WIELD ) )
      ++penalty;
   if( get_eq_char( ch, WEAR_DUAL_WIELD ) )
      ++penalty;
   if( get_eq_char( ch, WEAR_MISSILE_WIELD ) )
      ++penalty;
   if( get_eq_char( ch, WEAR_HOLD ) )
      ++penalty;
   if( get_eq_char( ch, WEAR_SHIELD ) )
      ++penalty;
   return URANGE( carry_minimum, ( ch->level + 200 ) / 5 + get_curr_dex( ch ) - 13 - penalty, carry_maximum );
}


seemed to do the trick 8 )
       
Post is unread #5 Apr 27, 2009, 5:23 am
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

You know, when you have numbers that high, I'm not sure it really makes a difference anymore to have the penalty logic. It adds complexity, and really between 200 items carried and 198, there's not much of a difference.
       
Post is unread #6 Apr 27, 2009, 8:33 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

To each their own, eh?
       
Pages:<< prev 1 next >>