Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
parse description bug
Dec 15, 2017, 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, Bing, Yandex, Sogou, Yahoo!

Members: 0
Guests: 8
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 » LoP Codebase » LoP1.38 Questions/Issues/Anom...
Forum Rules | Mark all | Recent Posts

LoP1.38 Questions/Issues/Anomolies
< Newer Topic :: Older Topic >

Pages:<< prev ... 2, 3, 4, 5, 6 next >>
Post is unread #61 Nov 17, 2009, 7:24 pm
Go to the top of the page
Go to the bottom of the page

Hanaisse
Magician
GroupMembers
Posts196
JoinedNov 25, 2007


Remcon said:

Actually it will be used to toggle the classes on or off if i remember right. They default to on (allowed) so doing it would turn them off (no longer allow).

Er, yeah, that's what I meant in my mind it just didn't come out that way, lol

On to races - does race recall do anything special?
Also, hungermod and thirstmod. Is that for frequency of being hungry/thirsty? If I set it to say, 10, would that increase or decrease it?
       
Post is unread #62 Nov 17, 2009, 8:05 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

Should be their recall if not in a clan etc...

Yea they have to do with the hunger and thirst but they are stock and dont recall the exact setting stuff right off lol. Should look in update.c for them since how they are used should be in there.
       
Post is unread #63 Nov 19, 2009, 8:52 am
Go to the top of the page
Go to the bottom of the page

Hanaisse
Magician
GroupMembers
Posts196
JoinedNov 25, 2007

Remcon said:

Should be their recall if not in a clan etc...

Can you explain a little bit more? I tried it by setting sea-elf race to recall vnum 21055 and yet my sea-elf char still recalled to the standard recall spot altar vnum 21017. Yes I hotbooted and checked the race file and it does say Race_Recall 21055.

Another oddity I came across. Quoted from your Features list.
- Races - Can easily set a race to use blood or mana.
- Using "SETRACE <race> USES BLOOD/MANA".

I set the drow race to use blood and discovered I couldn't create any "new" characters. The mud would reboot itself after asking to confirm name. It didn't even get as far as asking for race. Logging in existing chars was fine (although they weren't drows).
I tested it some more by setting 'uses' to 0 or nothing. There was no difference, the race still used mana.
       
Post is unread #64 Nov 19, 2009, 9:28 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

bool handle_recall( CHAR_DATA *ch )
{
   ROOM_INDEX_DATA *location = NULL;
   CHAR_DATA *opponent;

   if( !is_npc( ch ) && ch->pcdata->clan )
      location = get_room_index( ch->pcdata->clan->recall );

   if( !location && !is_npc( ch ) && ch->pcdata->nation )
      location = get_room_index( ch->pcdata->nation->recall );

   if( !is_npc( ch ) && !location && ch->level >= 5 && xIS_SET( ch->pcdata->flags, PCFLAG_DEADLY ) )
      location = get_room_index( sysdata.room_deadly );

   if( !location )
      location = get_room_index( race_table[ch->race]->race_recall );

   if( !location )
      location = get_room_index( sysdata.room_temple );

   if( !location )
   {
      send_to_char( "You're completely lost.\r\n", ch );
      return false;
   }

   if( ch->in_room == location )
      return false;

   if( xIS_SET( ch->in_room->room_flags, ROOM_NO_RECALL ) )
   {
      send_to_char( "For some strange reason... nothing happens.\r\n", ch );
      return false;
   }

   if( IS_AFFECTED( ch, AFF_CURSE ) )
   {
      send_to_char( "You're cursed and can't recall!\r\n", ch );
      return false;
   }

   if( ( opponent = who_fighting( ch ) ) )
   {
      int lose;

      if( number_bits( 1 ) == 0 || ( !is_npc( opponent ) && number_bits( 3 ) > 1 ) )
      {
         wait_state( ch, 4 );
         lose = ( int )( exp_level( ch, ch->level ) / 10 );
         gain_exp( ch, 0 - lose );
         ch_printf( ch, "You failed!  You lose %d exps.\r\n", lose );
         return false;
      }

      lose = ( int )( exp_level( ch, ch->level ) / 8 );
      gain_exp( ch, 0 - lose );
      ch_printf( ch, "You recall from combat!  You lose %d exps.\r\n", lose );
      stop_fighting( ch, true );
   }

   act( AT_ACTION, "$n disappears in a swirl of smoke.", ch, NULL, NULL, TO_ROOM );
   char_from_room( ch );
   char_to_room( ch, location );
   if( ch->mount )
   {
      char_from_room( ch->mount );
      char_to_room( ch->mount, location );
   }
   act( AT_ACTION, "$n appears in the room.", ch, NULL, NULL, TO_ROOM );
   do_look( ch, (char *)"auto" );
   return true;
}

that is found in skills.c and shows how it should work on finding where to send you when you recall.

As for the other I'll have to check it and while im at it ill check the race recall for issues after work today. (About time to head back to work so no time to do it currently).
       
Post is unread #65 Nov 19, 2009, 11:48 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

Well race recall seems to work fine.

The blood change works fine too (I used setrace human uses blood).

There is a problem with it crashing on creation though and it isn't related to the blood thing.
open up handler.c and find
bool is_outside( CHAR_DATA *ch )
{
   if( ch->in_room->sector_type != SECT_INSIDE
   && !xIS_SET( ch->in_room->room_flags, ROOM_INDOORS )
   && !xIS_SET( ch->in_room->room_flags, ROOM_TUNNEL ) )
      return true;
   return false;
}

change that to
bool is_outside( CHAR_DATA *ch )
{
   if( !ch || !ch->in_room )
      return false;

   if( ch->in_room->sector_type != SECT_INSIDE
   && !xIS_SET( ch->in_room->room_flags, ROOM_INDOORS )
   && !xIS_SET( ch->in_room->room_flags, ROOM_TUNNEL ) )
      return true;

   return false;
}

Forgot to check to make sure it was looking at valid data lol. Thanks for finding the bug :)
       
