Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
 parse description bug
Yesterday, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Sogou, Yandex, DotBot, Yahoo!, Bing

Members: 0
Guests: 7
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SWR FUSS » Smuggling objects handled imp...
Forum Rules | Mark all | Recent Posts

Smuggling objects handled improperly
< Newer Topic :: Older Topic > Alcohol, drugs, the works

Pages:<< prev 1 next >>
Post is unread #1 Apr 25, 2006, 4:21 am
Go to the top of the page
Go to the bottom of the page

Halcyon
Magician
GroupMembers
Posts187
JoinedApr 12, 2005

All the spec_funs for different types of customs guards aren't handling the smuggling process properly. Mind you, they handle CATCHING you smuggling just fine, but when you succeed, it's being done about half-way, and as such, players trying to level smuggling and the like are going to notice that they got credit for a lot less stuff than they actually had. This is because the objects aren't getting seperated before they're flagged as contraband, and thus, objects that are in the same object grouping are ALL getting the flag set to them.

The fixes are fairly simple. In special.c, in spec_customs_alcohol, find:

                  gain_exp( victim, ch_exp, SMUGGLING_ABILITY );

                  act( AT_ACTION, "$n looks at $N suspiciously.", ch, NULL, victim, TO_NOTVICT );
                  act( AT_ACTION, "$n look at you suspiciously.", ch, NULL, victim, TO_VICT );
                  SET_BIT( obj->extra_flags, ITEM_CONTRABAND );
                  return TRUE;
               }
               else if( !IS_SET( obj->extra_flags, ITEM_CONTRABAND ) )


Change that to:

                  gain_exp( victim, ch_exp, SMUGGLING_ABILITY );

                  act( AT_ACTION, "$n looks at $N suspiciously.", ch, NULL, victim, TO_NOTVICT );
                  act( AT_ACTION, "$n look at you suspiciously.", ch, NULL, victim, TO_VICT );
				  separate_obj( obj );
                  SET_BIT( obj->extra_flags, ITEM_CONTRABAND );
                  return TRUE;
               }
               else if( !IS_SET( obj->extra_flags, ITEM_CONTRABAND ) )


Then, the tiniest bit below that, find:

                  ch_printf( victim, "You receive %ld experience for smuggling %d. \r\n", ch_exp, obj->short_descr );
                  gain_exp( victim, ch_exp, SMUGGLING_ABILITY );

                  SET_BIT( obj->extra_flags, ITEM_CONTRABAND );
                  return TRUE;
               }


Change to:

                  ch_printf( victim, "You receive %ld experience for smuggling %d. \r\n", ch_exp, obj->short_descr );
                  gain_exp( victim, ch_exp, SMUGGLING_ABILITY );
				  separate_obj( obj );
                  SET_BIT( obj->extra_flags, ITEM_CONTRABAND );
                  return TRUE;
               }


Once more, just the tiniest bit below that, find:

                  ch_printf( victim, "You receive %ld experience for smuggling %d.\r\n ", ch_exp, content->short_descr );
                  gain_exp( victim, ch_exp, SMUGGLING_ABILITY );
                  SET_BIT( content->extra_flags, ITEM_CONTRABAND );
                  return TRUE;
               }


Change to:

                  ch_printf( victim, "You receive %ld experience for smuggling %d.\r\n ", ch_exp, content->short_descr );
                  gain_exp( victim, ch_exp, SMUGGLING_ABILITY );
				  separate_obj( content );
                  SET_BIT( content->extra_flags, ITEM_CONTRABAND );
                  return TRUE;
               }


PLEASE note the difference on that last one. It needs to separate OBJ_DATA *content, not *obj.

Do the same for spec_customs_smut, spec_customs_weapons, and spec_customs_spice, and you're all set. :smile:
       
Post is unread #2 Apr 25, 2006, 4:37 am
Go to the top of the page
Go to the bottom of the page

Halcyon
Magician
GroupMembers
Posts187
JoinedApr 12, 2005

Oh, and for the record, this issue exists in SW:FotE, as well.
       
Post is unread #3 Jun 29, 2006, 12:28 am
Go to the top of the page
Go to the bottom of the page

Halcyon
Magician
GroupMembers
Posts187
JoinedApr 12, 2005

Just while I have a moment, thought I'd "bump" this one up quick. This one HAS to be causing someone a headache somewhere.
       
Pages:<< prev 1 next >>