Major update
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.
This commit is contained in:
@@ -3,6 +3,29 @@ 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
|
||||
@@ -15,7 +38,7 @@ void main()
|
||||
//Get player and find locations
|
||||
xPC = GetLastPlayerDying();
|
||||
xLoc = GetLocation(xPC);
|
||||
//Create corpse at player's feet
|
||||
/* //Create corpse at player's feet
|
||||
xCorpse = CreateObject(OBJECT_TYPE_PLACEABLE,"corpse002",xLoc);
|
||||
//Drop equipment on corpse
|
||||
for (xCount = 1; xCount < 15; xCount++)
|
||||
@@ -44,7 +67,9 @@ void main()
|
||||
}
|
||||
//Now drop half of player's gold.
|
||||
xGold = (GetGold(xPC)/2);
|
||||
AssignCommand(xItem,TakeGoldFromCreature(xGold,xPC,FALSE));
|
||||
AssignCommand(xItem,TakeGoldFromCreature(xGold,xPC,FALSE)); */
|
||||
|
||||
onDeathApplyPenalty(xPC);
|
||||
//Now let's pop the death GUI
|
||||
DelayCommand(2.5, PopUpDeathGUIPanel(xPC,TRUE,TRUE));
|
||||
}
|
||||
|
Reference in New Issue
Block a user