45 lines
1.0 KiB
Plaintext
45 lines
1.0 KiB
Plaintext
|
void main()
|
||
|
{
|
||
|
object oPC=GetEnteringObject();
|
||
|
object oHide=GetItemPossessedBy(oPC,"jw_craftfeat_giv");
|
||
|
|
||
|
if (GetIsObjectValid(oHide))
|
||
|
{
|
||
|
SetDroppableFlag(oHide,TRUE);
|
||
|
DestroyObject(oHide);
|
||
|
}
|
||
|
|
||
|
object oBelt=GetLocalObject(oPC,"jw_smith_belt");
|
||
|
|
||
|
if (GetIsObjectValid(oBelt)&&GetItemPossessor(oBelt)==oPC)
|
||
|
{
|
||
|
AssignCommand(oPC,ClearAllActions());
|
||
|
AssignCommand(oPC,ActionEquipItem(oBelt,INVENTORY_SLOT_BELT));
|
||
|
DeleteLocalObject(oPC,"jw_smith_belt");
|
||
|
}
|
||
|
|
||
|
|
||
|
int nIdx;
|
||
|
object oItem;
|
||
|
|
||
|
|
||
|
// GetLocalInt(oItem,"jw_craft_copy");
|
||
|
|
||
|
|
||
|
nIdx=INVENTORY_SLOT_CHEST;
|
||
|
oItem=GetItemInSlot(nIdx,oPC);
|
||
|
AssignCommand(oPC,ActionUnequipItem(oItem));
|
||
|
AssignCommand(oPC,ActionEquipItem(oItem,nIdx));
|
||
|
|
||
|
nIdx=INVENTORY_SLOT_LEFTHAND;
|
||
|
oItem=GetItemInSlot(nIdx,oPC);
|
||
|
AssignCommand(oPC,ActionUnequipItem(oItem));
|
||
|
AssignCommand(oPC,ActionEquipItem(oItem,nIdx));
|
||
|
|
||
|
nIdx=INVENTORY_SLOT_RIGHTHAND;
|
||
|
oItem=GetItemInSlot(nIdx,oPC);
|
||
|
AssignCommand(oPC,ActionUnequipItem(oItem));
|
||
|
AssignCommand(oPC,ActionEquipItem(oItem,nIdx));
|
||
|
|
||
|
}
|