negative experience [Archive] - ForumsHQ

Post Reply
Graith

negative experience [Archive] - ForumsHQ

Post 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?
syntax53
Posts: 0
Joined: Wed Apr 03, 2002 6:00 am

Re: negative experience [Archive] - ForumsHQ

Post 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]).
Raybdbomb
Posts: 0
Joined: Wed Mar 21, 2001 6:00 am

Re: negative experience [Archive] - ForumsHQ

Post 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!"
Post Reply

Return to “Nightmare Redux”