EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Custom (https://www.eqemulator.org/forums/forumdisplay.php?f=671)
-   -   Worn armor sets have spell effects. (https://www.eqemulator.org/forums/showthread.php?t=42111)

superpally1 10-02-2018 07:01 PM

Worn armor sets have spell effects.
 
I was talking to a few people that play on my server and they liked the idea of having custom effects for wearing sets of gear. So I made it. This is just for the first tier of custom armor on my server. I will add to it for other tiers as well. I am sure there are better ways to do it, but this works.

Code:

sub EVENT_SAY {
   
    my $headid = $client->GetItemIDAt(2);
    my $chestid = $client->GetItemIDAt(17);
    my $legid = $client->GetItemIDAt(18);
    my $feetid = $client->GetItemIDAt(19);
    my $gloveid = $client->GetItemIDAt(12);
    my $armid = $client->GetItemIDAt(7);
    my @headpieces = (147587,147580,147573,147566);
    my @chestpieces = (147588,147581,147574,147567);
    my @legpieces = (147591,147584,147577,147570);
    my @feetpieces = (147592,147585,147573,147566);
    my @glovepieces = (147593,147586,147579,147572);
    my @armpieces = (147590,147583,147576,147569);
       
        if ($text=~/Armor Effects/i) {       
            $client->Message(12,"This will apply the effects you have obtained from your currently equipped tier armor pieces.");
            $client->Message(12,"Helmet, Arms, and Legs make up the 3 piece set.");
            $client->Message(12,"Helmet, Arms, Legs, Gloves, Boots, and BP make up the 6 piece set.");
            $client->Message(12,"------------------------------------------------------");
            $client->Message(12,"" . quest::saylink("armor sets",1) . "");
            $client->Message(12,"------------------------------------------------------");
            $client->Message(12,"" . quest::saylink("stop effects",1) . "");
            $client->Message(12,"------------------------------------------------------");
        }
        if ($text=~/armor sets/i) {
                if ($headid ~~ @headpieces && $armid ~~ @armpieces && $legid ~~ @legpieces) {
                    $client->Message(12,"------------------------------------------------------");
                    $client->Message(12,"" . quest::saylink("3 piece set",1) .".");
                    $client->Message(12,"------------------------------------------------------");
                }
                if ($headid ~~ @headpieces && $armid ~~ @armpieces && $legid ~~ @legpieces
                && $gloveid ~~ @glovepieces && $feetid ~~@feetpieces && $chestid ~~ @chestpieces) {
                  $client->Message(12,"" . quest::saylink("6 piece set",1) .".");
                  $client->Message(12,"------------------------------------------------------");
                }
        }
        if ($text=~/3 piece set/i && $headid ~~ @headpieces && $armid ~~ @armpieces && $legid ~~ @legpieces) {
                $client->Message(14,"Starting 3 piece set Effect.");
                $client->SpellEffect(369, 30, 0, 1, 3000, 0);
        }
        if ($text=~/6 piece set/i && $headid ~~ @headpieces && $armid ~~ @armpieces && $legid ~~ @legpieces
        && $gloveid ~~ @glovepieces && $feetid ~~@feetpieces && $chestid ~~ @chestpieces) {
                $client->Message(14,"Starting 6 piece set Effect.");
                $client->SpellEffect(447, 30, 0, 1, 3000, 0);
        }
        if ($text=~/stop effects/i) {
            $client->Message(13,"Stopping Effect.");
            $client->RemoveNimbusEffect(447);
            $client->RemoveNimbusEffect(369);
        }
}

https://imgur.com/aMFx8CD
Here is an image. https://imgur.com/aMFx8CD

ChaosSlayerZ 10-02-2018 08:55 PM

This is awesome. I been thinking about doing SETs with bonuses for a while, but never actually got to it.

Question - why is in in EVENT_SAY - you suppose to be talking to someone to have it activated?

superpally1 10-02-2018 09:26 PM

no, i put it in global_player.pl on my server i made a command that anyone can type. imenu it allows players to pick some various utilities to use, like a gate to nexus. i put it there. if someone doesnt have the required armor pieces, they wont get the options to enable the graphical effects.

ChaosSlayerZ 10-02-2018 09:30 PM

So basically you speaking to yourself to turn it on and off?

superpally1 10-02-2018 09:35 PM

yes. but you can change it to whatever you wish. you could even use like an item click

demonstar55 10-02-2018 09:58 PM

Just create custom charms.

ChaosSlayerZ 10-02-2018 10:37 PM

Quote:

Originally Posted by demonstar55 (Post 260295)
Just create custom charms.

My approach was based on charm too, but then, you would need to have separate charm for each set, no? That's kind of inconvenient.

demonstar55 10-02-2018 10:45 PM

Quote:

Originally Posted by ChaosSlayerZ (Post 260296)
My approach was based on charm too, but then, you would need to have separate charm for each set, no? That's kind of inconvenient.

No. The charm's script could check for multiple different sets. But that may run into performance issues hmmm....


All times are GMT -4. The time now is 03:19 PM.

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