Post is unread #66 Nov 19, 2009, 1:05 pm
Go to the top of the page
Go to the bottom of the page

Hanaisse
Magician
GroupMembers
Posts196
JoinedNov 25, 2007

Oh, I figured out why race recall didn't work. Because I picked a bad race example lol

You have 2 race files for sea-elf; one named Sea-elf, one named Sea-Elf.
When I set race recall it applied it to just Sea-elf and not to Sea-Elf. When choosing sea-elf on char creation however, it chooses Sea-Elf. I found out by changing Sea-Elf file name to Sea-Elfunused.race and get this when I log my existing sea-elf char;
Comm: Loading player data for: Kir
Bug: [*****] BUG: fread_char: invalid race (Sea-elf)
Bug: [*****] FILE: player/k/Kir LINE: 9

It also changed that chars race to drow once logged in lol
Looking at it further I've now lost sea-elf as a race completely so I guess Sea-elf is the file I should remove and keep Sea-Elf.

The crashes I'm still testing, but I think I have an idea what's wrong.
       
Post is unread #67 Nov 19, 2009, 1:27 pm
Go to the top of the page
Go to the bottom of the page

Hanaisse
Magician
GroupMembers
Posts196
JoinedNov 25, 2007

Well, the crashes, I respectably have to beg to differ that it is being caused by 'blood'.
setrace half-troll uses blood
Uses set to Blood

This time on new char creation I got this far;
You may choose from the following races, or type help [race] to learn more:
[Drow Elf Half-Troll Human Sea-elf Dwarf Gith Gnome]
: 
half-troll

Would you like to be a player killer, [Y/N]? 
--- Disconnected on Thursday, November 19, 2009, 4:10 PM ---

Once I reset it back to mana I can create half-trolls just fine.

The crashes are generating core dump files. Would you like me to gdb them? (Once I figure out how)
       
Post is unread #68 Nov 19, 2009, 1:59 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

Yes I would since I don't have access to one nor am I getting crashes from it. Only crash I got was from the one I posted a fix for and blood/mana I get in there fine now.

Using gdb is fairly simple normally the core will be in the main directory where the execution file is found.

So what I normally do is
get in the main directory
type gdb -c core lop

that is just an example since some put core files with numbers etc...
then it will give you a print out of stuff post what it shows.
       
Post is unread #69 Nov 19, 2009, 3:25 pm   Last edited Nov 19, 2009, 4:00 pm by Hanaisse
Go to the top of the page
Go to the bottom of the page

Hanaisse
Magician
GroupMembers
Posts196
JoinedNov 25, 2007

