| version 1.2 | | version 1.3 |
|---|
| | |
| # This script is meant for items that can be worn or carried really | | # This script is meant for items that can be worn or carried really |
| # I can't say how it will react if you hook it to other types of objects. | | # I can't say how it will react if you hook it to other types of objects. |
| | | |
| import CFPython | | import Crossfire |
| | | |
| activator=CFPython.WhoIsActivator() | | activator=Crossfire.WhoIsActivator() |
| activatorname=CFPython.GetName(activator) | | activatorname=activator.Name |
| whoami=CFPython.WhoAmI() | | whoami=Crossfire.WhoAmI() |
| | | |
| option=CFPython.GetEventOptions(whoami,1) # 1 is apply event | | option=Crossfire.ScriptParameters() # 1 is apply event |
| | | |
| if option: | | if option: |
| inv = CFPython.CheckInventory(activator, option) #Remove any previous disguise | | inv = activator.CheckInventory(option) #Remove any previous disguise |
| if inv: | | if inv: |
| CFPython.RemoveObject(inv) | | inv.Remove() |
| #print "removing tag" | | #print "removing tag" |
| | | |
| if not CFPython.IsApplied(whoami): #is the object is being applied | | if not whoami.Applied: #is the object is being applied |
| tag = CFPython.CreateInvisibleObjectInside(activator, option) | | tag = activator.CreateInvisibleObjectInside(option) |
| CFPython.SetName(tag, option) | | tag.Name=option |
| #print "adding tag" | | #print "adding tag" |
| | | |