PoA_PRC8/_module/nss/ac_artifactsling.nss

29 lines
655 B
Plaintext
Raw Normal View History

2022-10-07 14:20:31 -04:00
#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 not level 40, STOP!
if(GetHitDice(oPC)<30)return;
if (GetGold(oPC) >= 5000)
{
oPC = GetItemActivatedTarget();
CreateItemOnObject("artbullets1", oPC, 500);
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);
}
}