Mostrar posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Robins

Paginas: [1] 2 3
1
Sources Generales / Re: Source OgocX S1, S2, S4, S6 (VS 2022)
« Posteado: July 06, 2023, 12:29:28 PM »
Can someone give me the database sql 2008 r2. Thank you.

2
Sources Generales / Re: SSEMU 2.0.7 [ PACKAGE ]
« Posteado: July 05, 2023, 12:29:58 AM »
How can I install the DB into SQL 2008 R2 ?
tạo DB rồi chạy DB trong thư mục DB đó bác
À được rồi bác cảm ơn bác nhiều.

3
Sources Generales / Re: SSEMU 2.0.7 [ PACKAGE ]
« Posteado: July 04, 2023, 09:38:59 AM »
How can I install the DB into SQL 2008 R2 ?

4
Papelera de reciclaje General / Re: TEST CHAT GPT INGAME =))
« Posteado: March 29, 2023, 12:22:23 PM »
Làm câu hỏi cho newbie thì ngon kiểu như muốn hỏi cách làm nv cấp 3 hoặc là những câu hỏi mà newbie không biết thì hay.

5
Launcher / Re: SOURCER LAUNCHER + CORREÇOES 100% STAVEL NO VIRUS
« Posteado: February 05, 2023, 08:02:22 AM »
I also edited on this source but it is not popular. This is the version I designed.  :(




6
Sources Generales / Re: Unicode Lang 1.04D && 1.04E
« Posteado: March 19, 2022, 10:16:31 AM »
Existe uma versão vietnamita, por favor? Para mim, por favor, obrigado.

7
Sources Generales / Re: Share DropAll for User Online Source
« Posteado: March 19, 2022, 05:59:57 AM »
Dùng được nhưng làm sao để cho mình ADM dùng được lệnh đó vậy ạ. Thành viên thường cũng có thể dùng được lệnh này ?

Funciona, mas como posso fazer com que o ADM use esse comando? Membros regulares também podem usar este comando?

It works, but how can I get ADM to use that command? Can regular members also use this command?

Bạn sửa lại ở command.txt là được

Data mình không có sài command.txt mà sài Message.txt ạ :((
HELP

8
Papelera de reciclaje General / Re: pin the mouse, auto-move ^^!
« Posteado: March 18, 2022, 03:32:54 AM »
Onde você coloca o código? Obrigada.

9
Sources Generales / Re: Share DropAll for User Online Source
« Posteado: March 18, 2022, 02:16:14 AM »
Dùng được nhưng làm sao để cho mình ADM dùng được lệnh đó vậy ạ. Thành viên thường cũng có thể dùng được lệnh này ?

Funciona, mas como posso fazer com que o ADM use esse comando? Membros regulares também podem usar este comando?

It works, but how can I get ADM to use that command? Can regular members also use this command?

Bạn sửa lại ở command.txt là được

Data mình không có sài command.txt mà sài Message.txt ạ :((

10
Sources Generales / Re: Share DropAll for User Online Source
« Posteado: March 18, 2022, 01:29:43 AM »
Dùng được nhưng làm sao để cho mình ADM dùng được lệnh đó vậy ạ. Thành viên thường cũng có thể dùng được lệnh này ?

Funciona, mas como posso fazer com que o ADM use esse comando? Membros regulares também podem usar este comando?

It works, but how can I get ADM to use that command? Can regular members also use this command?

11
Sources Generales / Re: Custom Pets [1.04E] Fixeado [COMPLETO]
« Posteado: March 17, 2022, 12:40:35 PM »
Alguém pode me ajudar.
"// Fix
struct PMSG_ITEM_CHANGE_RECV
{
   PBMSG_HEAD header; // C1:25
   BYTE index[2];
   BYTE ItemInfo[MAX_ITEM_INFO];
};"

Eu recebi o erro "erro C4430: especificador de tipo ausente - int assumido. Nota: C++ não suporta default-int"
"erro C2146: erro de sintaxe: ausente ';' antes do identificador 'header'" e "erro C2011: 'PMSG_ITEM_CHANGE_RECV': redefinição do tipo 'struct'"






12
Sources Generales / Re: Guild Logo Name Player - Season 3 1.04j
« Posteado: March 16, 2022, 02:34:34 PM »
Existe uma fonte para 1.04E?

13
Sources Generales / Re: Source Auto Login Button (1.04e/S6) - Kapocha
« Posteado: March 16, 2022, 02:14:20 PM »
alguem me orienta onde colocar esse codigo com "LoadBitmapA("Interface\\login_auto.tga", 531141, GL_NEAREST, GL_CLAMP, 1, 0);" Não sou muito boa nisso

Interface.cpp

busca > "LoadBitmapA"
obrigado, mas no meu Interface.cpp não há palavra LoadBitmapA

Segue ai meu amigo e vai da certo


Obrigada. Mas meu código fonte não tem esses

Code: [Select]
#include "stdafx.h"
#include "Interface.h"
#include "TMemory.h"
#include "Protocol.h"
#include "Offset.h"
#include "User.h"
#include "Import.h"
#include "Defines.h"
#include "Camera.h"
#include "Fog.h"
#include "Other.h"
#include "Graphics.h"
#include "Glow.h"
#include "ChatExpanded.h"
#include "Reconnect.h"
#include "Config.h"
#include "CustomMessage.h"
#include "CustomEventTime.h"
#include "post_item.h"
#include "inter3.h"

Interface gInterface;
DWORD CharacterInfoExtern_Buff;
char CharacterInfoExtern_LevelBuff[80];
DWORD AddSomeShine_Buff;
DWORD AddSomeShine_Pointer;
bool Checkbox = true;

Interface::Interface()
{
ZeroMemory(this->Data, sizeof(this->Data));
}
Naked(AddSomeShine)
{
_asm
{
mov eax, dword ptr ds:[ecx + 0x30]
mov AddSomeShine_Buff, eax
}

if( AddSomeShine_Buff == 349 || AddSomeShine_Buff == 406 || AddSomeShine_Buff == 407 || AddSomeShine_Buff == 408 )
{
_asm
{
mov AddSomeShine_Buff, 0x005E4979
jmp AddSomeShine_Buff
}
}
else
{
_asm
{
mov AddSomeShine_Buff, 0x005E4A3C
jmp AddSomeShine_Buff
}
}
}

void Interface::Load()
{
/* this->BindObject(eSkillBox, iNewSkillBox, 32, 38, 305, 443);
// this->BindObject(eDragonLeft, iDragonLeft, 108, 45, 0, 388);
// this->BindObject(eDragonRight, iDragonRight, 108, 45, 532, 388);
// this->BindObject(eParty, iNewParty, 25, 25, 348, 449);
this->BindObject(eCharacter, iNewCharacter, 25, 25, 379, 449);
this->BindObject(eInventory, iNewInventory, 25, 25, 409, 449);
this->BindObject(eFriend, iNewWinpush, 54, 20, 581, 432);
this->BindObject(eFastMenu, iNewFastMenu, 55, 21, 5, 432);
*/
//--
this->BindObject(eSAMPLEBUTTON, 0x7AA4, 16, 15, 175, 1);
this->BindObject(eCheck, 0x9991, 15, 15, -1, -1);
this->BindObject(eUnCheck, 0x9992, 15, 15, -1, -1);
this->BindObject(eTIME, 0x787E, 80, 20, 174, 0);
this->BindObject(eOFFATTACK_BUTTON, 0x787F, 16, 12, -1, -1);
this->BindObject(eOPTIONS_BUTTON, 0x787D, 16, 12, -1, 1);
//---
this->BindObject(eCAMERA_MAIN, 0x787A, 93, 18, 174, 0);
this->BindObject(eCAMERA_BUTTON1, 0x787B, 16, 12, -1, -1);
this->BindObject(eCAMERA_BUTTON2, 0x787C, 16, 12, -1, -1);
//this->BindObject(eLOGO, 0x9989, 63.3, 50, 192.5, 1);
this->BindObject(eSHOP_WC, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_WP, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_GP, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_B, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_S, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_C, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_L, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_Cr, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_G, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_Gem, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_H, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_R, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_OFF, 0x7C04, 36, 27, -1, -1);
//---
this->BindObject(eOFFPANEL_MAIN, 0x7A5A, 222, 120, -1, -1);
this->BindObject(eOFFPANEL_TITLE, 0x7A63, 230, 67, -1, -1);
this->BindObject(eOFFPANEL_FRAME, 0x7A58, 230, 15, -1, -1);
this->BindObject(eOFFPANEL_FOOTER, 0x7A59, 230, 50, -1, -1);
this->BindObject(eOFFPANEL_YES, 0x7B12, 54, 30, -1, -1);
this->BindObject(eOFFPANEL_CANE, 0x7B0C, 54, 30, -1, -1);
//---
this->BindObject(eOFFATTACK_MAIN, 0x7A5A, 222, 120, -1, -1);
this->BindObject(eOFFATTACK_TITLE, 0x7A63, 230, 67, -1, -1);
this->BindObject(eOFFATTACK_FRAME, 0x7A58, 230, 15, -1, -1);
this->BindObject(eOFFATTACK_FOOTER, 0x7A59, 230, 50, -1, -1);
this->BindObject(eOFFATTACK_YES, 0x7B12, 54, 30, -1, -1);
this->BindObject(eOFFATTACK_CANE, 0x7B0C, 54, 30, -1, -1);
//---
this->BindObject(eUSERSPANEL_MAIN, 0x7A5A, 222, 256, -1, -1);
this->BindObject(eUSERSPANEL_TITLE, 0x7A63, 230, 67, -1, -1);
this->BindObject(eUSERSPANEL_FRAME, 0x7A58, 230, 15, -1, -1);
this->BindObject(eUSERSPANEL_FOOTER, 0x7A59, 230, 50, -1, -1);
this->BindObject(eUSERSPANEL_DIV, 0x7A62, 223, 21, -1, -1);
this->BindObject(eUSERSPANEL_OPTION, 0x7B68, 10, 10, -1, -1);
this->BindObject(eUSERSPANEL_LINE, 0x7B67, 154, 2, -1, -1);
this->BindObject(eUSERSPANEL_BUTTON, 0x9994, 40, 19, -1, -1);
this->BindObject(eUSERSPANEL_BUTTON1, 0x9994, 40, 19, -1, -1);
this->BindObject(eUSERSPANEL_BUTTON2, 0x9994, 40, 19, -1, -1);
this->BindObject(eUSERSPANEL_FOG, 0x9991, 15, 15, -1, -1);
this->BindObject(eUSERSPANEL_CLOSE, 0x7A5E, 128, 29, -1, -1);
this->BindObject(eUSERSPANEL_HPBAR, 0x9991, 15, 15, -1, -1);
this->BindObject(eUSERSPANEL_RANKHIDE, 0x9991, 15, 15, -1, -1);
this->BindObject(eUSERSPANEL_TRONGLOW, 0x9991, 15, 15, -1, -1);
this->BindObject(eUSERSPANEL_CHAT, 0x9991, 15, 15, -1, -1);
this->BindObject(eUSERSPANEL_MINIMAP, 0x9991, 15, 15, -1, -1);
this->BindObject(eUSERSPANEL_CAMERA, 0x9991, 15, 15, -1, -1);
//--
//Command info
this->BindObject(eEventTime_MAIN, 0x789F, 222, 195, -1, -1);
this->BindObject(eEventTime_CLOSE, 0x7EC5, 36, 29, -1, -1);

//---
this->Data[eTIME].OnShow = true;
this->showMiniMap = false;
//SetOp((LPVOID)oAllowGUI_Call1, this->AllowGUI, ASM::CALL);
//SetOp((LPVOID)oAllowGUI_Call2, this->AllowGUI, ASM::CALL);
SetOp((LPVOID)oDrawInterface_Call, this->Work, ASM::CALL);
SetOp((LPVOID)oLoadSomeForm_Call, this->LoadImages, ASM::CALL);
SetOp((LPVOID)0x00633FFB, this->LoadModels, ASM::CALL);
SetOp((LPVOID)0x00842468, this->PShopTextInfo, ASM::CALL);
//==========================================
// - Remove Texts PShop
//==========================================
SetRange((LPVOID)0x00842086, 5, ASM::NOP);
SetRange((LPVOID)0x0084234F, 5, ASM::NOP);
SetRange((LPVOID)0x008423C3, 5, ASM::NOP);
// - Draw Post Item
 this->item_post_ = nullptr;
 SetOp((LPVOID)oDrawInterface2_Call, this->Work2, ASM::CALL);
}
void Interface::Work()
{
gInterface.DrawTimeUI();
gObjUser.Refresh();
gCamera.Rotate();
gCamera.Position();
//--
ReconnectMainProc();
gInterface.DrawOffAttack();
gInterface.DrawPSHOP_OFFMODE();
gInterface.DrawUsersPanelWindow();
gInterface.DrawCameraUI();
pDrawInterface();
//--
gCustomEventTime.DrawEventTimePanelWindow();
}
int Interface::PShopTextInfo(int pThis)
{
gInterface.DrawPSHOP();
// ---
return pPShopTextInfo(pThis);
}
void Interface::LoadImages()
{
/* pLoadImage("Custom\\Interface\\s3\\2Menu01_new.jpg", 31292, GL_LINEAR, GL_CLAMP, 1, 0); //replace
pLoadImage("Custom\\Interface\\s3\\2Menu02.jpg", 31293, GL_LINEAR, GL_CLAMP, 1, 0); //replace
pLoadImage("Custom\\Interface\\s3\\2Menu03_new.jpg", 31294, GL_LINEAR, GL_CLAMP, 1, 0); //replace
pLoadImage("Custom\\Interface\\s3\\none.tga", 31295, GL_LINEAR, GL_CLAMP, 1, 0); //replace
pLoadImage("Custom\\Interface\\s3\\2Menu_Red.jpg", 0x7A42, GL_LINEAR, GL_CLAMP, 1, 0);//replace
pLoadImage("Custom\\Interface\\s3\\2Menu_Green.jpg", 0x7A41, GL_LINEAR, GL_CLAMP, 1, 0);//replace
pLoadImage("Custom\\Interface\\s3\\2Menu_Blue.jpg", 0x7A40, GL_LINEAR, GL_CLAMP, 1, 0);//replace
// pLoadImage("Custom\\Interface\\s3\\2Menu04.tga", iDragonLeft, GL_LINEAR, GL_CLAMP, 1, 0);
// pLoadImage("Custom\\Interface\\s3\\2Menu05.tga", iDragonRight, GL_LINEAR, GL_CLAMP, 1, 0);
pLoadImage("Custom\\Interface\\s3\\2Menu_Inventory.jpg", iNewInventory, GL_LINEAR, GL_CLAMP, 1, 0);
pLoadImage("Custom\\Interface\\s3\\2Menu_Character.jpg", iNewCharacter, GL_LINEAR, GL_CLAMP, 1, 0);
// pLoadImage("Custom\\Interface\\s3\\2Menu_Party.jpg", iNewParty, GL_LINEAR, GL_CLAMP, 1, 0);
pLoadImage("Custom\\Interface\\s3\\2win_push.jpg", iNewWinpush, GL_LINEAR, GL_CLAMP, 1, 0);
pLoadImage("Custom\\Interface\\s3\\2menu01_new2.jpg", iNewFastMenu, GL_LINEAR, GL_CLAMP, 1, 0);
pLoadImage("Custom\\Interface\\s3\\2SkillBox.jpg", iNewSkillBox, GL_LINEAR, GL_CLAMP, 1, 0);
*/
//--
pLoadImage("Interface\\TimeBar.tga", 0x787E, 0x2601, 0x2901, 1, 0);
pLoadImage("Interface\\CameraUI_BG.tga", 0x787A, 0x2601, 0x2900, 1, 0);
pLoadImage("Interface\\CameraUI_Switch.tga", 0x787B, 0x2601, 0x2900, 1, 0);
pLoadImage("Interface\\CameraUI_Reset.tga", 0x787C, 0x2601, 0x2900, 1, 0);
pLoadImage("Interface\\OffAttack_Switch.tga", 0x787F, 0x2601, 0x2900, 1, 0);
pLoadImage("Interface\\MacroSetup.tga", 0x787D, 0x2601, 0x2900, 1, 0);
//--
pLoadImage("Interface\\EventTime.tga", 0x789F, 0x2601, 0x2900, 1, 0);
// logo
//pLoadImage("Custom\\logo\\mwebgame.tga", 0x9989, 0x2601, 0x2900, 1, 0);
// MiniMap
pLoadImage("Interface\\check.jpg", 0x9991, 0x2601, 0x2900, 1, 0);
pLoadImage("Interface\\uncheck.jpg", 0x9992, 0x2601, 0x2900, 1, 0);
pLoadImage("Interface\\button.tga", 0x9994, 0x2601, 0x2900, 1, 0);
//--
//Here animation for cape. Wing 214.bmd for display only item in Inventory
pLoadImage("Item\\Newdeath01.tga", 0x789C, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\Newdeath02.tga", 0x789D, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\darklordwing4dd.tga", 0x78A5, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\darklordwing4de.tga", 0x78A6, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\ragefighterwing4db.tga", 0x78A8, 0x2601, 0x2900, 1, 0);
//--
pLoadImage("Item\\growlancerwing4dc.tga", 0x78A9, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\Item801_2_wing.tga", 0x78B1, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\Item802_2_wing.tga", 0x78B2, 0x2601, 0x2900, 1, 0);
//--
pLoadImage("Item\\NCcapeSmall.tga", 0x78B3, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\DarkLordRobeSmall.tga", 0x78B4, 0x2601, 0x2900, 1, 0);
//--
pLoadImage("Item\\darklordwing4ddmr.tga", 0x78B5, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\darklordwing4demr.tga", 0x78B6, 0x2601, 0x2900, 1, 0);
//--
pLoadSomeForm();
}
void Interface::LoadModels()
{
pInitModelData2();
}
void Interface::BindObject(short MonsterID, DWORD ModelID, float Width, float Height, float X, float Y)
{
this->Data[MonsterID].EventTick = 0;
this->Data[MonsterID].OnClick = false;
this->Data[MonsterID].OnShow = false;
this->Data[MonsterID].ModelID = ModelID;
this->Data[MonsterID].Width = Width;
this->Data[MonsterID].Height = Height;
this->Data[MonsterID].X = X;
this->Data[MonsterID].Y = Y;
this->Data[MonsterID].MaxX = X + Width;
this->Data[MonsterID].MaxY = Y + Height;
this->Data[MonsterID].Attribute = 0;
}
void Interface::DrawSampleButton()
{
float PosX = this->GetResizeX(eSAMPLEBUTTON);

if( this->CheckWindow(ObjWindow::CashShop)
|| this->CheckWindow(ObjWindow::FullMap)
|| this->CheckWindow(ObjWindow::SkillTree)
|| this->CheckWindow(MoveList) )
{
return;
}

this->DrawGUI(eSAMPLEBUTTON, PosX, 1);

if( !IsWorkZone(eSAMPLEBUTTON) )
{
return;
}

this->DrawToolTip(PosX - 5, 31, "Button tooltip");

if( this->Data[eSAMPLEBUTTON].OnClick )
{
this->DrawColoredGUI(eSAMPLEBUTTON, PosX, 1, pMakeColor(40, 20, 3, 130));
return;
}

this->DrawColoredGUI(eSAMPLEBUTTON, PosX, 1, pMakeColor(255, 204, 20, 130));
}
void Interface::EventSampleButton(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSAMPLEBUTTON].EventTick);

if( this->CheckWindow(CashShop) || this->CheckWindow(FullMap)
|| this->CheckWindow(SkillTree) || this->CheckWindow(MoveList)
|| !IsWorkZone(eSAMPLEBUTTON) )
{
return;
}

if( Event == WM_LBUTTONDOWN )
{
this->Data[eSAMPLEBUTTON].OnClick = true;
return;
}

this->Data[eSAMPLEBUTTON].OnClick = false;

if( Delay < 500 )
{
return;
}

this->Data[eSAMPLEBUTTON].EventTick = GetTickCount();

if( !this->Data[eRANK_MAIN].OnShow )
{
this->Data[eRANK_MAIN].OnShow = true;
}
else
{
this->Data[eRANK_MAIN].OnShow = false;
}
}
void Interface::DrawCameraUI()
{
float PosX = this->GetResizeX(eCAMERA_MAIN);
// ----
if (this->CheckWindow(CashShop)
|| this->CheckWindow(SkillTree)
|| this->CheckWindow(FullMap)
|| this->CheckWindow(MoveList)
|| (this->CheckWindow(Inventory)
&& this->CheckWindow(ExpandInventory)
&& this->CheckWindow(Store))
|| (this->CheckWindow(Inventory)
&& this->CheckWindow(Warehouse)
&& this->CheckWindow(ExpandWarehouse)))
{
return;
}
// ----
this->DrawGUI(eCAMERA_MAIN, PosX, 0);
this->DrawGUI(eCAMERA_BUTTON1, PosX + 18.5, 1);
this->DrawGUI(eCAMERA_BUTTON2, PosX + 37.0, 1);
//this->DrawGUI(eLOGO, PosX + 370, 20);
this->DrawGUI(eOFFATTACK_BUTTON, PosX + 0.5, 1.5);
this->DrawGUI(eOPTIONS_BUTTON, PosX + 55.5, 1.5);
// ----
if (gCamera.IsActive)
{
this->DrawColoredGUI(eCAMERA_BUTTON1, PosX + 18.5, 1, eShinyGreen);
}
// ----
if (IsWorkZone(eCAMERA_BUTTON1))
{
if (gCamera.IsActive)
{
this->DrawToolTip(PosX + 18.5 - 5, 25, "Zoom: %02.f%%", gCamera.ZoomPercent);
}
else
{
this->DrawToolTip(PosX + 18.5 - 5, 25, gCustomMessage.GetMessageB(3243));
}
// ----
if (this->Data[eCAMERA_BUTTON1].OnClick)
{
this->DrawColoredGUI(eCAMERA_BUTTON1, PosX + 18.5, 1, pMakeColor(40, 20, 3, 130));
return;
}
// ----
this->DrawColoredGUI(eCAMERA_BUTTON1, PosX + 18.5, 1, pMakeColor(255, 204, 20, 200));
}
else if (IsWorkZone(eCAMERA_BUTTON2))
{
this->DrawToolTip(PosX + 37.0 - 5, 25, gCustomMessage.GetMessageB(3242));
// ----
if (this->Data[eCAMERA_BUTTON2].OnClick)
{
this->DrawColoredGUI(eCAMERA_BUTTON2, PosX + 37.0, 1, pMakeColor(40, 20, 3, 130));
return;
}
// ----
this->DrawColoredGUI(eCAMERA_BUTTON2, PosX + 37.0, 1, pMakeColor(255, 204, 20, 200));
}

// ----
else if (IsWorkZone(eOFFATTACK_BUTTON))
{
{
this->DrawToolTip(PosX + 0.5 - 5, 25, gCustomMessage.GetMessageB(3241));
}
// ----
if (this->Data[eOFFATTACK_BUTTON].OnClick)
{
this->DrawColoredGUI(eOFFATTACK_BUTTON, PosX + 0.5, 1.5, pMakeColor(40, 20, 3, 130));
return;
}
// ----
this->DrawColoredGUI(eOFFATTACK_BUTTON, PosX + 0.5, 1.5, pMakeColor(250, 125, 50, 200));
}
// ----
else if (IsWorkZone(eOPTIONS_BUTTON))
{
{
this->DrawToolTip(PosX + 55.5 - 5, 25, gCustomMessage.GetMessageB(3240)); //Advanced Options

}
// ----
if (this->Data[eOPTIONS_BUTTON].OnClick)
{
this->DrawColoredGUI(eOFFATTACK_BUTTON, PosX + 55.5, 1.5, pMakeColor(40, 20, 3, 130));
return;
}
// ----
this->DrawColoredGUI(eOPTIONS_BUTTON, PosX + 55.5, 1.5, pMakeColor(255, 204, 20, 200));
}
// ----
}
// ----------------------------------------------------------------------------------------------
void Interface::EventCameraUI(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
// ----
if (this->CheckWindow(CashShop)
|| this->CheckWindow(SkillTree)
|| this->CheckWindow(FullMap)
|| this->CheckWindow(MoveList)
|| (this->CheckWindow(Inventory)
&& this->CheckWindow(ExpandInventory)
&& this->CheckWindow(Store))
|| (this->CheckWindow(Inventory)
&& this->CheckWindow(Warehouse)
&& this->CheckWindow(ExpandWarehouse)))
{
return;
}
// ----
if (IsWorkZone(eCAMERA_BUTTON1))
{
DWORD Delay = (CurrentTick - this->Data[eCAMERA_BUTTON1].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eCAMERA_BUTTON1].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eCAMERA_BUTTON1].OnClick = false;
pSetCursorFocus = false;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eCAMERA_BUTTON1].EventTick = GetTickCount();
// ----
gCamera.Switch();
}
else if (IsWorkZone(eCAMERA_BUTTON2))
{
DWORD Delay = (CurrentTick - this->Data[eCAMERA_BUTTON2].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eCAMERA_BUTTON2].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eCAMERA_BUTTON2].OnClick = false;
pSetCursorFocus = false;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eCAMERA_BUTTON2].EventTick = GetTickCount();
// ----
gCamera.Init();
}

// ----
else if (IsWorkZone(eOFFATTACK_BUTTON))
{
DWORD Delay = (CurrentTick - this->Data[eOFFATTACK_BUTTON].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eOFFATTACK_BUTTON].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eOFFATTACK_BUTTON].OnClick = false;
pSetCursorFocus = false;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eOFFATTACK_BUTTON].EventTick = GetTickCount();
// ----
OpenOffAttackWindow();
}
// ----
else if (IsWorkZone(eOPTIONS_BUTTON))
{
DWORD Delay = (CurrentTick - this->Data[eOPTIONS_BUTTON].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eOPTIONS_BUTTON].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eOPTIONS_BUTTON].OnClick = false;
pSetCursorFocus = false;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eOPTIONS_BUTTON].EventTick = GetTickCount();
// ----
gInterface.OpenUsersPanelWindow();
}
}
// ----------------------------------------------------------------------------------------------
bool Interface::CheckWindow(int WindowID)
{
return pCheckWindow(pWindowThis(), WindowID);
}
int Interface::CloseWindow(int WindowID)
{
return pCloseWindow(pWindowThis(), WindowID);
}
int Interface::OpenWindow(int WindowID)
{
return pOpenWindow(pWindowThis(), WindowID);
}

