24 lines
642 B
Plaintext
24 lines
642 B
Plaintext
void main()
|
|
{
|
|
object oPC = GetPCSpeaker();
|
|
object oNPC = OBJECT_SELF;
|
|
object oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC);
|
|
|
|
if(GetIsObjectValid(oItem))
|
|
{
|
|
ActionTakeItem(oItem,oPC);
|
|
AssignCommand(oNPC, ActionEquipItem(oItem, INVENTORY_SLOT_RIGHTHAND));
|
|
AssignCommand(oNPC, ActionSpeakString("Thanks!,take these in exchange"));
|
|
CreateItemOnObject("flying_boots",oPC,1);
|
|
SetLocalInt(oPC, "eaglenpc", 1);
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
AssignCommand(oNPC, ActionSpeakString("You ain't got no weapon!"));
|
|
return;
|
|
}
|
|
|
|
}
|
|
|