Jump to content
  • 0

CashShop Icon on upper Right near minimap


Question

Posted (edited)

Hello Everyone

How can I make it so that when the cash shop icon is clicked in-game, it calls the NPC script instead of opening the cash shop menu?

image.png.66c6e04863e8873d50042bcda9316e48.png

Edited by Onairda

3 answers to this question

Recommended Posts

  • 2
Posted (edited)

Done!

 

go to src/map/clif.cpp
 

For Roulette Icon

void clif_roulette_open( struct map_session_data* sd ){
	nullpo_retv( sd );

	struct packet_roulette_open_ack p;

	p.PacketType = 0xa1a;
	p.Result = 0; // result
	p.Serial = 0; // serial
	p.Step = (sd->roulette.claimPrize) ? sd->roulette.stage - 1 : 0;
	p.Idx = (sd->roulette.claimPrize) ? sd->roulette.prizeIdx : -1;
	p.AdditionItemID = -1; //! TODO: Display bonus item
	p.GoldPoint = sd->roulette_point.gold;
	p.SilverPoint = sd->roulette_point.silver;
	p.BronzePoint = sd->roulette_point.bronze;

	sd->state.roulette_open = true;

	clif_send( &p, sizeof( p ), &sd->bl, SELF );
}

Change to

void clif_roulette_open( struct map_session_data* sd ){
	nullpo_retv( sd );
	npc_event_do_id("NPCNAME::OnLabel", sd->status.account_id);
}

 

NPC:

-	script	NPCNAME	-1,{
OnLabel:
	mes "add whatever you want.";
	end;
}


then under cliff, searched the Cash Shop button and do the same.

Edited by Onairda
  • MVP 1
  • -1
Posted

U maybe can check the Paket who is sended to the server when it clicked by user. Then call an NPC or function of an NPC. Otherwise u need client modification but this will be much harder.

 

Rynbef~

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...