Jump to content
×
×
  • Create New...
  • 0

wanna set start level from mysql but not working


scrabbyyy

Question

7 answers to this question

Recommended Posts

  • 0
  • Moon
bool NewPlayerTable2(TPlayerTable * table, const char * name, BYTE race, BYTE shape, BYTE bEmpire)
{
	if (race >= MAIN_RACE_MAX_NUM)
	{
		sys_err("NewPlayerTable2.OUT_OF_RACE_RANGE(%d >= max(%d))\n", race, MAIN_RACE_MAX_NUM);
		return false;
	}

	unsigned job;

	if (!RaceToJob(race, &job))
	{	
		sys_err("NewPlayerTable2.RACE_TO_JOB_ERROR(%d)\n", race);
		return false;
	}

	sys_log(0, "NewPlayerTable2(name=%s, race=%d, job=%d)", name, race, job); 

	memset(table, 0, sizeof(TPlayerTable));

	strlcpy(table->name, name, sizeof(table->name));

	table->level		= 1;
	table->job			= race;	// Á÷¾÷´ë½Å Á¾Á·À» ³Ö´Â´Ù
	table->voice		= 0;
	table->part_base	= shape;

	table->st		= JobInitialPoints[job].st;
	table->dx		= JobInitialPoints[job].dx;
	table->ht		= JobInitialPoints[job].ht;
	table->iq		= JobInitialPoints[job].iq;

	table->hp		= JobInitialPoints[job].max_hp + table->ht * JobInitialPoints[job].hp_per_ht;
	table->sp		= JobInitialPoints[job].max_sp + table->iq * JobInitialPoints[job].sp_per_iq;
	table->stamina	= JobInitialPoints[job].max_stamina;

	table->x		= CREATE_START_X(bEmpire) + number(-300, 300);
	table->y		= CREATE_START_Y(bEmpire) + number(-300, 300);
	table->z		= 0;
	table->dir		= 0;
	table->playtime = 0;
	table->gold 	= 0;

	table->skill_group = 0;

	return true;
}

That will be enough for you.

Filename : input_login.cpp

Line : 383

Kind Regards

Ken

  • Love 1

Do not be sorry, be better.

Link to comment
Share on other sites

  • 0
  • Premium

it's very simple

open input_login.cpp

bool NewPlayerTable2(TPlayerTable * table, const char * name, BYTE race, BYTE shape, BYTE bEmpire)
u will find this in the function :
table->level = 1;

change 1 to the level u want

 

  • Love 2

If you're going to do something, then do it right.

Link to comment
Share on other sites

  • 0

Hello,
Whitout source,
Ingame quest
 

Spoiler

quest start begin
(tab)state start begin
(tab)(tab)when login  with pc.getqf("level_upped")==1 begin
(tab)(tab)end
(tab)(tab)when login  with pc.getqf("level_upped")==0 begin
(tab)(tab)(tab)mysql_query("UPDATE player.player SET level='105' WHERE id = "..pc.get_player_id())
(tab)(tab)(tab)pc.setqf("level_upped", 1)
(tab)(tab)(tab)end
(tab)(tab)end
(tab)end
end
(enter)
(enter)

This is 100% work and instantly :D
Best regards,
Dawis

  • Love 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.