View Single Post
  #6  
Old 11-30-2018, 02:07 AM
Shodai82
Sarnak
 
Join Date: May 2015
Posts: 43
Default

An update to this, it's probably best to use entity variables in global_player.pl when assigning talent values. I updated my implementation as such:

Code:
sub EVENT_ENTERZONE {   
    my $currentZoneID = $client->GetZoneID();
    if($currentZoneID != 344 && $currentZoneID != 345 && $currentZoneID != 202) {
        if($client->GetLevel() == 70) {
            if($qglobals{"Ultimate_Unrest_Complete"} == 1 && $qglobals{"has_gotten_charm_rank_nine"} == 1 && $qglobals{"has_gotten_oot_focus"} == 1 && $qglobals{"has_finished_ultimate_quest_line"} == 1) {
                if($client->GetClass() == 5) {
                    $client->SetEntityVariable("sk_flurry_of_hatred", $qglobals{"sk_flurry_of_hatred"});
                    $client->SetEntityVariable("sk_flurry_of_destruction", $qglobals{"sk_flurry_of_destruction"});
                }
            }
        }
    }
}

sub EVENT_USE_SKILL {
    my $currentZone = $client->GetZoneID();
    if($currentZone != 344 && $currentZone != 345 && $currentZone != 202) {
        if($client->GetClass() == 5) {
            if($skill_id == 0 || $skill_id == 1) {
                my $flurryOfHatredRank = $client->GetEntityVariable("sk_flurry_of_hatred");
                if($flurryOfHatredRank > 0) {
                    my $flurryOfHatredPathSingleMultiplier = 3;
                    my $chanceRollBonusSingleFlurryOfHatred = GET_RANDOM_NUMBER();
                    my $target = $client->GetTarget();
                    if($chanceRollBonusSingleFlurryOfHatred <= ($flurryOfHatredRank * $flurryOfHatredPathSingleMultiplier)) {
                        if($skill_id == 0) {
                            $client->DoSpecialAttackDamage($target, 0, 500, 1000, 0);
                            $client->DoSpecialAttackDamage($target, 0, 500, 1000, 0);
                            $client->DoSpecialAttackDamage($target, 0, 500, 1000, 0);
                            $client->Message(14, "Your Flurry of Hatred talent triggered three additional attacks!");
                        } else {
                            $client->DoSpecialAttackDamage($target, 1, 500, 1000, 0);
                            $client->DoSpecialAttackDamage($target, 1, 500, 1000, 0);
                            $client->DoSpecialAttackDamage($target, 1, 500, 1000, 0);
                            $client->Message(14, "Your Flurry of Hatred talent triggered three additional attacks!");
                        }
                    }
                }
            } elsif($skill_id == 2 || $skill_id == 3) {
                my $flurryOfDestructionRank = $client->GetEntityVariable("sk_flurry_of_destruction");
                if($flurryOfDestructionRank > 0) {
                    my $flurryOfDestructionPathSingleMultiplier = 4;
                    my $chanceRollBonusSingleFlurryOfDestruction = GET_RANDOM_NUMBER();
                    my $target = $client->GetTarget();
                    if($chanceRollBonusSingleFlurryOfDestruction <= ($flurryOfDestructionRank * $flurryOfDestructionPathSingleMultiplier)) {
                        if($skill_id == 2) {
                            $client->DoSpecialAttackDamage($target, 2, 500, 1000, 0);
                            $client->DoSpecialAttackDamage($target, 2, 500, 1000, 0);
                            $client->DoSpecialAttackDamage($target, 2, 500, 1000, 0);
                            $client->Message(14, "Your Flurry of Destruction talent triggered three additional attacks!");
                        } else {
                            $client->DoSpecialAttackDamage($target, 3, 500, 1000, 0);
                            $client->DoSpecialAttackDamage($target, 3, 500, 1000, 0);
                            $client->DoSpecialAttackDamage($target, 3, 500, 1000, 0);
                            $client->Message(14, "Your Flurry of Destruction talent triggered three additional attacks!");
                        }
                    }
                }
            }
        }
    }
}
Reply With Quote