GM Takumirai Posted November 23, 2012 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 592 Reputation: 31 Joined: 11/14/11 Last Seen: July 29, 2015 Share Posted November 23, 2012 (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 November 23, 2012 by GM Takumirai Quote Link to comment Share on other sites More sharing options...
goddameit Posted November 23, 2012 Group: Members Topic Count: 60 Topics Per Day: 0.01 Content Count: 562 Reputation: 219 Joined: 11/22/11 Last Seen: August 3, 2024 Share Posted November 23, 2012 press start, press end, no press no change. Quote Link to comment Share on other sites More sharing options...
GM Takumirai Posted November 23, 2012 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 592 Reputation: 31 Joined: 11/14/11 Last Seen: July 29, 2015 Author Share Posted November 23, 2012 @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.. Quote Link to comment Share on other sites More sharing options...
goddameit Posted November 23, 2012 Group: Members Topic Count: 60 Topics Per Day: 0.01 Content Count: 562 Reputation: 219 Joined: 11/22/11 Last Seen: August 3, 2024 Share Posted November 23, 2012 @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 Quote Link to comment Share on other sites More sharing options...
GM Takumirai Posted November 23, 2012 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 592 Reputation: 31 Joined: 11/14/11 Last Seen: July 29, 2015 Author Share Posted November 23, 2012 (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 November 23, 2012 by GM Takumirai Quote Link to comment Share on other sites More sharing options...
bachvugx Posted November 23, 2012 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 8 Reputation: 1 Joined: 02/20/12 Last Seen: August 3, 2022 Share Posted November 23, 2012 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; Quote Link to comment Share on other sites More sharing options...
GM Takumirai Posted November 24, 2012 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 592 Reputation: 31 Joined: 11/14/11 Last Seen: July 29, 2015 Author Share Posted November 24, 2012 Thanks Testing this 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= Quote Link to comment Share on other sites More sharing options...
ToastOfDoom Posted November 24, 2012 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 44 Reputation: 49 Joined: 11/19/11 Last Seen: January 4, 2019 Share Posted November 24, 2012 You're missing the tabs in the function & npc headers. function<TAB>script<TAB>command__<tab>{ ... -<tab>script<tab>fixautoattack<tab>{ ... Quote Link to comment Share on other sites More sharing options...
GM Takumirai Posted November 24, 2012 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 592 Reputation: 31 Joined: 11/14/11 Last Seen: July 29, 2015 Author Share Posted November 24, 2012 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.. Quote Link to comment Share on other sites More sharing options...
bachvugx Posted November 24, 2012 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 8 Reputation: 1 Joined: 02/20/12 Last Seen: August 3, 2022 Share Posted November 24, 2012 - 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 Quote Link to comment Share on other sites More sharing options...
GM Takumirai Posted November 24, 2012 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 592 Reputation: 31 Joined: 11/14/11 Last Seen: July 29, 2015 Author Share Posted November 24, 2012 - 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.. Quote Link to comment Share on other sites More sharing options...
bachvugx Posted November 24, 2012 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 8 Reputation: 1 Joined: 02/20/12 Last Seen: August 3, 2022 Share Posted November 24, 2012 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 1 Quote Link to comment Share on other sites More sharing options...
GM Takumirai Posted November 24, 2012 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 592 Reputation: 31 Joined: 11/14/11 Last Seen: July 29, 2015 Author Share Posted November 24, 2012 No problem i understand it all... btw its working now ill post if i find some bug, and thanks for the help.. Quote Link to comment Share on other sites More sharing options...
Question
GM Takumirai
- I patch the auto attack by God http://rathena.org/b...297-autoattack/
- i make a custom item
- and i make a function
- and i put also
- 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 TakumiraiLink to comment
Share on other sites
12 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.