View Single Post
  #2  
Old 03-01-2017, 11:06 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Quote:
Originally Posted by Nerdgasm View Post
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 View Post
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 View Post
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).
Reply With Quote