Jump to content
  • 0
Sign in to follow this  
Clare

Convert a Source Code to Hercules

Question

someone could help me make this code work in Hercules?
 
I've tried some times, but no have success, so if possible I would be grateful if can show me where also made changes to make the functional code.

yes, I am using a translator

Here the full code
@@ -8634,6 +8665,46 @@ }  /*==========================================+* @order [Shiraz]+* --> Pequena mod para aparecer nome do líder [Hold]+*------------------------------------------*/+ACMD_FUNC(order)+{+	struct s_mapiterator* count = mapit_getallusers();+	struct map_session_data *pl_sd;+	struct guild* member;+	int len;++	memset(atcmd_output, '0', sizeof(atcmd_output));+	+	if(!(member = guild->search(sd->status.guild_id)) || !strstr(member->master,sd->status.name))+	{+		clif_displaymessage(sd->fd, "Você não é o líder do clã.");+		return -1;+	}+	+	if(!(strlen(message)))+	{+		clif_displaymessage(sd->fd, "Você precisa digitar uma mensagem.");+		return -1;+	}++	sprintf(atcmd_output, "[Líder] %s : %s", sd->status.name, message);++	len = strlen(atcmd_output);++	for(pl_sd = (TBL_PC*)mapit_first(count); mapit_exists(count); pl_sd = (TBL_PC*)mapit_next(count))+	{+		if(pl_sd->status.guild_id != sd->status.guild_id)+			continue;+		clif_broadcast(&pl_sd->bl, atcmd_output, len, 0x10, SELF);+	}+	+	mapit_free(count);+	return 0;+}++/*==========================================  @@ -8937,6 +9009,7 @@	 { "font",               1,1,      atcommand_font }, // brAthena Modificações     { "whosell",            1,1,      atcommand_whosell },+	{ "order",             0,99,      atcommand_order   },

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
ACMD(order){	struct s_mapiterator* count = mapit_getallusers();	 struct map_session_data *pl_sd;	 struct guild* member;	 int len;	 memset(atcmd_output, '0', sizeof(atcmd_output));	 	 if(!(member = guild->search(sd->status.guild_id)) || !strstr(member->master,sd->status.name))	 {		  clif->message(sd->fd, "Voce nao e o lider do cla.");		  return -1;	 }	 	 if(!(strlen(message)))	 {		  clif->message(sd->fd, "Voce precisa digitar uma mensagem.");		  return -1;	 }	 sprintf(atcmd_output, "[Lider] %s : %s", sd->status.name, message);	 len = strlen(atcmd_output);	 for(pl_sd = (TBL_PC*)mapit->first(count); mapit->exists(count); pl_sd = (TBL_PC*)mapit->next(count))	 {		  if(pl_sd->status.guild_id != sd->status.guild_id)				continue;		  clif->broadcast(&pl_sd->bl, atcmd_output, len, 0x10, SELF);	 }	 	 mapit->free(count);	 return 0;}
 
ACMD_DEF(order),

Share this post


Link to post
Share on other sites
  • 0
I swear I spent two hours trying to make it work, but not really have no experience with the source editing, thank you for help if it is not too much to ask, could help me with this other code?


Edited by Suzuya

Share this post


Link to post
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.   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.