|
|
![](/forums/images/Darkness/misc/spacer.gif) |
![](/forums/images/Darkness/misc/spacer.gif) |
![](/forums/images/Darkness/misc/spacer.gif) |
![](/forums/images/Darkness/misc/q1.jpg) |
|
![](/forums/images/Darkness/misc/q1-1.jpg) |
![](/forums/images/Darkness/misc/q4.jpg) |
|
![](/forums/images/Darkness/misc/q4-1.jpg) |
![](/forums/images/Darkness/misc/a1.jpg) |
|
![](/forums/images/Darkness/misc/a1-1.jpg) |
|
Quests::Plugins & Mods Completed plugins for public use as well as modifications. |
![](/forums/images/Darkness/misc/a4.gif) |
|
![](/forums/images/Darkness/misc/a6.gif) |
![Old](/forums/images/Darkness/statusicon/post_old.gif)
12-24-2013, 12:49 AM
|
![Akkadius's Avatar](image.php?s=6cee73aa38786ca574f2e2b8f7f66d62&u=100179&dateline=1673514719) |
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
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..
|
![](/forums/images/Darkness/misc/a1.gif) |
|
![](/forums/images/Darkness/misc/a3.gif) |
![Old](/forums/images/Darkness/statusicon/post_old.gif)
12-24-2013, 07:14 AM
|
Discordant
|
|
Join Date: Aug 2007
Posts: 307
|
|
Quote:
Originally Posted by Akkadius
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
|
Nice Akkadius!
+1
I prefer to run the collection routine in this sub:
sub EVENT_CONNECT {}
That way code runs only 1 time when player logs in, instead of every time they zone.
That way it won't spam update the database each time a player dies or zones.
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
06-09-2016, 10:28 PM
|
Hill Giant
|
|
Join Date: Dec 2004
Location: Pittsburgh, PA
Posts: 128
|
|
Quote:
Originally Posted by thepoetwarrior
Nice Akkadius!
+1
I prefer to run the collection routine in this sub:
sub EVENT_CONNECT {}
That way code runs only 1 time when player logs in, instead of every time they zone.
That way it won't spam update the database each time a player dies or zones.
|
How do I get this work in global_player.lua
If I do #showstats on a myself or player as GM a stat box pops up with cancel or update with all the stats, but the quest npc is not popping up the box after clicking the links, just saying Fine!
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
06-10-2016, 04:43 PM
|
![Akkadius's Avatar](image.php?s=6cee73aa38786ca574f2e2b8f7f66d62&u=100179&dateline=1673514719) |
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
This is only for Perl, you'd have to write something separate for lua
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
02-24-2015, 08:24 PM
|
Hill Giant
|
|
Join Date: Mar 2010
Posts: 101
|
|
Is this still working? I installed everything, and queries are working. When I say 'player leaderboards' I get the text "Player Leaderboards" and a list of classes in saylink format. If I click any of the saylinks, nothing happens. If I manually type the trigger, nothing happens as well.
Im not sure if Im missing a plugin. I downloaded the popup_window_utils, DBI is working, and the database table is working and being populated.
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
02-25-2015, 01:26 AM
|
![Akkadius's Avatar](image.php?s=6cee73aa38786ca574f2e2b8f7f66d62&u=100179&dateline=1673514719) |
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
Quote:
Originally Posted by Nibiuno
Is this still working? I installed everything, and queries are working. When I say 'player leaderboards' I get the text "Player Leaderboards" and a list of classes in saylink format. If I click any of the saylinks, nothing happens. If I manually type the trigger, nothing happens as well.
Im not sure if Im missing a plugin. I downloaded the popup_window_utils, DBI is working, and the database table is working and being populated.
|
Set quest logging and see if there are any errors? It could be that you are missing a plugin like you said.
I would download a fresh batch of plugins from the stickied SVN in the thread:
http://www.eqemulator.org/forums/showthread.php?t=32608
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
03-09-2015, 08:24 PM
|
Hill Giant
|
|
Join Date: Sep 2013
Posts: 247
|
|
I have tried this plugin, and I am running into the same issue that Nibiuno stated above. Verified DBI is working, the cust_ext_leaderboards is being populated correctly. The popup_windows_utils and leaderboards.pl are in the plugin folder. I get the saylinks for classes, but once I click one of them, nothing happens.
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
03-09-2015, 08:37 PM
|
![ghanja's Avatar](image.php?s=6cee73aa38786ca574f2e2b8f7f66d62&u=183697&dateline=1414682103) |
Dragon
|
|
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
|
|
Quote:
Originally Posted by epilz
I have tried this plugin, and I am running into the same issue that Nibiuno stated above. Verified DBI is working, the cust_ext_leaderboards is being populated correctly. The popup_windows_utils and leaderboards.pl are in the plugin folder. I get the saylinks for classes, but once I click one of them, nothing happens.
|
Do you have quest logging on? Anything in the logs?
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
03-09-2015, 08:45 PM
|
![Akkadius's Avatar](image.php?s=6cee73aa38786ca574f2e2b8f7f66d62&u=100179&dateline=1673514719) |
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
Quote:
Originally Posted by epilz
I have tried this plugin, and I am running into the same issue that Nibiuno stated above. Verified DBI is working, the cust_ext_leaderboards is being populated correctly. The popup_windows_utils and leaderboards.pl are in the plugin folder. I get the saylinks for classes, but once I click one of them, nothing happens.
|
I'm sorry, but this reminds me of this:
THE GIRLS NEVER CAME.
I have to help someone quick but I will check into this plugin. Thanks for reporting.
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
03-09-2015, 08:43 PM
|
Hill Giant
|
|
Join Date: Sep 2013
Posts: 247
|
|
yes I have logging set to 3, I can see the queries happening, but no errors
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
03-09-2015, 08:47 PM
|
Hill Giant
|
|
Join Date: Sep 2013
Posts: 247
|
|
LMAO Akka, thanks
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
03-10-2015, 07:03 PM
|
![Akkadius's Avatar](image.php?s=6cee73aa38786ca574f2e2b8f7f66d62&u=100179&dateline=1673514719) |
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
Looking at this now
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
03-10-2015, 08:21 PM
|
![Akkadius's Avatar](image.php?s=6cee73aa38786ca574f2e2b8f7f66d62&u=100179&dateline=1673514719) |
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
OK, spent about an hour cleaning this up.
Replace Leaderboards.pl in your plugins folder with this code:
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;
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
03-10-2015, 08:43 PM
|
Hill Giant
|
|
Join Date: Sep 2013
Posts: 247
|
|
Thanks for the update. Copied the new code to Leaderboards.pl in my plugins folder and resourced my DB. Do not get the popup window, but that maybe because the cust_ext_leaderboards table has not been populated yet. I have the following in my global_player.pl file.
Code:
sub EVENT_ENTERZONE {
plugin::LeaderBoardsUpdate();
}
|
![Old](/forums/images/Darkness/statusicon/post_old.gif)
03-10-2015, 08:45 PM
|
![Akkadius's Avatar](image.php?s=6cee73aa38786ca574f2e2b8f7f66d62&u=100179&dateline=1673514719) |
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
Quote:
Originally Posted by epilz
Thanks for the update. Copied the new code to Leaderboards.pl in my plugins folder and resourced my DB. Do not get the popup window, but that maybe because the cust_ext_leaderboards table has not been populated yet. I have the following in my global_player.pl file.
Code:
sub EVENT_ENTERZONE {
plugin::LeaderBoardsUpdate();
}
|
Make sure you have the DiaWind plugin.
It has become apparent to me we need a decent way to update plugins because people are apparently downloading the wrong ones...
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 02:15 PM.
|
|
![](/forums/images/Darkness/misc/s1.jpg) |
|
![](/forums/images/Darkness/misc/s1-1.jpg) |
|
|
|
![](/forums/images/Darkness/misc/z1.jpg) |
|
![](/forums/images/Darkness/misc/z1-1.jpg) |
|
![](/forums/images/Darkness/misc/side3.jpg) |