void Interface::DrawTimeUI()
{
if (!this->Data[eTIME].OnShow)
{
return;
}
// ----
if (this->CheckWindow(ObjWindow::CashShop) || this->CheckWindow(ObjWindow::SkillTree)
|| this->CheckWindow(ObjWindow::MoveList) || this->CheckWindow(ObjWindow::ChatWindow) || this->CheckWindow(FullMap))
{
return;
}
// ----
this->DrawGUI(eTIME, 0.0f, 412.0f);
// -----
time_t TimeLocal;
struct tm * LocalT;
time(&TimeLocal);
LocalT = localtime(&TimeLocal);
char LocalTime[30];
sprintf(LocalTime, "%2d:%02d:%02d", LocalT->tm_hour, LocalT->tm_min, LocalT->tm_sec);
this->DrawFormat(eWhite, 27.0f, 418.0f, 100.0f, 1.0f, LocalTime);
}
/*
bool Interface::AllowGUI()
{
if( gInterface.CheckResetWindow())
{
return false;
}

return pAllowGUI();
}
*/
void Interface::SetTextColor(BYTE Red, BYTE Green, BYTE Blue, BYTE Opacity)
{
pSetTextColor(pTextThis(), Red, Green, Blue, Opacity);
}
void Interface::DrawText(int X, int Y, LPCTSTR Text)
{
pDrawText(pTextThis(), X, Y, Text, 0, 0, (LPINT)1, 0);
}
int Interface::DrawFormat(DWORD Color, int PosX, int PosY, int Width, int Align, LPCSTR Text, ...)
{
char Buff[2048];
int BuffLen = sizeof(Buff)-1;
ZeroMemory(Buff, BuffLen);

va_list args;
va_start(args, Text);
int Len = vsprintf_s(Buff, BuffLen, Text, args);
va_end(args);

int LineCount = 0;

char * Line = strtok(Buff, "\n");

while( Line != NULL )
{
pDrawColorText(Line, PosX, PosY, Width, 0, Color, 0, Align);
PosY += 10;
Line = strtok(NULL, "\n");
}

return PosY;
}
void Interface::DrawFormatEx(DWORD Color, int PosX, int PosY, int Width, int Align, LPCSTR Text, ...)
{
char Buff[2048];
int BuffLen = sizeof(Buff)-1;
ZeroMemory(Buff, BuffLen);

va_list args;
va_start(args, Text);
int Len = vsprintf_s(Buff, BuffLen, Text, args);
va_end(args);

pDrawColorText(Buff, PosX, PosY, Width, 0, Color, 0, Align);
}
float Interface::DrawRepeatGUI(short MonsterID, float X, float Y, int Count)
{
float StartY = Y;

for( int i = 0; i < Count; i++ )
{
pDrawGUI(this->Data[MonsterID].ModelID, X, StartY,this->Data[MonsterID].Width, this->Data[MonsterID].Height);

StartY += this->Data[MonsterID].Height;
}

return StartY;
}
void Interface::DrawGUI(short ObjectID, float PosX, float PosY)
{
if( this->Data[ObjectID].X == -1 || this->Data[ObjectID].Y == -1 )
{
this->Data[ObjectID].X = PosX;
this->Data[ObjectID].Y = PosY;
this->Data[ObjectID].MaxX = PosX + this->Data[ObjectID].Width;
this->Data[ObjectID].MaxY = PosY + this->Data[ObjectID].Height;
}

pDrawGUI(this->Data[ObjectID].ModelID, PosX, PosY,this->Data[ObjectID].Width, this->Data[ObjectID].Height);
}
void Interface::DrawColoredGUI(short ObjectID, float X, float Y, DWORD Color)
{
if( this->Data[ObjectID].X == -1 || this->Data[ObjectID].Y == -1 )
{
this->Data[ObjectID].X = X;
this->Data[ObjectID].Y = Y;
this->Data[ObjectID].MaxX = X + this->Data[ObjectID].Width;
this->Data[ObjectID].MaxY = Y + this->Data[ObjectID].Height;
}

pDrawColorButton(this->Data[ObjectID].ModelID, X, Y,this->Data[ObjectID].Width, this->Data[ObjectID].Height, 0, 0, Color);
}
int Interface::DrawToolTip(int X, int Y, LPCSTR Text, ...)
{
char Buff[2048];
int BuffLen = sizeof(Buff);
ZeroMemory(Buff, BuffLen);

va_list args;
va_start(args, Text);
int Len = vsprintf_s(Buff, BuffLen, Text, args);
va_end(args);

return pDrawToolTip(X, Y, Buff);
}
int Interface::DrawToolTipEx(int X, int Y, LPCSTR Text, ...)
{
char Buff[2048];
int BuffLen = sizeof(Buff);
ZeroMemory(Buff, BuffLen);

va_list args;
va_start(args, Text);
int Len = vsprintf_s(Buff, BuffLen, Text, args);
va_end(args);

int LineCount = 0;

char * Line = strtok(Buff, "\n");

while( Line != NULL )
{
pDrawToolTip(X, Y, Line);
Y += 10;
Line = strtok(NULL, "\n");
}

return Y;
}
int Interface::DrawMessage(int Mode, LPCSTR Text, ...)
{
char Buff[2048];
int BuffLen = sizeof(Buff);
ZeroMemory(Buff, BuffLen);

va_list args;
va_start(args, Text);
int Len = vsprintf_s(Buff, BuffLen, Text, args);
va_end(args);

return pDrawMessage(Buff, Mode);
}
bool Interface::IsWorkZone(short ObjectID)
{
float PosX = this->Data[ObjectID].X;
float MaxX = PosX + this->Data[ObjectID].Width;

if( ObjectID == eSAMPLEBUTTON )
{
PosX = this->GetResizeX(ObjectID);
MaxX = PosX + this->Data[ObjectID].Width;
}

if( (gObjUser.m_CursorX < PosX || gObjUser.m_CursorX > MaxX) || (gObjUser.m_CursorY < this->Data[ObjectID].Y || gObjUser.m_CursorY > this->Data[ObjectID].MaxY) )
return false;

return true;
}
bool Interface::IsWorkZone(float X, float Y, float MaxX, float MaxY)
{
if( (gObjUser.m_CursorX < X || gObjUser.m_CursorX > MaxX) || (gObjUser.m_CursorY < Y || gObjUser.m_CursorY > MaxY) )
return false;

return true;
}
float Interface::GetResizeX(short ObjectID)
{
if( pWinWidth == 800 )
{
return this->Data[ObjectID].X + 16.0;
}
else if( pWinWidth != 1024 )
{
return this->Data[ObjectID].X - 16.0;
}

return this->Data[ObjectID].X;
}

float Interface::GetResizeY(short ObjectID)
{

return this->Data[ObjectID].Y;
}
// ----------------------------------------------------------------------------------------------
bool Interface::MiniMapCheck()
{
if (this->CheckWindow(Inventory) ||
this->CheckWindow(CashShop) ||
this->CheckWindow(ChaosBox) ||
this->CheckWindow(Character) ||
this->CheckWindow(CommandWindow) ||
this->CheckWindow(ExpandInventory) ||
this->CheckWindow(ExpandWarehouse) ||
this->CheckWindow(FullMap) ||
this->CheckWindow(GensInfo) ||
this->CheckWindow(Guild) ||
this->CheckWindow(NPC_Dialog) ||
this->CheckWindow(NPC_Julia) ||
this->CheckWindow(NPC_Titus) ||
this->CheckWindow(OtherStore) ||
this->CheckWindow(Party) ||
this->CheckWindow(PetInfo) ||
this->CheckWindow(Shop) ||
this->CheckWindow(SkillTree) ||
this->CheckWindow(Store) ||
this->CheckWindow(Trade) ||
this->CheckWindow(FriendList) ||
this->CheckWindow(FastMenu) ||
this->CheckWindow(MuHelper) ||
this->CheckWindow(Quest) ||
this->CheckWindow(Warehouse))
return true;
return false;
}

bool Interface::CombinedChecks()
{
if ((this->CheckWindow(Inventory)
&& this->CheckWindow(ExpandInventory)
&& this->CheckWindow(Store)) ||
(this->CheckWindow(Inventory)
&& this->CheckWindow(Warehouse)
&& this->CheckWindow(ExpandWarehouse)) ||
(this->CheckWindow(Inventory)
&& this->CheckWindow(Character)
&& this->CheckWindow(Store)))
return true;
return false;
}
// ----------------------------------------------------------------------------------------------
void Interface::DrawUsersPanelWindow()
{
if( !this->Data[eUSERSPANEL_MAIN].OnShow )
{
return;
}
// ----
DWORD ItemNameColor = eWhite;
float MainWidth = 230.0;
float MainHeight = 313.0;
float StartY = 90.0;
float StartX = (MAX_WIN_WIDTH / 2) - (MainWidth / 2);
float MainCenter = StartX + (MainWidth / 3);
float ButtonX = MainCenter - (29.0 / 2);

this->DrawGUI(eUSERSPANEL_MAIN, StartX, StartY + 2);
this->DrawGUI(eUSERSPANEL_TITLE, StartX, StartY);
StartY = this->DrawRepeatGUI(eUSERSPANEL_FRAME, StartX, StartY + 20.0, 13);
this->DrawGUI(eUSERSPANEL_FOOTER, StartX, StartY);
// ----
if( IsWorkZone(eUSERSPANEL_CLOSE) )
{
DWORD Color = eGray100;

if( this->Data[eUSERSPANEL_CLOSE].OnClick )
{
Color = eGray150;
}

this->DrawColoredGUI(eUSERSPANEL_CLOSE, this->Data[eUSERSPANEL_CLOSE].X, this->Data[eUSERSPANEL_CLOSE].Y, Color);
}
// ----
this->DrawGUI(eUSERSPANEL_CLOSE, ButtonX, this->Data[eUSERSPANEL_FOOTER].Y + 0);
this->DrawFormat(eWhite, StartX + 8, this->Data[eUSERSPANEL_FOOTER].Y + -205, 210, 3, gCustomMessage.GetMessageB(3240));
this->DrawFormat(eWhite, StartX + 8, this->Data[eUSERSPANEL_FOOTER].Y + 10, 210, 3, gCustomMessage.GetMessageB(388));
this->DrawGUI(eUSERSPANEL_DIV, StartX, this->Data[eUSERSPANEL_FOOTER].Y - 20);
// ----
this->DrawGUI(eUnCheck, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 37);
this->DrawGUI(eUSERSPANEL_OPTION, StartX + 35, this->Data[eUSERSPANEL_MAIN].Y + 38);
this->DrawGUI(eUSERSPANEL_LINE, StartX + 30, this->Data[eUSERSPANEL_MAIN].Y + 55);
this->DrawFormat(eWhite, StartX + 50, this->Data[eUSERSPANEL_MAIN].Y + 40, +125, 1, gCustomMessage.GetMessageB(3795));
{
if(lifebar)
{
}
else
{
this->DrawGUI(eUSERSPANEL_HPBAR, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 37);
}
// ----
}
// ----
    this->DrawGUI(eUSERSPANEL_RANKHIDE, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 62);
    this->DrawGUI(eUSERSPANEL_OPTION, StartX + 35, this->Data[eUSERSPANEL_MAIN].Y + 63);
    this->DrawGUI(eUSERSPANEL_LINE, StartX + 30, this->Data[eUSERSPANEL_MAIN].Y + 80);
this->DrawFormat(eWhite, StartX + 50, this->Data[eUSERSPANEL_MAIN].Y + 65, +125, 1, gCustomMessage.GetMessageB(3796));
{
if(rankbar)
{
}
else
{
this->DrawGUI(eUnCheck, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 62);
}
// ----
}
// ----
    this->DrawGUI(eUSERSPANEL_TRONGLOW, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 87);
    this->DrawGUI(eUSERSPANEL_OPTION, StartX + 35, this->Data[eUSERSPANEL_MAIN].Y + 88);
    this->DrawGUI(eUSERSPANEL_LINE, StartX + 30, this->Data[eUSERSPANEL_MAIN].Y + 105);
this->DrawFormat(eWhite, StartX + 50, this->Data[eUSERSPANEL_MAIN].Y + 90, +135, 1, gCustomMessage.GetMessageB(3797));
{
if(g_bEnabled)
{
}
else
{
this->DrawGUI(eUnCheck, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 87);
}
// ----
}
// ----
this->DrawGUI(eUSERSPANEL_FOG, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 112);
    this->DrawGUI(eUSERSPANEL_OPTION, StartX + 35, this->Data[eUSERSPANEL_MAIN].Y + 113);
    this->DrawGUI(eUSERSPANEL_LINE, StartX + 30, this->Data[eUSERSPANEL_MAIN].Y + 130);
this->DrawFormat(eWhite, StartX + 50, this->Data[eUSERSPANEL_MAIN].Y + 115, +125, 1, gCustomMessage.GetMessageB(3798));
{
if(gFog.EnableFog)
{
}
else
{
this->DrawGUI(eUnCheck, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 112);
}
// ----
}
// ----
this->DrawGUI(eUnCheck, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 137);
    this->DrawGUI(eUSERSPANEL_OPTION, StartX + 35, this->Data[eUSERSPANEL_MAIN].Y + 138);
    this->DrawGUI(eUSERSPANEL_LINE, StartX + 30, this->Data[eUSERSPANEL_MAIN].Y + 155);
this->DrawFormat(eWhite, StartX + 50, this->Data[eUSERSPANEL_MAIN].Y + 140, +125, 1, gCustomMessage.GetMessageB(3799));
{
if (!gChatExpanded.IsActive)
        {
}
else
{
this->DrawGUI(eUSERSPANEL_CHAT, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 137);
}
// ----
}

/* // ----
this->DrawGUI(eUSERSPANEL_MINIMAP, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 164);
    this->DrawGUI(eUSERSPANEL_OPTION, StartX + 35, this->Data[eUSERSPANEL_MAIN].Y + 165);
    this->DrawGUI(eUSERSPANEL_LINE, StartX + 30, this->Data[eUSERSPANEL_MAIN].Y + 182);
this->DrawFormat(eWhite, StartX + 20, this->Data[eUSERSPANEL_MAIN].Y + 167, +120, 3, "Mini Map      ");
{
if (showMiniMap)
        {
}
else
{
this->DrawGUI(eUnCheck, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 164);
}
// ----

}
// ----
*/
}
bool Interface::EventUsersPanelWindow_Main(DWORD Event)
{
this->EventUsersPanelWindow_Close(Event);
this->EventUsersPanelWindow_HPBAR(Event);
this->EventUsersPanelWindow_RANKHIDE(Event);
this->EventUsersPanelWindow_TRONGLOW(Event);
this->EventUsersPanelWindow_FOG(Event);
this->EventUsersPanelWindow_CHAT(Event);
this->EventUsersPanelWindow_MINIMAP(Event);
return true;
}
bool Interface::EventUsersPanelWindow_Close(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_CLOSE].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_CLOSE) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_CLOSE].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_CLOSE].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
this->Data[eUSERSPANEL_CLOSE].EventTick = GetTickCount();
this->CloseUsersPanelWindow();
// ----
return false;
}
bool Interface::EventUsersPanelWindow_HPBAR(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_HPBAR].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_HPBAR) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_HPBAR].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_HPBAR].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eUSERSPANEL_HPBAR].EventTick = GetTickCount();
if(lifebar)
{
lifebar = false;
}
else
{
lifebar = true;
}
}
bool Interface::EventUsersPanelWindow_RANKHIDE(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_RANKHIDE].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_RANKHIDE) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_RANKHIDE].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_RANKHIDE].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eUSERSPANEL_RANKHIDE].EventTick = GetTickCount();
if(rankbar)
{
rankbar = false;
}
else
{
rankbar = true;
}
}
bool Interface::EventUsersPanelWindow_TRONGLOW(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_TRONGLOW].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_TRONGLOW) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_TRONGLOW].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_TRONGLOW].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
this->Data[eUSERSPANEL_TRONGLOW].EventTick = GetTickCount();
if(g_bEnabled) //Effects
{
g_bEnabled = false;
}
else
{
g_bEnabled = true;
}
}
bool Interface::EventUsersPanelWindow_FOG(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_FOG].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_FOG) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_FOG].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_FOG].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eUSERSPANEL_FOG].EventTick = GetTickCount();
if(gFog.EnableFog) //Fog
{
gFog.EnableFog = false;
}
    else
{
gFog.EnableFog = true;
}
}
bool Interface::EventUsersPanelWindow_CHAT(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_CHAT].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_CHAT) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_CHAT].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_CHAT].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eUSERSPANEL_CHAT].EventTick = GetTickCount();
gChatExpanded.Switch();
}
bool Interface::EventUsersPanelWindow_MINIMAP(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_MINIMAP].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_MINIMAP) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_MINIMAP].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_MINIMAP].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eUSERSPANEL_MINIMAP].EventTick = GetTickCount();
if(showMiniMap) //Fog
{
gInterface.showMiniMap = false;
}
    else
{
gInterface.showMiniMap = true;
}
}

