Page 1 of 1

negative experience [Archive] - ForumsHQ

Posted: Sun Aug 25, 2002 10:28 pm
by Graith
I'm trying to create a monster that casts a spell to give negative experience, but have had no luck so far. I tried creating a spell that refereneced a text block to addexp -10000, but it only *kinda* worked. I was able to get the textblock to correctly reference, but when the negative exp is applied, it adds approx. 4 billion exp rather than subtracting any. Is it just not possible to subtract exp in the coding? I thought that the Aged Titan used to give negative exp upon death. Or is that different because its not a text block but monster experience?

Re: negative experience [Archive] - ForumsHQ

Posted: Sun Aug 25, 2002 11:25 pm
by syntax53
mud probably reads the in 'addexp ' as an unsigned long integer. meaning that the value can range from 0 to 4,294,967,295. if a negative number (a signed value) was stored in it's place it would actually read as a very high unsigned integer. in your case adding 4,294,957,296 exp (-10,000 + 4,294,967,295 + 1 [gotta count the zero]).

Re: negative experience [Archive] - ForumsHQ

Posted: Mon Aug 26, 2002 12:18 am
by Raybdbomb
yeah you're right about the aged titan, i got like -10000 exp when i killed him the first time, i'm like "fuck!"