View Single Post
  #6  
Old 07-09-2003, 07:01 AM
krich
Hill Giant
 
Join Date: May 2003
Location: The Great Northwest
Posts: 150
Default

Excellent addition... I certainly hope Wes picks this one up in his new code.

One suggestion though: Perhaps a checkslot(slotnumber), or a getfreeslot() routine would compliment this function nicely. Blindly tossing a backback in a slot that may be occupied by other important inventory might not be the greatest idea.

Not very familiar with the quest scripting, but you get the idea...

Code:
if($1 == "i am naked") { 
    $emptyslot = getfreeslot()
    if ($emptyslot != 0) {
        say("Very well, here you go $name, a nice new backpack with some clothing inside!") 
        placeitem($emptyslot,"17969","1") 
        $bagbase = 250 + (($emptyslot - 22) * 10)
        placeitem($bagbase,"1001","1") 
        placeitem($bagbase + 1,"1002","1") 
    } else {
        say("It appears you don't have room to carry this bag of goodies, come back to me when you have unencumbered yourself a bit.")
    }
}
Regards,

krich
Reply With Quote