void Interface::DrawPSHOP()
{
float MainWidth = 230.0;
float MainHeight = 313.0;
float StartY = 100.0;
float StartX = (MAX_WIN_WIDTH / 2) - (MainWidth / 2);
// ---
if(this->CheckWindow(ObjWindow::Store) == true && this->CheckWindow(ObjWindow::ExpandInventory) == true)
{
StartX -= 190;
}
// ---
this->DrawFormat(eGold, StartX + 31, StartY + 77, + 125, 3, gCustomMessage.GetMessageB(3245));
// ---
this->DrawGUI(eSHOP_WC, StartX + 70, StartY + 90);
this->DrawFormat(eWhite, StartX + 80, StartY + 97, 100.0f, 1.0f, "WCoinC");
// ---
this->DrawGUI(eSHOP_B, StartX + 70, StartY + 120);
this->DrawFormat(eYellow, StartX + 85, StartY + 127, 100.0f, 1.0f, "Bless");
// ---
this->DrawGUI(eSHOP_WP, StartX + 125, StartY + 90);
this->DrawFormat(eWhite, StartX + 135, StartY + 97, 100.0f, 1.0f, "WCoinP");
// ---
this->DrawGUI(eSHOP_S, StartX + 125, StartY + 120);
this->DrawFormat(eYellow, StartX + 139, StartY + 127, 100.0f, 1.0f, "Soul");
// ---
this->DrawGUI(eSHOP_GP, StartX + 180, StartY + 90);
this->DrawFormat(eWhite, StartX + 187, StartY + 97, 100.0f, 1.0f, "GoblinPoint");
// ---
this->DrawGUI(eSHOP_C, StartX + 180, StartY + 120);
this->DrawFormat(eYellow, StartX + 195, StartY + 127, 100.0f, 1.0f, "Chaos");
// ---
/*this->DrawGUI(eSHOP_L, StartX + 70, StartY + 150);
this->DrawFormat(eYellow, StartX + 85, StartY + 157, 100.0f, 1.0f, "Life");
// ---
this->DrawGUI(eSHOP_Gem, StartX + 70, StartY + 180);
this->DrawFormat(eYellow, StartX + 80, StartY + 187, 100.0f, 1.0f, "Gemstone");
// ---
this->DrawGUI(eSHOP_Cr, StartX + 125, StartY + 150);
this->DrawFormat(eYellow, StartX + 135, StartY + 157, 100.0f, 1.0f, "Creation");
// ---
this->DrawGUI(eSHOP_H, StartX + 125, StartY + 180);
this->DrawFormat(eYellow, StartX + 137, StartY + 187, 100.0f, 1.0f, "Harmony");
// ---
this->DrawGUI(eSHOP_G, StartX + 180, StartY + 150);
this->DrawFormat(eYellow, StartX + 191, StartY + 157, 100.0f, 1.0f, "Guardian");
// ---
this->DrawGUI(eSHOP_R, StartX + 180, StartY + 180);
this->DrawFormat(eYellow, StartX + 187, StartY + 187, 100.0f, 1.0f, "Refine Stone");*/
// ---
this->DrawGUI(eSHOP_OFF, StartX + 190, StartY + 291);
// ---

if(IsWorkZone(eSHOP_OFF))
{
this->DrawToolTip(StartX + 170, StartY + 280, gCustomMessage.GetMessageB(3244));
}
}
bool Interface::DrawPSHOP_Main(DWORD Event)
{
this->DrawPSHOP_BLESS(Event);
this->DrawPSHOP_SOUL(Event);
this->DrawPSHOP_CHAOS(Event);
this->DrawPSHOP_WCOINC(Event);
this->DrawPSHOP_WCOINP(Event);
this->DrawPSHOP_COINTP(Event);
this->DrawPSHOP_OFFBUTTON(Event);
this->DrawPSHOP_LIFE(Event);
this->DrawPSHOP_CREATION(Event);
this->DrawPSHOP_GUARDIAN(Event);
this->DrawPSHOP_GEMSTONE(Event);
this->DrawPSHOP_HARMONY(Event);
this->DrawPSHOP_REFINE(Event);
return true;
}
bool Interface::DrawPSHOP_BLESS(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_B].EventTick);
// ----
if(!this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_B))
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_B].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_B].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_B].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x01,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}
bool Interface::DrawPSHOP_SOUL(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_S].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_S) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_S].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_S].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_S].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x02,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}
bool Interface::DrawPSHOP_CHAOS(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_C].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_C) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_C].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_C].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_C].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x03,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}
bool Interface::DrawPSHOP_WCOINC(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_WC].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_WC) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_WC].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_WC].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_WC].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x04,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}
bool Interface::DrawPSHOP_WCOINP(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_WP].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_WP) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_WP].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_WP].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_WP].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x05,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}
bool Interface::DrawPSHOP_COINTP(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_GP].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_GP) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_GP].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_GP].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_GP].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x06,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_LIFE(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_L].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_L) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_L].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_L].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_L].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x09,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_CREATION(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_Cr].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_Cr) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_Cr].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_Cr].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_Cr].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x10,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_GUARDIAN(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_G].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_G) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_G].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_G].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_G].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x11,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_GEMSTONE(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_Gem].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_Gem) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_Gem].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_Gem].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_Gem].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x12,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_HARMONY(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_H].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_H) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_H].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_H].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_H].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x13,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_REFINE(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_R].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_R) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_R].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_R].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_B].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x14,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_OFFBUTTON(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_OFF].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_OFF) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_OFF].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_OFF].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
this->Data[eSHOP_OFF].EventTick = GetTickCount();
gInterface.OpenOffWindow();
}

void Interface::DrawPSHOP_OFFMODE()
{
if( !this->Data[eOFFPANEL_MAIN].OnShow )
{
return;
}
float MainWidth = 230.0;
float MainHeight = 313.0;
float StartY = 80.0;
float StartX = (MAX_WIN_WIDTH / 2) - (MainWidth / 2);
float MainCenter = StartX + (MainWidth / 3);
float ButtonX = MainCenter - (29.0 / 2);

this->DrawGUI(eOFFPANEL_MAIN, StartX, StartY + 2);
this->DrawGUI(eOFFPANEL_TITLE, StartX, StartY);
//StartY = this->DrawRepeatGUI(eOFFPANEL_FRAME, StartX, StartY + 67.0, 13);
this->DrawGUI(eOFFPANEL_FOOTER, StartX, StartY + 75);

this->DrawFormat(eGold, StartX + 10, 90, 210, 3, gCustomMessage.GetMessageB(3244));
this->DrawFormat(eWhite, StartX + 10, 130, 210, 3, gCustomMessage.GetMessageB(3246));
this->DrawGUI(eOFFPANEL_YES, StartX + 30, StartY + 75);
this->DrawGUI(eOFFPANEL_CANE, StartX + 140, StartY + 75);
}

bool Interface::DrawPSHOP_OFFMAIN(DWORD Event)
{
this->DrawPSHOP_OFFYES(Event);
this->DrawPSHOP_OFFCANE(Event);
return true;
}

bool Interface::DrawPSHOP_OFFYES(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eOFFPANEL_YES].EventTick);
// ----
if( !this->Data[eOFFPANEL_MAIN].OnShow || !IsWorkZone(eOFFPANEL_YES) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eOFFPANEL_YES].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eOFFPANEL_YES].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eOFFPANEL_YES].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x07,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
this->CloseOffWindow();
}
bool Interface::DrawPSHOP_OFFCANE(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eOFFPANEL_CANE].EventTick);
// ----
if( !this->Data[eOFFPANEL_MAIN].OnShow || !IsWorkZone(eOFFPANEL_CANE) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eOFFPANEL_CANE].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eOFFPANEL_CANE].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eOFFPANEL_CANE].EventTick = GetTickCount();
this->CloseOffWindow();
}

// OFF ATTACK MODE
void Interface::DrawOffAttack()
{
if( !this->Data[eOFFATTACK_MAIN].OnShow )
{
return;
}
float MainWidth = 230.0;
float MainHeight = 313.0;
float StartY = 80.0;
float StartX = (MAX_WIN_WIDTH / 2) - (MainWidth / 2);
float MainCenter = StartX + (MainWidth / 3);
float ButtonX = MainCenter - (29.0 / 2);

this->DrawGUI(eOFFATTACK_MAIN, StartX, StartY + 2);
this->DrawGUI(eOFFATTACK_TITLE, StartX, StartY);
this->DrawGUI(eOFFATTACK_FOOTER, StartX, StartY + 75);

this->DrawFormat(eGold, StartX + 10, 90, 210, 3, "Offline Attack System");
this->DrawFormat(eWhite, StartX + 10, 130, 210, 3, "Leave your Character in OFFATTACK mode?");
this->DrawGUI(eOFFATTACK_YES, StartX + 30, StartY + 75);
this->DrawGUI(eOFFATTACK_CANE, StartX + 140, StartY + 75);

}

bool Interface::OffAttackEvent_Main(DWORD Event)
{
this->OffAttackEvent_Button1(Event);
this->OffAttackEvent_Button2(Event);
return true;
}

bool Interface::OffAttackEvent_Button1(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eOFFATTACK_YES].EventTick);
// ----
if( !this->Data[eOFFATTACK_MAIN].OnShow || !IsWorkZone(eOFFATTACK_YES) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eOFFATTACK_YES].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eOFFATTACK_YES].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eOFFATTACK_YES].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x08,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
this->CloseOffAttackWindow();
}
bool Interface::OffAttackEvent_Button2(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eOFFATTACK_CANE].EventTick);
// ----
if( !this->Data[eOFFATTACK_MAIN].OnShow || !IsWorkZone(eOFFATTACK_CANE) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eOFFATTACK_CANE].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eOFFATTACK_CANE].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eOFFATTACK_CANE].EventTick = GetTickCount();
this->CloseOffAttackWindow();
}


void Interface::Work2() {
if (gInterface.item_post_ && pCursorX < 150)
{
gInterface.DrawItemToolTipText(gInterface.item_post_, pCursorX + 80, pCursorY - 80);
if (gInterface.last_tickcount_view_ + 100 < GetTickCount()) {
gInterface.item_post_ = nullptr;
}
}
    pDrawInterface2();
}

void Interface::DrawChat ( int mode, char* character, char* message ) {
    PBMSG_CHATPOSTITEM chat;
    memset ( &chat.character_[0], 0, 10 );
    memset ( &chat.message_[0], 0, 89 );
    memcpy ( &chat.character_[0], &character[0], 10 );
    memcpy ( &chat.message_[0], &message[0], strlen ( message ) );
    pHandlePacketChatData ( &chat );

if (mode >= 1 && mode <= 9 && ChatBoxMuObjectChatDataPtrArrayLength) {
int index = ChatBoxMuObjectChatDataPtrArrayLength - 1;
ChatBoxMuObjectChatDataPtrArray[index]->chat_type_ = mode;
}
}

void Interface::DrawItemToolTipText ( void * item, int x, int y ) {
static DWORD mem = 0;
//static DWORD ItemToolTipAdress1 = 0x00861110; //1.04D-> 0x00860FC0
//static DWORD ItemToolTipAdress2 = 0x00861AA0; //1.04D-> 0x00861950
//static DWORD ItemToolTipAdress3 = 0x007E3E30; //1.04D-> 0x007E3CE0
_asm {
    PUSH 0
    PUSH 0
    PUSH 0
    PUSH item
    PUSH y
    PUSH x
MOV mem,0x00861110
    CALL mem
    MOV ECX, EAX
MOV mem,0x00861AA0
    CALL mem
    MOV ECX, EAX
MOV mem,0x007E3E30
    CALL mem
}

}

void Interface::DrawS2Interface()
{
gInterface.DrawGUI(eSkillBox, 305, 443);
}

void Interface::DrawMenuButton()
{
if (IsWorkZone(eParty))
{
this->DrawToolTip(345, 435, gCustomMessage.GetMessage(11));
}
if (this->CheckWindow(Party))
{
gInterface.DrawGUI(eParty, 348, 449);
}
if (IsWorkZone(eCharacter))
{
this->DrawToolTip(375, 435, gCustomMessage.GetMessage(12));
}
if (this->CheckWindow(Character))
{
gInterface.DrawGUI(eCharacter, 378.5f, 449);
}
if (IsWorkZone(eInventory))
{
this->DrawToolTip(405, 435, gCustomMessage.GetMessage(13));
}
if (this->CheckWindow(Inventory))
{
gInterface.DrawGUI(eInventory, 409, 449);
}
if (IsWorkZone(eFriend))
{
this->DrawToolTip(580, 420, gCustomMessage.GetMessage(14));
}
if (this->CheckWindow(FriendList))
{
gInterface.DrawGUI(eFriend, 581, 432);
}
if (IsWorkZone(eFastMenu))
{
this->DrawToolTip(13, 420, gCustomMessage.GetMessage(15));
}
if (this->CheckWindow(FastMenu))
{
gInterface.DrawGUI(eFastMenu, 5, 432);
}

}

void Interface::EventMenuButton(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
if (this->CheckWindow(ChaosBox))
{
return;
}

if (IsWorkZone(eParty))
{
DWORD Delay = (CurrentTick - this->Data[eParty].EventTick);
if (Event == WM_LBUTTONDOWN) {
this->Data[eParty].OnClick = true;
return;
}
this->Data[eParty].OnClick = false;
if (Delay < 500) {
return;
}
this->Data[eParty].EventTick = GetTickCount();
if (this->CheckWindow(Party)) {
this->CloseWindow(Party);
}
else {
this->OpenWindow(Party);
}
}
else if (IsWorkZone(eCharacter))
{
DWORD Delay = (CurrentTick - this->Data[eCharacter].EventTick);
if (Event == WM_LBUTTONDOWN) {
this->Data[eCharacter].OnClick = true;
return;
}
this->Data[eCharacter].OnClick = false;
if (Delay < 500) {
return;
}
this->Data[eCharacter].EventTick = GetTickCount();
if (this->CheckWindow(Character)) {
this->CloseWindow(Character);
}
else {
this->OpenWindow(Character);
}
}
else if (IsWorkZone(eInventory))
{
DWORD Delay = (CurrentTick - this->Data[eInventory].EventTick);
if (Event == WM_LBUTTONDOWN) {
this->Data[eInventory].OnClick = true;
return;
}
this->Data[eInventory].OnClick = false;
if (Delay < 500) {
return;
}
this->Data[eInventory].EventTick = GetTickCount();
if (this->CheckWindow(Inventory)) {
this->CloseWindow(Inventory);
}
else {
this->OpenWindow(Inventory);
}
}
else if (IsWorkZone(eFriend))
{
DWORD Delay = (CurrentTick - this->Data[eFriend].EventTick);
if (Event == WM_LBUTTONDOWN) {
this->Data[eFriend].OnClick = true;
return;
}
this->Data[eFriend].OnClick = false;
if (Delay < 500) {
return;
}
this->Data[eFriend].EventTick = GetTickCount();
if (this->CheckWindow(FriendList)) {
this->CloseWindow(FriendList);
}
else {
this->OpenWindow(FriendList);
}
}
else if (IsWorkZone(eFastMenu))
{
DWORD Delay = (CurrentTick - this->Data[eFastMenu].EventTick);
if (Event == WM_LBUTTONDOWN) {
this->Data[eFastMenu].OnClick = true;
return;
}
this->Data[eFastMenu].OnClick = false;
if (Delay < 500) {
return;
}
this->Data[eFastMenu].EventTick = GetTickCount();
if (this->CheckWindow(FastMenu)) {
this->CloseWindow(FastMenu);
}
else {
this->OpenWindow(FastMenu);
}
}
}

LoadBitmapA("Interface\\login_auto.tga", 531141, GL_NEAREST, GL_CLAMP, 1, 0);
pLoadImage("Custom\\Interface\\s3\\2Menu01_new.jpg", 31292, GL_LINEAR, GL_CLAMP, 1, 0);

