HM-CODE / Haunted-Memories

A repository for Haunted Memories code.
http://www.haunted-memories.net/
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

+setstat bug: header stats misreport #104

Closed Bradamante closed 13 years ago

Bradamante commented 13 years ago

Header stats are reporting 0 when you setstat them. They should report teh text.

Bradamante commented 13 years ago

Also, as a bonus:

+setstat Kenneth/Wits=1/B

<+setstat> You set Kenneth's Wits to 0.

Code correctly incremented Kenneth's Wits, but it did misreport the total.

Bradamante commented 13 years ago

When setting a PC's Resources merit to 2, I typed and got:

+setstat /Resources=1

<+setstat> You set <name's>'s Resources to 1.

Resources are correctly set at 2 on the +sheet; it's just the message that misreported.

hmmorpheus commented 13 years ago

The permissions issue was fixed by granting #5/FN_GETSTAT royalty bit level permissions (thank you Loki).

The greater display issue has been fixed by replacing #1687/TRIG_SETSTAT with:

&trig_setstat #1687=[setstat(%0,%1,%2,%3)];@pemit %4=msg(cc,+setstat,{You set [name(%0)]'s [caplist(caplist(%1),-)] to [switch(1,or(gt(setr(f,getstat(%0,%1,%3)),0),gte(words(%qf),1)),%qf,0)][if(cand(words(%4),match(Skills,%5)),%bwith specialties [elist(trim(getstat(%0,%1,specialties)),,|)])].})