Max Level to Use a Potion

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

User avatar
Specktro
Posts: 78
Joined: Sat Jun 10, 2017 12:49 am
Location: Rio Grande do Sul, Brasil
Brazil

Max Level to Use a Potion

Post by Specktro » Mon Nov 19, 2018 8:16 pm

HI Yo Everyone!

I was thinking about creating an experience potion that could be used only once (already got that) and that could be used only up to lv10, like, not usable after lv 11 and up... Is it possible?

Thanks in advance... being it possible or not :)


Edit: english corrections..
Image
Be Xtreme!

gcc
Junior Member
Paladin
Posts: 125
Joined: Thu Apr 14, 2011 6:03 am
Austria

Re: Max Level to Use a Potion

Post by gcc » Mon Nov 19, 2018 10:41 pm

Use a formula similar to this one:
(stat('ulvl'.accr)<11)?1000:0

If your potion adds +%xp for x seconds you also should use a formula for the duration and set the duration to 0 at lvl 11 or higher in order to make the item not consumable.

User avatar
Specktro
Posts: 78
Joined: Sat Jun 10, 2017 12:49 am
Location: Rio Grande do Sul, Brasil
Brazil

Re: Max Level to Use a Potion

Post by Specktro » Wed Nov 21, 2018 5:34 pm

gcc, working as I needed thanks!
Image
Be Xtreme!

Return to “General Mod Making”