Page 1 of 1

grave bug with item.hp

Posted: Sun Apr 14, 2013 2:24 pm
by RusseL
Test script:

Code: Select all

var item := Target(user);
SendSysMessage(user, "Before: ItemHP="+item.hp);
item.hp := item.hp - 10;
SendSysMessage(user, "After: ItemHP="+item.hp);
return 0;

Output x3:

Before: ItemHP=20
After: ItemHP=10
----------------
Before: ItemHP=10
After: ItemHP=0
----------------
Before: ItemHP=0
After: ItemHP=65526

so, you can get a platemail with 17k ar (1 layer):cheesy: :cheesy: :cheesy: :cheesy:

Re: grave bug with item.hp

Posted: Sun Sep 01, 2013 2:03 am
by Turley
he he found this posting by accident. nice little feature.

depends on the view if this is really a bug. hp member is I think an unsigned short thus normal behaviour.

Re: grave bug with item.hp

Posted: Sun Sep 01, 2013 3:22 am
by RusseL

Re: grave bug with item.hp

Posted: Sun Sep 01, 2013 3:27 am
by Turley
how lame :)

but we should not only secure HP. I try to keep it in my head.