Page 1 of 1

[Fix&&Codes]Shop Attack And Some Codes

PostPosted: Sat Jul 26, 2008 8:46 pm
by Computer29
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-----------------------------------------------

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

PostPosted: Sat Jul 26, 2008 9:31 pm
by soccerstar
i haven't tried it but, nice job :D

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

PostPosted: Sat Jul 26, 2008 9:41 pm
by Drakia
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...