IF
Global("ContainerStuff","ARxxxx",0)
THEN
RESPONSE #100
ContainerEnable("Cont01",0)
SetGlobal("ContainerStuff","ARxxxx",1)
ENDIF
Detected([ANYONE])
Global("ContainerStuff","ARxxxx",1) //ensure that party got the XP only once and all the stuff is proceeded just once
THEN
RESPONSE #100
RemoveTraps("Traps01")
ContainerEnable("Cont01",1)
DisplayStringHead("Cont01",XXXXX)//You have detected a secret container!
//I'm not sure whether this works with containers... whether they have any "head" (technically;))) if not, you can simulate it via invisible creature stands near this container and ActionOverride("my_invis",DisplayStringHead(myself,XYZ))
AddexperienceParty(YYY)
DisplayString((),ZZZZZ)//You win YYY XP
SetGlobal("ContainerStuff","ARxxxx",2)
ENDQuoteIF
True()
THEN
RESPONSE #100
ContainerEnable("Cont01",0)
END
IF
Detected("Traps01")
THEN
RESPONSE #100
RemoveTraps("Traps01")
ContainerEnable("Cont01",1)
DisplayStringHead("Cont01",XXXXX)//You have detected a secret container!
AddexperienceParty(YYY)
DisplayString((),ZZZZZ)//You win YYY XP
END