generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit
This commit is contained in:
25
_module/nss/identify.nss
Normal file
25
_module/nss/identify.nss
Normal file
@@ -0,0 +1,25 @@
|
||||
#include "nw_i0_plot"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
object oItem = GetFirstItemInInventory(oPC);
|
||||
while (oItem != OBJECT_INVALID)
|
||||
{
|
||||
if(!GetIdentified(oItem))
|
||||
{
|
||||
if (GetGold(oPC) >= 100)
|
||||
{
|
||||
SetIdentified(oItem,TRUE);
|
||||
TakeGold(100, oPC, TRUE);
|
||||
SendMessageToPC(oPC, GetName(OBJECT_SELF) + " " + GetStringByStrRef(75930) + " " + GetName(oItem));
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMessageToPC(oPC, "You do not have enough gold to identify items.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
oItem = GetNextItemInInventory(oPC);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user