Jump to content

Need a bit of help with a fairly minor script.


corey12

Recommended Posts

I've been working on something for awhile now, and about half way through my editor went nuts. I couldn't create any scripts (I hadn't realised this until a few days ago). Verifying the game on steam has allowed me to create new scripts, but I've more or less forgotten how to go about it- though I had trouble initially anyway.

 

I cannot edit my initial script for whatever reason. This script basically teleported the player to a COC Marker, removed their gear and put it in a chest. This works fine.

 

I'd like to also remove Mage/Candle Light spells from the player too, but I'm unsure how to do this. I'm not sure how to assign the target spell to be removed on the script.

 

The script is triggered from using something.

 

Also, and this is less significant, I'd like to remove Beast Form (Both the activated and disease immunity) spells through another source.

 

I can probably work from an example

 

; Removes the sheep spell from the player
if (Game.GetPlayer().RemoveSpell(SheepSpellProperty))
Debug.Trace("Sheep spell removed from the player")
endIf
I assume that's the kind of script I'm after, but how to I assign a target for the SheepSpellProperty part?
Any help would be appreciated.
Edited by corey12
Link to comment
Share on other sites

 

I've been working on something for awhile now, and about half way through my editor went nuts. I couldn't create any scripts (I hadn't realised this until a few days ago). Verifying the game on steam has allowed me to create new scripts, but I've more or less forgotten how to go about it- though I had trouble initially anyway.

 

I cannot edit my initial script for whatever reason. This script basically teleported the player to a COC Marker, removed their gear and put it in a chest. This works fine.

 

I'd like to also remove Mage/Candle Light spells from the player too, but I'm unsure how to do this. I'm not sure how to assign the target spell to be removed on the script.

 

The script is triggered from using something.

 

Also, and this is less significant, I'd like to remove Beast Form (Both the activated and disease immunity) spells through another source.

 

I can probably work from an example

 

; Removes the sheep spell from the player

if (Game.GetPlayer().RemoveSpell(SheepSpellProperty))

Debug.Trace("Sheep spell removed from the player")

endIf

I assume that's the kind of script I'm after, but how to I assign a target for the SheepSpellProperty part?
Any help would be appreciated.

This might be what you're looking for.

 

Spell property Sheepspell Auto

 

if (Game.GetPlayer().RemoveSpell(SheepSpell))

Debug.Trace("Sheep spell removed from the player")

endIf

 

You don't need to put property after the spell name unless it's part of the spell name.

After the script compiles you need to set the spell in the properties window.

If the spell name is right you can just hit autofill and it'll add the spell.

 

You may want to change the Debug.Trace to Debug.Notification if you want a message to appear ingame.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...