Am rescris functiile in urma unei cereri, pe alta comunitate, care suna cam asa:
"
How do i make request item for use certain emotions
Ex: For all emotion (sad/clap/angry...) don't request nothing.But for dancing to request mask emotion
"
Asa, ca...de lene, voi da copy-paste(mna... ) )
Daca cineva doreste postul initial:
"
How do i make request item for use certain emotions
Ex: For all emotion (sad/clap/angry...) don't request nothing.But for dancing to request mask emotion
"
Asa, ca...de lene, voi da copy-paste(mna... ) )
PHP:
First, you have to define a new request(in cmd_emotions.cpp). So for that
//Search:
#define TARGET_DISARM (1 << 5)
//and add bellow:
#define NEED_ITEM (1 << 6)
Then you have to insert that request, into emotions enum, so for that:
//Find and change:
// DANCE ->as requested..
{ "占쏙옙1", "dance1", NEED_ITEM, 1.0f },
{ "占쏙옙2", "dance2", NEED_ITEM, 1.0f },
{ "占쏙옙3", "dance3", NEED_ITEM, 1.0f },
{ "占쏙옙4", "dance4", NEED_ITEM, 1.0f },
{ "占쏙옙5", "dance5", NEED_ITEM, 1.0f },
{ "占쏙옙6", "dance6", NEED_ITEM, 1.0f },
//or include any other emotion, if you want to.
Now, change the can_emotion bool, like this:
bool CHARACTER_CanEmotion(CHARACTER& rch)
{
return true;
}
And finaly, do the item check, for dance_emotions:
//Search:
if (IS_SET(emotion_types[i].flag, WOMAN_ONLY) && SEX_MALE==GET_SEX(ch))
{
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("占쏙옙占쌘몌옙 占쏙옙 占쏙옙 占쌍쏙옙占싹댐옙."));
return;
}
//and add bellow:
if (IS_SET(emotion_types[i].flag, NEED_ITEM) && !ch->IsEquipUniqueItem(UNIQUE_ITEM_EMOTION_MASK))
{
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You need Emotion Mask for that...bla bla.")); //here you have to add your message
return;
}
Daca cineva doreste postul initial: