Patskie Posted January 22, 2014 Posted January 22, 2014 Perhaps this http://rathena.org/board/topic/78975-autopots/? Quote
AnnieRuru Posted January 22, 2014 Posted January 22, 2014 this script can be quite fun to write although I couldn't complete it atm [paste=4uoqzibzwyn4] Quote
Eros Posted January 24, 2014 Author Posted January 24, 2014 Miss annie is this working ? Miss annie i've tried it and it works but how can i set that when the player is frozen , sleep , stun he can't pots and how to lessen the delay Quote
AnnieRuru Posted January 25, 2014 Posted January 25, 2014 (edited) [paste=o16se0xvtw7] think there's still some room for improvements like - the HP/SP item should've set as an array instead of searching through IT_HEALING - let the user set to use only when hp/sp drops to below a certain percent ... - play specialeffect2 .... - auto-restock pots from storage ... link EDIT wait ... didn't noticed my server spam error ... ok [paste=po9lzz2hj1a] Edited January 25, 2014 by AnnieRuru Quote
Eros Posted January 25, 2014 Author Posted January 25, 2014 Miss annie can i ask something ? where can i find the delay Quote
AnnieRuru Posted January 25, 2014 Posted January 25, 2014 sleep2 200;I have a feeling that if I made this configurable, everyone will just set to the minimum value =/ Quote
Eros Posted January 25, 2014 Author Posted January 25, 2014 Ok thx miss annie btw i'll just ask who will i contact about sprite problems ? i'm kinda new here in rA Quote
Euphy Posted January 25, 2014 Posted January 25, 2014 I haven't tried it, but the autobonus commands might be useful for this ('autobonus2' in particular). For instance, something like this: autobonus2 "{}",10000,1,BF_WEAPON|BF_MAGIC,"{ if (Hp < MaxHp && countitem(504)) { delitem 504,1; consumeitem 504; specialeffect2 EF_POTION4; } }";No idea if it would work or not, but just another/simpler approach. Quote
AnnieRuru Posted January 25, 2014 Posted January 25, 2014 @euphy autobonus2 only triggers when the characters is hit so, if the player hit by a big number like 3,000 my script will keep pressing the pot until 99% hp your autobonus2 only press the pot once well, autobonus is actually quite fun ... like making a bunshin like this mod http://www.eathena.ws/board/index.php?s=&showtopic=177722&view=findpost&p=1496183 just the server keep spam "couldn't find label clonecheck::On150000"; @Eros lazy to do this atm ... =/ need some sort of array to store each item effects ..... Quote
Euphy Posted January 26, 2014 Posted January 26, 2014 Here's a sample using 'autobonus2': [paste=6y8ui2jsunt8] (obviously credits to Annie for a lot of parts XD) It's not as convenient as Annie's script, but should cause less strain on the servers since it only triggers when hit (instead of running all the time). This of course has its disadvantages, such as not being able to work for SP. Also, for some reason I couldn't get 'consumeitem' to work while testing (probably due to the weird mixing of 'bonus_script', 'autobonus', functions, 'itemheal'...) so you have to add items manually. x.x Quote
AnnieRuru Posted January 27, 2014 Posted January 27, 2014 (edited) Also, for some reason I couldn't get 'consumeitem' to work while testing (probably due to the weird mixing of 'bonus_script', 'autobonus', functions, 'itemheal'...) so you have to add items manually. x.xthis is the error I'm getting --- nullpo info -------------------------------------------- d:\rathena\src\map\script.c:17721: in func `unknown' --- end nullpo info ----------------------------------------another bug report .... on its way ...done -> http://rathena.org/board/tracker/issue-8563-consumeitem-doesnt-work-if-the-npc-id-is-0-example-bonus-script/ Edited January 27, 2014 by AnnieRuru Quote
Euphy Posted January 28, 2014 Posted January 28, 2014 @Annie: applied your fix in ad13f26. Thanks! Here's an update to my script: [paste=1i3e79nbonx] Replace line 68 with this (since escape characters are still not supported): bonus_script "{ callfunc \"start_autopot\"; }",86400,8,0,SI_INCHEALRATE; 1 Quote
Question
Eros
Is there such a thing like this ?
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.