yew staff code

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

yew staff code

Post by agentorangeguy »

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'?
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: yew staff code

Post by marzo »

For event==readied/unreadied to work, you have to tick the 'usecode events' checkbox in shape information for the shape in question.
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: yew staff code

Post by agentorangeguy »

Ohhhhhhhh...i didn't even think of that. ok I'll try that, thanks!
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Locked