28 lines
599 B
Plaintext
28 lines
599 B
Plaintext
|
#include "x2_inc_switches"
|
||
|
void main()
|
||
|
{
|
||
|
// Check if we have the correct event firing the script
|
||
|
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
|
||
|
|
||
|
object oPC;
|
||
|
oPC = GetItemActivator();
|
||
|
|
||
|
if (GetGold(oPC) >= 5000)
|
||
|
{
|
||
|
oPC = GetItemActivatedTarget();
|
||
|
|
||
|
CreateItemOnObject("legbolts1", oPC, 999);
|
||
|
|
||
|
AssignCommand(oPC, TakeGoldFromCreature(5000, oPC, TRUE));
|
||
|
|
||
|
FloatingTextStringOnCreature("Some gold disentigrated when you used this item.", oPC);
|
||
|
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
FloatingTextStringOnCreature("You do not have enough gold to summon the arrows!", oPC);
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|