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
  #1  
Old 12-24-2013, 12:49 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default Plugin: Player Leaderboards (In-Game)

Purpose:

To display an in-game leaderboards for players to see where they rank.

------------------------

I've had this code written for ages so the quality is so-so. But it definitely does what it needs to do. Feel free to modify if want.

------------------------

Required: Perl DBI - See Google for installing Perl DBI/DBD for Mysql, until I create an article explaining otherwise.
Required: plugin::LoadMysql(); - See thread HERE
Required: Popup Window plugin utils
Required: Mysql table `cust_ext_leaderboards`

http://wiki.eqemulator.org/i?Module=...Paste=BgtI3fWi



Source Table:

Code:
-- ----------------------------
-- Table structure for cust_ext_leaderboards
-- ----------------------------
DROP TABLE IF EXISTS `cust_ext_leaderboards`;
CREATE TABLE `cust_ext_leaderboards` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `class` varchar(255) NOT NULL,
  `race` varchar(255) NOT NULL,
  `hp` int(11) NOT NULL,
  `mana` int(11) NOT NULL,
  `ac` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  `aa` int(11) NOT NULL,
  `level` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Usage Example:

Code:
sub EVENT_SAY{
	if($text=~/hail/i){
		quest::say("What do you want?");
		quest::say(quest::saylink("I want to check my player leaderboards man!", 1));
	}
	if($text=~/leaderboards/i){
		quest::say("Fine!");
	}
	# Plugin will match for 'player leaderboards' and display menu options, it will also respond to further saylinks
	plugin::LeaderBoardsMenu($text);
}
Note: In order to actually have the players info collected, you have to insert the collection routine somewhere. I usually trigger it in EVENT_ENTERZONE of global_player.pl but you can do it however you want:

Code:
plugin::LeaderBoardsUpdate();
Plugin File: (Goes under /plugins folder)
Name: Leaderboards.pl

Options: You can set your website Magelo Path under LoadMageloPath, or you can put in javascript:; or # if you don't have a site.

Enjoy, let me know if you experience issues.

Last edited by Akkadius; 03-10-2015 at 08:22 PM..
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 04:24 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3