View Full Version : Dink Engine variables get confused

11-09-2002, 10:47 AM
I've come across a bug... or rather WC did, in PQ in which the powerful magic spells are instantly recharged.

It seems that the global varilables &magic_level and &magic_cost get confused with the variable &magic (as all three have the first 5 letters in common) so that if your &magic is say 18 then &magic_level becomes 18_level and &magic_cost becomes 18_cost.

When this happens and you arm a new weapon (not magic, arming a new magic resets things properly, though I don't know why) - you get instant (in human time) magic... be it Deus Strike or whatever.

I can't think of a way around this as I can't guarantee what magic is in which slot (or I'd do a quick change magic to fireball, arm it, change to &cur_magic and re-arm it) - compare_magic doesn't work, of course.

11-11-2002, 09:17 PM
Okay... Tyrsis solved this one for me. I had reworked a magic item script into a weapon item script (a scroll) and left if a &magic_cost = 0; command in the disarm of the item. She also pointed out that there is a bug in the Dink Engine in which if a magic item occupies slot number 5 and there is no weapon item in slot number 5 then when a saved game is loaded that magic item is not armed.