Calgor Posted September 18, 2010 Share Posted September 18, 2010 Hello, I'm trying to get some assistance with writing a little script. The basis is, I am trying to create a staff that serves multiple functions. I am intending it to do the following: If the target it hits is a locked object, it opens it, IE does a "open very hard lock" on target. If the target is a creature, NPC or generally something that can be hurt, cast a selection of painful nasty spells and so on.If it doesn't hit anything or it isn't one of those, do a generic cast of some lightning bolt or whatever. Intended results is a staff which costs maybe 50 energy worth, get maybe 100 uses before a recharge and will either unlock or do an unpleasant amount of damage to the target. Now although this can already be done with using pre existing effects, I am trying not to have a multitude of effects on the item's in game description because that looks unsightly and instead have just the name of the Script Effect. My knowledge of scripting is a bit...limited, however I have made a shot at it and it's probably laughably wrong but if anyone can guide in the right direction or provide a working script then that would be wonderful. Below is what I've tried to get and obviously it doesn't work. "OpenLockMastery" is the name of a spell I have made which is essentially a "Unlock 99 points on target". Scriptname MagicStaff begin OnHit if (target.GetLockLevel != 0 && target.GetLockLevel != 100) cast OpenLockMastery target else if (target.GetDead == 0) cast StandardShockShield2Apprentice targetend Any help with this will be appreciated. Thank you in advance. Link to comment Share on other sites More sharing options...
Recommended Posts