PDA

View Full Version : Need help with potion script.


Nerdgasm
08-11-2017, 02:53 PM
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?
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.