NPC Random lightsaber colors

veaseomat

New Member
Joined
Jan 10, 2011
Messages
9
#1
I figured out how to give NPC's random lightsaber colors this morning.

in MMOCoreORB/src/server/zone/objects/creature/ai/AiAgentImplementation.cpp

on line 196 before

readyWeapon = weao;


add this

Locker locker(weao);
if (weao->isJediWeapon()) {
int color = System::random(30);
weao->setBladeColor(color);
weao->setCustomizationVariable("/private/index_color_blade", color, true);
}

in the future i might go a step further and give dark jedi only red and light jedi the rest BUT for now im super happy to see anything other than just red on npc jedi lol.

ENJOY
-Veaseomat
 
Joined
Mar 26, 2015
Messages
140
#2
Now that is cool. Thanks for the contribution! Had to do the image. Had it sitting around never had a chance to use it lol. Not calling you a Kyle. Definitely appreciate the contribution to the community.

4z9lq2.jpg