I
Icy
Guest
Hello any potential thread readers, let me just tell you that I've been trying to figure this out for about two and a half hours now (currently 5:05 AM here :blink
. Let me explain my dilemma:
The recent `doPlayerSetSpecialDescription` function was removed and as a result, one of my custom scripts that I was heavily working on got basically butt-fucked. I know that in player.cpp around lines 184-217 has this tidbit of code in it:
And I'm wondering how I would insert a value based on what variables I have declared in an LUA creaturescript.
I know where I need to put it already
My LUA table looks somewhat like this:
Bonus points if you can figure out how to display it in ADJECTIVE[1] colour (if that's even possible!).
Thanks in advance
The recent `doPlayerSetSpecialDescription` function was removed and as a result, one of my custom scripts that I was heavily working on got basically butt-fucked. I know that in player.cpp around lines 184-217 has this tidbit of code in it:
Code:
184 {
185 s << nameDescription;
186 if(!hasCustomFlag(PlayerCustomFlag_HideLevel))
187 s << " (Level " << level << ")";
188
189 s << ". " << (sex % 2 ? "He" : "She");
190 if(hasFlag(PlayerFlag_ShowGroupNameInsteadOfVocation))
191 s << " is " << group->getName();
192 else if(vocation_id != 0)
193 s << " is " << vocation->getDescription();
194 else
195 s << " has no profession";
196
... s << getSpecialDescription();
... }
...
... std::string tmp;
... if(marriage && IOLoginData::getInstance()->getNameByGuid(marriage, tmp))
... {
... s << ", ";
... if(vocation_id == 0)
... {
... if(lookDistance == -1)
... s << "and you are";
... else
... s << "and is";
...
... s << " ";
... }
...
... s << (sex % 2 ? "husband" : "wife") << " of " << tmp;
... }
...
... s << ".";
And I'm wondering how I would insert a value based on what variables I have declared in an LUA creaturescript.
I know where I need to put it already
but unsure how I would go about implementing it, any help?Line 187 said:s << (sex % 2 ? "he" : "she") << " is insertLuaVariableHere (Level " << level << ")";
My LUA table looks somewhat like this:
LUA:
local ADJECTIVE, MAX_ADJECTIVE = {
[0] = {210, ""},
[1] = {190, "awesome"},
[2] = {45, "prosauce"}
}, 2
Bonus points if you can figure out how to display it in ADJECTIVE[1] colour (if that's even possible!).
Thanks in advance