Created top hak for crafting dialog. Moved Bioware creature abilities to top hak. Fixed DMFI wand handouts. Added DMFI language handouts. Added CCOH 6. Disabled PC corpse system. Modified new player startup system. Full compile. Updated release archive.
76 lines
2.6 KiB
Plaintext
76 lines
2.6 KiB
Plaintext
/**********************************
|
|
Script: Drop Items To Corpse
|
|
Created By: Jaden Wagener
|
|
Created On: 08/29/02
|
|
**********************************/
|
|
|
|
void onDeathApplyPenalty(object oDied)
|
|
{
|
|
int nXP = GetXP(oDied);
|
|
int nPenalty = 50 * GetHitDice(oDied);
|
|
int nHD = GetHitDice(oDied);
|
|
// * You can not lose a level with this respawning
|
|
int nMin = ((nHD * (nHD - 1)) / 2) * 1000;
|
|
|
|
int nNewXP = nXP - nPenalty;
|
|
if (nNewXP < nMin)
|
|
nNewXP = nMin;
|
|
if (nXP != nNewXP)
|
|
SetXP(oDied, nNewXP);
|
|
|
|
int nGoldToTake = FloatToInt(0.10 * GetGold(oDied));
|
|
// * a cap of 10 000gp taken from you
|
|
if (nGoldToTake > 10000)
|
|
nGoldToTake = 10000;
|
|
TakeGoldFromCreature(nGoldToTake, oDied, TRUE);
|
|
}
|
|
|
|
|
|
//Drops all player's equipment and half of gold onto the corpse.
|
|
//Combination of Diablo I and II death styles.
|
|
//Script should be placed in module's OnDeath slot
|
|
void main()
|
|
{
|
|
//Set variables
|
|
int xCount, xGold;
|
|
object xPC, xCorpse, xItem;
|
|
location xLoc;
|
|
//Get player and find locations
|
|
xPC = GetLastPlayerDying();
|
|
xLoc = GetLocation(xPC);
|
|
/* //Create corpse at player's feet
|
|
xCorpse = CreateObject(OBJECT_TYPE_PLACEABLE,"corpse002",xLoc);
|
|
//Drop equipment on corpse
|
|
for (xCount = 1; xCount < 15; xCount++)
|
|
{
|
|
switch (xCount)
|
|
{
|
|
//case 1: xItem = GetItemInSlot(INVENTORY_SLOT_ARMS,xPC); break;
|
|
//case 2: xItem = GetItemInSlot(INVENTORY_SLOT_ARROWS,xPC); break;
|
|
//case 3: xItem = GetItemInSlot(INVENTORY_SLOT_BELT,xPC); break;
|
|
//case 4: xItem = GetItemInSlot(INVENTORY_SLOT_BOLTS,xPC); break;
|
|
//case 5: xItem = GetItemInSlot(INVENTORY_SLOT_BOOTS,xPC); break;
|
|
//case 6: xItem = GetItemInSlot(INVENTORY_SLOT_BULLETS,xPC); break;
|
|
//case 7: xItem = GetItemInSlot(INVENTORY_SLOT_CHEST,xPC); break;
|
|
//case 8: xItem = GetItemInSlot(INVENTORY_SLOT_CLOAK,xPC); break;
|
|
//case 9: xItem = GetItemInSlot(INVENTORY_SLOT_HEAD,xPC); break;
|
|
//case 10: xItem = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,xPC); break;
|
|
//case 11: xItem = GetItemInSlot(INVENTORY_SLOT_LEFTRING,xPC); break;
|
|
//case 12: xItem = GetItemInSlot(INVENTORY_SLOT_NECK,xPC); break;
|
|
//case 13: xItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,xPC); break;
|
|
//case 14: xItem = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,xPC); break;
|
|
}
|
|
if (GetIsObjectValid(xItem))
|
|
{
|
|
AssignCommand(xCorpse,ActionTakeItem(xItem,xPC));
|
|
}
|
|
}
|
|
//Now drop half of player's gold.
|
|
xGold = (GetGold(xPC)/2);
|
|
AssignCommand(xItem,TakeGoldFromCreature(xGold,xPC,FALSE)); */
|
|
|
|
onDeathApplyPenalty(xPC);
|
|
//Now let's pop the death GUI
|
|
DelayCommand(2.5, PopUpDeathGUIPanel(xPC,TRUE,TRUE));
|
|
}
|