grave bug with item.hp

Bug reports and feature requests. New features can only be added to the current development version. Bug-fixes may be back-ported.

Current release: 099 / Current development: 100
Post Reply
RusseL
Forum Regular
Posts: 369
Joined: Fri Feb 20, 2009 8:30 pm

grave bug with item.hp

Post by RusseL » Sun Apr 14, 2013 2:24 pm

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:

Turley
POL Developer
Posts: 654
Joined: Sun Feb 05, 2006 4:45 am

Re: grave bug with item.hp

Post by Turley » Sun Sep 01, 2013 2:03 am

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.

RusseL
Forum Regular
Posts: 369
Joined: Fri Feb 20, 2009 8:30 pm

Re: grave bug with item.hp

Post by RusseL » Sun Sep 01, 2013 3:22 am


Turley
POL Developer
Posts: 654
Joined: Sun Feb 05, 2006 4:45 am

Re: grave bug with item.hp

Post by Turley » Sun Sep 01, 2013 3:27 am

how lame :)

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

Post Reply