Drakkus Posted January 27, 2012 Posted January 27, 2012 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 Quote
Legato Posted January 27, 2012 Posted January 27, 2012 (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 January 27, 2012 by Legato Quote
Drakkus Posted January 28, 2012 Author Posted January 28, 2012 (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 January 27, 2012 by Mindless Quote
Legato Posted January 28, 2012 Posted January 28, 2012 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. Quote
Drakkus Posted February 1, 2012 Author Posted February 1, 2012 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 Quote
Question
Drakkus
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.