PDA

View Full Version : Random Plat


Baelu
06-21-2017, 01:02 PM
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?

quest::givecash(0,0,0,0);

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.
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.