Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 06-21-2017, 01:02 PM
Baelu
Sarnak
 
Join Date: Jun 2017
Posts: 30
Default Random Plat

Had an idea for a random plat turn in just not sure how to write it. I saw these lines, just werent sure how to combine them?

Code:
quest::givecash(0,0,0,0);
Code:
quest::chooserandom
And would there be a way to determine what the random number was?

Example would be.. You get X amount of platinum for reward, and then the npc will respond with " you have received x amount of cash"

I know all the basics just not how to make the random amount or how to make the npc say how much was generated.
Reply With Quote
  #2  
Old 06-21-2017, 06:19 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

Here's an example using a Cloth Cap turn-in.
Code:
sub EVENT_ITEM {
    if (plugin::check_handin(\%itemcount, 1001 => 1)) {
        my $platinum = quest::ChooseRandom(1..10);
        quest::givecash(0, 0, 0, $platinum);
        plugin::Whisper("Thank you for the Cloth Cap, here is $platinum Platinum.");
    }
}
Reply With Quote
  #3  
Old 06-21-2017, 11:15 PM
Baelu
Sarnak
 
Join Date: Jun 2017
Posts: 30
Default

Awesome man thanks a ton.
Reply With Quote
  #4  
Old 06-21-2017, 11:34 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

You're welcome.
Reply With Quote
Reply


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 10:26 AM.


 

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