Jump to content
  • 0

REQUEST for @newmount [DELAY for 5sec*]


Question

Posted

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

4 answers to this question

Recommended Posts

Posted (edited)

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
Posted (edited)

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
Posted

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...