Checking for Fires in a room

For builders to discuss and ask building questions.
Post Reply
User avatar
Larethiel
Sword Grand Master
Sword Grand Master
Posts: 910
Joined: Sat Jul 22, 2006 4:10 pm
Location: Mt. Whateverest

Checking for Fires in a room

Post by Larethiel » Sat Oct 10, 2015 3:56 pm

I am looking for a way to make an object check for a fire in the room it is being used in. The object is something that would require being boiled and has an intercept program for that. In another thread I saw this
if ovnumhere(30) to if otypehere(34)
and the vnum for a generic fire being 34.

Now if I use otypehere(34), area checker will complain about
integer (otypehere) statement on line: if otypehere(34)
The same happens when using if ovnumhere(30). Using otyperoom(34), the program will work, however it doesn't seem to check for a fire because it will work in any room.

How could I check for a generic fire being present when trying to use the object?
Weit in der Champagne im Mittsommergrün,
dort, wo zwischen Grabkreuzen Mohnblumen blühn,
da flüstern die Gräser und wiegen sich leicht
im Wind, der sanft über das Gräberfeld streicht.
User avatar
Harroghty
Staff
Staff
Posts: 9695
Joined: Tue Jul 27, 2004 5:38 pm

Re: Checking for Fires in a room

Post by Harroghty » Mon Oct 12, 2015 9:18 pm

The if check requires a rhs. e.g.

Code: Select all

if otypehere(34) > 0
"A man may die yet still endure if his work enters the greater work, for time is carried upon a current of forgotten deeds, and events of great moment are but the culmination of a single carefully placed thought." - Chime of Eons
User avatar
Larethiel
Sword Grand Master
Sword Grand Master
Posts: 910
Joined: Sat Jul 22, 2006 4:10 pm
Location: Mt. Whateverest

Re: Checking for Fires in a room

Post by Larethiel » Tue Oct 13, 2015 2:01 pm

I tried this but it will not check for the generic fire with the vnum 30 even if that is in the room. The vnum 34 seems to apply to a blank scroll. I will let it check for the generic vnum 30 fire. Is 34 incorrect or am I missing something?
Weit in der Champagne im Mittsommergrün,
dort, wo zwischen Grabkreuzen Mohnblumen blühn,
da flüstern die Gräser und wiegen sich leicht
im Wind, der sanft über das Gräberfeld streicht.
User avatar
Harroghty
Staff
Staff
Posts: 9695
Joined: Tue Jul 27, 2004 5:38 pm

Re: Checking for Fires in a room

Post by Harroghty » Tue Oct 13, 2015 2:53 pm

34 is an object type, not a VNUM.
"A man may die yet still endure if his work enters the greater work, for time is carried upon a current of forgotten deeds, and events of great moment are but the culmination of a single carefully placed thought." - Chime of Eons
User avatar
Larethiel
Sword Grand Master
Sword Grand Master
Posts: 910
Joined: Sat Jul 22, 2006 4:10 pm
Location: Mt. Whateverest

Re: Checking for Fires in a room

Post by Larethiel » Tue Oct 13, 2015 5:38 pm

Oh, that explains that. Thanks!
Weit in der Champagne im Mittsommergrün,
dort, wo zwischen Grabkreuzen Mohnblumen blühn,
da flüstern die Gräser und wiegen sich leicht
im Wind, der sanft über das Gräberfeld streicht.
Post Reply