yew staff code
Posted: Thu Feb 16, 2012 2:51 pm
I've been coding the excellent Yew staff that Crowley made for the U6 mod. So far, it functions properly as I want it to, along the lines of the original U6 -
-it checks for the enchant spell, necessary reagents, and mana
-it 'charges' regular yew staff with the lightning spell (more will be avaliable but just testing this first) 10 charges
- it changes from 'yew staff' to 'yew staff - charged (lightning)' and it functions like a lightning wand.
That part functions just fine. What i'm having trouble doing is changing the 'yew staff - charged' back to a regular uncharged yew staff. Normally when the quality/charges reaches '0' it just puts the staff back into inventory. I tried making a basic code for it to change back but only does so if you double click it. 'event == readied/unreadied' didn't seem to work for me. How can I make the staff change back to a normal yew staff immediately after the quality/charges hits '0'?
-it checks for the enchant spell, necessary reagents, and mana
-it 'charges' regular yew staff with the lightning spell (more will be avaliable but just testing this first) 10 charges
- it changes from 'yew staff' to 'yew staff - charged (lightning)' and it functions like a lightning wand.
That part functions just fine. What i'm having trouble doing is changing the 'yew staff - charged' back to a regular uncharged yew staff. Normally when the quality/charges reaches '0' it just puts the staff back into inventory. I tried making a basic code for it to change back but only does so if you double click it. 'event == readied/unreadied' didn't seem to work for me. How can I make the staff change back to a normal yew staff immediately after the quality/charges hits '0'?