
This code does not include the auras, you should add the effects and flags by yourself, i'll maybe post it later but this is not the subject of this topic.
In order to have it working, you'll have to increase the range of some vars like m_stDialogBoxInfo. We used 61 with Snoopy instead of 41... You can use this code without editing these vars but if you want to add the other Dialogs i'll post you must change it !
Update :
- Cannot use Slates on Heldenian Maps
<span style='color:red'>Step One, Add the definitions
Open Game.h</span>
Add this :
Code: Select all
// Slates Related functions - Diuuude
void bItemDrop_Slates();
void DlgBoxClick_Slates(short msX, short msY);
void DrawDialogBox_Slates(short msX, short msY, short msZ, char cLB);
// Slates Related vars - Diuuude
BOOL m_bUsingSlate;
<span style='color:red'>Step Two, Add the Net Messages IDs
Open NetMessages.h</span>
Add this :
Code: Select all
// Slates - Diuuude
#define DEF_NOTIFY_SLATE_CREATESUCCESS 0x0BC1
#define DEF_NOTIFY_SLATE_CREATEFAIL 0x0BC2
#define DEF_NOTIFY_SLATE_INVINCIBLE 0x0BD8
#define DEF_NOTIFY_SLATE_MANA 0x0BD9
#define DEF_NOTIFY_SLATE_EXP 0x0BE0
#define DEF_NOTIFY_SLATE_STATUS 0x0BE1
#define DEF_NOTIFY_SLATECLEAR 99
#define DEF_COMMONTYPE_REQ_CREATESLATE 0x0A61
<span style='color:red'>Step Three, Add the Texts
Open lan_eng.h</span>
Add this :
Code: Select all
// Slates - Diuuude
#define DEF_MSG_NOTIFY_SLATE_CREATESUCCESS "The ancient prophecy slate is completed."
#define DEF_MSG_NOTIFY_SLATE_CREATEFAIL "The slates are broken with a sharp clink."
#define DEF_MSG_NOTIFY_SLATECLEAR "The effect of the prophecy-slate is disappeared."
#define DEF_MSG_NOTIFY_SLATE_INVINCIBLE "You are invincible by divine protection of Kloness, the GOD OF JUSTICE."
#define DEF_MSG_NOTIFY_SLATE_MANA "Your mana will be refilled by great Wizard."
#define DEF_MSG_NOTIFY_SLATE_EXP "You've got the wisdom. Now, the amount of experience, wich you get from enermy, is icreased."
#define DEF_MSG_NOTIFY_SLATE_ALREADYUSING "You're already using another slate."
#define DEF_MSG_NOTIFY_SLATE_HELDENIAN "You cannot use Slates during Heldenian."
<span style='color:red'>Step Four, Add all the other Slates Related Code
Open game.cpp</span>
In CGame, Find this code:
Code: Select all
//»óÇÏ.....â°í ÀÚµ¿º¸°ü ÀÎÅÍÆäÀ̽º¿ë
m_stDialogBoxInfo[39].sX = 0;
m_stDialogBoxInfo[39].sY = 0;
m_stDialogBoxInfo[39].sSizeX = 291;
m_stDialogBoxInfo[39].sSizeY = 413;
Code: Select all
// Slates Dialog - Diuuude
m_stDialogBoxInfo[40].sX = 100;
m_stDialogBoxInfo[40].sY = 60;
m_stDialogBoxInfo[40].sSizeX = 180;
m_stDialogBoxInfo[40].sSizeY = 182;
Code: Select all
case 40:
DlgBoxClick_Slates(msX, msY);
break;
Code: Select all
case 40:
bItemDrop_Slates();
break;
Code: Select all
case 40:
DrawDialogBox_Slates(msX, msY, msZ, cLB);
break;
Code: Select all
// Create Slate Request - Diuuude
case DEF_COMMONTYPE_REQ_CREATESLATE:
*cp = (char)m_stDialogBoxInfo[40].sV1;
cp++;
*cp = (char)m_stDialogBoxInfo[40].sV2;
cp++;
*cp = (char)m_stDialogBoxInfo[40].sV3;
cp++;
*cp = (char)m_stDialogBoxInfo[40].sV4;
cp++;
*cp = (char)m_stDialogBoxInfo[40].sV5;
cp++;
*cp = (char)m_stDialogBoxInfo[40].sV6;
cp++;
iRet = m_pGSock->iSendMsg(cMsg, 18);
break;
Code: Select all
m_bItemUsingStatus = FALSE;
Code: Select all
m_bUsingSlate = FALSE;
In function EnableDialogBox, add this case:
Code: Select all
case 40:
if (m_bIsDialogEnabled[40] == FALSE) {
m_stDialogBoxInfo[40].sView = 0;
m_stDialogBoxInfo[40].cMode = cType;
m_stDialogBoxInfo[40].sV1 = -1;
m_stDialogBoxInfo[40].sV2 = -1;
m_stDialogBoxInfo[40].sV3 = -1;
m_stDialogBoxInfo[40].sV4 = -1;
m_stDialogBoxInfo[40].cStr[0] = 0;
m_stDialogBoxInfo[40].cStr[1] = 0;
m_stDialogBoxInfo[40].cStr[4] = 0;
m_stDialogBoxInfo[40].sSizeX = 180;
m_stDialogBoxInfo[40].sSizeY = 183;
DisableDialogBox(17);
DisableDialogBox(20);
DisableDialogBox(23);
DisableDialogBox(26);
}
break;
Code: Select all
case 40:
m_bIsItemDisabled[m_stDialogBoxInfo[40].sV1] = FALSE;
m_bIsItemDisabled[m_stDialogBoxInfo[40].sV2] = FALSE;
m_bIsItemDisabled[m_stDialogBoxInfo[40].sV3] = FALSE;
m_bIsItemDisabled[m_stDialogBoxInfo[40].sV4] = FALSE;
ZeroMemory(m_stDialogBoxInfo[40].cStr, sizeof(m_stDialogBoxInfo[40].cStr));
ZeroMemory(m_stDialogBoxInfo[40].cStr2, sizeof(m_stDialogBoxInfo[40].cStr2));
ZeroMemory(m_stDialogBoxInfo[40].cStr3, sizeof(m_stDialogBoxInfo[40].cStr3));
ZeroMemory(m_stDialogBoxInfo[40].cStr4, sizeof(m_stDialogBoxInfo[40].cStr4));
m_stDialogBoxInfo[40].sV1 = -1;
m_stDialogBoxInfo[40].sV2 = -1;
m_stDialogBoxInfo[40].sV3 = -1;
m_stDialogBoxInfo[40].sV4 = -1;
break;
Code: Select all
// Slates Messages - Diuuude
case DEF_NOTIFY_SLATE_CREATESUCCESS:
AddEventList( DEF_MSG_NOTIFY_SLATE_CREATESUCCESS, 10 );
break;
case DEF_NOTIFY_SLATE_CREATEFAIL:
AddEventList( DEF_MSG_NOTIFY_SLATE_CREATEFAIL, 10 );
break;
case DEF_NOTIFY_SLATECLEAR:
AddEventList( DEF_MSG_NOTIFY_SLATECLEAR, 10 );
m_bUsingSlate = FALSE;
break;
case DEF_NOTIFY_SLATE_INVINCIBLE:
AddEventList( DEF_MSG_NOTIFY_SLATE_INVINCIBLE, 10 );
m_bUsingSlate = TRUE;
break;
case DEF_NOTIFY_SLATE_MANA:
AddEventList( DEF_MSG_NOTIFY_SLATE_MANA, 10 );
m_bUsingSlate = TRUE;
break;
case DEF_NOTIFY_SLATE_EXP:
AddEventList( DEF_MSG_NOTIFY_SLATE_EXP, 10 );
m_bUsingSlate = TRUE;
break;
Code: Select all
switch (m_pItemList[cItemID]->m_sSpriteFrame) {
case 55:
if (m_cSkillMastery[12] == 0) {
AddEventList(BDLBBOX_DOUBLE_CLICK_INVENTORY9, 10);
}
else {
EnableDialogBox(26, 1, NULL, NULL, NULL);
AddEventList(BDLBBOX_DOUBLE_CLICK_INVENTORY10, 10);
}
break;
case 113:
if (m_cSkillMastery[13] == 0) {
AddEventList(BDLBBOX_DOUBLE_CLICK_INVENTORY11, 10);
}
else {
EnableDialogBox(26, 3, NULL, NULL, NULL);
AddEventList(BDLBBOX_DOUBLE_CLICK_INVENTORY12, 10);
}
break;
}
Code: Select all
switch (m_pItemList[cItemID]->m_sSpriteFrame) {
case 55:
if (m_cSkillMastery[12] == 0) {
AddEventList(BDLBBOX_DOUBLE_CLICK_INVENTORY9, 10);
}
else {
EnableDialogBox(26, 1, NULL, NULL, NULL);
AddEventList(BDLBBOX_DOUBLE_CLICK_INVENTORY10, 10);
}
break;
case 113:
if (m_cSkillMastery[13] == 0) {
AddEventList(BDLBBOX_DOUBLE_CLICK_INVENTORY11, 10);
}
else {
EnableDialogBox(26, 3, NULL, NULL, NULL);
AddEventList(BDLBBOX_DOUBLE_CLICK_INVENTORY12, 10);
}
break;
case 151:
case 152:
case 153:
case 154:
EnableDialogBox(40, 1, NULL, NULL, NULL);
break;
}