I'm having some issues with using inventory on player.
Can someone please have a look for me and correct?
Will you assist?
It mainly appears to be when using crystal / chalk and using brownjar crops up a bit.
I apologise if somewhat messy
Meanwhile I will keep looking over it.
Script taken off now solved
Slasher, you could at least tell what's wrong is going on when you use this script....
But based on dialog inside the script I may make a
guess that you have mistakes in conditions.
For example:
if (cELF.ActiveInventory==ibluejar && cELF.Room==25 || cELF.Room==26 || cELF.Room==27)
This is probably supposed to deal this case when elf usues blue jar in rooms 25,26 and 27. But in fact it reads:
Quote
If active inventory is ibluejar AND room is 25
OR
room is 26
OR
room is 27
If you want this:
QuoteIf active inventory is ibluejar AND room is EITHER 25,26 or 27
You should take || operation in brackets:
if (cELF.ActiveInventory==ibluejar && (cELF.Room==25 || cELF.Room==26 || cELF.Room==27) ) <-- notice extra brackets there around "rooms" part
This is because of order of operations: && operation is executed first, and || operations are executed after.
There are other instances of this mistake in your code.