Jump to content
  • 0
Sign in to follow this  
AsiaGenius

[Scripting] Packets Manipulation

Question

void clif_parse_join_HUNT(int fd, struct map_session_data *sd) 
{
	const unsigned int blocksize = 6;
	unsigned int count, packet_orga,packet_orgas,packet_orgass,packet_type;
	struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)];

	packet_type = RFIFOW(fd,info->pos[0]);
	packet_id = RFIFOW(fd,info->pos[1]);
	

	if (packet_orga == 26964){ 
		ShowWarning("Packet Received!  \n");
	} 

}

I'm making a system that when you get a packet, the hexed, it will call an NPC!

 

Currently the script does the following;
1 - Click the button on my hexed interface
2 - A packet is sent
3 - I get the packet and display a message "Packet Received: D"
 
I must now call a script from an NPC in the game.
 
Can anyone help me with something?
 
 
void clif_parse_join_HUNT(int fd, struct map_session_data *sd) 
{
	const unsigned int blocksize = 6;
	unsigned int count, packet_orga,packet_orgas,packet_orgass,packet_type;
	struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)];

	packet_type = RFIFOW(fd,info->pos[0]);
	packet_id = RFIFOW(fd,info->pos[1]);
	

	if (packet_orga == 26964){ //
		//CALL NPC event_A WHERE 
	} 

}

 

Script to call

-	script	event_A	-1,{

mes "Working!";
close;

}

 

 

 

Sorry my bad english...

 

Solved, close topic. :)

Edited by falkatrua

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.   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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.