Auto-disarm to cast

For questions relating to POL scripting (not necessarily related to WoD)

Moderators: Siobhan, Sebastian, Drocket

Auto-disarm to cast

Postby SDonald on Mon Dec 22, 2003 8:27 am

Drocket,
I thought I'd check with you before I gave up on this.

I wanted to have autodisam of a weapon if the player tried to cast. Unfortunately it appears if you cast from the spellbook the core does an automatic blocksCastingIfInHand check in the itemdesc file before the script is run.

Can you think of a way around this?

Regards,
Stephen Donald.
SDonald
Regular Poster
 
Posts: 102
Joined: Fri Oct 11, 2002 7:47 am
Location: Australia

Postby SDonald on Mon Dec 22, 2003 8:39 am

Maybe make blocksCastingIfInHand 0 for all weapons and make it a cprop in all the itemdesc entries and then edit FreeHands function in magic.inc to search for a cprop of the renamed entry. (and manastone.src too!)
That way the core never even gets to check it.

Bah.. sorry to think out loud.... :)
I think I will try this!
SDonald
Regular Poster
 
Posts: 102
Joined: Fri Oct 11, 2002 7:47 am
Location: Australia

Postby Drocket on Mon Dec 22, 2003 10:25 am

Yep, that should work. Or you could just wait for POL 0.96 :)

One thing, though: I don't think you mean add a CProp, because that would put the property on all the items in the world, wasting a lot of RAM. You probably just want to add an itemdesc.cfg entry. That's probably what you mean, though.
Drocket
Site Admin
 
Posts: 820
Joined: Mon Oct 07, 2002 2:54 am

Postby SDonald on Mon Dec 22, 2003 11:28 am

Thanks... well yes it did work.
I had edited my reply to myself a few times, it's a wonder it made sense at all.
Testing for those inevitable unexpected side-effect now.
I regret posting before I thought about it now!

096 will have to wait. My custom map has too many issues converting it.


Regards,
Stephen Donald.
SDonald
Regular Poster
 
Posts: 102
Joined: Fri Oct 11, 2002 7:47 am
Location: Australia


Return to Scripting Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron