The line in red wont let it compile?
#include "nw_i0_plot"void main()
{
string sTag = "NW_IT_MMIDMISC06"; // Tag of items to take.
object oPC = GetPCSpeaker();
int nToTake = GetNumItems(oPC,sTag); // Number of items to take.
if ( nToTake)
{
TakeNumItems(oPC,sTag,nToTake);
int nReward =nToTake * 20;
GiveGoldToCreature(oPC,nReward);
GiveXPToCreature(oPC,nReward);
}
else SpeakString("You do not have any proof.");
}
// Loop through oPC's inventory until enough items are taken
// (i.e. while something still needs to be taken).
// Checking for OBJECT_INVALID should not be needed, but it's a good safety measure.
while ( oItem != OBJECT_INVALID )
{
// Only deal with items with the desired tag.
if ( GetTag(oItem) == sTag )
{
// Determine what to do based on stack size.
nAmount = nAmount + GetItemStackSize(oItem);
DestroyObject(oItem, 0.1); }
// Update the loop.
oItem = GetNextItemInInventory(oPC);
}
GiveGoldToCreature(oPC, 20*nAmount);
GiveXPToCreature(oPC, 20*nAmount);
if (iReward == TRUE)
{ while(nAmount > 0)
{
CreateItemOnObject(sResRef, oPC);
nAmount--; }
}
}
Modifié par Knight_Shield, 18 janvier 2012 - 11:55 .