Bleh. There was a long post here with gdb results for 6 core files which didn't provide much information. After getting another crash I played around with the gdb command syntax and got to the root of the problem.
[wren@srv17 LOP]$ gdb LOP core.11231
GNU gdb Fedora (6.8-27.el5)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...
Reading symbols from /usr/lib64/libz.so.1...done.
Loaded symbols for /usr/lib64/libz.so.1
Reading symbols from /lib64/libdl.so.2...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /usr/lib64/libstdc++.so.6...done.
Loaded symbols for /usr/lib64/libstdc++.so.6
Reading symbols from /lib64/libm.so.6...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/libgcc_s.so.1...done.
Loaded symbols for /lib64/libgcc_s.so.1
Reading symbols from /lib64/libc.so.6...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Core was generated by `LOP 4000 hotboot 3 4'.
Program terminated with signal 11, Segmentation fault.
[New process 11231]
#0  0x00000000004c3ebe in is_outside (ch=0xbd07670) at handler.c:3167
3167       if( ch->in_room->sector_type != SECT_INSIDE
(gdb)

Which is exactly what you said. So, just ignore me and my newbiness while I go fix it. :redface:
       
Post is unread #70 Nov 19, 2009, 5:32 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

:) gratz on figuring out gdb :)

I'm not sure why you had 2 seaelf files I only have one and it is Sea-Elf.race in my races directory. And this is what it shows in the mud
races
[ 0] (  0) Drow
[ 1] (  3) Elf
[ 2] (  0) Half-Elf
[ 3] (  0) Half-Ogre
[ 4] (  0) Half-Orc
[ 5] (  2) Half-Troll
[ 6] (  0) Halfling
[ 7] ( 46) Human
[ 8] (  0) Lizardman
[ 9] (  0) Pixie
[10] (  0) Sea-elf
[11] (  0) Dwarf
[12] (  0) Gith
[13] (  0) Gnome

So it loads up the Sea-Elf.race fine. Did you add a new race or something?
       
Post is unread #71 Nov 19, 2009, 7:40 pm
Go to the top of the page
Go to the bottom of the page

Hanaisse
Magician
GroupMembers
Posts196
JoinedNov 25, 2007

Remcon said:

:) gratz on figuring out gdb :)

Thanks, I'm pretty proud of myself but next time I'll listen to you lol
And the blood thing now works (<120hp 120bp 105mv>[0Gold])

Remcon said:

I'm not sure why you had 2 seaelf files I only have one and it is Sea-Elf.race in my races directory. And this is what it shows in the mud

So it loads up the Sea-Elf.race fine. Did you add a new race or something?

Right, back to the sea-elf thing, cuz this is getting more interesting.
My races look exactly the same as yours and no I haven't created any yet.
races
[ 0] (  3) Drow
[ 1] (  5) Elf
[ 2] (  0) Half-Elf
[ 3] (  2) Half-Ogre
[ 4] (  0) Half-Orc
[ 5] (  4) Half-Troll
[ 6] (  0) Halfling
[ 7] ( 42) Human
[ 8] (  0) Lizardman
[ 9] (  1) Pixie
[10] (  1) Sea-elf
[11] (  0) Dwarf
[12] (  1) Gith
[13] (  0) Gnome

Now, remember I said I removed Sea-elf.race leaving just Sea-Elf.race - I changed the file name to Sea-elfold.race.
I then created a new sea-elf char just fine, but lo and behold the next time I look in the races folder there's a new Sea-elf.race file created at the same time I created my new char. So now I have;

Sea-Elf.race
Sea-elf.race
Sea-elfold.race
in my races folder.
Hmm....
       
Post is unread #72 Nov 20, 2009, 12:52 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

Well you could open the races.lst and change it to use Sea_elf.race instead of Sea_Elf.race or you can open up Sea_Elf.race and change the name from Sea_elf to Sea_Elf either way should make it work fine. In cygwin it doesn't actually care that much about case which is why I hadn't noticed it. But in linux with the name being Sea_elf it will save the info into Sea_elf.race instead of Sea_Elf.race even though it requires Sea_Elf.race to load the race.
       
Post is unread #73 Dec 3, 2009, 6:09 pm
Go to the top of the page
Go to the bottom of the page

Hanaisse
Magician
GroupMembers
Posts196
JoinedNov 25, 2007

Bah, you removed reset add/insert/edit. Personally I found them to be pretty handy commands.

Just wanted to say how much I love the reset rchance. It's something I've been wanting in a code base for a long time.
       
Post is unread #74 Dec 3, 2009, 7:18 pm
Go to the top of the page
Go to the bottom of the page

tphegley
Magician
GroupMembers
Posts176
JoinedMay 21, 2006

What does it do?

I'm guessing it's short for random chance?
       
Post is unread #75 Dec 3, 2009, 7:30 pm
Go to the top of the page
Go to the bottom of the page

Hanaisse
Magician
GroupMembers
Posts196
JoinedNov 25, 2007

You can set a percentage chance of load on reset. It's great to deter campers and dropping little treasures here and there.
       
Post is unread #76 Dec 3, 2009, 7:32 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

Actually they were removed when the reset code was redone and released for smaugfuss it was part of those changes.

Glad you like it, I always found it kind of odd that everything always reset and wanted it possible to set up resets to only reset some of the time.

Yea, it is short for random chance more or less. You can set it up so things only reset a certain percent of the time. Defaults to 100%. The lower it is of course the less likely it is to reset each reset.
       
Post is unread #77 Jan 29, 2010, 7:24 pm   Last edited Jan 29, 2010, 7:35 pm by Sanus Compleo
Go to the top of the page
Go to the bottom of the page

Sanus Compleo
Magician
GroupMembers
Posts153
JoinedMar 25, 2008

Compiling o/save.o....
cc1plus: warnings being treated as errors
save.c: In function ‘void save_pfile_backup()’:
save.c:2619: error: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result
make[1]: *** [o/save.o] Error 1
make: *** [all] Error 2

That line is system ( buf ); but it's no-where else in the code...?

I know I can bypass Werror, but there's an error, so I'mma point it out :D


EDIT: Also:

In file included from /usr/include/stdio.h:910,
from save.c:22:
In function ‘int snprintf(char*, size_t, const char*, ...)’,
inlined from ‘void save_pfile_backup()’ at save.c:2618:
/usr/include/bits/stdio2.h:66: warning: call to int __builtin___snprintf_chk(char*, unsigned int, int, unsigned int, const char*, ...) will always overflow destination buffer

EDIT 2:

Oh wow, tried to run the startup script and it gave me an epic buffer overflow.
       
Post is unread #78 Jan 30, 2010, 6:20 am   Last edited Jan 30, 2010, 6:22 am by Remcon
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

in save.c
find
void save_pfile_backup( void )
{
   char buf[MIL];
   int logindex, tcount = 0;

   for( logindex = 1; ; logindex++ )
   {
      snprintf( buf, MIL, "%s%dpfiles.tgz", BACKUP_DIR, logindex );
      if( exists_file( buf ) )
         continue;
      if( logindex >= 11 )
      {
         remove_oldest_pfile_backup( );
         if( ++tcount > 5 ) /* Don't allow a constant loop if for some reason it can't remove one to use */
         {
            bug( "%s: failed to save pfile backup.", __FUNCTION__ );
            return;
         }
         logindex = 0;
         continue;
      }
      break;
   }

   /* Ok we have an empty log to use so use it */
   snprintf ( buf, MSL, "tar -czf %s%dpfiles.tgz %s", BACKUP_DIR, logindex, PLAYER_DIR );
   system ( buf );
}

change that to
void save_pfile_backup( void )
{
   char buf[MSL];
   int logindex, tcount = 0, echeck;

   for( logindex = 1; ; logindex++ )
   {
      snprintf( buf, sizeof( buf ), "%s%dpfiles.tgz", BACKUP_DIR, logindex );
      if( exists_file( buf ) )
         continue;
      if( logindex >= 11 )
      {
         remove_oldest_pfile_backup( );
         if( ++tcount > 5 ) /* Don't allow a constant loop if for some reason it can't remove one to use */
         {
            bug( "%s: failed to save pfile backup.", __FUNCTION__ );
            return;
         }
         logindex = 0;
         continue;
      }
      break;
   }

   /* Ok we have an empty log to use so use it */
   snprintf( buf, sizeof( buf ), "tar -czf %s%dpfiles.tgz %s", BACKUP_DIR, logindex, PLAYER_DIR );
   if( ( echeck = system( buf ) ) != -1 )
      perror( buf );
}

That should take care of all that lol. Nice find and thanks :)
I'm not 100% sure that system should return a -1 when successful but from what I read somewhere it should return -1 when successful. Just have to try it and see if it works right :)
       
Post is unread #79 Jan 30, 2010, 1:06 pm   Last edited Jan 30, 2010, 1:13 pm by Sanus Compleo
Go to the top of the page
Go to the bottom of the page

Sanus Compleo
Magician
GroupMembers
Posts153
JoinedMar 25, 2008

I'm about to go through all the commands and see what they do versus what I want them to do, so if I find any bugs, I'll tell you.


Speaking of:

bank balance
Account Aster has 10,000 gold.
Last 20 Transactions.
Sat Jan 30 4:06:40PM 2010 0û—¿Pú—¿²ü—¿8ú—¿ô,@Pú—¿1

Nother thing, how do you access the imc now? I'm confuzzled. Looking through docs.
       
Post is unread #80 Jan 30, 2010, 1:37 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005


bank balance
Account Aster has 10,000 gold.
Last 20 Transactions.
Sat Jan 30 4:06:40PM 2010 0û—¿Pú—¿²ü—¿8ú—¿ô,@Pú—¿1

Can you look in the bank file in the system directory and see what it has for the Aster account for me?


Nother thing, how do you access the imc now? I'm confuzzled. Looking through docs.

Nothing has changed in IMC in awhile. Can you give a more detailed question on what your having trouble with on it?
       
Pages:<< prev ... 2, 3, 4, 5, 6 next >>