EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Plugin::MM() usage (https://www.eqemulator.org/forums/showthread.php?t=40885)

DanCanDo 09-07-2016 02:45 AM

Plugin::MM() usage
 
Just curious about this possiblity. I've been playing around with that plugin and
having fun with it, but I was wondering, is it possible to use this plugin to feed
all world clients , similiar to quest::we(..) Where everyone on the server gets
it at the same time, when event is triggered ?

Akkadius 09-07-2016 02:51 AM

Quote:

Originally Posted by DanCanDo (Post 250968)
Just curious about this possiblity. I've been playing around with that plugin and
having fun with it, but I was wondering, is it possible to use this plugin to feed
all world clients , similiar to quest::we(..) Where everyone on the server gets
it at the same time, when event is triggered ?

It's possible, just not currently implemented.

DanCanDo 09-07-2016 02:53 AM

I didn't think so, but I figured it wouldn't hurt to ask. But Thank You Sir !

ghanja 09-07-2016 03:00 PM

Completely untested (including simply running a perl -c on the code), as I'm away from home atm:

Code:

# /quests/global/global_player.pl
use File::Copy qw(copy);

sub EVENT_SAY {
        @args = split(' ', $text); # Something I use for custom gm commands
        if ($text=~/#globalmarquee/i) {
                if ($args[1]) {
                        $formattedstring = "";
                        for ($count = 1; $count < scalar(@args); $count++) {
                                $formattedstring = $formattedstring." ".$args[$count];
                        }
                        my $filename = "C:\EQEMU\QUESTS\GLOBAL\GlobalMarquee.txt";
                        move $filename, $filename.".bak";
                        open my $fh, '>', "output.txt"
                                or die "Cannot open file: $!";
                        print $fh "$formattedstring\n";
                        close $fh;
                        quest::crosszonesignalnpcbynpctypeid(10, 99999);
                }
        }
}


# /quests/global/zone_controller.pl
sub EVENT_SIGNAL {

        elsif ($signal == 99999) {
                $filename = "C:\EQEMU\QUESTS\GLOBAL\GlobalMarquee.txt";
                my @marqueemessage = do {
                        open my $fh, "<", $filename
                                or die "could not open $filename: $!";
                        <$fh>;
                };               
                my @clist = $entity_list->GetClientList();
                foreach my $sclient (@clist) {
                        $sclient->SendMarqueeMessage(15, 510, 1, 1, 3000, $marqueemessage);
                }
        }
}

When there is a will, there is a way (with Perl).

Kingly_Krab 09-10-2016 12:06 AM

World-wide Marquees? Yes, please. Once this is merged they'll be possible using quest::worldwidemarquee(type, priority, fadein, fadeout, duration, message).

Example script:
Code:

sub EVENT_SAY {
    if ($text=~/#test/i && length($text) > 6) {
        quest::worldwidemarquee(315, 510, 1, 1, 3000, substr($text, 6));
    }
}

https://i.imgur.com/Z5k8QrY.jpg

DanCanDo 09-10-2016 05:52 AM

Quote:

Originally Posted by Kingly_Krab (Post 251027)
World-wide Marquees? Yes, please. Once this is merged they'll be possible using quest::worldwidemarquee(type, priority, fadein, fadeout, duration, message).

You seriously got this to work, that is awesome Kingly !!!
Thank you :)

jpyou127 09-10-2016 11:30 AM

Some seriously cool stuff King!

Celestial

Kingly_Krab 09-10-2016 01:14 PM

Merged as of ~5 minutes ago.

DanCanDo 09-10-2016 01:24 PM

Quote:

Originally Posted by Kingly_Krab (Post 251034)
Merged as of ~5 minutes ago.

Holy Rock Lobster (chuckle)
Just gitpulled, anxious to play around :)
Thanks a lot Kingly :)

DanCanDo 09-10-2016 02:35 PM

This little test works awesome, but had one tiny little question (grin)
Is it possible to change that grey color output ? ( I do have the color codes)
Code:

sub EVENT_ITEM {
    if (plugin::check_handin(\%itemcount, 13005 => 1, 13006 => 1)) {
        quest::worldwidemarquee(315, 510, 1, 1, 3000, substr("This is a Test. Is it working?", 0));
    }
}

EDIT: SORRY, Nevermind, just figured out the 'type' number was what I needed to change.

Kingly_Krab 09-10-2016 11:32 PM

Yeah, type indicates color. substr isn't necessary for what you're doing because that's for cutting a string apart based on indexes. You can use just "This is a Test. Is it working?" instead of substr("This is a Test. Is it working?", 0).

DanCanDo 09-11-2016 04:25 AM

Ahh, ok, thanks for that tip. My original thoughts on using this marquee was along the
lines of my little test example there. Although the quest::we is good for world emotes,
I figured sometimes, if a serverwide message goes out and a player's chat window is
busy with hits, misses, etc., the world emote may not be seen. But this marquee can
definately show up noticed, (chuckle) But it's got a lot of potential for other things,
(like above) letting the server know when a player has achieved something on the high
end, or for that matter "Newbie $name has finally got out of the Tutorial" (chuckle)


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

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