Jump to content

Recommended Posts

Posted (edited)

File Name: @AutoAttack
File Submitter: goddameit
File Submitted: 13 Sep 2012
File Category: Source Modifications
Content Author: Goddameit

Idea : http://rathena.org/b...k-close-enemys/

Preview :



Use this command you can turn on or off auto-attack.

It will auto-search 9x9 and attack the near one

if there is no monster in area, you will auto-walk randomly.

Click here to download this file

@AutoAttack.patch

 

Important Note : #31 #32

Edited by goddameit
  • Upvote 6
Posted (edited)

...

I don't know why, this is my first time use this to release,

anyway, I have uploaded to other space, try it.

oops, forgot change to rA version.

Edited by goddameit
Posted (edited)

is this working on latest rathena svn? i put it in atcommand and status and compiled with no error then try @autoattack but it send as a message not a command /heh btw in status.h with OPTION_AUTOATTACK = 0x08000000 but the 0x08000000 is already taken by OPTION_MOUNTING...

Edited by devilmadz23
Posted

Suggestion.

Place a timer in this command.

example: You can only use this command for a certain amount of time and it automatically turns off after that.. and you can only use it after 1 hour or so..

  • 4 weeks later...
  • 2 weeks later...
Posted (edited)

God can you make it .. an item base command? example if we used an custom item autoattack it will allow us to use autoattack and will expire on time.. then the item will disappear if the item expired

Edited by GM Takumirai
Posted

I've added a message what displayed "You activated Autoattack" and "You deactivated Autoattack".

It make a bit userfriendly.^^

Search:

ACMD_FUNC(autoattack)
{
nullpo_retr(-1, sd);
if (sd->sc.option & OPTION_AUTOATTACK)
{
sd->sc.option &= ~OPTION_AUTOATTACK;
unit_stop_attack(&sd->bl);
}else
{
sd->sc.option |= OPTION_AUTOATTACK;
add_timer(gettick()+200,autoattack_timer,sd->bl.id,0);
}
clif_changeoption(&sd->bl);
return 0;
}

Change it to:

ACMD_FUNC(autoattack)
{
nullpo_retr(-1, sd);
if (sd->sc.option & OPTION_AUTOATTACK)
{
sd->sc.option &= ~OPTION_AUTOATTACK;
unit_stop_attack(&sd->bl);
clif_displaymessage(fd, "You deactivated Autoattack.");
}else
{
sd->sc.option |= OPTION_AUTOATTACK;
add_timer(gettick()+200,autoattack_timer,sd->bl.id,0);
clif_displaymessage(fd, "You activated Autoattack.");

}
clif_changeoption(&sd->bl);
return 0;
}

Posted (edited)

It seems to me that you could use this @command in a script if you really want to include a timer function to it.

Just start @autoattack, and stop it with an npc timer. Make a function if you want it available for an item. Make the item none trade/storage/drop so that the player cant abuse it. Then have the script delete the item when the timer runs out.

Or just delete the item on usage

Edited by rocky6861
  • 3 weeks later...
  • 3 weeks later...
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

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