EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Random Plat (https://www.eqemulator.org/forums/showthread.php?t=41402)

Baelu 06-21-2017 01:02 PM

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.

Kingly_Krab 06-21-2017 06:19 PM

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.");
    }
}


Baelu 06-21-2017 11:15 PM

Awesome man thanks a ton.

Kingly_Krab 06-21-2017 11:34 PM

You're welcome.


All times are GMT -4. The time now is 11:49 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.