Jump to content
  • 0

@go and @


aguyaguy

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   0
  • Joined:  12/17/11
  • Last Seen:  

Is it possible to make the warp point of @go go randomly at different points?

Like if I type @go 1, it would either go to 123,433 or 123,323, or 123,343. to avoid kill / hit players because i have a PK Server

about @

when the normal player type @ it says "Unknown Command" how to disable it and it will be a normal chat .

but in the GM side (it will be @ in command) like @item , @produce etc etc !

Edited by aguyaguy
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

you are wrong..xD

the topic starter is looking for a way to alter his @go command..

the defaul @go command will warp users to a fixed coordinate..

but he now wanna alter it become randomly warp into 4 spot when users used @go..

player will be warped to 4 spot randomly instead of the original 1 spot...

beside...your script....it cant apply to all map..since different map have differnt location that have building or wall or obstacle...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   4
  • Joined:  11/10/11
  • Last Seen:  

for removing @ "unknown commands" message for unintended player gm level.

Find

    if( info == NULL || info->func == NULL || ( type && ((*atcmd_msg == atcommand_symbol && pc_isGM(sd) < info->level) || (*atcmd_msg == charcommand_symbol && pc_isGM(sd) < info->level2)) ) )
   {
      	 sprintf(output, msg_txt(153), command); // "%s is Unknown Command."
      	 clif_displaymessage(fd, output);
      	 return true;
   }

Replace

    if( info == NULL || info->func == NULL || ( type && ((*atcmd_msg == atcommand_symbol && pc_isGM(sd) < info->level) || (*atcmd_msg == charcommand_symbol && pc_isGM(sd) < info->level2)) ) )
   {
           return false;
   }

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  186
  • Reputation:   51
  • Joined:  11/14/11
  • Last Seen:  

for removing @ "unknown commands" message for unintended player gm level.

Find

	if( info == NULL || info->func == NULL || ( type && ((*atcmd_msg == atcommand_symbol && pc_isGM(sd) < info->level) || (*atcmd_msg == charcommand_symbol && pc_isGM(sd) < info->level2)) ) )
{
   	 sprintf(output, msg_txt(153), command); // "%s is Unknown Command."
   	 clif_displaymessage(fd, output);
   	 return true;
}

Replace

	if( info == NULL || info->func == NULL || ( type && ((*atcmd_msg == atcommand_symbol && pc_isGM(sd) < info->level) || (*atcmd_msg == charcommand_symbol && pc_isGM(sd) < info->level2)) ) )
{
		return false;
}

Wrong way to remove the notification itself.

Right way is to check for string length (see attachment).

Always let the user know what something was wrong.

Any error message like "error" is better than a player thinking like "wtf is going on here? Nothing happend? I tried it several times? WTF?"

player_commands_length.patch

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   0
  • Joined:  12/17/11
  • Last Seen:  

at godlezs . should i paste that ? or put it in below the script?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   4
  • Joined:  11/10/11
  • Last Seen:  

about @

when the normal player type @ it says "Unknown Command" how to disable it and it will be a "normal chat" .

but in the GM side (it will be @ in command) like @item , @produce etc etc !

Or maybe you can add GM Check. Make sure you set the lowest considered GM Level on your gm.conf

// The level at which a player with access is considered a GM.

// An account with an access level lower than this is not effected

// by gm_can_drop_lv (battle_athena.conf).

lowest_gm_level: 1

		   	 if( info == NULL || info->func == NULL || ( type && ((*atcmd_msg == atcommand_symbol && pc_isGM(sd) < info->level) || (*atcmd_msg == charcommand_symbol && pc_isGM(sd) < info->level2)) ) )
		 if ( battle_config.lowest_gm_level > pc_isGM(sd) )
	   	 return false;
	   	 else {
			 sprintf(output, msg_txt(153), command); // "%s is Unknown Command."
			 clif_displaymessage(fd, output);
			 return true;
	   	 }

You can try this or mix with other's dev code and decide which is best fit for you.

Try this code too if you don't want "#" <# failed. Player not found.> display on normal player ID.

Find

   	 if ( (ssd = map_nick2sd(charname)) == NULL  && ( (ssd = map_nick2sd(charname2)) == NULL ) )
	{
		sprintf(output, "%s failed. Player not found.", command);
		clif_displaymessage(fd, output);
		return true;
	}

Replace


  	 if ( (ssd = map_nick2sd(charname)) == NULL  && ( (ssd = map_nick2sd(charname2)) == NULL ) )
	{
		if ( battle_config.lowest_gm_level > pc_isGM(sd) )
		return false;
		else {
		sprintf(output, "%s failed. Player not found.", command);
		clif_displaymessage(fd, output);
		return true;
		}
	}

Hope this help :)

Edited by GHul
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...