[Fix&&Codes]Shop Attack And Some Codes

If you want to help us or give some corrections / codes, put it here :)

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

[Fix&&Codes]Shop Attack And Some Codes

Postby Computer29 on Sat Jul 26, 2008 8:46 pm

Open "worldpackets.cpp" And Find
  1. if ( thisclient->Battle->target == clientid ) return true;

Add:
  1.  
  2.     if(thisclient->Shop->open){
  3.         return true;
  4.     }
  5.  


-------------------------------------Beautiful Line-----------------------------------------------

Set Max Number Of Chars:
Open "sockets.h"
Find:
  1. unsigned int WorldPass;

Add:
  1. int          MaxChars;

Than Open "charserver.cpp"
Find
  1. Config.WorldPass            = ConfigGetInt    ( file, "worldpass", 123456 );

Add:
  1.    Config.MaxChars             = ConfigGetInt    ( file, "maxchars" , 3);
  2.     Log( MSG_INFO, "Max Number Of Chars Set To : %d.",Config.MaxChars );

Than Open "charpackets.cpp"
Find:
  1. if ( mysql_num_rows( result ) == 5 )

Replace To:
  1. if ( mysql_num_rows( result ) >= Config.MaxChars )


-------------------------------------Beautiful Line-----------------------------------------------
Set New Char's Level And Zuly:
File:charserver.cpp
Find:
  1. Config.WorldPass            = ConfigGetInt    ( file, "worldpass", 123456 );

Add:
  1. Config.InitLevel            = ConfigGetInt    ( file, "initlevel", 10);
  2. Config.NewZuly              = ConfigGetInt    ( file, "initzuly" , 0);

Next Open the conf file "CharServer.Conf"
add this after "usethreads=0"
  1.  
  2. initlevel=10
  3. initzuly=5000

final:
open "sockets.h"
find
  1. unsigned int WorldPass;

add after :
  1. int          InitLevel;
  2. int          NewZuly;

final open "charpackets.cpp"
find
  1. if(!DB->QExecute("INSERT INTO characters (account_name, char_name, face, hairStyle, sex) VALUES('%s','%s',%i,%i,%i)", thisclient->username, newname.c_str(), face, hairstyle, sex))

replace to:
  1. if(!DB->QExecute("INSERT INTO characters (account_name, char_name, face, hairStyle, sex, level, zuly) VALUES('%s','%s',%i,%i,%i,%i,%i)", thisclient->username, newname.c_str(), face, hairstyle, sex, Config.InitLevel, Config.NewZuly))

-------------------------------------Beautiful Line-----------------------------------------------
Computer29
Little soul
Little soul
 
Posts: 3
Joined: Mon Jan 14, 2008 7:54 pm

Re: [Fix&&Codes]Shop Attack And Some Codes

Postby soccerstar on Sat Jul 26, 2008 9:31 pm

i haven't tried it but, nice job :D
Search, Just Do It.
User avatar
soccerstar
Clown
Clown
 
Posts: 501
Joined: Tue Jun 17, 2008 12:46 am

Re: [Fix&&Codes]Shop Attack And Some Codes

Postby Drakia on Sat Jul 26, 2008 9:41 pm

Hmm... decent code, just not sure how useful it is. The max characters that any client supports is 5, that's why the limit is there. And you can change starting zuly/level by changing the default values in the table...
My favorite skill is scaring new users away.
If you haven't SEARCHED expect me to yell at you.
Image
Drakia
ospRose dev team
ospRose dev team
 
Posts: 1614
Joined: Tue Sep 18, 2007 6:53 am
Location: Nanaimo, BC, Canada


Return to Submit Code

Who is online

Users browsing this forum: No registered users and 4 guests