(fixed) Vi alcove bug

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Qwerty
Apprentice
Posts: 55
Joined: Sun Aug 30, 2009 6:21 am

(fixed) Vi alcove bug

Post by Qwerty »

When the party put&pick a champion's bone on the Vi_alcove quickly while Revive_character is proceeding.
Then, the DSB(0.42) was crashed just as the champion was ressurected.

It's log text.

@@@ LUA STACK @@@
[S:base/triggers.lua:155: attempt to index field '?' (a nil value)]
@@@@@@

Thanks.
-Qwerty-
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: (fixed) Vi alcove bug

Post by Sophia »

Oops... yeah, the problem is that it allows you take the bones out of the alcove while the resurrection is taking place, which is obviously not a good thing. :)

For the curious, the solution to this is to return true from an on_click, which prevents the party from picking something up off the dungeon floor. I added the following code to objects.lua:

Code: Select all

function obj.bones:on_click(id)
	if (exvar[id] and exvar[id].in_altar) then
		return true
	else
		return nil
	end
end
Then, in use_vi_altar I just set the exvar in_altar to true.
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Re: (fixed) Vi alcove bug

Post by zoom »

I am not sure,
but in dm reviving only worked when you would not take the bones out of the vialtar.
So far so good
If you took them out, (you still could)the
revive did not work but the fireball explosion nevertheless occured. At least so I think.. :roll:

When you´re not sure : should I really revive the char, you still have an option. But it is- admittedly- negligible
Post Reply