Maybe replace
AssignCommand(oPC, TakeGoldFromCreature(100, oPC, TRUE));
with
int iAmount = GetGold(oPC)/10;
AssignCommand(oPC, TakeGoldFromCreature(iAmount, oPC, TRUE));
BTW, it kind of looks like the code near the bottom will just play an effect on the PC (since the GetObectType check is on the oPC object that should never be a waypoint). If that's what you intend, you can probably get by without so much checking...
Modifié par MrZork, 30 juin 2011 - 01:53 .