AOC_PRC8/_module/nss/loot2.nss
Jaysyn904 5e558169a0 Initial Commit
Initial Commit
2025-04-03 11:24:16 -04:00

351 lines
6.5 KiB
Plaintext

void GoodTomb(int nRoll, object oTarget, object oPC)
{
string sTomb;
string ResRef;
object oItem;
int oFlag = 0;
int nDice;
switch(nRoll)
{
case 1: sTomb = "deathwurm"; break;
case 2: sTomb = "deathwurm2"; break;
case 3: sTomb = "blaroglord"; break;
case 4: sTomb = "blaroglord2"; break;
case 5: sTomb = "darkreaver"; break;
case 6: sTomb = "darkreaver2"; break;
case 7: sTomb = "wardemonr"; break;
case 8: sTomb = "wardemon2"; break;
case 9: sTomb = "thevalar"; break;
case 10: sTomb = "thevalar2"; break;
case 11: sTomb = "bardheratic"; break;
case 12: sTomb = "bardheratic2"; break;
case 13: sTomb = "kamaji"; break;
case 14: sTomb = "kamaji2"; break;
case 15: sTomb = "mistress"; break;
case 16: sTomb = "mistress2"; break;
case 17: sTomb = "baal1"; break;
case 18: sTomb = "baal12"; break;
case 19: sTomb = "lucifer1"; break;
case 20: sTomb = "lucifer12"; break;
}
oItem = GetFirstItemInInventory(oPC);
while (oItem!=OBJECT_INVALID)
{
ResRef = GetResRef(oItem);
if (ResRef==sTomb)
{
oFlag=1;
}
oItem = GetNextItemInInventory(oPC);
}
if (oFlag!=1)
{
CreateItemOnObject(sTomb, oTarget);
}
}
void EvilTomb(int nRoll, object oTarget, object oPC)
{
string sTomb;
string ResRef;
object oItem;
int oFlag = 0;
int nDice;
switch(nRoll)
{
case 1: sTomb = "gdeathwurm"; break;
case 2: sTomb = "gdeathwurm2"; break;
case 3: sTomb = "gblaroglord"; break;
case 4: sTomb = "gblaroglord2"; break;
case 5: sTomb = "gdarkreaver"; break;
case 6: sTomb = "gdarkreaver2"; break;
case 7: sTomb = "gwardemonr"; break;
case 8: sTomb = "gwardemon2"; break;
case 9: sTomb = "gthevalar"; break;
case 10: sTomb = "gthevalar2"; break;
case 11: sTomb = "gbardheratic"; break;
case 12: sTomb = "gbardheratic2"; break;
case 13: sTomb = "gkamaji"; break;
case 14: sTomb = "gkamaji2"; break;
case 15: sTomb = "gmistress"; break;
case 16: sTomb = "gmistress2"; break;
case 17: sTomb = "gbaal1"; break;
case 18: sTomb = "gbaal12"; break;
case 19: sTomb = "glucifer1"; break;
case 20: sTomb = "glucifer12"; break;
}
oItem = GetFirstItemInInventory(oPC);
while (oItem!=OBJECT_INVALID)
{
ResRef = GetResRef(oItem);
if (ResRef==sTomb)
{
oFlag=1;
}
oItem = GetNextItemInInventory(oPC);
}
if (oFlag!=1)
{
CreateItemOnObject(sTomb, oTarget);
}
}
void TombSpawn(object oTarget, object oPC)
{
int oMode = GetLocalInt(GetModule(), "gamemode");
int oDrop;
string oCreature = GetTag(oTarget);
if (oCreature=="dragon1") {oDrop=1;}
if (oCreature=="zep_balrog001") {oDrop=2;}
if (oCreature=="dopple") {oDrop=3;}
if (oCreature=="zep_pitfiend001") {oDrop=4;}
if (oCreature=="zep_halfdrafn001") {oDrop=5;}
if (oCreature=="palewarrior") {oDrop=6;}
if (oCreature=="zep_marilithb001") {oDrop=7;}
if (oCreature=="boss1") {oDrop=8;}
if (oCreature=="lord") {oDrop=9;}
if (oCreature=="lucifer") {oDrop=10;}
switch(oDrop)
{
case 1:
{
if (oMode==1)
{
EvilTomb(d4(), oTarget, oPC);
}
else
{
GoodTomb(d4(), oTarget, oPC);
}
}
break;
case 2:
{
if (oMode==1)
{
EvilTomb(d6(), oTarget, oPC);
}
else
{
GoodTomb(d6(), oTarget, oPC);
}
}
break;
case 3:
{
if (oMode==1)
{
EvilTomb(d8(), oTarget, oPC);
}
else
{
GoodTomb(d8(), oTarget, oPC);
}
}
break;
case 4:
{
if (oMode==1)
{
EvilTomb(d10(), oTarget, oPC);
}
else
{
GoodTomb(d10(), oTarget, oPC);
}
}
break;
case 5:
{
if (oMode==1)
{
EvilTomb(d12(), oTarget, oPC);
}
else
{
GoodTomb(d12(), oTarget, oPC);
}
}
break;
case 6:
{
if (oMode==1)
{
EvilTomb((d8()+d6()), oTarget, oPC);
}
else
{
GoodTomb((d8()+d6()), oTarget, oPC);
}
}
break;
case 7:
{
if (oMode==1)
{
EvilTomb(d8(2), oTarget, oPC);
}
else
{
GoodTomb(d8(2), oTarget, oPC);
}
}
break;
case 8:
{
if (oMode==1)
{
EvilTomb(d6(3), oTarget, oPC);
}
else
{
GoodTomb(d6(3), oTarget, oPC);
}
}
break;
case 9:
{
if (oMode==1)
{
EvilTomb(d20(), oTarget, oPC);
}
else
{
GoodTomb(d20(), oTarget, oPC);
}
}
break;
case 10:
{
if (oMode==1)
{
EvilTomb(d20(), oTarget, oPC);
}
else
{
GoodTomb(d20(), oTarget, oPC);
}
}
break;
}
}
void main () {}
/*
nDice = d20();
if (nDice==1)
{
sTomb = "deathwurm";
}
if (nDice==2)
{
sTomb = "blaroglord";
}
if (nDice==3)
{
sTomb = "darkreaver";
}
if (nDice==4)
{
sTomb = "wardemon";
}
if (nDice==5)
{
sTomb = "thevalar";
}
if (nDice==6)
{
sTomb = "deathwurm2";
}
if (nDice==7)
{
sTomb = "blaroglord2";
}
if (nDice==8)
{
sTomb = "darkreaver2";
}
if (nDice==9)
{
sTomb = "wardemon2";
}
if (nDice==10)
{
sTomb = "thevalar2";
}
if (nDice==11)
{
sTomb = "baal1";
}
if (nDice==12)
{
sTomb = "baal2";
}
if (nDice==13)
{
sTomb = "bardheratic";
}
if (nDice==14)
{
sTomb = "bardheratic2";
}
if (nDice==15)
{
sTomb = "kamaji";
}
if (nDice==16)
{
sTomb = "kamaji2";
}
if (nDice==17)
{
sTomb = "mistress";
}
if (nDice==18)
{
sTomb = "mistress2";
}
if (nDice==19)
{
sTomb = "lucifer1";
}
if (nDice==20)
{
sTomb = "lucifer2";
}
oItem = GetFirstItemInInventory(oPC);
while (oItem!=OBJECT_INVALID)
{
ResRef = GetResRef(oItem);
if (ResRef==sTomb)
{
oFlag=1;
}
oItem = GetNextItemInInventory(oPC);
}
if (oFlag!=1)
{
CreateItemOnObject(sTomb, oTarget);
}
}
void CreateGold(object oTarget, int nStackSize)
{
object oPC = GetLastKiller();
int oKills = GetLocalInt(oPC, "iKilled");
int oDeaths = GetLocalInt(oPC, "iDied");
nStackSize+=(oKills-oDeaths)*100;
string sItemTemplate1 = "nw_it_gold001"; // gold
CreateItemOnObject(sItemTemplate1, oTarget, nStackSize);
}
void main (){}