Jaysyn904 04165202c0 Initial upload
Initial upload
2024-11-25 19:36:07 -05:00

61 lines
1.9 KiB
Plaintext

///////////////////////////////////////////////////////////////////////////////////
// Real Time Strategy - NWN - Magic Bug Eggs
//================================================================================
// By Deva Bryson Winblood. 03/10/2003
///////////////////////////////////////////////////////////////////////////////////
#include "rtsh_multiplay"
void fnHatch(object oSeed)
{ // create bugs
int nL=0;
int nB=d4();
int nT;
location lLoc=GetLocation(oSeed);
object oBug;
while(nL<nB)
{ // create bugs
nL++;
nT=d6();
switch(nT)
{ // bug type
case 1:
case 2: { // fire beetles
oBug=CreateObject(OBJECT_TYPE_CREATURE,"btlfire001",lLoc,TRUE);
break;
} // fire beetles
case 3:
case 4:
case 5:
{ // stink beetles
oBug=CreateObject(OBJECT_TYPE_CREATURE,"btlstink001",lLoc,TRUE);
break;
} // stink beetles
case 6: { // stag beetle
oBug=CreateObject(OBJECT_TYPE_CREATURE,"btlstag001",lLoc,TRUE);
break;
} // stag beetle
} // bug type
} // create bugs
DestroyObject(oSeed);
} // fnHatch()
void main()
{
object oPC=GetItemActivator();
int nMana=fnGetTeamMana(oPC);
location lLoc=GetItemActivatedTargetLocation();
effect eBeam=EffectBeam(VFX_BEAM_MIND,oPC,BODY_NODE_HAND,FALSE);
if (nMana>4)
{ // enough mana
object oBury=CreateObject(OBJECT_TYPE_PLACEABLE,"rts_pl_mag27",lLoc,TRUE);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY,eBeam,lLoc,4.0);
DelayCommand(HoursToSeconds(8),fnHatch(oBury));
nMana=nMana-5;
fnSetTeamMana(oPC,nMana);
SendMessageToPC(oPC,"You plant the bug seeds and a trickle of 5 mana was fed into their growth to bring them out of their dormancy.");
} // enough mana
else
SendMessageToPC(oPC,"Without at least 5 mana you can tell these seeds will remain dormant.");
}