EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Betabuff Script? (https://www.eqemulator.org/forums/showthread.php?t=39359)

mgellan 02-13-2015 05:25 PM

Betabuff Script?
 
Hi there:

I run the EQ Launchpad server, in perpetual dev and a practice server for my P99 guild, Omni. I would like to set up betabuff NPCs for players on the server, does anyone have a betabuff script they would be willing to share? Basically looking for something like what P99 has on their Velious beta, say "betabuff" to an npc and rezone equipped with Kunark BiS and levelled to 60. Anyone? Thanks!!

Regards,
Mg

ghanja 02-13-2015 11:12 PM

I have no idea what P99 has, I don't play there. And this is not a "buff" bot by a long shot.. just something tossed together really quick and crude like. It's up to you to figure out what items (#finditem) you want to put in the arrays (if I were doing the work of finding the item id's I probably would have tossed them in a hash but.. keeping it as simple to read as I assume you are unfamiliar with Perl altogether). Hasnt been syntax checked, hasn't been tested, nothing.. but, it is a reply.

Code:

# delete or rename Priest_of_Discord.lua in \global\quests
# name this Priest_of_Discord.pl and place in the same directory
sub EVENT_SAY {
        my @itemsarray;
        if ($text=~/Hail/i) {
                plugin::Whisper (        "Oh.. it's you.  Yeah, so I've been demoted from the Priest of all things Evil to an item butler.".
                                                        "Do you want a [".quest::saylink("bag")."] to put your junk in or do you want your [".quest::saylink("items")."] now?");
        }
        elsif ($text=~/bag/i) {
                quest::summonitem(17969);
        }
        elsif ($text=~/items/i) {
                @itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Bard");
                @itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Cleric");
                @itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Druid");
                @itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Enchanter");
                @itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Magician");
                @itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Monk");
                @itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Necromancer");
                @itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Paladin");
                @itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Ranger");
                @itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Rogue");
                @itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Shadowknight");
                @itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Shaman");
                @itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Warrior");
                @itemsarray = [0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000] if ($class eq "Wizard");
                foreach $individualitem (@itemsarray) {
                        if (!plugin::check_hasitem($client, $individualitem)) { quest::summonitem($individualitem); }
                }
        }
}


Kingly_Krab 02-14-2015 12:20 AM

Here's a re-written version of Ghanja's script that uses a hash instead to make it simpler, rather than several conditional based assignments:
Code:

sub EVENT_SAY {
    if ($text=~/Hail/i) {
        plugin::Whisper("Oh.. it's you.  Yeah, so I've been demoted from the Priest of all things Evil to an item butler. Do you want a " . quest::saylink("bag", 1) . " to put your junk in or do you want your " . quest::saylink("items, 1") . " now?");
    } elsif ($text=~/bag/i) {
        quest::summonitem(17969);
    } elsif ($text=~/items/i) {
        my %hash = ("Warrior" => [1, 2, 3, 4, 5, 6, 7, 8, 9],
        "Cleric" => [1, 2, 3, 4, 5, 6, 7, 8, 9],
        "Paladin" => [1, 2, 3, 4, 5, 6, 7, 8, 9],
        "Ranger" => [1, 2, 3, 4, 5, 6, 7, 8, 9],
        "Shadowknight" => [1, 2, 3, 4, 5, 6, 7, 8, 9],
        "Druid" => [1, 2, 3, 4, 5, 6, 7, 8, 9],
        "Monk" => [1, 2, 3, 4, 5, 6, 7, 8, 9],
        "Bard" => [1, 2, 3, 4, 5, 6, 7, 8, 9],
        "Rogue" => [1, 2, 3, 4, 5, 6, 7, 8, 9],
        "Shaman" => [1, 2, 3, 4, 5, 6, 7, 8, 9],
        "Necromancer" => [1, 2, 3, 4, 5, 6, 7, 8, 9],
        "Wizard" => [1, 2, 3, 4, 5, 6, 7, 8, 9],
        "Magician" => [1, 2, 3, 4, 5, 6, 7, 8, 9],
        "Enchanter" => [1, 2, 3, 4, 5, 6, 7, 8, 9],
        "Beastlord" => [1, 2, 3, 4, 5, 6, 7, 8, 9],
        "Berserker" => [1, 2, 3, 4, 5, 6, 7, 8, 9]);
        foreach my $item (@{$hash{$class}}) {
            if (!plugin::check_hasitem($client, $item)) {
                quest::summonitem($item);
            }
        }
    }
}


ghanja 02-14-2015 02:28 AM

Quote:

Originally Posted by Kingly_Krab (Post 237842)
Here's a re-written version of Ghanja's script that uses a hash instead to make it simpler, rather than several conditional based assignments:

I've been optimized.

I did state I would have used a hash, however, simpler to whom? Not sure if the layman's approach is a hash. But hey, options are good.

mgellan 02-15-2015 12:51 PM

I'm not unfamiliar with Perl at all, but thanks for the scripts. I was looking for something somewhat more elaborate - I'm thinking the P99 script actually copies your char from a template since race etc. changes as well i.e. if you select warrior you come back as a 60 ogre warrior with BiS equipment max skills etc. Perhaps the question should have been "how do I clone a character"?

Regards,
Mg

ghanja 02-15-2015 01:39 PM

Quote:

Originally Posted by mgellan (Post 237888)
I'm not unfamiliar with Perl at all, but thanks for the scripts. I was looking for something somewhat more elaborate - I'm thinking the P99 script actually copies your char from a template since race etc. changes as well i.e. if you select warrior you come back as a 60 ogre warrior with BiS equipment max skills etc. Perhaps the question should have been "how do I clone a character"?

Regards,
Mg

#race
#level

then run either of the scripts above, populated by yourself.

In a quick Google search I came across this:

http://wiki.project1999.com/Players:Kunark_Gear

Though, familiar with Perl, share what you've come up with and I'm positive someone will help with any bumps in the road.


All times are GMT -4. The time now is 10:47 AM.

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