tentei mas erro :(

error C2660: 'LoadBitmapA' : function does not take 6 arguments

IntelliSense: argument of type "const char *" is incompatible with parameter of type "HINSTANCE"   

IntelliSense: argument of type "int" is incompatible with parameter of type "LPCSTR"

IntelliSense: too many arguments in function call


Find this function in Interface.cpp and add this line.

void Interface::LoadImages()
{
  pLoadImage("Interface\\login_auto.tga", 531141, GL_NEAREST, GL_CLAMP, 1, 0);

Obrigado a todos. Mas não funciona, tentei assim :( :( :(

14
Sources Generales / Re: Source Auto Login Button (1.04e/S6) - Kapocha
« Posteado: March 16, 2022, 01:45:35 PM »
alguem me orienta onde colocar esse codigo com "LoadBitmapA("Interface\\login_auto.tga", 531141, GL_NEAREST, GL_CLAMP, 1, 0);" Não sou muito boa nisso

Interface.cpp

busca > "LoadBitmapA"
obrigado, mas no meu Interface.cpp não há palavra LoadBitmapA

Segue ai meu amigo e vai da certo


Obrigada. Mas meu código fonte não tem esses

Code: [Select]
#include "stdafx.h"
#include "Interface.h"
#include "TMemory.h"
#include "Protocol.h"
#include "Offset.h"
#include "User.h"
#include "Import.h"
#include "Defines.h"
#include "Camera.h"
#include "Fog.h"
#include "Other.h"
#include "Graphics.h"
#include "Glow.h"
#include "ChatExpanded.h"
#include "Reconnect.h"
#include "Config.h"
#include "CustomMessage.h"
#include "CustomEventTime.h"
#include "post_item.h"
#include "inter3.h"

Interface gInterface;
DWORD CharacterInfoExtern_Buff;
char CharacterInfoExtern_LevelBuff[80];
DWORD AddSomeShine_Buff;
DWORD AddSomeShine_Pointer;
bool Checkbox = true;

Interface::Interface()
{
ZeroMemory(this->Data, sizeof(this->Data));
}
Naked(AddSomeShine)
{
_asm
{
mov eax, dword ptr ds:[ecx + 0x30]
mov AddSomeShine_Buff, eax
}

if( AddSomeShine_Buff == 349 || AddSomeShine_Buff == 406 || AddSomeShine_Buff == 407 || AddSomeShine_Buff == 408 )
{
_asm
{
mov AddSomeShine_Buff, 0x005E4979
jmp AddSomeShine_Buff
}
}
else
{
_asm
{
mov AddSomeShine_Buff, 0x005E4A3C
jmp AddSomeShine_Buff
}
}
}

void Interface::Load()
{
/* this->BindObject(eSkillBox, iNewSkillBox, 32, 38, 305, 443);
// this->BindObject(eDragonLeft, iDragonLeft, 108, 45, 0, 388);
// this->BindObject(eDragonRight, iDragonRight, 108, 45, 532, 388);
// this->BindObject(eParty, iNewParty, 25, 25, 348, 449);
this->BindObject(eCharacter, iNewCharacter, 25, 25, 379, 449);
this->BindObject(eInventory, iNewInventory, 25, 25, 409, 449);
this->BindObject(eFriend, iNewWinpush, 54, 20, 581, 432);
this->BindObject(eFastMenu, iNewFastMenu, 55, 21, 5, 432);
*/
//--
this->BindObject(eSAMPLEBUTTON, 0x7AA4, 16, 15, 175, 1);
this->BindObject(eCheck, 0x9991, 15, 15, -1, -1);
this->BindObject(eUnCheck, 0x9992, 15, 15, -1, -1);
this->BindObject(eTIME, 0x787E, 80, 20, 174, 0);
this->BindObject(eOFFATTACK_BUTTON, 0x787F, 16, 12, -1, -1);
this->BindObject(eOPTIONS_BUTTON, 0x787D, 16, 12, -1, 1);
//---
this->BindObject(eCAMERA_MAIN, 0x787A, 93, 18, 174, 0);
this->BindObject(eCAMERA_BUTTON1, 0x787B, 16, 12, -1, -1);
this->BindObject(eCAMERA_BUTTON2, 0x787C, 16, 12, -1, -1);
//this->BindObject(eLOGO, 0x9989, 63.3, 50, 192.5, 1);
this->BindObject(eSHOP_WC, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_WP, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_GP, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_B, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_S, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_C, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_L, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_Cr, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_G, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_Gem, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_H, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_R, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_OFF, 0x7C04, 36, 27, -1, -1);
//---
this->BindObject(eOFFPANEL_MAIN, 0x7A5A, 222, 120, -1, -1);
this->BindObject(eOFFPANEL_TITLE, 0x7A63, 230, 67, -1, -1);
this->BindObject(eOFFPANEL_FRAME, 0x7A58, 230, 15, -1, -1);
this->BindObject(eOFFPANEL_FOOTER, 0x7A59, 230, 50, -1, -1);
this->BindObject(eOFFPANEL_YES, 0x7B12, 54, 30, -1, -1);
this->BindObject(eOFFPANEL_CANE, 0x7B0C, 54, 30, -1, -1);
//---
this->BindObject(eOFFATTACK_MAIN, 0x7A5A, 222, 120, -1, -1);
this->BindObject(eOFFATTACK_TITLE, 0x7A63, 230, 67, -1, -1);
this->BindObject(eOFFATTACK_FRAME, 0x7A58, 230, 15, -1, -1);
this->BindObject(eOFFATTACK_FOOTER, 0x7A59, 230, 50, -1, -1);
this->BindObject(eOFFATTACK_YES, 0x7B12, 54, 30, -1, -1);
this->BindObject(eOFFATTACK_CANE, 0x7B0C, 54, 30, -1, -1);
//---
this->BindObject(eUSERSPANEL_MAIN, 0x7A5A, 222, 256, -1, -1);
this->BindObject(eUSERSPANEL_TITLE, 0x7A63, 230, 67, -1, -1);
this->BindObject(eUSERSPANEL_FRAME, 0x7A58, 230, 15, -1, -1);
this->BindObject(eUSERSPANEL_FOOTER, 0x7A59, 230, 50, -1, -1);
this->BindObject(eUSERSPANEL_DIV, 0x7A62, 223, 21, -1, -1);
this->BindObject(eUSERSPANEL_OPTION, 0x7B68, 10, 10, -1, -1);
this->BindObject(eUSERSPANEL_LINE, 0x7B67, 154, 2, -1, -1);
this->BindObject(eUSERSPANEL_BUTTON, 0x9994, 40, 19, -1, -1);
this->BindObject(eUSERSPANEL_BUTTON1, 0x9994, 40, 19, -1, -1);
this->BindObject(eUSERSPANEL_BUTTON2, 0x9994, 40, 19, -1, -1);
this->BindObject(eUSERSPANEL_FOG, 0x9991, 15, 15, -1, -1);
this->BindObject(eUSERSPANEL_CLOSE, 0x7A5E, 128, 29, -1, -1);
this->BindObject(eUSERSPANEL_HPBAR, 0x9991, 15, 15, -1, -1);
this->BindObject(eUSERSPANEL_RANKHIDE, 0x9991, 15, 15, -1, -1);
this->BindObject(eUSERSPANEL_TRONGLOW, 0x9991, 15, 15, -1, -1);
this->BindObject(eUSERSPANEL_CHAT, 0x9991, 15, 15, -1, -1);
this->BindObject(eUSERSPANEL_MINIMAP, 0x9991, 15, 15, -1, -1);
this->BindObject(eUSERSPANEL_CAMERA, 0x9991, 15, 15, -1, -1);
//--
//Command info
this->BindObject(eEventTime_MAIN, 0x789F, 222, 195, -1, -1);
this->BindObject(eEventTime_CLOSE, 0x7EC5, 36, 29, -1, -1);

//---
this->Data[eTIME].OnShow = true;
this->showMiniMap = false;
//SetOp((LPVOID)oAllowGUI_Call1, this->AllowGUI, ASM::CALL);
//SetOp((LPVOID)oAllowGUI_Call2, this->AllowGUI, ASM::CALL);
SetOp((LPVOID)oDrawInterface_Call, this->Work, ASM::CALL);
SetOp((LPVOID)oLoadSomeForm_Call, this->LoadImages, ASM::CALL);
SetOp((LPVOID)0x00633FFB, this->LoadModels, ASM::CALL);
SetOp((LPVOID)0x00842468, this->PShopTextInfo, ASM::CALL);
//==========================================
// - Remove Texts PShop
//==========================================
SetRange((LPVOID)0x00842086, 5, ASM::NOP);
SetRange((LPVOID)0x0084234F, 5, ASM::NOP);
SetRange((LPVOID)0x008423C3, 5, ASM::NOP);
// - Draw Post Item
 this->item_post_ = nullptr;
 SetOp((LPVOID)oDrawInterface2_Call, this->Work2, ASM::CALL);
}
void Interface::Work()
{
gInterface.DrawTimeUI();
gObjUser.Refresh();
gCamera.Rotate();
gCamera.Position();
//--
ReconnectMainProc();
gInterface.DrawOffAttack();
gInterface.DrawPSHOP_OFFMODE();
gInterface.DrawUsersPanelWindow();
gInterface.DrawCameraUI();
pDrawInterface();
//--
gCustomEventTime.DrawEventTimePanelWindow();
}
int Interface::PShopTextInfo(int pThis)
{
gInterface.DrawPSHOP();
// ---
return pPShopTextInfo(pThis);
}
void Interface::LoadImages()
{
/* pLoadImage("Custom\\Interface\\s3\\2Menu01_new.jpg", 31292, GL_LINEAR, GL_CLAMP, 1, 0); //replace
pLoadImage("Custom\\Interface\\s3\\2Menu02.jpg", 31293, GL_LINEAR, GL_CLAMP, 1, 0); //replace
pLoadImage("Custom\\Interface\\s3\\2Menu03_new.jpg", 31294, GL_LINEAR, GL_CLAMP, 1, 0); //replace
pLoadImage("Custom\\Interface\\s3\\none.tga", 31295, GL_LINEAR, GL_CLAMP, 1, 0); //replace
pLoadImage("Custom\\Interface\\s3\\2Menu_Red.jpg", 0x7A42, GL_LINEAR, GL_CLAMP, 1, 0);//replace
pLoadImage("Custom\\Interface\\s3\\2Menu_Green.jpg", 0x7A41, GL_LINEAR, GL_CLAMP, 1, 0);//replace
pLoadImage("Custom\\Interface\\s3\\2Menu_Blue.jpg", 0x7A40, GL_LINEAR, GL_CLAMP, 1, 0);//replace
// pLoadImage("Custom\\Interface\\s3\\2Menu04.tga", iDragonLeft, GL_LINEAR, GL_CLAMP, 1, 0);
// pLoadImage("Custom\\Interface\\s3\\2Menu05.tga", iDragonRight, GL_LINEAR, GL_CLAMP, 1, 0);
pLoadImage("Custom\\Interface\\s3\\2Menu_Inventory.jpg", iNewInventory, GL_LINEAR, GL_CLAMP, 1, 0);
pLoadImage("Custom\\Interface\\s3\\2Menu_Character.jpg", iNewCharacter, GL_LINEAR, GL_CLAMP, 1, 0);
// pLoadImage("Custom\\Interface\\s3\\2Menu_Party.jpg", iNewParty, GL_LINEAR, GL_CLAMP, 1, 0);
pLoadImage("Custom\\Interface\\s3\\2win_push.jpg", iNewWinpush, GL_LINEAR, GL_CLAMP, 1, 0);
pLoadImage("Custom\\Interface\\s3\\2menu01_new2.jpg", iNewFastMenu, GL_LINEAR, GL_CLAMP, 1, 0);
pLoadImage("Custom\\Interface\\s3\\2SkillBox.jpg", iNewSkillBox, GL_LINEAR, GL_CLAMP, 1, 0);
*/
//--
pLoadImage("Interface\\TimeBar.tga", 0x787E, 0x2601, 0x2901, 1, 0);
pLoadImage("Interface\\CameraUI_BG.tga", 0x787A, 0x2601, 0x2900, 1, 0);
pLoadImage("Interface\\CameraUI_Switch.tga", 0x787B, 0x2601, 0x2900, 1, 0);
pLoadImage("Interface\\CameraUI_Reset.tga", 0x787C, 0x2601, 0x2900, 1, 0);
pLoadImage("Interface\\OffAttack_Switch.tga", 0x787F, 0x2601, 0x2900, 1, 0);
pLoadImage("Interface\\MacroSetup.tga", 0x787D, 0x2601, 0x2900, 1, 0);
//--
pLoadImage("Interface\\EventTime.tga", 0x789F, 0x2601, 0x2900, 1, 0);
// logo
//pLoadImage("Custom\\logo\\mwebgame.tga", 0x9989, 0x2601, 0x2900, 1, 0);
// MiniMap
pLoadImage("Interface\\check.jpg", 0x9991, 0x2601, 0x2900, 1, 0);
pLoadImage("Interface\\uncheck.jpg", 0x9992, 0x2601, 0x2900, 1, 0);
pLoadImage("Interface\\button.tga", 0x9994, 0x2601, 0x2900, 1, 0);
//--
//Here animation for cape. Wing 214.bmd for display only item in Inventory
pLoadImage("Item\\Newdeath01.tga", 0x789C, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\Newdeath02.tga", 0x789D, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\darklordwing4dd.tga", 0x78A5, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\darklordwing4de.tga", 0x78A6, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\ragefighterwing4db.tga", 0x78A8, 0x2601, 0x2900, 1, 0);
//--
pLoadImage("Item\\growlancerwing4dc.tga", 0x78A9, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\Item801_2_wing.tga", 0x78B1, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\Item802_2_wing.tga", 0x78B2, 0x2601, 0x2900, 1, 0);
//--
pLoadImage("Item\\NCcapeSmall.tga", 0x78B3, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\DarkLordRobeSmall.tga", 0x78B4, 0x2601, 0x2900, 1, 0);
//--
pLoadImage("Item\\darklordwing4ddmr.tga", 0x78B5, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\darklordwing4demr.tga", 0x78B6, 0x2601, 0x2900, 1, 0);
//--
pLoadSomeForm();
}
void Interface::LoadModels()
{
pInitModelData2();
}
void Interface::BindObject(short MonsterID, DWORD ModelID, float Width, float Height, float X, float Y)
{
this->Data[MonsterID].EventTick = 0;
this->Data[MonsterID].OnClick = false;
this->Data[MonsterID].OnShow = false;
this->Data[MonsterID].ModelID = ModelID;
this->Data[MonsterID].Width = Width;
this->Data[MonsterID].Height = Height;
this->Data[MonsterID].X = X;
this->Data[MonsterID].Y = Y;
this->Data[MonsterID].MaxX = X + Width;
this->Data[MonsterID].MaxY = Y + Height;
this->Data[MonsterID].Attribute = 0;
}
void Interface::DrawSampleButton()
{
float PosX = this->GetResizeX(eSAMPLEBUTTON);

if( this->CheckWindow(ObjWindow::CashShop)
|| this->CheckWindow(ObjWindow::FullMap)
|| this->CheckWindow(ObjWindow::SkillTree)
|| this->CheckWindow(MoveList) )
{
return;
}

this->DrawGUI(eSAMPLEBUTTON, PosX, 1);

if( !IsWorkZone(eSAMPLEBUTTON) )
{
return;
}

this->DrawToolTip(PosX - 5, 31, "Button tooltip");

if( this->Data[eSAMPLEBUTTON].OnClick )
{
this->DrawColoredGUI(eSAMPLEBUTTON, PosX, 1, pMakeColor(40, 20, 3, 130));
return;
}

this->DrawColoredGUI(eSAMPLEBUTTON, PosX, 1, pMakeColor(255, 204, 20, 130));
}
void Interface::EventSampleButton(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSAMPLEBUTTON].EventTick);

if( this->CheckWindow(CashShop) || this->CheckWindow(FullMap)
|| this->CheckWindow(SkillTree) || this->CheckWindow(MoveList)
|| !IsWorkZone(eSAMPLEBUTTON) )
{
return;
}

if( Event == WM_LBUTTONDOWN )
{
this->Data[eSAMPLEBUTTON].OnClick = true;
return;
}

this->Data[eSAMPLEBUTTON].OnClick = false;

if( Delay < 500 )
{
return;
}

this->Data[eSAMPLEBUTTON].EventTick = GetTickCount();

if( !this->Data[eRANK_MAIN].OnShow )
{
this->Data[eRANK_MAIN].OnShow = true;
}
else
{
this->Data[eRANK_MAIN].OnShow = false;
}
}
void Interface::DrawCameraUI()
{
float PosX = this->GetResizeX(eCAMERA_MAIN);
// ----
if (this->CheckWindow(CashShop)
|| this->CheckWindow(SkillTree)
|| this->CheckWindow(FullMap)
|| this->CheckWindow(MoveList)
|| (this->CheckWindow(Inventory)
&& this->CheckWindow(ExpandInventory)
&& this->CheckWindow(Store))
|| (this->CheckWindow(Inventory)
&& this->CheckWindow(Warehouse)
&& this->CheckWindow(ExpandWarehouse)))
{
return;
}
// ----
this->DrawGUI(eCAMERA_MAIN, PosX, 0);
this->DrawGUI(eCAMERA_BUTTON1, PosX + 18.5, 1);
this->DrawGUI(eCAMERA_BUTTON2, PosX + 37.0, 1);
//this->DrawGUI(eLOGO, PosX + 370, 20);
this->DrawGUI(eOFFATTACK_BUTTON, PosX + 0.5, 1.5);
this->DrawGUI(eOPTIONS_BUTTON, PosX + 55.5, 1.5);
// ----
if (gCamera.IsActive)
{
this->DrawColoredGUI(eCAMERA_BUTTON1, PosX + 18.5, 1, eShinyGreen);
}
// ----
if (IsWorkZone(eCAMERA_BUTTON1))
{
if (gCamera.IsActive)
{
this->DrawToolTip(PosX + 18.5 - 5, 25, "Zoom: %02.f%%", gCamera.ZoomPercent);
}
else
{
this->DrawToolTip(PosX + 18.5 - 5, 25, gCustomMessage.GetMessageB(3243));
}
// ----
if (this->Data[eCAMERA_BUTTON1].OnClick)
{
this->DrawColoredGUI(eCAMERA_BUTTON1, PosX + 18.5, 1, pMakeColor(40, 20, 3, 130));
return;
}
// ----
this->DrawColoredGUI(eCAMERA_BUTTON1, PosX + 18.5, 1, pMakeColor(255, 204, 20, 200));
}
else if (IsWorkZone(eCAMERA_BUTTON2))
{
this->DrawToolTip(PosX + 37.0 - 5, 25, gCustomMessage.GetMessageB(3242));
// ----
if (this->Data[eCAMERA_BUTTON2].OnClick)
{
this->DrawColoredGUI(eCAMERA_BUTTON2, PosX + 37.0, 1, pMakeColor(40, 20, 3, 130));
return;
}
// ----
this->DrawColoredGUI(eCAMERA_BUTTON2, PosX + 37.0, 1, pMakeColor(255, 204, 20, 200));
}

// ----
else if (IsWorkZone(eOFFATTACK_BUTTON))
{
{
this->DrawToolTip(PosX + 0.5 - 5, 25, gCustomMessage.GetMessageB(3241));
}
// ----
if (this->Data[eOFFATTACK_BUTTON].OnClick)
{
this->DrawColoredGUI(eOFFATTACK_BUTTON, PosX + 0.5, 1.5, pMakeColor(40, 20, 3, 130));
return;
}
// ----
this->DrawColoredGUI(eOFFATTACK_BUTTON, PosX + 0.5, 1.5, pMakeColor(250, 125, 50, 200));
}
// ----
else if (IsWorkZone(eOPTIONS_BUTTON))
{
{
this->DrawToolTip(PosX + 55.5 - 5, 25, gCustomMessage.GetMessageB(3240)); //Advanced Options

}
// ----
if (this->Data[eOPTIONS_BUTTON].OnClick)
{
this->DrawColoredGUI(eOFFATTACK_BUTTON, PosX + 55.5, 1.5, pMakeColor(40, 20, 3, 130));
return;
}
// ----
this->DrawColoredGUI(eOPTIONS_BUTTON, PosX + 55.5, 1.5, pMakeColor(255, 204, 20, 200));
}
// ----
}
// ----------------------------------------------------------------------------------------------
void Interface::EventCameraUI(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
// ----
if (this->CheckWindow(CashShop)
|| this->CheckWindow(SkillTree)
|| this->CheckWindow(FullMap)
|| this->CheckWindow(MoveList)
|| (this->CheckWindow(Inventory)
&& this->CheckWindow(ExpandInventory)
&& this->CheckWindow(Store))
|| (this->CheckWindow(Inventory)
&& this->CheckWindow(Warehouse)
&& this->CheckWindow(ExpandWarehouse)))
{
return;
}
// ----
if (IsWorkZone(eCAMERA_BUTTON1))
{
DWORD Delay = (CurrentTick - this->Data[eCAMERA_BUTTON1].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eCAMERA_BUTTON1].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eCAMERA_BUTTON1].OnClick = false;
pSetCursorFocus = false;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eCAMERA_BUTTON1].EventTick = GetTickCount();
// ----
gCamera.Switch();
}
else if (IsWorkZone(eCAMERA_BUTTON2))
{
DWORD Delay = (CurrentTick - this->Data[eCAMERA_BUTTON2].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eCAMERA_BUTTON2].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eCAMERA_BUTTON2].OnClick = false;
pSetCursorFocus = false;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eCAMERA_BUTTON2].EventTick = GetTickCount();
// ----
gCamera.Init();
}

// ----
else if (IsWorkZone(eOFFATTACK_BUTTON))
{
DWORD Delay = (CurrentTick - this->Data[eOFFATTACK_BUTTON].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eOFFATTACK_BUTTON].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eOFFATTACK_BUTTON].OnClick = false;
pSetCursorFocus = false;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eOFFATTACK_BUTTON].EventTick = GetTickCount();
// ----
OpenOffAttackWindow();
}
// ----
else if (IsWorkZone(eOPTIONS_BUTTON))
{
DWORD Delay = (CurrentTick - this->Data[eOPTIONS_BUTTON].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eOPTIONS_BUTTON].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eOPTIONS_BUTTON].OnClick = false;
pSetCursorFocus = false;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eOPTIONS_BUTTON].EventTick = GetTickCount();
// ----
gInterface.OpenUsersPanelWindow();
}
}
// ----------------------------------------------------------------------------------------------
bool Interface::CheckWindow(int WindowID)
{
return pCheckWindow(pWindowThis(), WindowID);
}
int Interface::CloseWindow(int WindowID)
{
return pCloseWindow(pWindowThis(), WindowID);
}
int Interface::OpenWindow(int WindowID)
{
return pOpenWindow(pWindowThis(), WindowID);
}

void Interface::DrawTimeUI()
{
if (!this->Data[eTIME].OnShow)
{
return;
}
// ----
if (this->CheckWindow(ObjWindow::CashShop) || this->CheckWindow(ObjWindow::SkillTree)
|| this->CheckWindow(ObjWindow::MoveList) || this->CheckWindow(ObjWindow::ChatWindow) || this->CheckWindow(FullMap))
{
return;
}
// ----
this->DrawGUI(eTIME, 0.0f, 412.0f);
// -----
time_t TimeLocal;
struct tm * LocalT;
time(&TimeLocal);
LocalT = localtime(&TimeLocal);
char LocalTime[30];
sprintf(LocalTime, "%2d:%02d:%02d", LocalT->tm_hour, LocalT->tm_min, LocalT->tm_sec);
this->DrawFormat(eWhite, 27.0f, 418.0f, 100.0f, 1.0f, LocalTime);
}
/*
bool Interface::AllowGUI()
{
if( gInterface.CheckResetWindow())
{
return false;
}

return pAllowGUI();
}
*/
void Interface::SetTextColor(BYTE Red, BYTE Green, BYTE Blue, BYTE Opacity)
{
pSetTextColor(pTextThis(), Red, Green, Blue, Opacity);
}
void Interface::DrawText(int X, int Y, LPCTSTR Text)
{
pDrawText(pTextThis(), X, Y, Text, 0, 0, (LPINT)1, 0);
}
int Interface::DrawFormat(DWORD Color, int PosX, int PosY, int Width, int Align, LPCSTR Text, ...)
{
char Buff[2048];
int BuffLen = sizeof(Buff)-1;
ZeroMemory(Buff, BuffLen);

va_list args;
va_start(args, Text);
int Len = vsprintf_s(Buff, BuffLen, Text, args);
va_end(args);

int LineCount = 0;

char * Line = strtok(Buff, "\n");

while( Line != NULL )
{
pDrawColorText(Line, PosX, PosY, Width, 0, Color, 0, Align);
PosY += 10;
Line = strtok(NULL, "\n");
}

return PosY;
}
void Interface::DrawFormatEx(DWORD Color, int PosX, int PosY, int Width, int Align, LPCSTR Text, ...)
{
char Buff[2048];
int BuffLen = sizeof(Buff)-1;
ZeroMemory(Buff, BuffLen);

va_list args;
va_start(args, Text);
int Len = vsprintf_s(Buff, BuffLen, Text, args);
va_end(args);

pDrawColorText(Buff, PosX, PosY, Width, 0, Color, 0, Align);
}
float Interface::DrawRepeatGUI(short MonsterID, float X, float Y, int Count)
{
float StartY = Y;

for( int i = 0; i < Count; i++ )
{
pDrawGUI(this->Data[MonsterID].ModelID, X, StartY,this->Data[MonsterID].Width, this->Data[MonsterID].Height);

StartY += this->Data[MonsterID].Height;
}

return StartY;
}
void Interface::DrawGUI(short ObjectID, float PosX, float PosY)
{
if( this->Data[ObjectID].X == -1 || this->Data[ObjectID].Y == -1 )
{
this->Data[ObjectID].X = PosX;
this->Data[ObjectID].Y = PosY;
this->Data[ObjectID].MaxX = PosX + this->Data[ObjectID].Width;
this->Data[ObjectID].MaxY = PosY + this->Data[ObjectID].Height;
}

pDrawGUI(this->Data[ObjectID].ModelID, PosX, PosY,this->Data[ObjectID].Width, this->Data[ObjectID].Height);
}
void Interface::DrawColoredGUI(short ObjectID, float X, float Y, DWORD Color)
{
if( this->Data[ObjectID].X == -1 || this->Data[ObjectID].Y == -1 )
{
this->Data[ObjectID].X = X;
this->Data[ObjectID].Y = Y;
this->Data[ObjectID].MaxX = X + this->Data[ObjectID].Width;
this->Data[ObjectID].MaxY = Y + this->Data[ObjectID].Height;
}

pDrawColorButton(this->Data[ObjectID].ModelID, X, Y,this->Data[ObjectID].Width, this->Data[ObjectID].Height, 0, 0, Color);
}
int Interface::DrawToolTip(int X, int Y, LPCSTR Text, ...)
{
char Buff[2048];
int BuffLen = sizeof(Buff);
ZeroMemory(Buff, BuffLen);

va_list args;
va_start(args, Text);
int Len = vsprintf_s(Buff, BuffLen, Text, args);
va_end(args);

return pDrawToolTip(X, Y, Buff);
}
int Interface::DrawToolTipEx(int X, int Y, LPCSTR Text, ...)
{
char Buff[2048];
int BuffLen = sizeof(Buff);
ZeroMemory(Buff, BuffLen);

va_list args;
va_start(args, Text);
int Len = vsprintf_s(Buff, BuffLen, Text, args);
va_end(args);

int LineCount = 0;

char * Line = strtok(Buff, "\n");

while( Line != NULL )
{
pDrawToolTip(X, Y, Line);
Y += 10;
Line = strtok(NULL, "\n");
}

return Y;
}
int Interface::DrawMessage(int Mode, LPCSTR Text, ...)
{
char Buff[2048];
int BuffLen = sizeof(Buff);
ZeroMemory(Buff, BuffLen);

va_list args;
va_start(args, Text);
int Len = vsprintf_s(Buff, BuffLen, Text, args);
va_end(args);

return pDrawMessage(Buff, Mode);
}
bool Interface::IsWorkZone(short ObjectID)
{
float PosX = this->Data[ObjectID].X;
float MaxX = PosX + this->Data[ObjectID].Width;

if( ObjectID == eSAMPLEBUTTON )
{
PosX = this->GetResizeX(ObjectID);
MaxX = PosX + this->Data[ObjectID].Width;
}

if( (gObjUser.m_CursorX < PosX || gObjUser.m_CursorX > MaxX) || (gObjUser.m_CursorY < this->Data[ObjectID].Y || gObjUser.m_CursorY > this->Data[ObjectID].MaxY) )
return false;

return true;
}
bool Interface::IsWorkZone(float X, float Y, float MaxX, float MaxY)
{
if( (gObjUser.m_CursorX < X || gObjUser.m_CursorX > MaxX) || (gObjUser.m_CursorY < Y || gObjUser.m_CursorY > MaxY) )
return false;

return true;
}
float Interface::GetResizeX(short ObjectID)
{
if( pWinWidth == 800 )
{
return this->Data[ObjectID].X + 16.0;
}
else if( pWinWidth != 1024 )
{
return this->Data[ObjectID].X - 16.0;
}

return this->Data[ObjectID].X;
}

