I modified the hench loot script to send message to all pcs in a party together
I have no way to test it solo.
This commit is contained in:
parent
70db8c9b3f
commit
1a97a1f036
Binary file not shown.
@ -4,34 +4,28 @@
|
|||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
object oMaster = GetMaster();
|
|
||||||
ClearAllActions();
|
ClearAllActions();
|
||||||
SetAssociateState(NW_ASC_IS_BUSY);
|
SetAssociateState(NW_ASC_IS_BUSY);
|
||||||
int bFound = FALSE;
|
int bFound = FALSE;
|
||||||
string sName;
|
string sName;
|
||||||
location lCenter = GetLocation(OBJECT_SELF);
|
location lCenter = GetLocation(OBJECT_SELF);
|
||||||
object oThing = GetFirstObjectInShape(SHAPE_SPHERE,60.0,lCenter,TRUE,OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_ITEM);
|
object oThing = GetFirstObjectInShape(SHAPE_SPHERE,60.0,lCenter,TRUE,OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_ITEM);
|
||||||
|
object oMaster = GetMaster(OBJECT_SELF);
|
||||||
|
object oParty = GetFirstFactionMember(OBJECT_SELF, TRUE);
|
||||||
while(GetIsObjectValid(oThing))
|
while(GetIsObjectValid(oThing))
|
||||||
{
|
{
|
||||||
if(GetObjectType(oThing)==OBJECT_TYPE_ITEM)
|
if(GetObjectType(oThing)==OBJECT_TYPE_ITEM)
|
||||||
{
|
{
|
||||||
bFound = TRUE;
|
bFound = TRUE;
|
||||||
/*switch(GetBaseItemType(oThing)) {
|
|
||||||
case BASE_ITEM_POTIONS:
|
|
||||||
case BASE_ITEM_HEALERSKIT:
|
|
||||||
case BASE_ITEM_SPELLSCROLL:
|
|
||||||
case BASE_ITEM_ARMOR:*/
|
|
||||||
sName = GetName(oThing);
|
sName = GetName(oThing);
|
||||||
TurnToFaceObject(oThing);
|
TurnToFaceObject(oThing);
|
||||||
ActionMoveToObject (oThing, TRUE, 1.0f);
|
ActionMoveToObject (oThing, TRUE, 1.0f);
|
||||||
|
ActionDoCommand (SendMessageToPC(oParty, GetName(oMaster)+"'s golem"+" picked up "+sName+"."));
|
||||||
ActionPickUpItem(oThing);
|
ActionPickUpItem(oThing);
|
||||||
ActionDoCommand(SendMessageToPC(oMaster,GetName(OBJECT_SELF)+" picked up "+sName+"."));
|
//oParty = GetNextFactionMember(OBJECT_SELF, TRUE);
|
||||||
|
|
||||||
/*break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
else // oThing is a placeable
|
else // oThing is a placeable
|
||||||
{
|
{
|
||||||
@ -45,38 +39,30 @@ void main()
|
|||||||
bFound = TRUE;
|
bFound = TRUE;
|
||||||
ActionMoveToObject (oThing, TRUE, 1.0f);
|
ActionMoveToObject (oThing, TRUE, 1.0f);
|
||||||
ActionDoCommand(AssignCommand(oThing,PlayAnimation(ANIMATION_PLACEABLE_OPEN)));
|
ActionDoCommand(AssignCommand(oThing,PlayAnimation(ANIMATION_PLACEABLE_OPEN)));
|
||||||
//ActionInteractObject(oThing);
|
|
||||||
//ActionDoCommand(DoPlaceableObjectAction(oThing,PLACEABLE_ACTION_USE));
|
|
||||||
TurnToFaceObject(oThing);
|
TurnToFaceObject(oThing);
|
||||||
ActionPlayAnimation(ANIMATION_LOOPING_GET_MID,2.0,0.5);
|
ActionPlayAnimation(ANIMATION_LOOPING_GET_MID,3.0,0.5);
|
||||||
object oItem = GetFirstItemInInventory(oThing);
|
object oItem = GetFirstItemInInventory(oThing);
|
||||||
|
object oMaster = GetMaster(OBJECT_SELF);
|
||||||
|
object oParty = GetFirstFactionMember(OBJECT_SELF, TRUE);
|
||||||
while(GetIsObjectValid(oItem))
|
while(GetIsObjectValid(oItem))
|
||||||
{
|
{
|
||||||
/* switch(GetBaseItemType(oItem)) {
|
ActionDoCommand (SendMessageToPC(oParty, GetName(oMaster)+"'s golem"+" picked up "+GetName(oItem)+" from "+GetName(oThing)+"."));
|
||||||
case BASE_ITEM_POTIONS:
|
ActionTakeItem(oItem,oThing);
|
||||||
case BASE_ITEM_HEALERSKIT:
|
oParty = GetNextFactionMember(OBJECT_SELF, TRUE);
|
||||||
case BASE_ITEM_SPELLSCROLL:
|
oItem = GetNextItemInInventory(oThing);
|
||||||
case BASE_ITEM_ARMOR:*/
|
|
||||||
ActionDoCommand(SendMessageToPC(oMaster,GetName(OBJECT_SELF)+" picked up "+GetName(oItem)+" from "+GetName(oThing)+"."));
|
|
||||||
ActionTakeItem(oItem,oThing);
|
|
||||||
|
|
||||||
/* break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}*/
|
|
||||||
oItem = GetNextItemInInventory(oThing);
|
|
||||||
}
|
}
|
||||||
ActionDoCommand(AssignCommand(oThing,PlayAnimation(ANIMATION_PLACEABLE_CLOSE)));
|
ActionDoCommand(AssignCommand(oThing,PlayAnimation(ANIMATION_PLACEABLE_CLOSE)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // else
|
} // else
|
||||||
oThing = GetNextObjectInShape(SHAPE_SPHERE,60.0,lCenter,TRUE,OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_ITEM);
|
oThing = GetNextObjectInShape(SHAPE_SPHERE,60.0,lCenter,TRUE,OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_ITEM);
|
||||||
|
|
||||||
} // while(GetIsObjectValid(oThing))
|
} // while(GetIsObjectValid(oThing))
|
||||||
|
|
||||||
ActionDoCommand(SetAssociateState(NW_ASC_IS_BUSY,FALSE));
|
ActionDoCommand(SetAssociateState(NW_ASC_IS_BUSY,FALSE));
|
||||||
|
|
||||||
if(!bFound)
|
if(!bFound)
|
||||||
SpeakString("I don't see where I can find any around here.");
|
ActionSpeakString("I don't see where I can find any around here.", TALKVOLUME_PARTY);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user