I wrote a script in order to do this effect: when a bountyhunter is in shadow(hide in shadow/invisible/improved invisibility),auto cast spell zshl01.spl on him;when he is not in shadow,auto cast zshl01e.spl on him.
----------------------------------------
IF
Global("zshl01","GLOBAL",0)
Kit(Player1,BOUNTYHUNTER)
OR(2)
StateCheck(Player1,STATE_INVISIBLE)
StateCheck(Player1,STATE_IMPROVEDINVISIBILITY)
THEN
RESPONSE #100
ApplySpellRES("zshl01",Player1)
SetGlobal("zshl01","GLOBAL",11)
Continue()
END
IF
Global("zshl01","GLOBAL",11)
!StateCheck(Player1,STATE_INVISIBLE)
!StateCheck(Player1,STATE_IMPROVEDINVISIBILITY)
THEN
RESPONSE #100
ApplySpellRES("zshl01e",Player1)
SetGlobal("zshl01","GLOBAL",0)
Continue()
END
-----------------------------------------
But it does not work.So I change
Kit(Player1,BOUNTYHUNTER)
into
Class(Player1,THIEF_ALL)
And it works!Of course,to all thieves.
What is my problem?How to use the trigger "Kit(O:Object*,I:Kit*KIT)"?
Thanks!Forgive my poor English knowledge.