float Interface::GetResizeY(short ObjectID)
{

return this->Data[ObjectID].Y;
}
// ----------------------------------------------------------------------------------------------
bool Interface::MiniMapCheck()
{
if (this->CheckWindow(Inventory) ||
this->CheckWindow(CashShop) ||
this->CheckWindow(ChaosBox) ||
this->CheckWindow(Character) ||
this->CheckWindow(CommandWindow) ||
this->CheckWindow(ExpandInventory) ||
this->CheckWindow(ExpandWarehouse) ||
this->CheckWindow(FullMap) ||
this->CheckWindow(GensInfo) ||
this->CheckWindow(Guild) ||
this->CheckWindow(NPC_Dialog) ||
this->CheckWindow(NPC_Julia) ||
this->CheckWindow(NPC_Titus) ||
this->CheckWindow(OtherStore) ||
this->CheckWindow(Party) ||
this->CheckWindow(PetInfo) ||
this->CheckWindow(Shop) ||
this->CheckWindow(SkillTree) ||
this->CheckWindow(Store) ||
this->CheckWindow(Trade) ||
this->CheckWindow(FriendList) ||
this->CheckWindow(FastMenu) ||
this->CheckWindow(MuHelper) ||
this->CheckWindow(Quest) ||
this->CheckWindow(Warehouse))
return true;
return false;
}

bool Interface::CombinedChecks()
{
if ((this->CheckWindow(Inventory)
&& this->CheckWindow(ExpandInventory)
&& this->CheckWindow(Store)) ||
(this->CheckWindow(Inventory)
&& this->CheckWindow(Warehouse)
&& this->CheckWindow(ExpandWarehouse)) ||
(this->CheckWindow(Inventory)
&& this->CheckWindow(Character)
&& this->CheckWindow(Store)))
return true;
return false;
}
// ----------------------------------------------------------------------------------------------
void Interface::DrawUsersPanelWindow()
{
if( !this->Data[eUSERSPANEL_MAIN].OnShow )
{
return;
}
// ----
DWORD ItemNameColor = eWhite;
float MainWidth = 230.0;
float MainHeight = 313.0;
float StartY = 90.0;
float StartX = (MAX_WIN_WIDTH / 2) - (MainWidth / 2);
float MainCenter = StartX + (MainWidth / 3);
float ButtonX = MainCenter - (29.0 / 2);

this->DrawGUI(eUSERSPANEL_MAIN, StartX, StartY + 2);
this->DrawGUI(eUSERSPANEL_TITLE, StartX, StartY);
StartY = this->DrawRepeatGUI(eUSERSPANEL_FRAME, StartX, StartY + 20.0, 13);
this->DrawGUI(eUSERSPANEL_FOOTER, StartX, StartY);
// ----
if( IsWorkZone(eUSERSPANEL_CLOSE) )
{
DWORD Color = eGray100;

if( this->Data[eUSERSPANEL_CLOSE].OnClick )
{
Color = eGray150;
}

this->DrawColoredGUI(eUSERSPANEL_CLOSE, this->Data[eUSERSPANEL_CLOSE].X, this->Data[eUSERSPANEL_CLOSE].Y, Color);
}
// ----
this->DrawGUI(eUSERSPANEL_CLOSE, ButtonX, this->Data[eUSERSPANEL_FOOTER].Y + 0);
this->DrawFormat(eWhite, StartX + 8, this->Data[eUSERSPANEL_FOOTER].Y + -205, 210, 3, gCustomMessage.GetMessageB(3240));
this->DrawFormat(eWhite, StartX + 8, this->Data[eUSERSPANEL_FOOTER].Y + 10, 210, 3, gCustomMessage.GetMessageB(388));
this->DrawGUI(eUSERSPANEL_DIV, StartX, this->Data[eUSERSPANEL_FOOTER].Y - 20);
// ----
this->DrawGUI(eUnCheck, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 37);
this->DrawGUI(eUSERSPANEL_OPTION, StartX + 35, this->Data[eUSERSPANEL_MAIN].Y + 38);
this->DrawGUI(eUSERSPANEL_LINE, StartX + 30, this->Data[eUSERSPANEL_MAIN].Y + 55);
this->DrawFormat(eWhite, StartX + 50, this->Data[eUSERSPANEL_MAIN].Y + 40, +125, 1, gCustomMessage.GetMessageB(3795));
{
if(lifebar)
{
}
else
{
this->DrawGUI(eUSERSPANEL_HPBAR, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 37);
}
// ----
}
// ----
    this->DrawGUI(eUSERSPANEL_RANKHIDE, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 62);
    this->DrawGUI(eUSERSPANEL_OPTION, StartX + 35, this->Data[eUSERSPANEL_MAIN].Y + 63);
    this->DrawGUI(eUSERSPANEL_LINE, StartX + 30, this->Data[eUSERSPANEL_MAIN].Y + 80);
this->DrawFormat(eWhite, StartX + 50, this->Data[eUSERSPANEL_MAIN].Y + 65, +125, 1, gCustomMessage.GetMessageB(3796));
{
if(rankbar)
{
}
else
{
this->DrawGUI(eUnCheck, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 62);
}
// ----
}
// ----
    this->DrawGUI(eUSERSPANEL_TRONGLOW, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 87);
    this->DrawGUI(eUSERSPANEL_OPTION, StartX + 35, this->Data[eUSERSPANEL_MAIN].Y + 88);
    this->DrawGUI(eUSERSPANEL_LINE, StartX + 30, this->Data[eUSERSPANEL_MAIN].Y + 105);
this->DrawFormat(eWhite, StartX + 50, this->Data[eUSERSPANEL_MAIN].Y + 90, +135, 1, gCustomMessage.GetMessageB(3797));
{
if(g_bEnabled)
{
}
else
{
this->DrawGUI(eUnCheck, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 87);
}
// ----
}
// ----
this->DrawGUI(eUSERSPANEL_FOG, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 112);
    this->DrawGUI(eUSERSPANEL_OPTION, StartX + 35, this->Data[eUSERSPANEL_MAIN].Y + 113);
    this->DrawGUI(eUSERSPANEL_LINE, StartX + 30, this->Data[eUSERSPANEL_MAIN].Y + 130);
this->DrawFormat(eWhite, StartX + 50, this->Data[eUSERSPANEL_MAIN].Y + 115, +125, 1, gCustomMessage.GetMessageB(3798));
{
if(gFog.EnableFog)
{
}
else
{
this->DrawGUI(eUnCheck, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 112);
}
// ----
}
// ----
this->DrawGUI(eUnCheck, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 137);
    this->DrawGUI(eUSERSPANEL_OPTION, StartX + 35, this->Data[eUSERSPANEL_MAIN].Y + 138);
    this->DrawGUI(eUSERSPANEL_LINE, StartX + 30, this->Data[eUSERSPANEL_MAIN].Y + 155);
this->DrawFormat(eWhite, StartX + 50, this->Data[eUSERSPANEL_MAIN].Y + 140, +125, 1, gCustomMessage.GetMessageB(3799));
{
if (!gChatExpanded.IsActive)
        {
}
else
{
this->DrawGUI(eUSERSPANEL_CHAT, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 137);
}
// ----
}

/* // ----
this->DrawGUI(eUSERSPANEL_MINIMAP, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 164);
    this->DrawGUI(eUSERSPANEL_OPTION, StartX + 35, this->Data[eUSERSPANEL_MAIN].Y + 165);
    this->DrawGUI(eUSERSPANEL_LINE, StartX + 30, this->Data[eUSERSPANEL_MAIN].Y + 182);
this->DrawFormat(eWhite, StartX + 20, this->Data[eUSERSPANEL_MAIN].Y + 167, +120, 3, "Mini Map      ");
{
if (showMiniMap)
        {
}
else
{
this->DrawGUI(eUnCheck, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 164);
}
// ----

}
// ----
*/
}
bool Interface::EventUsersPanelWindow_Main(DWORD Event)
{
this->EventUsersPanelWindow_Close(Event);
this->EventUsersPanelWindow_HPBAR(Event);
this->EventUsersPanelWindow_RANKHIDE(Event);
this->EventUsersPanelWindow_TRONGLOW(Event);
this->EventUsersPanelWindow_FOG(Event);
this->EventUsersPanelWindow_CHAT(Event);
this->EventUsersPanelWindow_MINIMAP(Event);
return true;
}
bool Interface::EventUsersPanelWindow_Close(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_CLOSE].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_CLOSE) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_CLOSE].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_CLOSE].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
this->Data[eUSERSPANEL_CLOSE].EventTick = GetTickCount();
this->CloseUsersPanelWindow();
// ----
return false;
}
bool Interface::EventUsersPanelWindow_HPBAR(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_HPBAR].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_HPBAR) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_HPBAR].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_HPBAR].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eUSERSPANEL_HPBAR].EventTick = GetTickCount();
if(lifebar)
{
lifebar = false;
}
else
{
lifebar = true;
}
}
bool Interface::EventUsersPanelWindow_RANKHIDE(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_RANKHIDE].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_RANKHIDE) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_RANKHIDE].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_RANKHIDE].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eUSERSPANEL_RANKHIDE].EventTick = GetTickCount();
if(rankbar)
{
rankbar = false;
}
else
{
rankbar = true;
}
}
bool Interface::EventUsersPanelWindow_TRONGLOW(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_TRONGLOW].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_TRONGLOW) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_TRONGLOW].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_TRONGLOW].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
this->Data[eUSERSPANEL_TRONGLOW].EventTick = GetTickCount();
if(g_bEnabled) //Effects
{
g_bEnabled = false;
}
else
{
g_bEnabled = true;
}
}
bool Interface::EventUsersPanelWindow_FOG(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_FOG].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_FOG) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_FOG].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_FOG].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eUSERSPANEL_FOG].EventTick = GetTickCount();
if(gFog.EnableFog) //Fog
{
gFog.EnableFog = false;
}
    else
{
gFog.EnableFog = true;
}
}
bool Interface::EventUsersPanelWindow_CHAT(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_CHAT].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_CHAT) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_CHAT].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_CHAT].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eUSERSPANEL_CHAT].EventTick = GetTickCount();
gChatExpanded.Switch();
}
bool Interface::EventUsersPanelWindow_MINIMAP(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_MINIMAP].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_MINIMAP) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_MINIMAP].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_MINIMAP].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eUSERSPANEL_MINIMAP].EventTick = GetTickCount();
if(showMiniMap) //Fog
{
gInterface.showMiniMap = false;
}
    else
{
gInterface.showMiniMap = true;
}
}

void Interface::DrawPSHOP()
{
float MainWidth = 230.0;
float MainHeight = 313.0;
float StartY = 100.0;
float StartX = (MAX_WIN_WIDTH / 2) - (MainWidth / 2);
// ---
if(this->CheckWindow(ObjWindow::Store) == true && this->CheckWindow(ObjWindow::ExpandInventory) == true)
{
StartX -= 190;
}
// ---
this->DrawFormat(eGold, StartX + 31, StartY + 77, + 125, 3, gCustomMessage.GetMessageB(3245));
// ---
this->DrawGUI(eSHOP_WC, StartX + 70, StartY + 90);
this->DrawFormat(eWhite, StartX + 80, StartY + 97, 100.0f, 1.0f, "WCoinC");
// ---
this->DrawGUI(eSHOP_B, StartX + 70, StartY + 120);
this->DrawFormat(eYellow, StartX + 85, StartY + 127, 100.0f, 1.0f, "Bless");
// ---
this->DrawGUI(eSHOP_WP, StartX + 125, StartY + 90);
this->DrawFormat(eWhite, StartX + 135, StartY + 97, 100.0f, 1.0f, "WCoinP");
// ---
this->DrawGUI(eSHOP_S, StartX + 125, StartY + 120);
this->DrawFormat(eYellow, StartX + 139, StartY + 127, 100.0f, 1.0f, "Soul");
// ---
this->DrawGUI(eSHOP_GP, StartX + 180, StartY + 90);
this->DrawFormat(eWhite, StartX + 187, StartY + 97, 100.0f, 1.0f, "GoblinPoint");
// ---
this->DrawGUI(eSHOP_C, StartX + 180, StartY + 120);
this->DrawFormat(eYellow, StartX + 195, StartY + 127, 100.0f, 1.0f, "Chaos");
// ---
/*this->DrawGUI(eSHOP_L, StartX + 70, StartY + 150);
this->DrawFormat(eYellow, StartX + 85, StartY + 157, 100.0f, 1.0f, "Life");
// ---
this->DrawGUI(eSHOP_Gem, StartX + 70, StartY + 180);
this->DrawFormat(eYellow, StartX + 80, StartY + 187, 100.0f, 1.0f, "Gemstone");
// ---
this->DrawGUI(eSHOP_Cr, StartX + 125, StartY + 150);
this->DrawFormat(eYellow, StartX + 135, StartY + 157, 100.0f, 1.0f, "Creation");
// ---
this->DrawGUI(eSHOP_H, StartX + 125, StartY + 180);
this->DrawFormat(eYellow, StartX + 137, StartY + 187, 100.0f, 1.0f, "Harmony");
// ---
this->DrawGUI(eSHOP_G, StartX + 180, StartY + 150);
this->DrawFormat(eYellow, StartX + 191, StartY + 157, 100.0f, 1.0f, "Guardian");
// ---
this->DrawGUI(eSHOP_R, StartX + 180, StartY + 180);
this->DrawFormat(eYellow, StartX + 187, StartY + 187, 100.0f, 1.0f, "Refine Stone");*/
// ---
this->DrawGUI(eSHOP_OFF, StartX + 190, StartY + 291);
// ---

if(IsWorkZone(eSHOP_OFF))
{
this->DrawToolTip(StartX + 170, StartY + 280, gCustomMessage.GetMessageB(3244));
}
}
bool Interface::DrawPSHOP_Main(DWORD Event)
{
this->DrawPSHOP_BLESS(Event);
this->DrawPSHOP_SOUL(Event);
this->DrawPSHOP_CHAOS(Event);
this->DrawPSHOP_WCOINC(Event);
this->DrawPSHOP_WCOINP(Event);
this->DrawPSHOP_COINTP(Event);
this->DrawPSHOP_OFFBUTTON(Event);
this->DrawPSHOP_LIFE(Event);
this->DrawPSHOP_CREATION(Event);
this->DrawPSHOP_GUARDIAN(Event);
this->DrawPSHOP_GEMSTONE(Event);
this->DrawPSHOP_HARMONY(Event);
this->DrawPSHOP_REFINE(Event);
return true;
}
bool Interface::DrawPSHOP_BLESS(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_B].EventTick);
// ----
if(!this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_B))
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_B].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_B].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_B].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x01,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}
bool Interface::DrawPSHOP_SOUL(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_S].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_S) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_S].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_S].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_S].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x02,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}
bool Interface::DrawPSHOP_CHAOS(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_C].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_C) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_C].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_C].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_C].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x03,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}
bool Interface::DrawPSHOP_WCOINC(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_WC].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_WC) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_WC].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_WC].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_WC].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x04,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}
bool Interface::DrawPSHOP_WCOINP(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_WP].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_WP) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_WP].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_WP].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_WP].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x05,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}
bool Interface::DrawPSHOP_COINTP(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_GP].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_GP) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_GP].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_GP].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_GP].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x06,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_LIFE(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_L].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_L) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_L].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_L].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_L].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x09,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_CREATION(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_Cr].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_Cr) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_Cr].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_Cr].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_Cr].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x10,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_GUARDIAN(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_G].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_G) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_G].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_G].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_G].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x11,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_GEMSTONE(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_Gem].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_Gem) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_Gem].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_Gem].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_Gem].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x12,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_HARMONY(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_H].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_H) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_H].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_H].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_H].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x13,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_REFINE(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_R].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_R) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_R].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_R].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_B].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x14,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_OFFBUTTON(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_OFF].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_OFF) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_OFF].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_OFF].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
this->Data[eSHOP_OFF].EventTick = GetTickCount();
gInterface.OpenOffWindow();
}

void Interface::DrawPSHOP_OFFMODE()
{
if( !this->Data[eOFFPANEL_MAIN].OnShow )
{
return;
}
float MainWidth = 230.0;
float MainHeight = 313.0;
float StartY = 80.0;
float StartX = (MAX_WIN_WIDTH / 2) - (MainWidth / 2);
float MainCenter = StartX + (MainWidth / 3);
float ButtonX = MainCenter - (29.0 / 2);

this->DrawGUI(eOFFPANEL_MAIN, StartX, StartY + 2);
this->DrawGUI(eOFFPANEL_TITLE, StartX, StartY);
//StartY = this->DrawRepeatGUI(eOFFPANEL_FRAME, StartX, StartY + 67.0, 13);
this->DrawGUI(eOFFPANEL_FOOTER, StartX, StartY + 75);

this->DrawFormat(eGold, StartX + 10, 90, 210, 3, gCustomMessage.GetMessageB(3244));
this->DrawFormat(eWhite, StartX + 10, 130, 210, 3, gCustomMessage.GetMessageB(3246));
this->DrawGUI(eOFFPANEL_YES, StartX + 30, StartY + 75);
this->DrawGUI(eOFFPANEL_CANE, StartX + 140, StartY + 75);
}

bool Interface::DrawPSHOP_OFFMAIN(DWORD Event)
{
this->DrawPSHOP_OFFYES(Event);
this->DrawPSHOP_OFFCANE(Event);
return true;
}

bool Interface::DrawPSHOP_OFFYES(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eOFFPANEL_YES].EventTick);
// ----
if( !this->Data[eOFFPANEL_MAIN].OnShow || !IsWorkZone(eOFFPANEL_YES) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eOFFPANEL_YES].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eOFFPANEL_YES].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eOFFPANEL_YES].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x07,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
this->CloseOffWindow();
}
bool Interface::DrawPSHOP_OFFCANE(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eOFFPANEL_CANE].EventTick);
// ----
if( !this->Data[eOFFPANEL_MAIN].OnShow || !IsWorkZone(eOFFPANEL_CANE) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eOFFPANEL_CANE].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eOFFPANEL_CANE].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eOFFPANEL_CANE].EventTick = GetTickCount();
this->CloseOffWindow();
}

// OFF ATTACK MODE
void Interface::DrawOffAttack()
{
if( !this->Data[eOFFATTACK_MAIN].OnShow )
{
return;
}
float MainWidth = 230.0;
float MainHeight = 313.0;
float StartY = 80.0;
float StartX = (MAX_WIN_WIDTH / 2) - (MainWidth / 2);
float MainCenter = StartX + (MainWidth / 3);
float ButtonX = MainCenter - (29.0 / 2);

this->DrawGUI(eOFFATTACK_MAIN, StartX, StartY + 2);
this->DrawGUI(eOFFATTACK_TITLE, StartX, StartY);
this->DrawGUI(eOFFATTACK_FOOTER, StartX, StartY + 75);

this->DrawFormat(eGold, StartX + 10, 90, 210, 3, "Offline Attack System");
this->DrawFormat(eWhite, StartX + 10, 130, 210, 3, "Leave your Character in OFFATTACK mode?");
this->DrawGUI(eOFFATTACK_YES, StartX + 30, StartY + 75);
this->DrawGUI(eOFFATTACK_CANE, StartX + 140, StartY + 75);

}

bool Interface::OffAttackEvent_Main(DWORD Event)
{
this->OffAttackEvent_Button1(Event);
this->OffAttackEvent_Button2(Event);
return true;
}

