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:
		
										
											Binary file not shown.
										
									
								
							@@ -4,34 +4,28 @@
 | 
			
		||||
 | 
			
		||||
void main()
 | 
			
		||||
{
 | 
			
		||||
    object oMaster = GetMaster();
 | 
			
		||||
 | 
			
		||||
    ClearAllActions();
 | 
			
		||||
    SetAssociateState(NW_ASC_IS_BUSY);
 | 
			
		||||
    int bFound = FALSE;
 | 
			
		||||
    string sName;
 | 
			
		||||
    location lCenter = GetLocation(OBJECT_SELF);
 | 
			
		||||
    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))
 | 
			
		||||
    {
 | 
			
		||||
        if(GetObjectType(oThing)==OBJECT_TYPE_ITEM)
 | 
			
		||||
        {
 | 
			
		||||
            bFound = TRUE;
 | 
			
		||||
            /*switch(GetBaseItemType(oThing)) {
 | 
			
		||||
                case BASE_ITEM_POTIONS:
 | 
			
		||||
                case BASE_ITEM_HEALERSKIT:
 | 
			
		||||
                case BASE_ITEM_SPELLSCROLL:
 | 
			
		||||
                case BASE_ITEM_ARMOR:*/
 | 
			
		||||
 | 
			
		||||
                    sName = GetName(oThing);
 | 
			
		||||
                    TurnToFaceObject(oThing);
 | 
			
		||||
                    ActionMoveToObject (oThing, TRUE, 1.0f);
 | 
			
		||||
                    ActionDoCommand (SendMessageToPC(oParty, GetName(oMaster)+"'s golem"+" picked up "+sName+"."));
 | 
			
		||||
                    ActionPickUpItem(oThing);
 | 
			
		||||
                    ActionDoCommand(SendMessageToPC(oMaster,GetName(OBJECT_SELF)+" picked up "+sName+"."));
 | 
			
		||||
                    //oParty = GetNextFactionMember(OBJECT_SELF, TRUE);
 | 
			
		||||
 | 
			
		||||
                    /*break;
 | 
			
		||||
 | 
			
		||||
                default:
 | 
			
		||||
                    break;
 | 
			
		||||
            }*/
 | 
			
		||||
        }
 | 
			
		||||
        else // oThing is a placeable
 | 
			
		||||
        {
 | 
			
		||||
@@ -45,38 +39,30 @@ void main()
 | 
			
		||||
                    bFound = TRUE;
 | 
			
		||||
                    ActionMoveToObject (oThing, TRUE, 1.0f);
 | 
			
		||||
                    ActionDoCommand(AssignCommand(oThing,PlayAnimation(ANIMATION_PLACEABLE_OPEN)));
 | 
			
		||||
                    //ActionInteractObject(oThing);
 | 
			
		||||
                    //ActionDoCommand(DoPlaceableObjectAction(oThing,PLACEABLE_ACTION_USE));
 | 
			
		||||
                    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 oMaster = GetMaster(OBJECT_SELF);
 | 
			
		||||
                    object oParty = GetFirstFactionMember(OBJECT_SELF, TRUE);
 | 
			
		||||
                    while(GetIsObjectValid(oItem))
 | 
			
		||||
                    {
 | 
			
		||||
                       /* switch(GetBaseItemType(oItem)) {
 | 
			
		||||
                            case BASE_ITEM_POTIONS:
 | 
			
		||||
                            case BASE_ITEM_HEALERSKIT:
 | 
			
		||||
                            case BASE_ITEM_SPELLSCROLL:
 | 
			
		||||
                            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 (SendMessageToPC(oParty, GetName(oMaster)+"'s golem"+" picked up "+GetName(oItem)+" from "+GetName(oThing)+"."));
 | 
			
		||||
                       ActionTakeItem(oItem,oThing);
 | 
			
		||||
                       oParty = GetNextFactionMember(OBJECT_SELF, TRUE);
 | 
			
		||||
                       oItem = GetNextItemInInventory(oThing);
 | 
			
		||||
                    }
 | 
			
		||||
                    ActionDoCommand(AssignCommand(oThing,PlayAnimation(ANIMATION_PLACEABLE_CLOSE)));
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        } // else
 | 
			
		||||
        oThing = GetNextObjectInShape(SHAPE_SPHERE,60.0,lCenter,TRUE,OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_ITEM);
 | 
			
		||||
 | 
			
		||||
    } // while(GetIsObjectValid(oThing))
 | 
			
		||||
 | 
			
		||||
    ActionDoCommand(SetAssociateState(NW_ASC_IS_BUSY,FALSE));
 | 
			
		||||
 | 
			
		||||
    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.
										
									
								
							
		Reference in New Issue
	
	Block a user