WoR_PRC8/_module/nss/tk_odye_at_set_i.nss
Jaysyn904 b5e28e52f4 Initial commit
Initial commit [1.18]
2025-04-03 11:49:34 -04:00

22 lines
478 B
Plaintext

// Krit's Omnidye
// Sets the dye based on the (standard) index selection.
#include "tk_odye_include"
void main()
{
// Get the dye that will be set.
object oDye = GetLocalObject(OBJECT_SELF, DYE_ITEM);
// Get the dye's index.
int nColor = GetLocalInt(OBJECT_SELF, DYE_SELECTION);
// Set the color index to be used by the dying scripts.
SetLocalInt(oDye, DYE_INDEX, nColor);
// Rename the dye to be informative.
SetDyeName(oDye, nColor);
}