|
||
|
|
#1 (permalink) |
|
I know it took ME a long time to figure out how to give my monsters loot with whatever properties I want, so here is how to do it:
For example, I am going to add a newbied longsword with HitDispel 50% to this monster's pack. 1) Find the section of the mobile's .cs file where it defines the loot (You will see a bunch of lines starting with "PackItem") 2) Right up above (or below; doesn't matter as long as it's in the same bracket) all the PackItem lines, I would put this: Code:
// Begin Custom Longsword Longsword A = new Longsword(); A.LootType = LootType.Newbied; A.WeaponAttributes.HitDispel = 50; //End Custom Longsword PackItem( A ); 3) Save the file, recompile, enjoy, TO MAKE IT RANDOMIZED IF THE MONSTER DROPS THE ITEM EDIT: Fixed a problem with Utility.Random 1) Take a look at David's post on how to use Utility.Random if you don't already know how. 2) To make a one in 5 chance for it to have the above longsword, add this to the loot section: -UPDATED: Longsword will now only be constructed on case 0 of the random thingymabob. This is simply more effecient in scripting -Code:
switch ( Utility.Random( 4 ) )
{
case 0:
{
// Begin Custom Longsword
Longsword A = new Longsword();
A.LootType = LootType.Newbied;
A.Attributes.HitDispel = 50;
//End Custom Longsword
PackItem( A ); break;
}
}
Any questions or errors when using this feel free to PM me ![]() |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|