Jump to content
  • 0

Item script that allows you to autopot.


Question

12 answers to this question

Recommended Posts

Posted

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

Posted (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 by AnnieRuru
Posted

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

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

Posted

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

Posted (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.x

this 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 by AnnieRuru
Posted

@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;
  • 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...