Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
 parse description bug
Today, 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, Google, Remcon, Yahoo!, DotBot

Members: 1
Guests: 12
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 » SWFOTE FUSS » Coding Help (New Commands)
Forum Rules | Mark all | Recent Posts

Coding Help (New Commands)
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Feb 28, 2010, 9:18 pm
Go to the top of the page
Go to the bottom of the page

merqutio
Fledgling
GroupMembers
Posts4
JoinedFeb 28, 2010

I'm new to MUD coding, and I'm still a little confused with the SWFOTE FUSS codebase. Are there any guides/tutorials out there on basic coding for this particular codebase? How do I add new commands? I'm trying to add a command that changes a players level.
       
Post is unread #2 Feb 28, 2010, 9:20 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

Changing a players level is done with the 'advance' command if trying to leave them as a mortal character, or the 'makeimm' command if trying to make them an immortal.
       
Post is unread #3 Feb 28, 2010, 9:31 pm
Go to the top of the page
Go to the bottom of the page

merqutio
Fledgling
GroupMembers
Posts4
JoinedFeb 28, 2010

I tried using the advance command but I'm having problems with it:


[Hp:500/500] [Mv:1000/1000] (Align:0) advance dummy 10
Log: Raziel: advance dummy 10
Syntax: advance <char> <ability> <level>.

Force:0/0 Align:0
[Hp:500/500] [Mv:1000/1000] (Align:0) advance dummy level 10
Log: Raziel: advance dummy level 10
No Such Ability.
Syntax: advance <char> <ability> <level>.


Am I using the wrong syntax?
       
Post is unread #4 Feb 28, 2010, 11:55 pm   Last edited Mar 1, 2010, 12:05 am by ayuri
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

Advance is what you'd use to buff up player characters.

If you want to set a npc to a level you have to use mset.
mset <npc> level <1 - 36 (or whatever your top_level is in the game)>


*EDIT: If dummy is NOT a npc more than likely you'll need to advance dummy piloting 30, advance dummy combat 30, etc, etc for each class there is. I do not recall if swfotefuss has the 'all' statement.

ayuri
       
Post is unread #5 Mar 1, 2010, 6:40 am
Go to the top of the page
Go to the bottom of the page

Daiimus
Fledgling
GroupMembers
Posts13
JoinedFeb 26, 2006

Also, once you advance the levels you'll wanna do a "sset all 100" to max out all your skills.
       
Post is unread #6 Mar 1, 2010, 12:11 pm   Last edited Mar 1, 2010, 12:13 pm by merqutio
Go to the top of the page
Go to the bottom of the page

merqutio
Fledgling
GroupMembers
Posts4
JoinedFeb 28, 2010

Thanks for the help guys. I had one last question. I am having a difficult time with formating in hedit. Whenever I use the online buffer to edit a description or helpfile, the carriage returns are off when I view the descriotion in telnet. So for example, if I types the follow in the online text editor:

Welcome to the MUD!
Enjoy your Stay
/s

It will come out as the following in my MUD client:

Welcome to the MUD!
Enjoy your Stay

But in telnet, the MOTD would come out as:

Welcome ot the MUD!
Enjoy your Stay

Any ideas on how to fix this??
       
Post is unread #7 Mar 1, 2010, 5:46 pm
Go to the top of the page
Go to the bottom of the page

Keberus
Conjurer
GroupFUSS Project Team
Posts341
JoinedJun 4, 2005

Tested, and I see what you mean. This seemed to work to remedy the problem.

editor.c find editdata_to_str and replace with:
char *editdata_to_str( EDITOR_DATA * edd )
{
   EDITOR_LINE *eline;
   char *buf, *src, *tmp;
   short size, used, i;

   CREATE( buf, char, MAX_STRING_LENGTH );
   size = MAX_STRING_LENGTH;
   used = 0;
   buf[0] = '\0';

   eline = edd->first_line;
   i = 0;
   while( eline )
   {
      /*
       * ignore the last empty line
       */
      if( eline->next == NULL && eline->line[0] == '\0' )
         break;
      src = eline->line;
      while( *src )
      {
         buf[i++] = *src++;
         used++;

         if( used >= size - 3 )
         {
            RECREATE( buf, char, size + MAX_STRING_LENGTH );
            size += MAX_STRING_LENGTH;
         }
      }
      buf[i++] = '\r';
      buf[i++] = '\n';
      used += 2;
      eline = eline->next;
   }

   buf[i++] = '\0';
   used++;

   tmp = STRALLOC( buf );
   DISPOSE( buf );
   smush_tilde( tmp );
   return tmp;
}


Really all you are doing is adding in 2 lines:
+     buf[i++] = '\r';
      buf[i++] = '\n';
+      used += 2;



Later,
KeB
       
Post is unread #8 Mar 1, 2010, 6:58 pm
Go to the top of the page
Go to the bottom of the page

merqutio
Fledgling
GroupMembers
Posts4
JoinedFeb 28, 2010

Thanks Keberus! It worked!
       
Pages:<< prev 1 next >>