Quote:
Originally Posted by Nerdgasm
Heya, so I had a few questions...
1. Is there a way I can make spells do damage based off of your own HP? Example; Spell A does 190% of your HP, and how would I go about doing that?
|
Yes. Either via source code or LUA/Perl spell script.
Quote:
Originally Posted by Nerdgasm
1a. Second part to that, can I make that damage be multiplied by strength/stamina, etc? If so... how?
|
Yes. Depends on which method you choose above. But since this is in the Quests Q/A, I'll assume you mean how via the quest script system.
Think spell script. Then:
Code:
if ($client->IsClient()) {
quest::say ("That is not a valid target jackass!");
} else {
$client->GetTarget()->Damage($client, xDmg, xSpellID);
}
Rudimentary, I know, sorry heading to bed. But, it will point you in the right direction.
Quote:
Originally Posted by Nerdgasm
Had some ideas for the scripts based off a potion script I have that restores 10% of your total hp, but I'm not sure where to go from there... Lol.
|
[/QUOTE]
Well that's slightly different then. You'd append a script to an item, with potion graphic, etc.
But toy around with:
Code:
$client->GetMaxHP()
or
Code:
$client->HealDamage($client->GetMaxHP * 0.10);
I -suppose- it's HealDamage, it's been awhile since I've healed a certain percentage via script (it's normally items/spells).