EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Quests (https://www.eqemulator.org/forums/forumdisplay.php?f=624)
-   -   Couple of questions (https://www.eqemulator.org/forums/showthread.php?t=14980)

govtcheeze 07-24-2004 03:55 AM

Couple of questions
 
A lot of quests require people to combine items in a container, which then is replaced by a new item. I was thinking of using a tradeskill to accompish this, but how do you delete the container and items after a successful combine?

Also, is there a way to use rand() to give multiple rewards, say:

if(rand() < 15) {
quest::summonitem("11111"):
} else {
quest::summonitem("22222");
}

I found this post: http://www.eqemulator.net/forums/viewtopic.php?t=15696 but it shows how to do it for selecting any item at random, instead of the ability to make an item summoned more often than another one.

Sorry for the noobish question, just started working with the perl quests this week :)

EDIT:

Think I am going to answer my second question, but would this work at described above:

Code:

my $random = int(rand(100));   
if($random <= 15){
  quest::summonitem("11111"); }
if($random >  15){
  quest::summonitem("22222"); }

and for random range for money:

Code:

$random = int(rand(8,20));

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



All times are GMT -4. The time now is 10:16 PM.

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