i'm trying to reverse a stat increase from an obj wear with an obj remove, but i notice that negative values in the %actor.<stat>()% command are ignored. too bad if true. i can read then modify then write the new values but wondered if i was just doing the nop incorrectly.
Trigger Editor [35073]
1) Name : everyone needs a thneed redux
2) Intended for : Objects
3) Trigger types: Remove
4) Numeric Arg : 100
5) Arguments :
6) Commands:
*
* 080522 Aegon 350 Ice Fortress
*
if %actor.is_pc%
context %self.id%
if %random.100% == 1
%send% %actor% As you pull the thneed over your head, the magical fabric tears, and your thneed unravels and vanishes.
%purge% %self%
halt
return 1
end
if ! %bit%
if ! %actor.varexists(bit)%
%send% %actor% error in thneed bonus stat removal!
halt
return 0
else
set bit %actor.bit%
rdelete bit %actor.id%
end
if %bit% == str
if %actor.str% == 18
if %actor.stradd% >= 20
nop %actor.stradd(-20)%
else
nop %actor.stradd(0)%
end
else
nop %actor.str(-1)%
end
elseif %bit% == wis
nop %actor.wis(-1)%
elseif %bit% == dex
nop %actor.dex(-1)%
elseif %bit% == maxhitp
nop %actor.maxhitp(-24)%
elseif %bit% == maxmove
nop %actor.maxmove(-24)%
end
end
%send% %actor% The Once-ler whispers, "%actor.name%, I'll need that bit of %bit% back now. But you know where to find it."
unset %bit%
end