Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ Area Editor ➜ General ➜ Random Items

Random Items

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Malti   USA  (55 posts)  Bio
Date Thu 27 Apr 2006 06:01 PM (UTC)
Message
Is there a way to make probability of a MOB getting a weapon as loot to make loot ultra-rare? I.E. the mob will only have the item 10% of the time...
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Thu 27 Apr 2006 06:18 PM (UTC)
Message
You can do this with mudprogs on the death event. Just load the item if a rand() ifcheck is less than 10. It's not perfect -- the mob won't have the item until death. But it more or less works...

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Malti   USA  (55 posts)  Bio
Date Reply #2 on Thu 27 Apr 2006 06:29 PM (UTC)
Message
Forgive my ignorance, but i dont know how to do the if check. Is there a list of things you can if check?
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #3 on Thu 27 Apr 2006 07:08 PM (UTC)
Message
There should be helpfiles named "help ifchecks" or something like that. If I remember correctly, there are 3: "ifchecks", "ifchecks2", "ifchecks3".

Your ifcheck would look something like:
if rand() < 10
  mpoload vnum
endif
Note that I haven't written any mudprog for a while so I may have a few mistakes in there, but that's the general idea.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Malti   USA  (55 posts)  Bio
Date Reply #4 on Mon 01 May 2006 05:47 PM (UTC)
Message
if rand(10)
 mpoload 9901 1
 drop amulet
endif


This is the program I cam up with for random loot on the death_porg of a MOB. It does not work though, and I get wierd messages like "..it is out of your reach.." or "..but its under a pile of stuff..." that I never recieved before. Is there a way to put this in the corpse of the monster so that when it dies, the amulet is in the corpse if the rand condition is met?
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #5 on Mon 01 May 2006 06:22 PM (UTC)
Message
Where are these messages appearing? They're typical of a bad mental state, that will give you funny messages like that. Normally, by oloading the object, it'll be in the mob's corpse to begin with, and you don't need to drop it.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


21,867 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.