Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
 parse description bug
Today, 9:00 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, Remcon, Yandex, DotBot, Bing

Members: 1
Guests: 15
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,237
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » "Translate" a command
Forum Rules | Mark all | Recent Posts

"Translate" a command
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Nov 16, 2008, 1:21 pm   Last edited Nov 16, 2008, 1:22 pm by Lorac
Go to the top of the page
Go to the bottom of the page

Lorac
Fledgling
GroupMembers
Posts6
JoinedNov 13, 2008

Hi again, I'm trying to translate commands in order to have it in Spanish, I've started with chat commands but I'm having some troubles...

I've tried to do that in act_comm.c

void do_charlar( CHAR_DATA* ch, const char* argument)
{
do_chat( ch, argument );
}

void do_chat( CHAR_DATA* ch, const char* argument)
{
if( NOT_AUTHED( ch ) )
{
send_to_char( "Ein?\r\n", ch );
return;
}
talk_channel( ch, argument, CHANNEL_CHAT, "charla" );
return;
}

and I've declared the new command in mud.h

DECLARE_DO_FUN( do_charlar );

But it doesn't work, I suppose that I should change something more, I've read that when you create a new command you must declare it in tables.c too.

Any help will be usefull

Thanks!

And a last question! Which is the function which gets the info from the mud?
       
Post is unread #2 Nov 16, 2008, 1:33 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

You don't need to change the code function names. What you want to be looking at is the command table from cedit. The names in the code can be entirely different from the command names themselves.

So you'd do something like: cedit create charlar do_chat
although it might be easier to do it offline since you'll have a lot of changes to make. It's in the system/ directory if memory serves.
       
Post is unread #3 Nov 16, 2008, 1:55 pm
Go to the top of the page
Go to the bottom of the page

Lorac
Fledgling
GroupMembers
Posts6
JoinedNov 13, 2008

Thank you! it's all ok now.
       
Post is unread #4 Nov 17, 2008, 5:46 am
Go to the top of the page
Go to the bottom of the page

Keberus
Conjurer
GroupFUSS Project Team
Posts341
JoinedJun 4, 2005

One thing that you may want to keep in mind. Though you can just change the name reference in the code, any command that sends the syntax to the character will have it displayed wrong and could be confusing like with the function do_say, if you changed the name, but where using it and didn't specify all the arguments someone might see:

Let's say you changed it from say to hablar (sorry my spanish isn't that great )

Someone would still see this if they didn't include an argument
Say what?


because of the code:
   if( argument[0] == '\0' )
   {
      send_to_char( "Say what?\r\n", ch );
      return;
   }


So, for some functions, like say. You may confuse the character, so it might be necessary to change the code in something like above to read:
   if( argument[0] == '\0' )
   {
      send_to_char( "Hablar Que?\r\n", ch );  
      return;
   }

Again, just using say as an example.


Later,
KeB
       
Pages:<< prev 1 next >>