Jump to content
  • 0

CashShop Icon on upper Right near minimap


Onairda

Question


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  178
  • Reputation:   9
  • Joined:  12/30/16
  • Last Seen:  

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
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 2

  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  178
  • Reputation:   9
  • Joined:  12/30/16
  • Last Seen:  

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
Link to comment
Share on other sites

  • -1

  • Group:  Forum Moderator
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  941
  • Reputation:   125
  • Joined:  05/23/12
  • Last Seen:  

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~

Link to comment
Share on other sites

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.

×
×
  • Create New...