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);