bool Interface::OffAttackEvent_Button1(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eOFFATTACK_YES].EventTick);
// ----
if( !this->Data[eOFFATTACK_MAIN].OnShow || !IsWorkZone(eOFFATTACK_YES) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eOFFATTACK_YES].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eOFFATTACK_YES].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eOFFATTACK_YES].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x08,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
this->CloseOffAttackWindow();
}
bool Interface::OffAttackEvent_Button2(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eOFFATTACK_CANE].EventTick);
// ----
if( !this->Data[eOFFATTACK_MAIN].OnShow || !IsWorkZone(eOFFATTACK_CANE) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eOFFATTACK_CANE].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eOFFATTACK_CANE].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eOFFATTACK_CANE].EventTick = GetTickCount();
this->CloseOffAttackWindow();
}


void Interface::Work2() {
if (gInterface.item_post_ && pCursorX < 150)
{
gInterface.DrawItemToolTipText(gInterface.item_post_, pCursorX + 80, pCursorY - 80);
if (gInterface.last_tickcount_view_ + 100 < GetTickCount()) {
gInterface.item_post_ = nullptr;
}
}
    pDrawInterface2();
}

void Interface::DrawChat ( int mode, char* character, char* message ) {
    PBMSG_CHATPOSTITEM chat;
    memset ( &chat.character_[0], 0, 10 );
    memset ( &chat.message_[0], 0, 89 );
    memcpy ( &chat.character_[0], &character[0], 10 );
    memcpy ( &chat.message_[0], &message[0], strlen ( message ) );
    pHandlePacketChatData ( &chat );

if (mode >= 1 && mode <= 9 && ChatBoxMuObjectChatDataPtrArrayLength) {
int index = ChatBoxMuObjectChatDataPtrArrayLength - 1;
ChatBoxMuObjectChatDataPtrArray[index]->chat_type_ = mode;
}
}

void Interface::DrawItemToolTipText ( void * item, int x, int y ) {
static DWORD mem = 0;
//static DWORD ItemToolTipAdress1 = 0x00861110; //1.04D-> 0x00860FC0
//static DWORD ItemToolTipAdress2 = 0x00861AA0; //1.04D-> 0x00861950
//static DWORD ItemToolTipAdress3 = 0x007E3E30; //1.04D-> 0x007E3CE0
_asm {
    PUSH 0
    PUSH 0
    PUSH 0
    PUSH item
    PUSH y
    PUSH x
MOV mem,0x00861110
    CALL mem
    MOV ECX, EAX
MOV mem,0x00861AA0
    CALL mem
    MOV ECX, EAX
MOV mem,0x007E3E30
    CALL mem
}

}

void Interface::DrawS2Interface()
{
gInterface.DrawGUI(eSkillBox, 305, 443);
}

void Interface::DrawMenuButton()
{
if (IsWorkZone(eParty))
{
this->DrawToolTip(345, 435, gCustomMessage.GetMessage(11));
}
if (this->CheckWindow(Party))
{
gInterface.DrawGUI(eParty, 348, 449);
}
if (IsWorkZone(eCharacter))
{
this->DrawToolTip(375, 435, gCustomMessage.GetMessage(12));
}
if (this->CheckWindow(Character))
{
gInterface.DrawGUI(eCharacter, 378.5f, 449);
}
if (IsWorkZone(eInventory))
{
this->DrawToolTip(405, 435, gCustomMessage.GetMessage(13));
}
if (this->CheckWindow(Inventory))
{
gInterface.DrawGUI(eInventory, 409, 449);
}
if (IsWorkZone(eFriend))
{
this->DrawToolTip(580, 420, gCustomMessage.GetMessage(14));
}
if (this->CheckWindow(FriendList))
{
gInterface.DrawGUI(eFriend, 581, 432);
}
if (IsWorkZone(eFastMenu))
{
this->DrawToolTip(13, 420, gCustomMessage.GetMessage(15));
}
if (this->CheckWindow(FastMenu))
{
gInterface.DrawGUI(eFastMenu, 5, 432);
}

}

void Interface::EventMenuButton(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
if (this->CheckWindow(ChaosBox))
{
return;
}

if (IsWorkZone(eParty))
{
DWORD Delay = (CurrentTick - this->Data[eParty].EventTick);
if (Event == WM_LBUTTONDOWN) {
this->Data[eParty].OnClick = true;
return;
}
this->Data[eParty].OnClick = false;
if (Delay < 500) {
return;
}
this->Data[eParty].EventTick = GetTickCount();
if (this->CheckWindow(Party)) {
this->CloseWindow(Party);
}
else {
this->OpenWindow(Party);
}
}
else if (IsWorkZone(eCharacter))
{
DWORD Delay = (CurrentTick - this->Data[eCharacter].EventTick);
if (Event == WM_LBUTTONDOWN) {
this->Data[eCharacter].OnClick = true;
return;
}
this->Data[eCharacter].OnClick = false;
if (Delay < 500) {
return;
}
this->Data[eCharacter].EventTick = GetTickCount();
if (this->CheckWindow(Character)) {
this->CloseWindow(Character);
}
else {
this->OpenWindow(Character);
}
}
else if (IsWorkZone(eInventory))
{
DWORD Delay = (CurrentTick - this->Data[eInventory].EventTick);
if (Event == WM_LBUTTONDOWN) {
this->Data[eInventory].OnClick = true;
return;
}
this->Data[eInventory].OnClick = false;
if (Delay < 500) {
return;
}
this->Data[eInventory].EventTick = GetTickCount();
if (this->CheckWindow(Inventory)) {
this->CloseWindow(Inventory);
}
else {
this->OpenWindow(Inventory);
}
}
else if (IsWorkZone(eFriend))
{
DWORD Delay = (CurrentTick - this->Data[eFriend].EventTick);
if (Event == WM_LBUTTONDOWN) {
this->Data[eFriend].OnClick = true;
return;
}
this->Data[eFriend].OnClick = false;
if (Delay < 500) {
return;
}
this->Data[eFriend].EventTick = GetTickCount();
if (this->CheckWindow(FriendList)) {
this->CloseWindow(FriendList);
}
else {
this->OpenWindow(FriendList);
}
}
else if (IsWorkZone(eFastMenu))
{
DWORD Delay = (CurrentTick - this->Data[eFastMenu].EventTick);
if (Event == WM_LBUTTONDOWN) {
this->Data[eFastMenu].OnClick = true;
return;
}
this->Data[eFastMenu].OnClick = false;
if (Delay < 500) {
return;
}
this->Data[eFastMenu].EventTick = GetTickCount();
if (this->CheckWindow(FastMenu)) {
this->CloseWindow(FastMenu);
}
else {
this->OpenWindow(FastMenu);
}
}
}

LoadBitmapA("Interface\\login_auto.tga", 531141, GL_NEAREST, GL_CLAMP, 1, 0);
pLoadImage("Custom\\Interface\\s3\\2Menu01_new.jpg", 31292, GL_LINEAR, GL_CLAMP, 1, 0);

tentei mas erro :(

error C2660: 'LoadBitmapA' : function does not take 6 arguments

IntelliSense: argument of type "const char *" is incompatible with parameter of type "HINSTANCE"   

IntelliSense: argument of type "int" is incompatible with parameter of type "LPCSTR"

IntelliSense: too many arguments in function call   

15
Sources Generales / Re: Source Auto Login Button (1.04e/S6) - Kapocha
« Posteado: March 16, 2022, 01:11:06 PM »
alguem me orienta onde colocar esse codigo com "LoadBitmapA("Interface\\login_auto.tga", 531141, GL_NEAREST, GL_CLAMP, 1, 0);" Não sou muito boa nisso

Interface.cpp

busca > "LoadBitmapA"
obrigado, mas no meu Interface.cpp não há palavra LoadBitmapA

Segue ai meu amigo e vai da certo


Obrigada. Mas meu código fonte não tem esses

Code: [Select]
#include "stdafx.h"
#include "Interface.h"
#include "TMemory.h"
#include "Protocol.h"
#include "Offset.h"
#include "User.h"
#include "Import.h"
#include "Defines.h"
#include "Camera.h"
#include "Fog.h"
#include "Other.h"
#include "Graphics.h"
#include "Glow.h"
#include "ChatExpanded.h"
#include "Reconnect.h"
#include "Config.h"
#include "CustomMessage.h"
#include "CustomEventTime.h"
#include "post_item.h"
#include "inter3.h"

Interface gInterface;
DWORD CharacterInfoExtern_Buff;
char CharacterInfoExtern_LevelBuff[80];
DWORD AddSomeShine_Buff;
DWORD AddSomeShine_Pointer;
bool Checkbox = true;

Interface::Interface()
{
ZeroMemory(this->Data, sizeof(this->Data));
}
Naked(AddSomeShine)
{
_asm
{
mov eax, dword ptr ds:[ecx + 0x30]
mov AddSomeShine_Buff, eax
}

if( AddSomeShine_Buff == 349 || AddSomeShine_Buff == 406 || AddSomeShine_Buff == 407 || AddSomeShine_Buff == 408 )
{
_asm
{
mov AddSomeShine_Buff, 0x005E4979
jmp AddSomeShine_Buff
}
}
else
{
_asm
{
mov AddSomeShine_Buff, 0x005E4A3C
jmp AddSomeShine_Buff
}
}
}

void Interface::Load()
{
/* this->BindObject(eSkillBox, iNewSkillBox, 32, 38, 305, 443);
// this->BindObject(eDragonLeft, iDragonLeft, 108, 45, 0, 388);
// this->BindObject(eDragonRight, iDragonRight, 108, 45, 532, 388);
// this->BindObject(eParty, iNewParty, 25, 25, 348, 449);
this->BindObject(eCharacter, iNewCharacter, 25, 25, 379, 449);
this->BindObject(eInventory, iNewInventory, 25, 25, 409, 449);
this->BindObject(eFriend, iNewWinpush, 54, 20, 581, 432);
this->BindObject(eFastMenu, iNewFastMenu, 55, 21, 5, 432);
*/
//--
this->BindObject(eSAMPLEBUTTON, 0x7AA4, 16, 15, 175, 1);
this->BindObject(eCheck, 0x9991, 15, 15, -1, -1);
this->BindObject(eUnCheck, 0x9992, 15, 15, -1, -1);
this->BindObject(eTIME, 0x787E, 80, 20, 174, 0);
this->BindObject(eOFFATTACK_BUTTON, 0x787F, 16, 12, -1, -1);
this->BindObject(eOPTIONS_BUTTON, 0x787D, 16, 12, -1, 1);
//---
this->BindObject(eCAMERA_MAIN, 0x787A, 93, 18, 174, 0);
this->BindObject(eCAMERA_BUTTON1, 0x787B, 16, 12, -1, -1);
this->BindObject(eCAMERA_BUTTON2, 0x787C, 16, 12, -1, -1);
//this->BindObject(eLOGO, 0x9989, 63.3, 50, 192.5, 1);
this->BindObject(eSHOP_WC, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_WP, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_GP, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_B, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_S, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_C, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_L, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_Cr, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_G, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_Gem, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_H, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_R, 0x7E54, 52, 25, -1, -1);
this->BindObject(eSHOP_OFF, 0x7C04, 36, 27, -1, -1);
//---
this->BindObject(eOFFPANEL_MAIN, 0x7A5A, 222, 120, -1, -1);
this->BindObject(eOFFPANEL_TITLE, 0x7A63, 230, 67, -1, -1);
this->BindObject(eOFFPANEL_FRAME, 0x7A58, 230, 15, -1, -1);
this->BindObject(eOFFPANEL_FOOTER, 0x7A59, 230, 50, -1, -1);
this->BindObject(eOFFPANEL_YES, 0x7B12, 54, 30, -1, -1);
this->BindObject(eOFFPANEL_CANE, 0x7B0C, 54, 30, -1, -1);
//---
this->BindObject(eOFFATTACK_MAIN, 0x7A5A, 222, 120, -1, -1);
this->BindObject(eOFFATTACK_TITLE, 0x7A63, 230, 67, -1, -1);
this->BindObject(eOFFATTACK_FRAME, 0x7A58, 230, 15, -1, -1);
this->BindObject(eOFFATTACK_FOOTER, 0x7A59, 230, 50, -1, -1);
this->BindObject(eOFFATTACK_YES, 0x7B12, 54, 30, -1, -1);
this->BindObject(eOFFATTACK_CANE, 0x7B0C, 54, 30, -1, -1);
//---
this->BindObject(eUSERSPANEL_MAIN, 0x7A5A, 222, 256, -1, -1);
this->BindObject(eUSERSPANEL_TITLE, 0x7A63, 230, 67, -1, -1);
this->BindObject(eUSERSPANEL_FRAME, 0x7A58, 230, 15, -1, -1);
this->BindObject(eUSERSPANEL_FOOTER, 0x7A59, 230, 50, -1, -1);
this->BindObject(eUSERSPANEL_DIV, 0x7A62, 223, 21, -1, -1);
this->BindObject(eUSERSPANEL_OPTION, 0x7B68, 10, 10, -1, -1);
this->BindObject(eUSERSPANEL_LINE, 0x7B67, 154, 2, -1, -1);
this->BindObject(eUSERSPANEL_BUTTON, 0x9994, 40, 19, -1, -1);
this->BindObject(eUSERSPANEL_BUTTON1, 0x9994, 40, 19, -1, -1);
this->BindObject(eUSERSPANEL_BUTTON2, 0x9994, 40, 19, -1, -1);
this->BindObject(eUSERSPANEL_FOG, 0x9991, 15, 15, -1, -1);
this->BindObject(eUSERSPANEL_CLOSE, 0x7A5E, 128, 29, -1, -1);
this->BindObject(eUSERSPANEL_HPBAR, 0x9991, 15, 15, -1, -1);
this->BindObject(eUSERSPANEL_RANKHIDE, 0x9991, 15, 15, -1, -1);
this->BindObject(eUSERSPANEL_TRONGLOW, 0x9991, 15, 15, -1, -1);
this->BindObject(eUSERSPANEL_CHAT, 0x9991, 15, 15, -1, -1);
this->BindObject(eUSERSPANEL_MINIMAP, 0x9991, 15, 15, -1, -1);
this->BindObject(eUSERSPANEL_CAMERA, 0x9991, 15, 15, -1, -1);
//--
//Command info
this->BindObject(eEventTime_MAIN, 0x789F, 222, 195, -1, -1);
this->BindObject(eEventTime_CLOSE, 0x7EC5, 36, 29, -1, -1);

//---
this->Data[eTIME].OnShow = true;
this->showMiniMap = false;
//SetOp((LPVOID)oAllowGUI_Call1, this->AllowGUI, ASM::CALL);
//SetOp((LPVOID)oAllowGUI_Call2, this->AllowGUI, ASM::CALL);
SetOp((LPVOID)oDrawInterface_Call, this->Work, ASM::CALL);
SetOp((LPVOID)oLoadSomeForm_Call, this->LoadImages, ASM::CALL);
SetOp((LPVOID)0x00633FFB, this->LoadModels, ASM::CALL);
SetOp((LPVOID)0x00842468, this->PShopTextInfo, ASM::CALL);
//==========================================
// - Remove Texts PShop
//==========================================
SetRange((LPVOID)0x00842086, 5, ASM::NOP);
SetRange((LPVOID)0x0084234F, 5, ASM::NOP);
SetRange((LPVOID)0x008423C3, 5, ASM::NOP);
// - Draw Post Item
 this->item_post_ = nullptr;
 SetOp((LPVOID)oDrawInterface2_Call, this->Work2, ASM::CALL);
}
void Interface::Work()
{
gInterface.DrawTimeUI();
gObjUser.Refresh();
gCamera.Rotate();
gCamera.Position();
//--
ReconnectMainProc();
gInterface.DrawOffAttack();
gInterface.DrawPSHOP_OFFMODE();
gInterface.DrawUsersPanelWindow();
gInterface.DrawCameraUI();
pDrawInterface();
//--
gCustomEventTime.DrawEventTimePanelWindow();
}
int Interface::PShopTextInfo(int pThis)
{
gInterface.DrawPSHOP();
// ---
return pPShopTextInfo(pThis);
}
void Interface::LoadImages()
{
/* pLoadImage("Custom\\Interface\\s3\\2Menu01_new.jpg", 31292, GL_LINEAR, GL_CLAMP, 1, 0); //replace
pLoadImage("Custom\\Interface\\s3\\2Menu02.jpg", 31293, GL_LINEAR, GL_CLAMP, 1, 0); //replace
pLoadImage("Custom\\Interface\\s3\\2Menu03_new.jpg", 31294, GL_LINEAR, GL_CLAMP, 1, 0); //replace
pLoadImage("Custom\\Interface\\s3\\none.tga", 31295, GL_LINEAR, GL_CLAMP, 1, 0); //replace
pLoadImage("Custom\\Interface\\s3\\2Menu_Red.jpg", 0x7A42, GL_LINEAR, GL_CLAMP, 1, 0);//replace
pLoadImage("Custom\\Interface\\s3\\2Menu_Green.jpg", 0x7A41, GL_LINEAR, GL_CLAMP, 1, 0);//replace
pLoadImage("Custom\\Interface\\s3\\2Menu_Blue.jpg", 0x7A40, GL_LINEAR, GL_CLAMP, 1, 0);//replace
// pLoadImage("Custom\\Interface\\s3\\2Menu04.tga", iDragonLeft, GL_LINEAR, GL_CLAMP, 1, 0);
// pLoadImage("Custom\\Interface\\s3\\2Menu05.tga", iDragonRight, GL_LINEAR, GL_CLAMP, 1, 0);
pLoadImage("Custom\\Interface\\s3\\2Menu_Inventory.jpg", iNewInventory, GL_LINEAR, GL_CLAMP, 1, 0);
pLoadImage("Custom\\Interface\\s3\\2Menu_Character.jpg", iNewCharacter, GL_LINEAR, GL_CLAMP, 1, 0);
// pLoadImage("Custom\\Interface\\s3\\2Menu_Party.jpg", iNewParty, GL_LINEAR, GL_CLAMP, 1, 0);
pLoadImage("Custom\\Interface\\s3\\2win_push.jpg", iNewWinpush, GL_LINEAR, GL_CLAMP, 1, 0);
pLoadImage("Custom\\Interface\\s3\\2menu01_new2.jpg", iNewFastMenu, GL_LINEAR, GL_CLAMP, 1, 0);
pLoadImage("Custom\\Interface\\s3\\2SkillBox.jpg", iNewSkillBox, GL_LINEAR, GL_CLAMP, 1, 0);
*/
//--
pLoadImage("Interface\\TimeBar.tga", 0x787E, 0x2601, 0x2901, 1, 0);
pLoadImage("Interface\\CameraUI_BG.tga", 0x787A, 0x2601, 0x2900, 1, 0);
pLoadImage("Interface\\CameraUI_Switch.tga", 0x787B, 0x2601, 0x2900, 1, 0);
pLoadImage("Interface\\CameraUI_Reset.tga", 0x787C, 0x2601, 0x2900, 1, 0);
pLoadImage("Interface\\OffAttack_Switch.tga", 0x787F, 0x2601, 0x2900, 1, 0);
pLoadImage("Interface\\MacroSetup.tga", 0x787D, 0x2601, 0x2900, 1, 0);
//--
pLoadImage("Interface\\EventTime.tga", 0x789F, 0x2601, 0x2900, 1, 0);
// logo
//pLoadImage("Custom\\logo\\mwebgame.tga", 0x9989, 0x2601, 0x2900, 1, 0);
// MiniMap
pLoadImage("Interface\\check.jpg", 0x9991, 0x2601, 0x2900, 1, 0);
pLoadImage("Interface\\uncheck.jpg", 0x9992, 0x2601, 0x2900, 1, 0);
pLoadImage("Interface\\button.tga", 0x9994, 0x2601, 0x2900, 1, 0);
//--
//Here animation for cape. Wing 214.bmd for display only item in Inventory
pLoadImage("Item\\Newdeath01.tga", 0x789C, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\Newdeath02.tga", 0x789D, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\darklordwing4dd.tga", 0x78A5, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\darklordwing4de.tga", 0x78A6, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\ragefighterwing4db.tga", 0x78A8, 0x2601, 0x2900, 1, 0);
//--
pLoadImage("Item\\growlancerwing4dc.tga", 0x78A9, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\Item801_2_wing.tga", 0x78B1, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\Item802_2_wing.tga", 0x78B2, 0x2601, 0x2900, 1, 0);
//--
pLoadImage("Item\\NCcapeSmall.tga", 0x78B3, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\DarkLordRobeSmall.tga", 0x78B4, 0x2601, 0x2900, 1, 0);
//--
pLoadImage("Item\\darklordwing4ddmr.tga", 0x78B5, 0x2601, 0x2900, 1, 0);
pLoadImage("Item\\darklordwing4demr.tga", 0x78B6, 0x2601, 0x2900, 1, 0);
//--
pLoadSomeForm();
}
void Interface::LoadModels()
{
pInitModelData2();
}
void Interface::BindObject(short MonsterID, DWORD ModelID, float Width, float Height, float X, float Y)
{
this->Data[MonsterID].EventTick = 0;
this->Data[MonsterID].OnClick = false;
this->Data[MonsterID].OnShow = false;
this->Data[MonsterID].ModelID = ModelID;
this->Data[MonsterID].Width = Width;
this->Data[MonsterID].Height = Height;
this->Data[MonsterID].X = X;
this->Data[MonsterID].Y = Y;
this->Data[MonsterID].MaxX = X + Width;
this->Data[MonsterID].MaxY = Y + Height;
this->Data[MonsterID].Attribute = 0;
}
void Interface::DrawSampleButton()
{
float PosX = this->GetResizeX(eSAMPLEBUTTON);

if( this->CheckWindow(ObjWindow::CashShop)
|| this->CheckWindow(ObjWindow::FullMap)
|| this->CheckWindow(ObjWindow::SkillTree)
|| this->CheckWindow(MoveList) )
{
return;
}

this->DrawGUI(eSAMPLEBUTTON, PosX, 1);

if( !IsWorkZone(eSAMPLEBUTTON) )
{
return;
}

this->DrawToolTip(PosX - 5, 31, "Button tooltip");

if( this->Data[eSAMPLEBUTTON].OnClick )
{
this->DrawColoredGUI(eSAMPLEBUTTON, PosX, 1, pMakeColor(40, 20, 3, 130));
return;
}

this->DrawColoredGUI(eSAMPLEBUTTON, PosX, 1, pMakeColor(255, 204, 20, 130));
}
void Interface::EventSampleButton(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSAMPLEBUTTON].EventTick);

if( this->CheckWindow(CashShop) || this->CheckWindow(FullMap)
|| this->CheckWindow(SkillTree) || this->CheckWindow(MoveList)
|| !IsWorkZone(eSAMPLEBUTTON) )
{
return;
}

if( Event == WM_LBUTTONDOWN )
{
this->Data[eSAMPLEBUTTON].OnClick = true;
return;
}

this->Data[eSAMPLEBUTTON].OnClick = false;

if( Delay < 500 )
{
return;
}

this->Data[eSAMPLEBUTTON].EventTick = GetTickCount();

if( !this->Data[eRANK_MAIN].OnShow )
{
this->Data[eRANK_MAIN].OnShow = true;
}
else
{
this->Data[eRANK_MAIN].OnShow = false;
}
}
void Interface::DrawCameraUI()
{
float PosX = this->GetResizeX(eCAMERA_MAIN);
// ----
if (this->CheckWindow(CashShop)
|| this->CheckWindow(SkillTree)
|| this->CheckWindow(FullMap)
|| this->CheckWindow(MoveList)
|| (this->CheckWindow(Inventory)
&& this->CheckWindow(ExpandInventory)
&& this->CheckWindow(Store))
|| (this->CheckWindow(Inventory)
&& this->CheckWindow(Warehouse)
&& this->CheckWindow(ExpandWarehouse)))
{
return;
}
// ----
this->DrawGUI(eCAMERA_MAIN, PosX, 0);
this->DrawGUI(eCAMERA_BUTTON1, PosX + 18.5, 1);
this->DrawGUI(eCAMERA_BUTTON2, PosX + 37.0, 1);
//this->DrawGUI(eLOGO, PosX + 370, 20);
this->DrawGUI(eOFFATTACK_BUTTON, PosX + 0.5, 1.5);
this->DrawGUI(eOPTIONS_BUTTON, PosX + 55.5, 1.5);
// ----
if (gCamera.IsActive)
{
this->DrawColoredGUI(eCAMERA_BUTTON1, PosX + 18.5, 1, eShinyGreen);
}
// ----
if (IsWorkZone(eCAMERA_BUTTON1))
{
if (gCamera.IsActive)
{
this->DrawToolTip(PosX + 18.5 - 5, 25, "Zoom: %02.f%%", gCamera.ZoomPercent);
}
else
{
this->DrawToolTip(PosX + 18.5 - 5, 25, gCustomMessage.GetMessageB(3243));
}
// ----
if (this->Data[eCAMERA_BUTTON1].OnClick)
{
this->DrawColoredGUI(eCAMERA_BUTTON1, PosX + 18.5, 1, pMakeColor(40, 20, 3, 130));
return;
}
// ----
this->DrawColoredGUI(eCAMERA_BUTTON1, PosX + 18.5, 1, pMakeColor(255, 204, 20, 200));
}
else if (IsWorkZone(eCAMERA_BUTTON2))
{
this->DrawToolTip(PosX + 37.0 - 5, 25, gCustomMessage.GetMessageB(3242));
// ----
if (this->Data[eCAMERA_BUTTON2].OnClick)
{
this->DrawColoredGUI(eCAMERA_BUTTON2, PosX + 37.0, 1, pMakeColor(40, 20, 3, 130));
return;
}
// ----
this->DrawColoredGUI(eCAMERA_BUTTON2, PosX + 37.0, 1, pMakeColor(255, 204, 20, 200));
}

// ----
else if (IsWorkZone(eOFFATTACK_BUTTON))
{
{
this->DrawToolTip(PosX + 0.5 - 5, 25, gCustomMessage.GetMessageB(3241));
}
// ----
if (this->Data[eOFFATTACK_BUTTON].OnClick)
{
this->DrawColoredGUI(eOFFATTACK_BUTTON, PosX + 0.5, 1.5, pMakeColor(40, 20, 3, 130));
return;
}
// ----
this->DrawColoredGUI(eOFFATTACK_BUTTON, PosX + 0.5, 1.5, pMakeColor(250, 125, 50, 200));
}
// ----
else if (IsWorkZone(eOPTIONS_BUTTON))
{
{
this->DrawToolTip(PosX + 55.5 - 5, 25, gCustomMessage.GetMessageB(3240)); //Advanced Options

}
// ----
if (this->Data[eOPTIONS_BUTTON].OnClick)
{
this->DrawColoredGUI(eOFFATTACK_BUTTON, PosX + 55.5, 1.5, pMakeColor(40, 20, 3, 130));
return;
}
// ----
this->DrawColoredGUI(eOPTIONS_BUTTON, PosX + 55.5, 1.5, pMakeColor(255, 204, 20, 200));
}
// ----
}
// ----------------------------------------------------------------------------------------------
void Interface::EventCameraUI(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
// ----
if (this->CheckWindow(CashShop)
|| this->CheckWindow(SkillTree)
|| this->CheckWindow(FullMap)
|| this->CheckWindow(MoveList)
|| (this->CheckWindow(Inventory)
&& this->CheckWindow(ExpandInventory)
&& this->CheckWindow(Store))
|| (this->CheckWindow(Inventory)
&& this->CheckWindow(Warehouse)
&& this->CheckWindow(ExpandWarehouse)))
{
return;
}
// ----
if (IsWorkZone(eCAMERA_BUTTON1))
{
DWORD Delay = (CurrentTick - this->Data[eCAMERA_BUTTON1].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eCAMERA_BUTTON1].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eCAMERA_BUTTON1].OnClick = false;
pSetCursorFocus = false;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eCAMERA_BUTTON1].EventTick = GetTickCount();
// ----
gCamera.Switch();
}
else if (IsWorkZone(eCAMERA_BUTTON2))
{
DWORD Delay = (CurrentTick - this->Data[eCAMERA_BUTTON2].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eCAMERA_BUTTON2].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eCAMERA_BUTTON2].OnClick = false;
pSetCursorFocus = false;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eCAMERA_BUTTON2].EventTick = GetTickCount();
// ----
gCamera.Init();
}

