View Single Post
  #1  
Old 07-24-2004, 03:55 AM
govtcheeze
Hill Giant
 
Join Date: Mar 2004
Location: South Florida
Posts: 247
Default 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);
__________________
GovtCheeze, Welfare Warrior
"Listen, here's the thing. If you can't spot the sucker in the first half hour at the table, then you ARE the sucker." -- Mike McDermott, Rounders

Developer of the original (circa 2004):
Loots v2.0, bitch!
Faction v1.0, bitch!
Magelo-like clone v0.3, bitch!
Zone geometry and spawn/path viewer, bitch!
Reply With Quote