Jump to content
  • 0

Item script that allows you to autopot.


Eros

Question


  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  202
  • Reputation:   2
  • Joined:  07/09/12
  • Last Seen:  

Is there such a thing like this ?

Link to comment
Share on other sites

12 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

this script can be quite fun to write

although I couldn't complete it atm

[paste=4uoqzibzwyn4]

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  202
  • Reputation:   2
  • Joined:  07/09/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

[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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  202
  • Reputation:   2
  • Joined:  07/09/12
  • Last Seen:  

Miss annie can i ask something ? where can i find the delay

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

sleep2 200;
I have a feeling that if I made this configurable, everyone will just set to the minimum value =/
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  202
  • Reputation:   2
  • Joined:  07/09/12
  • Last Seen:  

Ok thx miss annie btw i'll just ask who will i contact about sprite problems ? i'm kinda new here in rA

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

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.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

@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
Link to comment
Share on other sites

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.

×
×
  • Create New...