// ----
else if (IsWorkZone(eOFFATTACK_BUTTON))
{
DWORD Delay = (CurrentTick - this->Data[eOFFATTACK_BUTTON].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eOFFATTACK_BUTTON].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eOFFATTACK_BUTTON].OnClick = false;
pSetCursorFocus = false;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eOFFATTACK_BUTTON].EventTick = GetTickCount();
// ----
OpenOffAttackWindow();
}
// ----
else if (IsWorkZone(eOPTIONS_BUTTON))
{
DWORD Delay = (CurrentTick - this->Data[eOPTIONS_BUTTON].EventTick);
// ----
if (Event == WM_LBUTTONDOWN)
{
this->Data[eOPTIONS_BUTTON].OnClick = true;
pSetCursorFocus = true;
return;
}
// ----
this->Data[eOPTIONS_BUTTON].OnClick = false;
pSetCursorFocus = false;
// ----
if (Delay < 500)
{
return;
}
// ----
this->Data[eOPTIONS_BUTTON].EventTick = GetTickCount();
// ----
gInterface.OpenUsersPanelWindow();
}
}
// ----------------------------------------------------------------------------------------------
bool Interface::CheckWindow(int WindowID)
{
return pCheckWindow(pWindowThis(), WindowID);
}
int Interface::CloseWindow(int WindowID)
{
return pCloseWindow(pWindowThis(), WindowID);
}
int Interface::OpenWindow(int WindowID)
{
return pOpenWindow(pWindowThis(), WindowID);
}

void Interface::DrawTimeUI()
{
if (!this->Data[eTIME].OnShow)
{
return;
}
// ----
if (this->CheckWindow(ObjWindow::CashShop) || this->CheckWindow(ObjWindow::SkillTree)
|| this->CheckWindow(ObjWindow::MoveList) || this->CheckWindow(ObjWindow::ChatWindow) || this->CheckWindow(FullMap))
{
return;
}
// ----
this->DrawGUI(eTIME, 0.0f, 412.0f);
// -----
time_t TimeLocal;
struct tm * LocalT;
time(&TimeLocal);
LocalT = localtime(&TimeLocal);
char LocalTime[30];
sprintf(LocalTime, "%2d:%02d:%02d", LocalT->tm_hour, LocalT->tm_min, LocalT->tm_sec);
this->DrawFormat(eWhite, 27.0f, 418.0f, 100.0f, 1.0f, LocalTime);
}
/*
bool Interface::AllowGUI()
{
if( gInterface.CheckResetWindow())
{
return false;
}

return pAllowGUI();
}
*/
void Interface::SetTextColor(BYTE Red, BYTE Green, BYTE Blue, BYTE Opacity)
{
pSetTextColor(pTextThis(), Red, Green, Blue, Opacity);
}
void Interface::DrawText(int X, int Y, LPCTSTR Text)
{
pDrawText(pTextThis(), X, Y, Text, 0, 0, (LPINT)1, 0);
}
int Interface::DrawFormat(DWORD Color, int PosX, int PosY, int Width, int Align, LPCSTR Text, ...)
{
char Buff[2048];
int BuffLen = sizeof(Buff)-1;
ZeroMemory(Buff, BuffLen);

va_list args;
va_start(args, Text);
int Len = vsprintf_s(Buff, BuffLen, Text, args);
va_end(args);

int LineCount = 0;

char * Line = strtok(Buff, "\n");

while( Line != NULL )
{
pDrawColorText(Line, PosX, PosY, Width, 0, Color, 0, Align);
PosY += 10;
Line = strtok(NULL, "\n");
}

return PosY;
}
void Interface::DrawFormatEx(DWORD Color, int PosX, int PosY, int Width, int Align, LPCSTR Text, ...)
{
char Buff[2048];
int BuffLen = sizeof(Buff)-1;
ZeroMemory(Buff, BuffLen);

va_list args;
va_start(args, Text);
int Len = vsprintf_s(Buff, BuffLen, Text, args);
va_end(args);

pDrawColorText(Buff, PosX, PosY, Width, 0, Color, 0, Align);
}
float Interface::DrawRepeatGUI(short MonsterID, float X, float Y, int Count)
{
float StartY = Y;

for( int i = 0; i < Count; i++ )
{
pDrawGUI(this->Data[MonsterID].ModelID, X, StartY,this->Data[MonsterID].Width, this->Data[MonsterID].Height);

StartY += this->Data[MonsterID].Height;
}

return StartY;
}
void Interface::DrawGUI(short ObjectID, float PosX, float PosY)
{
if( this->Data[ObjectID].X == -1 || this->Data[ObjectID].Y == -1 )
{
this->Data[ObjectID].X = PosX;
this->Data[ObjectID].Y = PosY;
this->Data[ObjectID].MaxX = PosX + this->Data[ObjectID].Width;
this->Data[ObjectID].MaxY = PosY + this->Data[ObjectID].Height;
}

pDrawGUI(this->Data[ObjectID].ModelID, PosX, PosY,this->Data[ObjectID].Width, this->Data[ObjectID].Height);
}
void Interface::DrawColoredGUI(short ObjectID, float X, float Y, DWORD Color)
{
if( this->Data[ObjectID].X == -1 || this->Data[ObjectID].Y == -1 )
{
this->Data[ObjectID].X = X;
this->Data[ObjectID].Y = Y;
this->Data[ObjectID].MaxX = X + this->Data[ObjectID].Width;
this->Data[ObjectID].MaxY = Y + this->Data[ObjectID].Height;
}

pDrawColorButton(this->Data[ObjectID].ModelID, X, Y,this->Data[ObjectID].Width, this->Data[ObjectID].Height, 0, 0, Color);
}
int Interface::DrawToolTip(int X, int Y, LPCSTR Text, ...)
{
char Buff[2048];
int BuffLen = sizeof(Buff);
ZeroMemory(Buff, BuffLen);

va_list args;
va_start(args, Text);
int Len = vsprintf_s(Buff, BuffLen, Text, args);
va_end(args);

return pDrawToolTip(X, Y, Buff);
}
int Interface::DrawToolTipEx(int X, int Y, LPCSTR Text, ...)
{
char Buff[2048];
int BuffLen = sizeof(Buff);
ZeroMemory(Buff, BuffLen);

va_list args;
va_start(args, Text);
int Len = vsprintf_s(Buff, BuffLen, Text, args);
va_end(args);

int LineCount = 0;

char * Line = strtok(Buff, "\n");

while( Line != NULL )
{
pDrawToolTip(X, Y, Line);
Y += 10;
Line = strtok(NULL, "\n");
}

return Y;
}
int Interface::DrawMessage(int Mode, LPCSTR Text, ...)
{
char Buff[2048];
int BuffLen = sizeof(Buff);
ZeroMemory(Buff, BuffLen);

va_list args;
va_start(args, Text);
int Len = vsprintf_s(Buff, BuffLen, Text, args);
va_end(args);

return pDrawMessage(Buff, Mode);
}
bool Interface::IsWorkZone(short ObjectID)
{
float PosX = this->Data[ObjectID].X;
float MaxX = PosX + this->Data[ObjectID].Width;

if( ObjectID == eSAMPLEBUTTON )
{
PosX = this->GetResizeX(ObjectID);
MaxX = PosX + this->Data[ObjectID].Width;
}

if( (gObjUser.m_CursorX < PosX || gObjUser.m_CursorX > MaxX) || (gObjUser.m_CursorY < this->Data[ObjectID].Y || gObjUser.m_CursorY > this->Data[ObjectID].MaxY) )
return false;

return true;
}
bool Interface::IsWorkZone(float X, float Y, float MaxX, float MaxY)
{
if( (gObjUser.m_CursorX < X || gObjUser.m_CursorX > MaxX) || (gObjUser.m_CursorY < Y || gObjUser.m_CursorY > MaxY) )
return false;

return true;
}
float Interface::GetResizeX(short ObjectID)
{
if( pWinWidth == 800 )
{
return this->Data[ObjectID].X + 16.0;
}
else if( pWinWidth != 1024 )
{
return this->Data[ObjectID].X - 16.0;
}

return this->Data[ObjectID].X;
}

float Interface::GetResizeY(short ObjectID)
{

return this->Data[ObjectID].Y;
}
// ----------------------------------------------------------------------------------------------
bool Interface::MiniMapCheck()
{
if (this->CheckWindow(Inventory) ||
this->CheckWindow(CashShop) ||
this->CheckWindow(ChaosBox) ||
this->CheckWindow(Character) ||
this->CheckWindow(CommandWindow) ||
this->CheckWindow(ExpandInventory) ||
this->CheckWindow(ExpandWarehouse) ||
this->CheckWindow(FullMap) ||
this->CheckWindow(GensInfo) ||
this->CheckWindow(Guild) ||
this->CheckWindow(NPC_Dialog) ||
this->CheckWindow(NPC_Julia) ||
this->CheckWindow(NPC_Titus) ||
this->CheckWindow(OtherStore) ||
this->CheckWindow(Party) ||
this->CheckWindow(PetInfo) ||
this->CheckWindow(Shop) ||
this->CheckWindow(SkillTree) ||
this->CheckWindow(Store) ||
this->CheckWindow(Trade) ||
this->CheckWindow(FriendList) ||
this->CheckWindow(FastMenu) ||
this->CheckWindow(MuHelper) ||
this->CheckWindow(Quest) ||
this->CheckWindow(Warehouse))
return true;
return false;
}

bool Interface::CombinedChecks()
{
if ((this->CheckWindow(Inventory)
&& this->CheckWindow(ExpandInventory)
&& this->CheckWindow(Store)) ||
(this->CheckWindow(Inventory)
&& this->CheckWindow(Warehouse)
&& this->CheckWindow(ExpandWarehouse)) ||
(this->CheckWindow(Inventory)
&& this->CheckWindow(Character)
&& this->CheckWindow(Store)))
return true;
return false;
}
// ----------------------------------------------------------------------------------------------
void Interface::DrawUsersPanelWindow()
{
if( !this->Data[eUSERSPANEL_MAIN].OnShow )
{
return;
}
// ----
DWORD ItemNameColor = eWhite;
float MainWidth = 230.0;
float MainHeight = 313.0;
float StartY = 90.0;
float StartX = (MAX_WIN_WIDTH / 2) - (MainWidth / 2);
float MainCenter = StartX + (MainWidth / 3);
float ButtonX = MainCenter - (29.0 / 2);

this->DrawGUI(eUSERSPANEL_MAIN, StartX, StartY + 2);
this->DrawGUI(eUSERSPANEL_TITLE, StartX, StartY);
StartY = this->DrawRepeatGUI(eUSERSPANEL_FRAME, StartX, StartY + 20.0, 13);
this->DrawGUI(eUSERSPANEL_FOOTER, StartX, StartY);
// ----
if( IsWorkZone(eUSERSPANEL_CLOSE) )
{
DWORD Color = eGray100;

if( this->Data[eUSERSPANEL_CLOSE].OnClick )
{
Color = eGray150;
}

this->DrawColoredGUI(eUSERSPANEL_CLOSE, this->Data[eUSERSPANEL_CLOSE].X, this->Data[eUSERSPANEL_CLOSE].Y, Color);
}
// ----
this->DrawGUI(eUSERSPANEL_CLOSE, ButtonX, this->Data[eUSERSPANEL_FOOTER].Y + 0);
this->DrawFormat(eWhite, StartX + 8, this->Data[eUSERSPANEL_FOOTER].Y + -205, 210, 3, gCustomMessage.GetMessageB(3240));
this->DrawFormat(eWhite, StartX + 8, this->Data[eUSERSPANEL_FOOTER].Y + 10, 210, 3, gCustomMessage.GetMessageB(388));
this->DrawGUI(eUSERSPANEL_DIV, StartX, this->Data[eUSERSPANEL_FOOTER].Y - 20);
// ----
this->DrawGUI(eUnCheck, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 37);
this->DrawGUI(eUSERSPANEL_OPTION, StartX + 35, this->Data[eUSERSPANEL_MAIN].Y + 38);
this->DrawGUI(eUSERSPANEL_LINE, StartX + 30, this->Data[eUSERSPANEL_MAIN].Y + 55);
this->DrawFormat(eWhite, StartX + 50, this->Data[eUSERSPANEL_MAIN].Y + 40, +125, 1, gCustomMessage.GetMessageB(3795));
{
if(lifebar)
{
}
else
{
this->DrawGUI(eUSERSPANEL_HPBAR, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 37);
}
// ----
}
// ----
    this->DrawGUI(eUSERSPANEL_RANKHIDE, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 62);
    this->DrawGUI(eUSERSPANEL_OPTION, StartX + 35, this->Data[eUSERSPANEL_MAIN].Y + 63);
    this->DrawGUI(eUSERSPANEL_LINE, StartX + 30, this->Data[eUSERSPANEL_MAIN].Y + 80);
this->DrawFormat(eWhite, StartX + 50, this->Data[eUSERSPANEL_MAIN].Y + 65, +125, 1, gCustomMessage.GetMessageB(3796));
{
if(rankbar)
{
}
else
{
this->DrawGUI(eUnCheck, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 62);
}
// ----
}
// ----
    this->DrawGUI(eUSERSPANEL_TRONGLOW, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 87);
    this->DrawGUI(eUSERSPANEL_OPTION, StartX + 35, this->Data[eUSERSPANEL_MAIN].Y + 88);
    this->DrawGUI(eUSERSPANEL_LINE, StartX + 30, this->Data[eUSERSPANEL_MAIN].Y + 105);
this->DrawFormat(eWhite, StartX + 50, this->Data[eUSERSPANEL_MAIN].Y + 90, +135, 1, gCustomMessage.GetMessageB(3797));
{
if(g_bEnabled)
{
}
else
{
this->DrawGUI(eUnCheck, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 87);
}
// ----
}
// ----
this->DrawGUI(eUSERSPANEL_FOG, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 112);
    this->DrawGUI(eUSERSPANEL_OPTION, StartX + 35, this->Data[eUSERSPANEL_MAIN].Y + 113);
    this->DrawGUI(eUSERSPANEL_LINE, StartX + 30, this->Data[eUSERSPANEL_MAIN].Y + 130);
this->DrawFormat(eWhite, StartX + 50, this->Data[eUSERSPANEL_MAIN].Y + 115, +125, 1, gCustomMessage.GetMessageB(3798));
{
if(gFog.EnableFog)
{
}
else
{
this->DrawGUI(eUnCheck, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 112);
}
// ----
}
// ----
this->DrawGUI(eUnCheck, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 137);
    this->DrawGUI(eUSERSPANEL_OPTION, StartX + 35, this->Data[eUSERSPANEL_MAIN].Y + 138);
    this->DrawGUI(eUSERSPANEL_LINE, StartX + 30, this->Data[eUSERSPANEL_MAIN].Y + 155);
this->DrawFormat(eWhite, StartX + 50, this->Data[eUSERSPANEL_MAIN].Y + 140, +125, 1, gCustomMessage.GetMessageB(3799));
{
if (!gChatExpanded.IsActive)
        {
}
else
{
this->DrawGUI(eUSERSPANEL_CHAT, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 137);
}
// ----
}

/* // ----
this->DrawGUI(eUSERSPANEL_MINIMAP, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 164);
    this->DrawGUI(eUSERSPANEL_OPTION, StartX + 35, this->Data[eUSERSPANEL_MAIN].Y + 165);
    this->DrawGUI(eUSERSPANEL_LINE, StartX + 30, this->Data[eUSERSPANEL_MAIN].Y + 182);
this->DrawFormat(eWhite, StartX + 20, this->Data[eUSERSPANEL_MAIN].Y + 167, +120, 3, "Mini Map      ");
{
if (showMiniMap)
        {
}
else
{
this->DrawGUI(eUnCheck, ButtonX + 100, this->Data[eUSERSPANEL_MAIN].Y + 164);
}
// ----

}
// ----
*/
}
bool Interface::EventUsersPanelWindow_Main(DWORD Event)
{
this->EventUsersPanelWindow_Close(Event);
this->EventUsersPanelWindow_HPBAR(Event);
this->EventUsersPanelWindow_RANKHIDE(Event);
this->EventUsersPanelWindow_TRONGLOW(Event);
this->EventUsersPanelWindow_FOG(Event);
this->EventUsersPanelWindow_CHAT(Event);
this->EventUsersPanelWindow_MINIMAP(Event);
return true;
}
bool Interface::EventUsersPanelWindow_Close(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_CLOSE].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_CLOSE) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_CLOSE].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_CLOSE].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
this->Data[eUSERSPANEL_CLOSE].EventTick = GetTickCount();
this->CloseUsersPanelWindow();
// ----
return false;
}
bool Interface::EventUsersPanelWindow_HPBAR(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_HPBAR].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_HPBAR) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_HPBAR].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_HPBAR].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eUSERSPANEL_HPBAR].EventTick = GetTickCount();
if(lifebar)
{
lifebar = false;
}
else
{
lifebar = true;
}
}
bool Interface::EventUsersPanelWindow_RANKHIDE(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_RANKHIDE].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_RANKHIDE) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_RANKHIDE].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_RANKHIDE].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eUSERSPANEL_RANKHIDE].EventTick = GetTickCount();
if(rankbar)
{
rankbar = false;
}
else
{
rankbar = true;
}
}
bool Interface::EventUsersPanelWindow_TRONGLOW(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_TRONGLOW].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_TRONGLOW) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_TRONGLOW].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_TRONGLOW].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
this->Data[eUSERSPANEL_TRONGLOW].EventTick = GetTickCount();
if(g_bEnabled) //Effects
{
g_bEnabled = false;
}
else
{
g_bEnabled = true;
}
}
bool Interface::EventUsersPanelWindow_FOG(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_FOG].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_FOG) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_FOG].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_FOG].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eUSERSPANEL_FOG].EventTick = GetTickCount();
if(gFog.EnableFog) //Fog
{
gFog.EnableFog = false;
}
    else
{
gFog.EnableFog = true;
}
}
bool Interface::EventUsersPanelWindow_CHAT(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_CHAT].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_CHAT) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_CHAT].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_CHAT].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eUSERSPANEL_CHAT].EventTick = GetTickCount();
gChatExpanded.Switch();
}
bool Interface::EventUsersPanelWindow_MINIMAP(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eUSERSPANEL_MINIMAP].EventTick);
// ----
if( !this->Data[eUSERSPANEL_MAIN].OnShow || !IsWorkZone(eUSERSPANEL_MINIMAP) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eUSERSPANEL_MINIMAP].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eUSERSPANEL_MINIMAP].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eUSERSPANEL_MINIMAP].EventTick = GetTickCount();
if(showMiniMap) //Fog
{
gInterface.showMiniMap = false;
}
    else
{
gInterface.showMiniMap = true;
}
}

