Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Plugins & Mods

Quests::Plugins & Mods Completed plugins for public use as well as modifications.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-07-2010, 06:13 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I haven't tested this yet, but I am pretty sure you can simplify that down to just the following and it won't have a limit to how many messages you can send and also doesn't require you to put the count of how many messages you are using:

Code:
###Usage: plugin::RandomSay("message1","message2", etc..);
###Usage: plugin::RandomEmote("message1","message2", etc..);

sub RandomSay {
	my $count = 0;
	while ($_[$count])
	{
		$count++;
	}
	my $RandMessage = plugin::RandomRange(0, $count);
	quest::say($_[$RandMessage]);
}

sub RandomEmote {
	my $count = 0;
	while ($_[$count])
	{
		$count++;
	}
	my $RandMessage = plugin::RandomRange(0, $count);
	quest::emote($_[$RandMessage]);
}

return 1;
Note that it does require the RandomRange plugin I made here:
http://www.eqemulator.org/forums/showthread.php?t=30421
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 06-07-2010 at 03:03 AM..
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

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


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3