Jump to content
  • 0

Regen potions


Redking178

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  07/28/20
  • Last Seen:  

Hello all, looking to get into making some custom items and wanted to start with making some simple regen potions. After digging into Loops for awhile I found some examples but unfortunately I wasn't able to make much progress.
Request

  • Consumable 
  • Restores hp and sp by 3% per 10 second intervals
  • Lasts for 1 hour
  • Has a buff icon
  • Fine with using the assets from 22702 for the consumable

I had found some other posts looking for what I would assume would be something similar to what I need but have not been successful in making it function for me. This is my attempt tinkering around by trying to replace the red pots functionality per a post I found from 2012
 

501,Red_Potion,Red Potion,0,50,,40,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 3,3; for( set @healtime,0; @healtime < 60; set @healtime,@healtime+1 ) { percentheal 10,10; sleep2 10000; } dispbottom "Your healing item has run out."; end; },{},{}

Any help would be greatly appreciated.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

hmm. i'm not really sure if i understand what you want.. but this is what was on my mind.. and this is the effect of the script

https://streamable.com/yrb1be

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

specialeffect2 EF_HEAL3; sc_start2 SC_L_LIFEPOTION,3600000,-3,10;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  07/28/20
  • Last Seen:  

7 hours ago, Haruka Mayumi said:

specialeffect2 EF_HEAL3; sc_start2 SC_L_LIFEPOTION,3600000,-3,10;

Thanks for the response.
I have tried this in a few different places within the code I posted, could you use the example red potion and show me what the line would look like. I'm still new sorry to ask.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

501,Red_Potion,Red Potion,0,50,,40,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect2 EF_HEAL3; sc_start2 SC_L_LIFEPOTION,3600000,-3,10; },{},{}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  07/28/20
  • Last Seen:  

18 minutes ago, Haruka Mayumi said:

501,Red_Potion,Red Potion,0,50,,40,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect2 EF_HEAL3; sc_start2 SC_L_LIFEPOTION,3600000,-3,10; },{},{}

 

Thank you for the example, I must be missing something. When I use the item I get the initial heal, but I don't get buff icon or ef_heal3 effect to show. I also don't get the heal over time. I have tried to alter this to add in the heal over time to no avail.
 

501,Red_Potion,Red Potion,0,50,,40,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect2 EF_HEAL3; sc_start2 SC_L_LIFEPOTION,3600000,-3,10; },{ bonus2 bRegenPercentHP,10,1000;},{}

My goals for this test was to create a potion that heals every set duration (example 10 seconds) for a set $ HP/SP amount (example 3%) for a set duration (example 60 minutes)
If you could provide more help I would greatly appreciate it.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  07/28/20
  • Last Seen:  

33 minutes ago, Haruka Mayumi said:

hmm. i'm not really sure if i understand what you want.. but this is what was on my mind.. and this is the effect of the script

https://streamable.com/yrb1be

Oh that is exactly what I want, hmm I wonder why mine doesn't do that same thing. Is there another file or something I need to edit in relation to the item_db.txt?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  07/28/20
  • Last Seen:  

Ah I see there is already an item that has half of the effects I want item # 14535. I would be cool with editing this item to have the sp regen effect as well if that was possible
image.png.fd577bead7358d1916294e8ae0da9bf9.png

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