• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ Storage Value/ Show Description

krankthefunk

New Member
Joined
Jan 7, 2008
Messages
127
Reaction score
2
I'm making the quest Dreamer's Challenge for my OT and at the end of this quest you get to join either the Brotherhood or Nightmare Side.

I want to request a Code that show another description based on their storage value after the players Level.

Example:
00:47 You see Upalot. He is a sorcerer {level 5}. He is on the Brotherhood Side.
or
00:47 You see Upalot. He is a sorcerer {level 5}. He is on the Nightmare Side.

I was thinkin in C++, if you can delare storage.

local getStorageValue->player(98765)
If storage == 1
{
description="Nightmare Side"
}
elseif storage == 2 then
{
description="Brotherhood Side"
}


the function onLook in TFS doesn't work like what I wanted so I think its can only be done in source.

if someone has this code please help me

Thanks in advance
 
Yea ^^

on player.cpp after:

Code:
		else if(vocation_id != 0)
			s << " is " << vocation->getDescription();
		else
			s << " has no vocation";
	}

Add:

Code:
 		std::string strValue;
		if(getStorageValue(98765, strValue))
		{
                                  
            int32_t intValue = atoi(strValue.c_str());
			if(intValue && intValue == 1)
			{
				s << ", Nightmare Side.";
            } 
            else if (intValue && intValue == 2)
            {
                s << ", Brotherhood Side.";
            }                                 
        }

Rep++

Not tested
 
Back
Top