|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Q&A This is the quest support section |
11-08-2014, 03:56 PM
|
Banned
|
|
Join Date: Aug 2010
Location: Sanctuary
Posts: 269
|
|
Theoretical idea: Item Discovery Notifications
I'm pondering whether or not this would be possible via perl, and how it would be done. If anyone has any ideas, feel free to let me know and maybe we can come up with a fun little custom feature.
My idea is that when a player gets the discovery on an item, a notification message would be sent to one of the following, depending on how the server admin has it set :
Option A: Directly to the player
Option B: To the player and a designated GM
Option C: Broadcast to all players on the server
I'm wondering if something can be scripted to pull this information from the discovered_items table, and then send a message with the item name (maybe even a link to the item) and the name of the player who discovered it.
Any thoughts?
|
11-08-2014, 04:39 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,593
|
|
This will work, yes. Here's why:
Code:
sub EVENT_DISCOVER_ITEM - Triggered when an item is discovered.
$itemid - Item being discovered.
Option A:
Code:
$client->Message(335, "You discovered " . quest::varlink($itemid) . "!");
Option B:
Code:
$client->Message(335, "You discovered " . quest::varlink($itemid) . "!");
quest::crosszonemessageplayerbyname(335, "Kinglykrab", "$name discovered " . plugin::varlink($itemid) . "!");
Option C:
Code:
quest::gmsay("$name discovered " . quest::varlink($itemid) . "!", 335, 1, 0, 0);
Last edited by Kingly_Krab; 11-08-2014 at 05:25 PM..
|
11-08-2014, 04:54 PM
|
Banned
|
|
Join Date: Aug 2010
Location: Sanctuary
Posts: 269
|
|
Oh, sweet! This makes me very happy! Thanks, Kingly!
|
11-08-2014, 05:35 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,593
|
|
You're welcome.
|
11-08-2014, 05:36 PM
|
|
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
Option C needs to leverage quest::we, not gmsay, only GMs get those messages, that is if you want to broadcast to all players
|
11-08-2014, 05:50 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,593
|
|
Not only GMs get them if you specify a minimum status of 0.
|
11-08-2014, 05:56 PM
|
|
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
Quote:
Originally Posted by Kingly_Krab
Not only GMs get them if you specify a minimum status of 0.
|
What's the point
|
11-08-2014, 10:17 PM
|
Banned
|
|
Join Date: Aug 2010
Location: Sanctuary
Posts: 269
|
|
Just for anyone reading this curious about it, this works for looted items, tradeskill made items, and even zones. Very cool! Thanks again to Kingly for helping figure this out.
|
11-23-2014, 04:25 PM
|
Hill Giant
|
|
Join Date: Jun 2010
Posts: 231
|
|
This is really cool idea but let me get this straight, this would be coded like:
Code:
## should there be a list of items up here to trigger this, so not every item is spammed via "we"?##
sub EVENT_DISCOVER_ITEM - Triggered when an item is discovered.
$itemid - Item being discovered.
quest::we("$name discovered " . quest::varlink($itemid) . "!", 335, 1, 0, 0);
|
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 12:41 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|