Jump to content
  • 0

REQUEST for @newmount [DELAY for 5sec*]


Drakkus

Question


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

As the 'Topic Title' says.

I don't like using @newmounts that is easily to be mounted, and i want to make it with 'DELAY' like 5secs.

with 'Casting' at the Top of the Head.

Regards,

Mindless

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


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

Here's for the 5 seconds delay.

src/map/atcommand.c

ACMD_FUNC(new_mount) {

+	if ( DIFF_TICK(gettick(), sd->new_mount_cd) < 5000 ) {
+		clif_displaymessage(fd, "You can only use this command once per 5 seconds.");
+			return 1;
+	}
+	sd->new_mount_cd = gettick();
+	
clif_displaymessage(sd->fd,"NOTICE: If you crash with mount your LUA is outdated");	

if( !(sd->sc.option&OPTION_MOUNTING) ) {
	clif_displaymessage(sd->fd,"You have mounted.");
	pc_setoption(sd, sd->sc.option|OPTION_MOUNTING);
} else {
	clif_displaymessage(sd->fd,"You have released your mount");
	pc_setoption(sd, sd->sc.option&~OPTION_MOUNTING);
}
return 0;
}

src/map/pc.h

unsigned char head_dir; //0: Look forward. 1: Look right, 2: Look left.
unsigned int client_tick;
+  unsigned int new_mount_cd;	
int npc_id,areanpc_id,npc_shopid,touching_id;

For the cast-bar on the top of the head, that I don't know.

Edited by Legato
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

Here's for the 5 seconds delay.

src/map/atcommand.c

ACMD_FUNC(new_mount) {

+	if ( DIFF_TICK(gettick(), sd->new_mount_cd) < 5000 ) {
+		clif_displaymessage(fd, "You can only use this command once per 5 seconds.");
+			return 1;
+	}
+	sd->new_mount_cd = gettick();
+	
clif_displaymessage(sd->fd,"NOTICE: If you crash with mount your LUA is outdated");	

if( !(sd->sc.option&OPTION_MOUNTING) ) {
	clif_displaymessage(sd->fd,"You have mounted.");
	pc_setoption(sd, sd->sc.option|OPTION_MOUNTING);
} else {
	clif_displaymessage(sd->fd,"You have released your mount");
	pc_setoption(sd, sd->sc.option&~OPTION_MOUNTING);
}
return 0;
}

src/map/pc.h

unsigned char head_dir; //0: Look forward. 1: Look right, 2: Look left.
unsigned int client_tick;
+  unsigned int new_mount_cd;	
int npc_id,areanpc_id,npc_shopid,touching_id;

For the cast-bar on the top of the head, that I don't know.

Yey, it works now, however i need that 'CAST-BAR' on the top of the head.

When @newmount it would 'CAST-BAR' and @newmount (dismounted) no 'CAST-BAR' this would be prevent to easily be mounted.

Regards,

Mindless

Any help for this?

Edited by Mindless
Link to comment
Share on other sites


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

I don't think you could do that via @command unless you make it a skill. I might be wrong. I'm not sure.

But, I am glad I could help.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

Again, for this topic. possible to make it as a 'SKILL'. i don't want using @newmount instead of using Skill, to prevent Spamming thru INGAME.

Anyone could help me about this?

Regards,

Mindless

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