Added CCOH and missing areas Changed some areas to be craftable, Fixed some on death issues, Fixed the Gaurd
50 lines
1.8 KiB
Plaintext
50 lines
1.8 KiB
Plaintext
void main()
|
|
{
|
|
int iSilkNum = GetLocalInt(OBJECT_SELF,"iSilk");
|
|
if (iSilkNum<1) return;
|
|
object oPC = GetLastDisturbed();
|
|
object oItem = GetInventoryDisturbItem();
|
|
|
|
|
|
if (GetInventoryDisturbType()== INVENTORY_DISTURB_TYPE_ADDED)
|
|
{
|
|
// The following 3 lines are to ensure compatability with UOAbigal's Persistent Token System.
|
|
// You can replace them with whatever 'no-drop' code you have or comment them out.
|
|
string sNoDropFlag = (GetStringLeft(GetTag(oItem),6));
|
|
if (sNoDropFlag == "NoDrop" || sNoDropFlag == "TOKEN_"||sNoDropFlag=="_TBOX_")
|
|
return;
|
|
if (GetBaseItemType(oItem)==BASE_ITEM_LARGEBOX)
|
|
{
|
|
DestroyObject(oItem);
|
|
SendMessageToPC(oPC,"To avoid possible dupe exploits, the container placed in this bag may be destroyed.");
|
|
return;
|
|
}
|
|
CopyItem(oItem,oPC,TRUE);
|
|
DestroyObject(oItem,1.0);
|
|
}
|
|
|
|
float fSelf = GetFacing(oPC)+Random(360);
|
|
object oArea = GetArea(oPC);
|
|
vector vSelf = GetPosition(oPC);
|
|
object oTemp = OBJECT_INVALID;
|
|
float fDistance = (IntToFloat(Random(100)+1)/10.0);
|
|
vector vFire = vSelf + (AngleToVector(fSelf) * fDistance);
|
|
location lFire = Location(oArea,vFire,fSelf);
|
|
if (Random(1000)<350)
|
|
{
|
|
string sSpiderResRef = "spidgiant001";
|
|
if (Random(1000)<500) sSpiderResRef="spidgiant002";
|
|
if (Random(1000)<350) sSpiderResRef="spidgiant002";
|
|
oTemp = CreateObject(OBJECT_TYPE_CREATURE,sSpiderResRef,lFire,TRUE);
|
|
AssignCommand(oTemp,SetFacingPoint(AngleToVector(GetFacing(oPC))));
|
|
AssignCommand(oTemp, ActionAttack(oPC,FALSE));
|
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_DUR_WEB,FALSE),lFire,600.0);
|
|
FloatingTextStringOnCreature("You have disturbed a dormant spider!",oPC,FALSE);
|
|
iSilkNum--;
|
|
SetLocalInt(OBJECT_SELF,"iSilk",iSilkNum);
|
|
}
|
|
|
|
|
|
|
|
}
|