Jump to content
  • 0

help - Auto Attack


Question

Posted (edited)

- I patch the auto attack by God http://rathena.org/b...297-autoattack/

- i make a custom item

30000,AutoAttack_Box,AutoAttack Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 30001,604800; },{},{}

- and i make a function


function script command__ {

attachnpctimer getcharid(3);
atcommand "@autoattack";
initnpctimer;
return;

- and i put also

30001,Auto_Attack_Card,Auto Attack,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "command__"; },{},{}

- my problem is what if the Auto Attack Card will expired?.. is the function enough to stop from auto attacking??.. if the expiration end?

Edited by GM Takumirai

12 answers to this question

Recommended Posts

Posted

@god

is there a solution to provide in the function of a script to check if the item gone due to expiration the player will force to logout??..

- because it will be abuse if pressing it / using it then the time expire still the player are in auto attack state..

Posted

@god

is there a solution to provide in the function of a script to check if the item gone due to expiration the player will force to logout??..

- because it will be abuse if pressing it / using it then the time expire still the player are in auto attack state..

create new event (OnItemGoneEvent:) to supply

Posted (edited)

thanks for the response @God,

create new event (OnItemGoneEvent:) to supply

how to do it?.. sorry im noob ..

and please check the function script if it's right


function script command__ {

attachnpctimer getcharid(3);
atcommand "@autoattack";
initnpctimer;
return;

Edited by GM Takumirai
Posted

try this

30001,Auto_Attack_Card,Auto Attack,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{ callfunc "command__"; set @at,1;},{ callfunc "command__"; set @at,0;}

function script command__ {

attachnpctimer getcharid(3);
if
atcommand "@autoattack";
initnpctimer;
return;

and

- script fixautoattack {
OnPCLoginEvent:
if (@at == 0)
{end;} else { atcommand "@autoattack"; set @at,0;};
end;

Posted

Thanks Testing this /lv

got error

try this

30001,Auto_Attack_Card,Auto Attack,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{ callfunc "command__"; set @at,1;},{ callfunc "command__"; set @at,0;}

function script command__ {

attachnpctimer getcharid(3);
if
atcommand "@autoattack";
initnpctimer;
return;

and

- script fixautoattack {
OnPCLoginEvent:
if (@at == 0)
{end;} else { atcommand "@autoattack"; set @at,0;};
end;


[Error]: npc_parsesrcfile: Unknown syntax in file 'npc/AGNRO/VIP/VIP-auto-attack.txt', line '1'. Stopping...
* w1=function script command__ {
* w2=
* w3=
* w4=
[Error]: npc_parsesrcfile: Unknown syntax in file 'npc/AGNRO/VIP/VIP-auto-attack-checker.txt', line '1'. Stopping...
* w1=- script fixautoattack {
* w2=
* w3=
* w4=

Posted

Oh that's why, thanks Toast

it seem that its not working..

// Auto Attack Box to make the card have rental or expire time

29056,Auto_Attack_Box,Auto Attack Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 29002,604800; },{},{}

29002,autoatk_Card,Auto Attack Card,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{ callfunc "command__"; set @at,1;},{ callfunc "command__"; set @at,0;}

//This command is tfor the Auto Attack Card to used it


function script command__ {

atcommand "@autoattack";
return;}

//This Code is to check if the item Auto Attack Card Expired the Auto Attack Command will force to cancel


- script fixautoattack -1,{
OnPCLoginEvent:
if (@at == 0)
{end;} else { atcommand "@autoattack"; set @at,0;};
end;}

i dont know what is the problem there's no error in map..

Posted

- script fixautoattack -1,{
OnPCLoginEvent:
if (@at == 0 && (getequipid(<equipment slot>) == 29002 ))
{end;} else if (@at == 1 && (getequipid(<equipment slot>) == 29002 )) { atcommand "@autoattack"; set @at,0;};
end;}

Try this

Posted

- script fixautoattack -1,{
OnPCLoginEvent:
if (@at == 0 && (getequipid(<equipment slot>) == 29002 ))
{end;} else if (@at == 1 && (getequipid(<equipment slot>) == 29002 )) { atcommand "@autoattack"; set @at,0;};
end;}

Try this

sir how about if i make the item equipable

example if i equip the item it will trigger command @autoattack..

but if i un-equip the item, @autoattack will trigger off.. but the problem on the patch of God there's no @autoattack on and @autoattack off command, only it trigger @autoattack.. is there any solution?..

and also a checker if the item gone and still in the state of @autoattack, it will automaticaly disable the @autoattack..

Posted

ITEM BOX:

29056,Auto_Attack_Box,Auto Attack Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 29002,604800; },{},{}

ITEM AUTO

29002,autoatk_Card,Auto Attack Card,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{ callfunc "command__"; set @at,1;},{ callfunc "command__"; set @at,0;}

FUNCTION ATCOMMAND

function script command__ {
atcommand "@autoattack";
return;}

FUNCTION CHECK

- script fixautoattack -1,{
OnPCLogoutEvent:
if (@at == 1)
{ atcommand "@autoattack"; set @at,0;};
end;
}

Before TEST plz unequip ITEM AUTO and turn off auto attack.

Sr ! My English is very very very BAD :(

  • Upvote 1

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