EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::General Support (https://www.eqemulator.org/forums/forumdisplay.php?f=598)
-   -   Need help with potion script. (https://www.eqemulator.org/forums/showthread.php?t=41472)

Nerdgasm 08-11-2017 02:53 PM

Need help with potion script.
 
Hey all, I had a script once that healed your health, mana and endurance by 10% when used. The script has pulled a magic act and disappeared, does anyone by chance happen to have one laying around that i could nab for ya?

The_Beast 08-11-2017 06:01 PM

This is something you can use when making a script :

$client->Heal();
$client->SetMana($client->GetMaxMana());

there is also castspell 999 (to gain mana) and castspell 13 for complete heal

Nerdgasm 08-11-2017 06:35 PM

I know about those, looking for a more % specific script that can be attached to an item.

Kingly_Krab 08-12-2017 04:23 AM

Try this maybe?
Code:

sub EVENT_ITEM_CLICK {
    if ($itemid == #) {
        $client->SetHP(($client->GetHP() + int($client->GetMaxHP() * .1)));
        $client->SetMana(($client->GetMana() + int($client->GetMaxMana() * .1)));
        $client->SetEndurance(($client->GetEndurance() + int($client->GetMaxEndurance() * .1)));
    }
}


Nerdgasm 08-12-2017 10:43 AM

Thank you sir, exactly what I was looking for.


All times are GMT -4. The time now is 05:20 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.