Welcomes MSG world server

Welcome in the osRose emulator Project.

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

Welcomes MSG world server

Postby kjanssen on Sat Aug 01, 2009 12:55 pm

i have a question about the world server

i want if someone login that it says "Welkom charname"

it wil not work is i put in the command.ini "welcome_MSG=%s welcome"

not if i doe this
Config.WELCOME_MSG = ConfigGetString ( file, "welcome_msg", "Welcome" + '%s' + "to Rose Online" );

what must i do to let this work?
kjanssen
Lucky Ghost
Lucky Ghost
 
Posts: 623
Joined: Sat Dec 20, 2008 5:38 pm

Re: Welcomes MSG world server

Postby kjanssen on Wed Aug 05, 2009 4:24 pm

nobody has a answer?
kjanssen
Lucky Ghost
Lucky Ghost
 
Posts: 623
Joined: Sat Dec 20, 2008 5:38 pm

Re: Welcomes MSG world server

Postby lmame on Wed Aug 05, 2009 4:26 pm

Don't put welcome_msg at all in the .conf or list_conf mysql table.
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: Welcomes MSG world server

Postby kjanssen on Wed Aug 05, 2009 8:30 pm

lmame wrote:Don't put welcome_msg at all in the .conf or list_conf mysql table.


where must i put the welcome msg then?

i only want if a player is comming online that there comes

Welkom charname
kjanssen
Lucky Ghost
Lucky Ghost
 
Posts: 623
Joined: Sat Dec 20, 2008 5:38 pm

Re: Welcomes MSG world server

Postby lmame on Wed Aug 05, 2009 8:55 pm

In the server of course. Overwrite the one read in the .conf by setting yours in server or use something like "sendPM" to send him a welcome PM.
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: Welcomes MSG world server

Postby kjanssen on Thu Aug 06, 2009 9:18 am

lmame wrote:In the server of course. Overwrite the one read in the .conf by setting yours in server or use something like "sendPM" to send him a welcome PM.



where and what must i put in?
kjanssen
Lucky Ghost
Lucky Ghost
 
Posts: 623
Joined: Sat Dec 20, 2008 5:38 pm

Re: Welcomes MSG world server

Postby lmame on Thu Aug 06, 2009 9:40 am

For sendpm() ? You send it where the welcome_msg is sent to the player and it's something like:
SendPM(thisclient,"Welcome %s!",thisclient->CharInfo->CharName);

or something.
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: Welcomes MSG world server

Postby kjanssen on Thu Aug 06, 2009 11:26 am

lmame wrote:For sendpm() ? You send it where the welcome_msg is sent to the player and it's something like:
SendPM(thisclient,"Welcome %s!",thisclient->CharInfo->CharName);

or something.


thanks for you're quick response i go to try that


thank you
kjanssen
Lucky Ghost
Lucky Ghost
 
Posts: 623
Joined: Sat Dec 20, 2008 5:38 pm

Re: Welcomes MSG world server

Postby kjanssen on Thu Aug 06, 2009 11:49 am

where does the server send that MSG?

i only find where is loads it

  1. //World
  2.     Config.MinimumAccessLevel   = ConfigGetInt    ( file, "minimal_access_level", 100 );
  3.     Config.usethreads           = ConfigGetInt    ( file, "usethreads", 0 )==0?false:true;
  4.     Config.DROP_TYPE            = ConfigGetInt    ( file, "drop_type", 2 );
  5.    
  6.  
  7.     Config.WELCOME_MSG          = ConfigGetString ( file, "welcome_msg", "Welkom %s"
  8.     Config.AUTOSAVE             = ConfigGetInt    ( file, "autosave", 0 );
  9.     Config.SAVETIME             = ConfigGetInt    ( file, "savetime", 3600 );
  10.     Config.MapDelay             = ConfigGetInt    ( file, "mapdelay", 10 );
  11.     Config.WorldDelay           = ConfigGetInt    ( file, "worlddelay", 200 );
  12.     Config.VisualDelay          = ConfigGetInt    ( file, "visualdelay", 500 );
  13.     Config.Partygap             = ConfigGetInt    ( file, "partygap", 10 );
  14.     Config.MaxStat              = ConfigGetInt    ( file, "maxstat", 254 );
  15.     Config.FairyMode            = ConfigGetInt    ( file, "fairy", 1 );
  16.     Config.FairyStay            = ConfigGetInt    ( file, "fairystay", 20 );
  17.     Config.FairyWait            = ConfigGetInt    ( file, "fairywait", 15 );
  18.     Config.FairyMax             = ConfigGetInt    ( file, "fairymax", 0);
  19.     Config.FairyTestMode        = ConfigGetInt    ( file, "fairytestmode", 1);
  20.     Config.Cfmode               = ConfigGetInt    ( file, "cfmode", 0);
kjanssen
Lucky Ghost
Lucky Ghost
 
Posts: 623
Joined: Sat Dec 20, 2008 5:38 pm

Re: Welcomes MSG world server

Postby lmame on Thu Aug 06, 2009 12:15 pm

Look for something like:
  1.     RESETPACKET( pak, 0x702 );
  2.     ADDSTRING  ( pak, Config.WELCOME_MSG );
  3.     ADDBYTE    ( pak, 0 );
  4.     thisclient->client->SendPacket( &pak );


Add after:
  1. SendPM(thisclient,"Welcome %s",thisclient->CharInfo->charname);




Or REPLACE:
  1.     RESETPACKET( pak, 0x702 );
  2.     ADDSTRING  ( pak, Config.WELCOME_MSG );
  3.     ADDBYTE    ( pak, 0 );
  4.     thisclient->client->SendPacket( &pak );


BY:
  1.      char buffer[200];
  2.      sprintf( buffer, "Welcome %s!",thisclient->CharInfo->charname);
  3.     RESETPACKET( pak, 0x702 );
  4.     ADDSTRING  ( pak, buffer );
  5.     ADDBYTE    ( pak, 0 );
  6.     thisclient->client->SendPacket( &pak );


You don't have a dev because this is VERY basic work a guy like you could even do...
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Next

Return to Support - OspRose Emulator

Who is online

Users browsing this forum: No registered users and 7 guests