Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

send item to all player and change inventory slots ?

Newbie Spellweaver
Joined
Jun 8, 2016
Messages
56
Reaction score
0
hello guys , is it possible to send item to all player's inventory maybe?
and can i make character start with a special number of inventory slots ?
 
Joined
Jun 10, 2012
Messages
557
Reaction score
131
Well at JD you had to edit the config characters, basically those are the first 2-3 accounts. Once you done with the edit that you want you have to export the clsconfig.
I think its the same way here since they both developed by wanmei =D
 
Upvote 0
Joined
Jun 10, 2012
Messages
557
Reaction score
131
sry but i didn"t get what u mean
how can i edit clsconfig?

Normally when you done the character edit on the main characters you've to execute this command
Code:
./gamedbd gamesys.conf exportclsconfig
If you done everything correctly the next character that is made will have expanded bag or w.e change you've done on the main characters.
 
Upvote 0
Newbie Spellweaver
Joined
Jun 8, 2016
Messages
56
Reaction score
0
what i did was changing my account id to 16 , then expanding my bag with gm codes and then run the command but ididn"t get the changes
 
Upvote 0
Joined
Jun 10, 2012
Messages
557
Reaction score
131
Just a quick questing sir, when you make the first 2 accounts their ID's should be like 16 and 32, when you log these accounts does they have pre-created characters named like cls5gender0 or something like this.

If there is you have to log in every single character and expand the bag or add w.e you want there. Once you're done you've to execute the command that I wrote above, and don't forget that you should first open gamedbd folder with cd gamedbd or w.e is the game database.

Once you've done all these steps create new character and everything should be okay.
If still nothing then you might have not done something right or PWI clsconfigs are different than JD's one.
 
Upvote 0
Newbie Spellweaver
Joined
Jun 8, 2016
Messages
56
Reaction score
0
oh thanks a lot ,



and a question : the old characters won"t get the new changes?
 
Upvote 0
Banned
Banned
Joined
Aug 10, 2011
Messages
201
Reaction score
54
Use the API that Hulu shared

everything is possible with this

eg webservice :

PHP:
if(	isset($_POST['inventory'])	)
		{
                       $api 	= new API();
			if ( $role_data = $api->getRole( $role ) )
			{
				if(($role_data['pocket']['icapacity'] == '64') || ($role_data['pocket']['icapacity'] == '80') || ($role_data['pocket']['icapacity'] == '32'))
				{
					$role_data['pocket']['icapacity']	= '96';
					
					if ($api->putRole( $role, $role_data ))
					{
						$ERROR	= "<div class='alert alert-success'> <b>Successfully extended your Inventory to 96 Slots!</b></div></br>";
					}
					else
					{
						$ERROR	= "<div class='alert alert-danger'> <b>There was an error</b></div></br>";
					}
				}
				elseif ($role_data['pocket']['icapacity'] == '128' || ($role_data['pocket']['icapacity'] == '96'))
				{
					$ERROR	= "<div class='alert alert-danger'> <b>You already have extended your Inventory !</b></div></br>";
				}
				else
				{
					$ERROR	= "<div class='alert alert-danger'> <b>You must maximize your inventory to 64 Slots first!</b></div></br>";
				}
			}
		}
 
Upvote 0
Joined
Jun 10, 2012
Messages
557
Reaction score
131
Use the API that Hulu shared

everything is possible with this

eg webservice :

PHP:
if(	isset($_POST['inventory'])	)
		{
                       $api 	= new API();
			if ( $role_data = $api->getRole( $role ) )
			{
				if(($role_data['pocket']['icapacity'] == '64') || ($role_data['pocket']['icapacity'] == '80') || ($role_data['pocket']['icapacity'] == '32'))
				{
					$role_data['pocket']['icapacity']	= '96';
					
					if ($api->putRole( $role, $role_data ))
					{
						$ERROR	= "<div class='alert alert-success'> <b>Successfully extended your Inventory to 96 Slots!</b></div></br>";
					}
					else
					{
						$ERROR	= "<div class='alert alert-danger'> <b>There was an error</b></div></br>";
					}
				}
				elseif ($role_data['pocket']['icapacity'] == '128' || ($role_data['pocket']['icapacity'] == '96'))
				{
					$ERROR	= "<div class='alert alert-danger'> <b>You already have extended your Inventory !</b></div></br>";
				}
				else
				{
					$ERROR	= "<div class='alert alert-danger'> <b>You must maximize your inventory to 64 Slots first!</b></div></br>";
				}
			}
		}

The problem is that DanXus want to change players bag when they create characters like when you create character your bag is already fully extended. From what I see this script is made to increase the bag of character that is already made. Correct me if I'm wrong :p
 
Upvote 0
Banned
Banned
Joined
Aug 10, 2011
Messages
201
Reaction score
54
The problem is that DanXus want to change players bag when they create characters like when you create character your bag is already fully extended. From what I see this script is made to increase the bag of character that is already made. Correct me if I'm wrong :p

It's just an example on how it work, if you export listrole in database you can loop to mass change all characters
example :

PHP:
$Query		=	$mysqli->query("select * from `listrole` WHERE `level`=150 LIMIT 0, 1000");
	
	while($Row	=	$Query->fetch_array())
	{
		if ($Row['roleid'] > 1024)
		{
			$role_data = $api->getRole( $Row['roleid'] );
			$role_data['pocket']['icapacity'] == '128';
			if ($api->putRole( $Row['roleid'], $role_data ))
			{
				$success++;
				error_log(date('[Y-m-d H:i] ')."[OK] Reset: ".$Row['roleid']." ".PHP_EOL, 3, LOG_FILE);
			}
			else
			{
				$errors++;
				$fail	.=	"Role ID : ".$Row['roleid']."Failed the skill reset </br>";
				error_log(date('[Y-m-d H:i] ')."[FAIL] Reset: ".$Row['roleid']." ".PHP_EOL, 3, LOG_FILE);
			}
			sleep(2);
		}
		$count++;
	}
 
Upvote 0
Back
Top