Jump to content
Returning Members: Password Reset Required ×

[v6609] What is the packet for Bulletin Board and Merchant?


Recommended Posts

Posted (edited)

Is it possible to actually control the events in this Bulletin Board, I'm on 6609, could someone tell me what packet it is?

image.png.474e8dca83d0cda03363438052e6536f.png

Also whenenver I login, there's always this merchant application applied, can I control this too? I remember there was an NPC in the Market which we could enroll or get out of this, but I don't know what is the packet that controls merchants and it seems to be always applied by default for all accounts.

image.png.a7596abd5c226e0bca0eafd55122a64e.png

Thank you guys in advance, I'm just asking for some leads or packets where I can further investigate this.

Edited by xFranko
  • xFranko changed the title to [v6609] What is the packet for Bulletin Board and Merchant?
Posted (edited)

The bulletin is client sided, when you click the Join button it will send a MsgAction packet:

case ActionType.BulletinInviteTrans: // 166
{
  ScriptManager.BulletinInvitation(user, Command);
  break;
}

If using official bins, the actions for every event is on `cq_config` type 6007.

Also for merchant there is a NPC in the market, you use the MsgInteract to control the client status.

public void SetMerchant()
{
	if (IsMerchant())
	{
		// already merchant
		return;
	}

	if (Level <= 30 && Metempsychosis == 0)
	{
        // newbie, set merchant instantly
		_user.Business = (uint)DateTime.Now.ToUnixTimestamp();
		SynchroAttributes(ClientUpdateType.Merchant, 255);
	}
	else
	{
        // 5 days approval
		_user.Business = (uint)DateTime.Now.AddDays(5).ToUnixTimestamp();
	}

	Save();
}

public void RemoveMerchant()
{
	_user.Business = 0;
	SynchroAttributes(ClientUpdateType.Merchant, 0);
	Save();
}

public void SendMerchant()
{
	if (IsMerchant())
	{
        // tell client use is merchant
		SynchroAttributes(ClientUpdateType.Merchant, 255);
		return;
	}

	if (IsAwaitingMerchantStatus())
	{
        // user waiting merchant status window
		SynchroAttributes(ClientUpdateType.Merchant, 1);
		Send(new MsgInteract
		{
			Action = MsgInteractType.MerchantProgress,
			Data = BusinessManDays
		});
		return;
	}

	if (Level <= 30 && Metempsychosis == 0)
	{
		// user is not merchant and is newbie, ask if want to be a merchant
		Send(new MsgInteract
		{
			Action = MsgInteractType.InitialMerchant,
			Command = 5 // 5 days
		});
		return;
	}

	// not newbie and no merchant status
	SynchroAttributes(ClientUpdateType.Merchant, 0);
}

 

Edited by Konichu

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...