21 quantity =
int(args[1])
24 Crossfire.Log(Crossfire.LogDebug,
"CFDialog: trying to take: %s of item %s from character %s" %(quantity, itemname, character.Name ))
25 if itemname ==
"money":
26 paid = character.PayAmount(
int(quantity))
28 Crossfire.Log(Crossfire.LogError,
"Tried to make player %s pay more than they had" %(character.Name))
29 character.Write(
"You give {} to {}".format(Crossfire.CostStringFromValue(
int(quantity)), speaker.Name))
31 inv = character.CheckInventory(itemname)
34 character.Write(
"You give {} {} to {}".format(inv.Quantity, inv.NameSingular
if inv.Quantity == 1
else inv.NamePl, speaker.Name))
37 character.Write(
"You give {} {} to {}".format(
int(quantity), inv.NameSingular
if quantity == 1
else inv.NamePl, speaker.Name))
40 Crossfire.Log(Crossfire.LogError,
"Dialog script tried to remove more items than available from player %s" %(character.Name))
44 Crossfire.Log(Crossfire.LogError,
"Dialog script tried to remove non-existant item from player %s" %(character.Name))