Items Scripts
NWN Script: glow_when_mob.htm
| Author | Sticky: Post Working Scripts Here |
| Calidarien | Posted: Thursday, 27 June 09:24AM |
| There have been requests on the board for a
weapon like Sting from the Hobbit. That is, if a certain enemy is the
vicinity, then the sword should glow. However, I have failed to figure out
how to apply spell effects to swords, so I wrote a script that makes the
wielder glow instead. Close enough, perhaps. Currently, if a PC (though my script should be general enough for NPCs as well; haven't tested that) is wielding the sword with the appropriate tag ("CAL_SWORD") in either hand, then when the PC is rather close to an object of the appropriate tag ("CAL_COW"), the PC will start pulsating between white and red. This is the paralyzed visual effect, which is cool, and has the bonus that the PC should know whether he is paralyzed or it's actually the sword's effect. Since this is an OnHeartbeat script, you sometimes have to wait a bit for the glowing to start and to stop. However, since in most applications of this script, the distances to check will probably be beyond perception range, that delay shouldn't be a problem. I have declared at the beginning of the script all the variables that users of the script will want to modify to fit their modules. 1. Script Name: cal_glow 2. What It Does: Wielder of a weapon glows when a certain object is near 3. Notes: Call this script OnHeartbeat, and make sure you have a weapon and an object with tags matching those in the script. Then play around with the glowing. 4. The Script Itself:
|
|
All Items Scripts
📄 aquire_time
📄 bead_of_force
📄 book_of_inf_spells
📄 clear_inventory
📄 clear_inventory_002
📄 clear_inventory_003
📄 clear_inventory_004
📄 cursed_items
📄 cursed_items_002
📄 cursed_potion
📄 give_xp
📄 glow_when_mob
📄 healing_belt
📄 helm
📄 hurled_weapons
📄 item_weight
📄 key_rental
📄 lore_items
📄 npc_owners
📄 random_magic
📄 retrieve_ammo
📄 scimitar_of_dancing
📄 scroll_creation
📄 spawn_item
📄 spawn_item_002
📄 spawn_item_004
📄 stone_of_recall
📄 stone_of_recall_002
📄 summon_creature
📄 teleport_item
📄 torch
📄 weapon_upgrade