Heat-Resistant Boots? That's easy to script. Reminds me of my Ice Sickle. It's an ice sword that freezes water under it to Bridges (looks right in Iceworks style) and is disabled over Hot Tiles (instead of Oremites). Okay, it's completely the opposite, but whatever.
I'm not sure what you're requesting, but these boots are, like you said, easily scripted by using something like your example code in a Global Script NPC (nothing would go in the accessory's code). But it does need one main fix: An If.. Else will get rid of the annoying fact it only waits for a lower ID.
Imperative Global Script
Label Loop
If ...
Wait until var _Accessory = 20000
Set Var _HotTile = 2
Else
Set Var _HotTile = 5
If End
Wait 0
Go to Loop
Though only the title suggests this (no mention in the post) if you're asking that there could be a way to automatically reset vars on unequip (meaning that setting something like _HotTile on it would only affect Hot Tiles for as long as it's equipped), then I'm all for it. My suggested implementation:
Click here to view the secret text
×1. Include an Imperative Reset vars on unequip, which resets all changed vars when the equipment is lost. No, it wouldn't be something like Imperative Reset vars on end; if it worked for Monsters, then multiple instances of the same monster would change the variable spasmodically.
- or -
2. Allow Wait for defeat to handle equipment. Much simpler to imagine, but something tels me that the way the game is programmed won't let it work.
- or -
3. Set up an event handler (like Each Attack) for when an NPC object is destroyed (internally speaking). It could be something like At End, and it will execute immediately as the NPC is killed, ended, unequipped (if it is equipment), or whenever else the NPC is destroyed internally. The code executed for At End would be whatever takes 1 turn (a Wait 0 can end it).
Method 3 is undoubtedly my favorite.
Here's how the code for the accessory would look with these.
Click here to view the secret text
× Imperative Reset vars on end
Set Var _HotTile - 3
---
Set Var _HotTile - 3
Wait for defeat
Set Var _HotTile + 3
Equipment Destroy Accessoy
---
Set Var _HotTile - 3
At End Reset
Go to Wait
Label Reset
Set Var _HotTile + 3
Wait 0
Label Wait
____________________________
Also known as ExpHP everywhere else.
[Last edited by Kwakstur at 12-20-2008 04:42 AM]