void Interface::DrawPSHOP()
{
float MainWidth = 230.0;
float MainHeight = 313.0;
float StartY = 100.0;
float StartX = (MAX_WIN_WIDTH / 2) - (MainWidth / 2);
// ---
if(this->CheckWindow(ObjWindow::Store) == true && this->CheckWindow(ObjWindow::ExpandInventory) == true)
{
StartX -= 190;
}
// ---
this->DrawFormat(eGold, StartX + 31, StartY + 77, + 125, 3, gCustomMessage.GetMessageB(3245));
// ---
this->DrawGUI(eSHOP_WC, StartX + 70, StartY + 90);
this->DrawFormat(eWhite, StartX + 80, StartY + 97, 100.0f, 1.0f, "WCoinC");
// ---
this->DrawGUI(eSHOP_B, StartX + 70, StartY + 120);
this->DrawFormat(eYellow, StartX + 85, StartY + 127, 100.0f, 1.0f, "Bless");
// ---
this->DrawGUI(eSHOP_WP, StartX + 125, StartY + 90);
this->DrawFormat(eWhite, StartX + 135, StartY + 97, 100.0f, 1.0f, "WCoinP");
// ---
this->DrawGUI(eSHOP_S, StartX + 125, StartY + 120);
this->DrawFormat(eYellow, StartX + 139, StartY + 127, 100.0f, 1.0f, "Soul");
// ---
this->DrawGUI(eSHOP_GP, StartX + 180, StartY + 90);
this->DrawFormat(eWhite, StartX + 187, StartY + 97, 100.0f, 1.0f, "GoblinPoint");
// ---
this->DrawGUI(eSHOP_C, StartX + 180, StartY + 120);
this->DrawFormat(eYellow, StartX + 195, StartY + 127, 100.0f, 1.0f, "Chaos");
// ---
/*this->DrawGUI(eSHOP_L, StartX + 70, StartY + 150);
this->DrawFormat(eYellow, StartX + 85, StartY + 157, 100.0f, 1.0f, "Life");
// ---
this->DrawGUI(eSHOP_Gem, StartX + 70, StartY + 180);
this->DrawFormat(eYellow, StartX + 80, StartY + 187, 100.0f, 1.0f, "Gemstone");
// ---
this->DrawGUI(eSHOP_Cr, StartX + 125, StartY + 150);
this->DrawFormat(eYellow, StartX + 135, StartY + 157, 100.0f, 1.0f, "Creation");
// ---
this->DrawGUI(eSHOP_H, StartX + 125, StartY + 180);
this->DrawFormat(eYellow, StartX + 137, StartY + 187, 100.0f, 1.0f, "Harmony");
// ---
this->DrawGUI(eSHOP_G, StartX + 180, StartY + 150);
this->DrawFormat(eYellow, StartX + 191, StartY + 157, 100.0f, 1.0f, "Guardian");
// ---
this->DrawGUI(eSHOP_R, StartX + 180, StartY + 180);
this->DrawFormat(eYellow, StartX + 187, StartY + 187, 100.0f, 1.0f, "Refine Stone");*/
// ---
this->DrawGUI(eSHOP_OFF, StartX + 190, StartY + 291);
// ---

if(IsWorkZone(eSHOP_OFF))
{
this->DrawToolTip(StartX + 170, StartY + 280, gCustomMessage.GetMessageB(3244));
}
}
bool Interface::DrawPSHOP_Main(DWORD Event)
{
this->DrawPSHOP_BLESS(Event);
this->DrawPSHOP_SOUL(Event);
this->DrawPSHOP_CHAOS(Event);
this->DrawPSHOP_WCOINC(Event);
this->DrawPSHOP_WCOINP(Event);
this->DrawPSHOP_COINTP(Event);
this->DrawPSHOP_OFFBUTTON(Event);
this->DrawPSHOP_LIFE(Event);
this->DrawPSHOP_CREATION(Event);
this->DrawPSHOP_GUARDIAN(Event);
this->DrawPSHOP_GEMSTONE(Event);
this->DrawPSHOP_HARMONY(Event);
this->DrawPSHOP_REFINE(Event);
return true;
}
bool Interface::DrawPSHOP_BLESS(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_B].EventTick);
// ----
if(!this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_B))
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_B].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_B].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_B].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x01,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}
bool Interface::DrawPSHOP_SOUL(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_S].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_S) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_S].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_S].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_S].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x02,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}
bool Interface::DrawPSHOP_CHAOS(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_C].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_C) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_C].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_C].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_C].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x03,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}
bool Interface::DrawPSHOP_WCOINC(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_WC].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_WC) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_WC].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_WC].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_WC].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x04,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}
bool Interface::DrawPSHOP_WCOINP(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_WP].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_WP) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_WP].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_WP].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_WP].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x05,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}
bool Interface::DrawPSHOP_COINTP(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_GP].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_GP) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_GP].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_GP].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_GP].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x06,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_LIFE(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_L].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_L) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_L].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_L].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_L].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x09,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_CREATION(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_Cr].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_Cr) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_Cr].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_Cr].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_Cr].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x10,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_GUARDIAN(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_G].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_G) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_G].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_G].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_G].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x11,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_GEMSTONE(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_Gem].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_Gem) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_Gem].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_Gem].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_Gem].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x12,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_HARMONY(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_H].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_H) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_H].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_H].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_H].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x13,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_REFINE(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_R].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_R) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_R].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_R].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eSHOP_B].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x14,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
}

bool Interface::DrawPSHOP_OFFBUTTON(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eSHOP_OFF].EventTick);
// ----
if( !this->CheckWindow(ObjWindow::Store) || !IsWorkZone(eSHOP_OFF) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eSHOP_OFF].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eSHOP_OFF].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
this->Data[eSHOP_OFF].EventTick = GetTickCount();
gInterface.OpenOffWindow();
}

void Interface::DrawPSHOP_OFFMODE()
{
if( !this->Data[eOFFPANEL_MAIN].OnShow )
{
return;
}
float MainWidth = 230.0;
float MainHeight = 313.0;
float StartY = 80.0;
float StartX = (MAX_WIN_WIDTH / 2) - (MainWidth / 2);
float MainCenter = StartX + (MainWidth / 3);
float ButtonX = MainCenter - (29.0 / 2);

this->DrawGUI(eOFFPANEL_MAIN, StartX, StartY + 2);
this->DrawGUI(eOFFPANEL_TITLE, StartX, StartY);
//StartY = this->DrawRepeatGUI(eOFFPANEL_FRAME, StartX, StartY + 67.0, 13);
this->DrawGUI(eOFFPANEL_FOOTER, StartX, StartY + 75);

this->DrawFormat(eGold, StartX + 10, 90, 210, 3, gCustomMessage.GetMessageB(3244));
this->DrawFormat(eWhite, StartX + 10, 130, 210, 3, gCustomMessage.GetMessageB(3246));
this->DrawGUI(eOFFPANEL_YES, StartX + 30, StartY + 75);
this->DrawGUI(eOFFPANEL_CANE, StartX + 140, StartY + 75);
}

bool Interface::DrawPSHOP_OFFMAIN(DWORD Event)
{
this->DrawPSHOP_OFFYES(Event);
this->DrawPSHOP_OFFCANE(Event);
return true;
}

bool Interface::DrawPSHOP_OFFYES(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eOFFPANEL_YES].EventTick);
// ----
if( !this->Data[eOFFPANEL_MAIN].OnShow || !IsWorkZone(eOFFPANEL_YES) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eOFFPANEL_YES].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eOFFPANEL_YES].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eOFFPANEL_YES].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x07,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
this->CloseOffWindow();
}
bool Interface::DrawPSHOP_OFFCANE(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eOFFPANEL_CANE].EventTick);
// ----
if( !this->Data[eOFFPANEL_MAIN].OnShow || !IsWorkZone(eOFFPANEL_CANE) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eOFFPANEL_CANE].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eOFFPANEL_CANE].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eOFFPANEL_CANE].EventTick = GetTickCount();
this->CloseOffWindow();
}

// OFF ATTACK MODE
void Interface::DrawOffAttack()
{
if( !this->Data[eOFFATTACK_MAIN].OnShow )
{
return;
}
float MainWidth = 230.0;
float MainHeight = 313.0;
float StartY = 80.0;
float StartX = (MAX_WIN_WIDTH / 2) - (MainWidth / 2);
float MainCenter = StartX + (MainWidth / 3);
float ButtonX = MainCenter - (29.0 / 2);

this->DrawGUI(eOFFATTACK_MAIN, StartX, StartY + 2);
this->DrawGUI(eOFFATTACK_TITLE, StartX, StartY);
this->DrawGUI(eOFFATTACK_FOOTER, StartX, StartY + 75);

this->DrawFormat(eGold, StartX + 10, 90, 210, 3, "Offline Attack System");
this->DrawFormat(eWhite, StartX + 10, 130, 210, 3, "Leave your Character in OFFATTACK mode?");
this->DrawGUI(eOFFATTACK_YES, StartX + 30, StartY + 75);
this->DrawGUI(eOFFATTACK_CANE, StartX + 140, StartY + 75);

}

bool Interface::OffAttackEvent_Main(DWORD Event)
{
this->OffAttackEvent_Button1(Event);
this->OffAttackEvent_Button2(Event);
return true;
}

bool Interface::OffAttackEvent_Button1(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eOFFATTACK_YES].EventTick);
// ----
if( !this->Data[eOFFATTACK_MAIN].OnShow || !IsWorkZone(eOFFATTACK_YES) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eOFFATTACK_YES].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eOFFATTACK_YES].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eOFFATTACK_YES].EventTick = GetTickCount();
PMSG_TICKET_SEND pMsg;
pMsg.header.set(0xFF,0x08,sizeof(pMsg));
DataSend((BYTE*)&pMsg,pMsg.header.size);
this->CloseOffAttackWindow();
}
bool Interface::OffAttackEvent_Button2(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - this->Data[eOFFATTACK_CANE].EventTick);
// ----
if( !this->Data[eOFFATTACK_MAIN].OnShow || !IsWorkZone(eOFFATTACK_CANE) )
{
return false;
}
// ----
if( Event == WM_LBUTTONDOWN )
{
this->Data[eOFFATTACK_CANE].OnClick = true;
pSetCursorFocus = true;
return true;
}
// ----
this->Data[eOFFATTACK_CANE].OnClick = false;
pSetCursorFocus = false;
// ----
if( Delay < 500 )
{
return false;
}
// ----
// ----
this->Data[eOFFATTACK_CANE].EventTick = GetTickCount();
this->CloseOffAttackWindow();
}


void Interface::Work2() {
if (gInterface.item_post_ && pCursorX < 150)
{
gInterface.DrawItemToolTipText(gInterface.item_post_, pCursorX + 80, pCursorY - 80);
if (gInterface.last_tickcount_view_ + 100 < GetTickCount()) {
gInterface.item_post_ = nullptr;
}
}
    pDrawInterface2();
}

void Interface::DrawChat ( int mode, char* character, char* message ) {
    PBMSG_CHATPOSTITEM chat;
    memset ( &chat.character_[0], 0, 10 );
    memset ( &chat.message_[0], 0, 89 );
    memcpy ( &chat.character_[0], &character[0], 10 );
    memcpy ( &chat.message_[0], &message[0], strlen ( message ) );
    pHandlePacketChatData ( &chat );

if (mode >= 1 && mode <= 9 && ChatBoxMuObjectChatDataPtrArrayLength) {
int index = ChatBoxMuObjectChatDataPtrArrayLength - 1;
ChatBoxMuObjectChatDataPtrArray[index]->chat_type_ = mode;
}
}

void Interface::DrawItemToolTipText ( void * item, int x, int y ) {
static DWORD mem = 0;
//static DWORD ItemToolTipAdress1 = 0x00861110; //1.04D-> 0x00860FC0
//static DWORD ItemToolTipAdress2 = 0x00861AA0; //1.04D-> 0x00861950
//static DWORD ItemToolTipAdress3 = 0x007E3E30; //1.04D-> 0x007E3CE0
_asm {
    PUSH 0
    PUSH 0
    PUSH 0
    PUSH item
    PUSH y
    PUSH x
MOV mem,0x00861110
    CALL mem
    MOV ECX, EAX
MOV mem,0x00861AA0
    CALL mem
    MOV ECX, EAX
MOV mem,0x007E3E30
    CALL mem
}

}

void Interface::DrawS2Interface()
{
gInterface.DrawGUI(eSkillBox, 305, 443);
}

void Interface::DrawMenuButton()
{
if (IsWorkZone(eParty))
{
this->DrawToolTip(345, 435, gCustomMessage.GetMessage(11));
}
if (this->CheckWindow(Party))
{
gInterface.DrawGUI(eParty, 348, 449);
}
if (IsWorkZone(eCharacter))
{
this->DrawToolTip(375, 435, gCustomMessage.GetMessage(12));
}
if (this->CheckWindow(Character))
{
gInterface.DrawGUI(eCharacter, 378.5f, 449);
}
if (IsWorkZone(eInventory))
{
this->DrawToolTip(405, 435, gCustomMessage.GetMessage(13));
}
if (this->CheckWindow(Inventory))
{
gInterface.DrawGUI(eInventory, 409, 449);
}
if (IsWorkZone(eFriend))
{
this->DrawToolTip(580, 420, gCustomMessage.GetMessage(14));
}
if (this->CheckWindow(FriendList))
{
gInterface.DrawGUI(eFriend, 581, 432);
}
if (IsWorkZone(eFastMenu))
{
this->DrawToolTip(13, 420, gCustomMessage.GetMessage(15));
}
if (this->CheckWindow(FastMenu))
{
gInterface.DrawGUI(eFastMenu, 5, 432);
}

}

void Interface::EventMenuButton(DWORD Event)
{
DWORD CurrentTick = GetTickCount();
if (this->CheckWindow(ChaosBox))
{
return;
}

if (IsWorkZone(eParty))
{
DWORD Delay = (CurrentTick - this->Data[eParty].EventTick);
if (Event == WM_LBUTTONDOWN) {
this->Data[eParty].OnClick = true;
return;
}
this->Data[eParty].OnClick = false;
if (Delay < 500) {
return;
}
this->Data[eParty].EventTick = GetTickCount();
if (this->CheckWindow(Party)) {
this->CloseWindow(Party);
}
else {
this->OpenWindow(Party);
}
}
else if (IsWorkZone(eCharacter))
{
DWORD Delay = (CurrentTick - this->Data[eCharacter].EventTick);
if (Event == WM_LBUTTONDOWN) {
this->Data[eCharacter].OnClick = true;
return;
}
this->Data[eCharacter].OnClick = false;
if (Delay < 500) {
return;
}
this->Data[eCharacter].EventTick = GetTickCount();
if (this->CheckWindow(Character)) {
this->CloseWindow(Character);
}
else {
this->OpenWindow(Character);
}
}
else if (IsWorkZone(eInventory))
{
DWORD Delay = (CurrentTick - this->Data[eInventory].EventTick);
if (Event == WM_LBUTTONDOWN) {
this->Data[eInventory].OnClick = true;
return;
}
this->Data[eInventory].OnClick = false;
if (Delay < 500) {
return;
}
this->Data[eInventory].EventTick = GetTickCount();
if (this->CheckWindow(Inventory)) {
this->CloseWindow(Inventory);
}
else {
this->OpenWindow(Inventory);
}
}
else if (IsWorkZone(eFriend))
{
DWORD Delay = (CurrentTick - this->Data[eFriend].EventTick);
if (Event == WM_LBUTTONDOWN) {
this->Data[eFriend].OnClick = true;
return;
}
this->Data[eFriend].OnClick = false;
if (Delay < 500) {
return;
}
this->Data[eFriend].EventTick = GetTickCount();
if (this->CheckWindow(FriendList)) {
this->CloseWindow(FriendList);
}
else {
this->OpenWindow(FriendList);
}
}
else if (IsWorkZone(eFastMenu))
{
DWORD Delay = (CurrentTick - this->Data[eFastMenu].EventTick);
if (Event == WM_LBUTTONDOWN) {
this->Data[eFastMenu].OnClick = true;
return;
}
this->Data[eFastMenu].OnClick = false;
if (Delay < 500) {
return;
}
this->Data[eFastMenu].EventTick = GetTickCount();
if (this->CheckWindow(FastMenu)) {
this->CloseWindow(FastMenu);
}
else {
this->OpenWindow(FastMenu);
}
}
}

16
Sources Generales / Re: Source Auto Login Button (1.04e/S6) - Kapocha
« Posteado: March 16, 2022, 11:55:38 AM »
alguem me orienta onde colocar esse codigo com "LoadBitmapA("Interface\\login_auto.tga", 531141, GL_NEAREST, GL_CLAMP, 1, 0);" Não sou muito boa nisso

Interface.cpp

busca > "LoadBitmapA"
obrigado, mas no meu Interface.cpp não há palavra LoadBitmapA

17
Sources Generales / Re: CustomFont interface
« Posteado: March 16, 2022, 11:47:57 AM »
Mình bị báo lỗi: Error   1   error C3861: 'pSetBackgroundTextColor': identifier not found và    3 IntelliSense: identifier "pSetBackgroundTextColor" is undefined
Có ai biết cách khắc phục không ạ ?

18
Sources Generales / Re: Source Auto Login Button (1.04e/S6) - Kapocha
« Posteado: March 16, 2022, 11:21:30 AM »
alguem me orienta onde colocar esse codigo com "LoadBitmapA("Interface\\login_auto.tga", 531141, GL_NEAREST, GL_CLAMP, 1, 0);" Não sou muito boa nisso

19
Extras / Re: [Release] CUSTOM LOGIN SCREEN WITH VIDEOS PLUGIN
« Posteado: March 16, 2022, 06:36:11 AM »
Can make this main??? I have tried all ways but no success. https://tuservermu.com.ve/index.php?topic=32799.0

20
Sources Generales / Re: Source eX614 - MuEmu - By Emershow
« Posteado: March 16, 2022, 05:42:50 AM »
Has anyone fixed the skeleton yet??? Can you share the fix source code please? I really need. Thank you.
Maybe emerson 13 went offline last October. I don't know what happened to you. I hope god bless you.

Paginas: [1] 2 3