- Mesaj
- 12.062
- Çözümler
- 571
- Beğeni
- 14.471
- Puan
- 5.915
- Ticaret Puanı
- 2
Server/game/src/input_main.cpp açılır ve aratılır;
Altına şu kod eklenir:
Lua kodları:
Locale stringe ekleyin:
Sistemin çalıştığına dair kanıt;
C++:
int CInputMain::Chat(LPCHARACTER ch, const char * data, size_t uiBytes)
C++:
if (quest::CQuestManager::instance().GetEventFlag("ox_chat_engel") == 1)
{
if(ch->GetMapIndex() == 113 && (pinfo->type == CHAT_TYPE_TALKING || pinfo->type == CHAT_TYPE_PARTY || pinfo->type == CHAT_TYPE_GUILD || pinfo->type == CHAT_TYPE_SHOUT))
{
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ox konusmasi"));
return iExtraLen;
}
}
Lua kodları:
Lua (Quest):
quest ox_chat begin state start begin
when 20358.chat."OX Chat Engel" with pc.is_gm() begin
local durum = game.get_event_flag("ox_chat_engel")
if durum == 0 then
say("Chat engeli açmak istiyor musun?")
say("")
local ac = select(locale.yes,locale.no)
if ac == 1 then
say("Chat engel aktif.")
game.set_event_flag("ox_chat_engel",1)
end
else
say("Chat engeli kapamak istiyor musun?")
say("")
local ac = select(locale.yes,locale.no)
if ac == 1 then
say("Chat engel deaktif.")
game.set_event_flag("ox_chat_engel",0)
end
end
end
end
end
Locale stringe ekleyin:
Kod:
"ox konusmasi";
"|cffFFC125Ox mapinde yöneticiler izin vermediği sürece konusamazsın.";
Sistemin çalıştığına dair kanıt;