Jump to content

  •  

Photo

[Scripting] Packets Manipulation


  • Please log in to reply
No replies to this topic

#1 AsiaGenius

AsiaGenius

    Member

  • Members
  • PipPip
  • 22 posts

Posted 23 February 2016 - 11:30 PM

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! :D \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, 23 February 2016 - 09:22 PM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users


This topic has been visited by 51 user(s)