Most visitors online was 12720 , on 2 May 2024
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature currently requires accessing the site using the built-in Safari browser.
hi @michi28 you can share tutorial how to edit new font
//Thank
#include "StdAfx.h"#include "Font.h"
//#include "Utils.h"
#include "TMemory.h"
Font gFont;
#define Offset_CreateFontA1 0x004060D0
#define Offset_CreateFontA2 0x004D2882
#define Offset_CreateFontA3 0x004D28EB
#define Offset_CreateFontA4 0x004D2957
#define Offset_CreateFontA5 0x004D29C1
void Font::Load()
{
SetDword((PVOID)(Offset_CreateFontA1 + 1), (DWORD)&LoadNewFont - (Offset_CreateFontA1 + 5));
SetDword((PVOID)(Offset_CreateFontA2 + 1), (DWORD)&LoadNewFont - (Offset_CreateFontA2 + 5));
SetDword((PVOID)(Offset_CreateFontA3 + 1), (DWORD)&LoadNewFont - (Offset_CreateFontA3 + 5));
SetDword((PVOID)(Offset_CreateFontA4 + 1), (DWORD)&LoadNewFont - (Offset_CreateFontA4 + 5));
SetDword((PVOID)(Offset_CreateFontA5 + 1), (DWORD)&LoadNewFont - (Offset_CreateFontA5 + 5));
SetByte((PVOID)Offset_CreateFontA1, ASM::CALL);
SetByte((PVOID)Offset_CreateFontA2, ASM::CALL);
SetByte((PVOID)Offset_CreateFontA3, ASM::CALL);
SetByte((PVOID)Offset_CreateFontA4, ASM::CALL);
SetByte((PVOID)Offset_CreateFontA5, ASM::CALL);
SetByte((PVOID)(Offset_CreateFontA1 + 5), ASM::NOP);
SetByte((PVOID)(Offset_CreateFontA2 + 5), ASM::NOP);
SetByte((PVOID)(Offset_CreateFontA3 + 5), ASM::NOP);
SetByte((PVOID)(Offset_CreateFontA4 + 5), ASM::NOP);
SetByte((PVOID)(Offset_CreateFontA5 + 5), ASM::NOP);
}
HFONT LoadNewFont()
{
char MyFontFaceName[100];
HFONT MyFont;
char sValue[99];
int Bold = GetPrivateProfileIntA("MainConfig", "Main_Font_Bold", 0, ".\\Config.ini");
int Height = GetPrivateProfileIntA("MainConfig", "Main_Font_Height", 13, ".\\Config.ini");
int Italic = GetPrivateProfileIntA("MainConfig", "Main_Font_Italic", 0, ".\\Config.ini");
int Unicode = GetPrivateProfileIntA("MainConfig", "Main_Font_Unicode", 1, ".\\Config.ini");
int Width = GetPrivateProfileIntA("MainConfig", "Main_Font_Width", 0, ".\\Config.ini");
int UnderLine = GetPrivateProfileIntA("MainConfig", "Main_Font_Underline", 0, ".\\Config.ini");
int Quality = GetPrivateProfileIntA("MainConfig", "Main_Font_Quality", 3, ".\\Config.ini");
int StrikeOut = GetPrivateProfileIntA("MainConfig", "Main_Font_StrikeOut", 0, ".\\Config.ini");
GetPrivateProfileStringA("MainConfig", "Main_Font_Name", "Tahoma", MyFontFaceName, 100, ".\\Config.ini");
if (Bold == 0)
{
if (Unicode == 1)
{
MyFont = CreateFontA(Height, Width, 0, 0, 400, Italic, UnderLine, StrikeOut, 0x01, 0, 0, Quality, 0, MyFontFaceName);
}
else
{
MyFont = CreateFontA(Height, Width, 0, 0, 400, Italic, UnderLine, StrikeOut, 0x0, 0, 0, Quality, 0, MyFontFaceName);
}
}
else
{
if (Unicode == 1)
{
MyFont = CreateFontA(Height, Width, 0, 0, 700, Italic, UnderLine, StrikeOut, 0x01, 0, 0, Quality, 0, MyFontFaceName);
}
else
{
MyFont = CreateFontA(Height, Width, 0, 0, 700, Italic, UnderLine, StrikeOut, 0x0, 0, 0, Quality, 0, MyFontFaceName);
}
}
wsprintf(sValue, "%d", Bold);
WritePrivateProfileStringA("MainConfig", "Main_Font_Bold", sValue, ".\\Config.ini");
wsprintf(sValue, "%d", Height);
WritePrivateProfileStringA("MainConfig", "Main_Font_Height", sValue, ".\\Config.ini");
wsprintf(sValue, "%d", Italic);
WritePrivateProfileStringA("MainConfig", "Main_Font_Italic", sValue, ".\\Config.ini");
wsprintf(sValue, "%d", Unicode);
WritePrivateProfileStringA("MainConfig", "Main_Font_Unicode", sValue, ".\\Config.ini");
wsprintf(sValue, "%d", Width);
WritePrivateProfileStringA("MainConfig", "Main_Font_Width", sValue, ".\\Config.ini");
wsprintf(sValue, "%d", UnderLine);
WritePrivateProfileStringA("MainConfig", "Main_Font_Underline", sValue, ".\\Config.ini");
wsprintf(sValue, "%d", Quality);
WritePrivateProfileStringA("MainConfig", "Main_Font_Quality", sValue, ".\\Config.ini");
wsprintf(sValue, "%d", StrikeOut);
WritePrivateProfileStringA("MainConfig", "Main_Font_StrikeOut", sValue, ".\\Config.ini");
WritePrivateProfileStringA("MainConfig", "Main_Font_Name", MyFontFaceName, ".\\Config.ini");
return MyFont;
}
#pragma once
class Font
{
public:
void Load();
}; extern Font gFont;
HFONT LoadNewFont();
#include "Font.h
and below
gFont.Load();
[MainConfig]Main_RankHornor=1
Main_AgiBugFix=1
Main_MiniMap_Enabled=0
Main_Font_Name=Tahoma
Main_Font_Bold=0
Main_Font_Height=13
Main_Font_Italic=0
Main_Font_Unicode=1
Main_Font_Width=0
Main_Font_Underline=0
Main_Font_Quality=3
Main_Font_StrikeOut=0
void Other::Changer(){
VMBEGIN
// ----
#ifdef __ROOT__
SetByte((PVOID)0x0095CE90, 0xEB);
SetRange((PVOID)0x0095DE51, 2, ASM::NOP);
#endif
// ----
char IP[20];
// ----
//if( !g_ScriptEncode.ReadScript("Data\\Custom\\Common.z") )
//{
//MessageBox(NULL, "file not found", "[Common]", ERROR);
// return;
//}
// ----
g_ScriptEncode.GetToken();
//memcpy(IP, g_ScriptEncode.GetString(), sizeof(IP)-1);
// ----
//Narvulkan Modification.... Tags: Server IP, Client IP Change, IPs, ip, change ip, server ip, ...
memcpy(IP, "127.0.0.1", sizeof(IP)-1);
WriteMemory((LPVOID)0x00E611B2, IP, sizeof(IP));
//char ii[] = "192.168.0.100"; //DeBug
//WriteMemory((LPVOID)0x00E611B2, ii, sizeof(ii));
// ----
SetByte((PVOID)oCharColor_Loot, 8);
SetByte((PVOID)oVulcanusMove, 0);
//-> Money transfer limit
SetByte((PVOID)(0x007AF025 + 1), 9);
SetByte((PVOID)(0x007AF2C5 + 1), 9);
SetByte((PVOID)(0x007AF645 + 1), 9);
SetByte((PVOID)(0x007B01C5 + 1), 9);
//-> Speed bug fix
//SetByte((PVOID)(0x00649E24 + 3), 14); //-> 1 Method
//SetByte((PVOID)(0x00556C32 + 6), 2); //-> 2 Method
//-> Siege minimap fix
SetRange((PVOID)0x006505FB, 4, ASM::NOP);
//-> Character delete level
SetDword((PVOID)(0x00405B7A+2), 401); // Delete rule
SetDword((PVOID)(0x0040CC3F+1), 401); // Error message
// ----
static char* LogName = "Logs\\Error.log";
static char* LogName2 = "Logs\\Error_%d.log";
static char* DumpName = "Logs\\Error.dmp";
static char* ScreenName = "Images\\Screen(%02d_%02d-%02d_%02d)-%04d.jpg";
// ----
SetDword((PVOID)(0x004D9F54+1), (DWORD)ScreenName);
SetDword((PVOID)(0x0096A8C8+1), (DWORD)LogName);
SetDword((PVOID)(0x0096A94F+1), (DWORD)LogName);
SetDword((PVOID)(0x0096A9DB+1), (DWORD)LogName2);
SetDword((PVOID)(0x004D1D0B+1), (DWORD)DumpName);
SetDword((PVOID)(0x004D9F54+1), (DWORD)ScreenName);
WriteMemory((LPVOID)0x00D26BA0, __CustomTitle, sizeof(__CustomTitle));
// ----
VMEND
}
Thanks You bro, its work. Have a nice day!DONT run encoder.exe; just drag the txt into the .exe and it WILL create the .txt.z file.
#include "stdafx.h"#include "MiniMap.h"
#include "TMemory.h"
#include "Interface.h"
#include <sys/stat.h>
DWORD LoadImg1 = 0x007721E0;
DWORD LoadMap1 = 0x00860FC0;
DWORD LoadMap2 = 0x008615F0;
DWORD LoadMap3 = 0x00886C20;
DWORD LoadMap4 = 0x004E65C0;
MiniMap gMiniMap; //Small MiniMap Class Initialization (Only for: Hook Main Function)
bool IsValidMap(int MapId)
{
char FullMapName[200];
sprintf_s(FullMapName, "World%d\\Map1.jpg", MapId + 1);
struct stat buffer;
if (stat(FullMapName, &buffer)) // -> On this way Minimap not have crashs on Event Maps... xD
{
switch (MapId)
{
case 0: return true;//Lorencia
case 1: return true;//Dungeon
case 2: return true;//Devias
case 3: return true;//Noria
case 4: return true;//LostTower
case 6: return true;//Stadium
case 7: return true;//Atlans
case 8: return true;//Tarkan
case 10: return true;//Icarus
case 24: return true;//Kalima 1
case 25: return true;//Kalima 2
case 26: return true;//Kalima 3
case 27: return true;//Kalima 4
case 28: return true;//Kalima 5
case 29: return true;//Kalima 6
case 30: return true;//Valley of Loren
case 31: return true;//Land of Trials
case 33: return true;//Aida
case 34: return true;//Crywolf
case 36: return true;//Kanturu 1
case 37: return true;//Kanturu 2
case 38: return true;//Kanturu 3
case 42: return true;//Barracks
case 51: return true;//Elbeland
case 56: return true;//Swamp of Calmness
case 57: return true;//Raklion
case 58: return true;//Raklion Boss
case 63: return true;//Vulcanus
case 80: return true;//Kalrutan 1
case 81: return true;//Kalrutan 2
// Invalid MiniMap
default: return false;
}
}
return false;
}
void LoadImageJpgForMap(char* ImagePatch, DWORD PrintCode)
{
_asm
{
PUSH 0
PUSH 1
PUSH 0x2900
PUSH 0x2601
PUSH 0x7B7A
PUSH ImagePatch
CALL LoadImg1 // -> Here is not used: mov edi and anothers bad instructions to memory is only direct CALL to Main Offset :
ADD ESP,0x18
}
}
int LoadMap(int Map)
{
char FullMapName[200];
sprintf(FullMapName, "World%d\\Map1.jpg", Map + 1);
ChangePath(FullMapName);
LoadImageJpgForMap(FullMapName, 0x7B7A);
return Map;
}
void ChangePath(const char* Map)
{
memset((DWORD*)0xD4A654, 0, 19);
memcpy((DWORD*)0xD4A654, Map, 17);
}
bool MapCheckerCore1(int Map)
{
if (IsValidMap(Map))
{
return 1;
}
return 0;
}
void MapCheckerCore2(int Map)
{
if (IsValidMap(Map))
{
LoadMap(Map);
_asm
{
CALL LoadMap1
MOV ECX, EAX
CALL LoadMap2
MOV ECX, EAX
CALL LoadMap3
}
}
_asm
{
PUSH Map
CALL LoadMap4 // -> Here on: 1.04d main.exe is not necesary POP EBP instruction.. I don't know why ^^ I like think that is by call convention type (__cdecl or __stdcall on original main function).
}
}
#define oMapCheckerHook1 0x007D3B6D
#define oMapCheckerHook2 0x00886B87
#define oMapCheckerHook3 0x0062EB3D
//--------------------------------------------------------------------------------------------
// Cool Info ^^
//--------------------------------------------------------------------------------------------
#define oMiniMapKeyPushOffset 0x007D3B55 //0x09 = TAB - 0x10 = SHIFT
#define oMiniMapKeyCallOffset 0x007D3B6D //This call must be hook to MapCheckerCore1 proc
// -------------------------------------------------------------------------------------------
#define oScreenMapKeyOffset 0x007D3BA5 //0x09 = TAB - 0x10 = SHIFT
void MiniMap::Load()
{
SetOp((LPVOID)oMapCheckerHook1, (LPVOID)MapCheckerCore1, ASM::CALL);
SetOp((LPVOID)oMapCheckerHook2, (LPVOID)MapCheckerCore1, ASM::CALL);
SetOp((LPVOID)oMapCheckerHook3, (LPVOID)MapCheckerCore2, ASM::CALL);
}
#pragma once// ----------------------------------------------------------------------------------------------
#include "Import.h" // -> This is not necesary.. on my zClient Modified Source I only use this.. to make a small new mod (is TEST) xD
// ----------------------------------------------------------------------------------------------
int LoadMap(int Map);
void LoadImageJpgForMap(char* ImagePath, DWORD PrintCode);
bool MapCheckerCore1(int Map);
void MapCheckerCore2(int Map);
void ChangePath(const char*Map);
bool IsValidMap(int MapId);
class MiniMap
{
public:
void Load();
// ----
}; extern MiniMap gMiniMap;
#include "stdafx.h"#include "Other.h"
#include "TMemory.h"
#include "Item.h"
#include "User.h"
#include "Controller.h"
#include "Interface.h"
#include "CheatGuard.h"
#include "Protocol.h"
#include "Monster.h"
#include "ResetSystem.h"
#include "ItemPrice.h"
#include "ChatExpanded.h"
#include "ConnectEx.h"
#include "TDebugLog.h"
#ifdef __NOVUS__
#include "CraftSystem.h"
#endif
#include "VisualFix.h"
#include "OffTrade.h"
#include "ItemRank.h"
#include "ItemModel.h"
#include "SocketItem.h"
#include <string>
#include "CRC.h"
#include "Font.h"
#include "MiniMap.h"
// ----------------------------------------------------------------------------------------------
std::vector<std::string> GetArguments()
{
std::vector<std::string> list;
LPSTR arguments = GetCommandLineA();
if(!arguments)
{
return list;
}
size_t i = 0;
bool quote = false;
bool it = false;
std::string argument = "";
std::string commandline = arguments;
while(i < commandline.length())
{
if(quote)
{
if(commandline.at(i) == '"')
{
quote = false;
}
else
{
argument += commandline.at(i);
it = true;
}
}
else
{
switch(commandline.at(i))
{
case '"':
quote = true;
break;
case ' ':
case '\t':
case '\r':
case '\n':
if(it)
{
list.push_back(argument);
argument = "";
it = false;
}
break;
default:
argument += commandline.at(i);
it = true;
break;
}
}
i++;
}
if(argument != "")
{
list.push_back(argument);
}
return list;
}
void CheckArguments()
{
std::vector<std::string> argumentos = GetArguments();
if(argumentos.size() == 2)
{
if(argumentos[1] == "Season 6 zTema")
{
return;
}
}
ShellExecute(GetDesktopWindow(), "Open", "Launcher.exe", NULL, NULL, SW_SHOWNORMAL);
ExitProcess(0);
}
extern "C" __declspec(dllexport)void Init()
{
DWORD OldProtect;
// ----
if(VirtualProtect(LPVOID(0x00401000),0x00D21FFF,PAGE_EXECUTE_READWRITE,&OldProtect))
#ifdef PROTECT
if( VMProtectIsDebuggerPresent(TRUE) != 0 )
{
MessageBox(0, "Protect system found debugger, process will be closed", "CheatGuard", ERROR);
ExitProcess(0);
}
#endif
VMBEGIN
#ifdef __MUANGEL__
if( pMUIsLoaded == 1 )
{
CreateMutex(0, 1, "MuOnline");
// ----
if( GetLastError() == 183 )
{
ExitProcess(0);
}
}
#endif
// ----
#if defined __MIX__ || __WHITE__ || __MUANGEL__
#ifndef __ROOT__
char ** Command = 0;
CommandLineToArg(GetCommandLine(), &Command);
if( strcmp("Updater", Command[1]) )
{
MessageBoxA(0, "Please start game from Launcher", "Start Error", ERROR);
ExitProcess(0);
}
#endif
#endif
// ----
// ----
#ifdef __NOVUS__
gCraftSystem.Load();
#endif
gConnectEx.Load();
gController.Load();
gChatExpanded.Load();
gItemPrice.Load();
gItem.Load();
gResetSystem.Load();
gProtocol.Load();
gCheatGuard.Load();
gObjUser.Load();
gOther.Load();
gInterface.Load();
gVisualFix.InitVisualFix();
g_ItemModel.Load();
gOffTrade.Init();
gFont.Load();
gMiniMap.Load();
#ifdef __RMOS__
g_ItemRank.Load();
#endif
// ----
LoadLibrary("ttlci.dll");
#ifdef MUNEWAGE
CheckArguments();
#endif
VMEND
}
// ----------------------------------------------------------------------------------------------
BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
{
switch(dwReason)
{
case DLL_PROCESS_DETACH:
{
}
break;
// --
case DLL_PROCESS_ATTACH:
{
gController.Instance = hModule;
}
break;
}
// ----
return true;
}
// ----------------------------------------------------------------------------------------------
for (n=0;n<OBJ_MAXMONSTER;n++)
{
if ( gObj[n].Class == 80 ) // Devil Lizard King
{
gObj[n].Live = TRUE;
MapNumber = 7;
gObj[n].MapNumber = MapNumber;
while ( gMSetBase.GetBoxPosition(MapNumber, 50, 10, 250, 200, gObj[n].X, gObj[n].Y) == 0 )
{
}
this->m_BossDevilLizardKingMapNumber = gObj[n].MapNumber;
this->m_BossDevilLizardKingMapX = gObj[n].X;
this->m_BossDevilLizardKingMapY = gObj[n].Y;
gObj[n].Life = gObj[n].MaxLife;
gObj[n].TX = gObj[n].X;
gObj[n].TY = gObj[n].Y;
gObj[n].MTX = gObj[n].X;
gObj[n].MTY = gObj[n].Y;
gObj[n].StartX = gObj[n].X;
gObj[n].StartY = gObj[n].Y;
gObj[n].m_State = 1;
gObj[n].PathCount = 0;
0 26 //Flamberge
0 27 //Sword breaker
0 28 //Rune bastard sword
2 16 //frost mace
2 17 //absolute scepter
4 23 //dark stinger
5 20 //Eternal Wing Stick
5 30 //deadly staff
5 31 //inberial staff
5 32 //merlin staff
6 17 //crimson glory
6 18 //Salamander Shield
6 19 //Frost Barrier
6 20 //Guardian Shield
7 45 //titan helm
7 46 //brave helm
7 49 //Seraphim Helm
7 50 //Divine Helm
7 51 //Royal Helm
7 52 //Hades Helm
7 53 //Queen Helm
8 45 //Titan Armor
8 46 //Brave Armor
8 47 //Phantom Armor
8 48 //Destroy Armor
8 49 //Seraphim Armor
8 50 //Divine Armor
8 51 //Royal Armor
8 52 //Hades Armor
8 53 //Queen Armor
9 45 //Titan Pants
9 46 //Brave Pants
9 47 //Phantom Pants
9 48 //Destroy Pants
9 49 //Seraphim Pants
9 50 //Divine Pants
9 51 //Royal Pants
9 52 //Hades Pants
9 53 //Queen Pants
10 45 //Titan Gloves
10 46 //Brave Gloves
10 47 //Phantom Gloves
10 48 //Destroy Gloves
10 49 //Seraphim Gloves
10 50 //Divine Gloves
10 51 //Royal Gloves
10 52 //Hades Gloves
10 53 //Queen Gloves
11 45 //Titan Boots
11 46 //Brave Boots
11 47 //Phantom Boots
11 48 //Destroy Boots
11 49 //Seraphim Boots
11 50 //Divine Boots
11 51 //Royal Boots
11 52 //Hades Boots
11 53 //Queen Boots
7 44 //Eternal Wing
8 44 //Eternal Wing
9 44 //Eternal Wing
10 44 //Eternal Wing
11 44 //Eternal Wing
[MainConfig]Main_RankHornor=1
Main_AgiBugFix=1
Main_MiniMap_Enabled=0
Main_Font_Name=Tahoma
Main_Font_Bold=0
Main_Font_Height=13
Main_Font_Italic=0
Main_Font_Unicode=1
Main_Font_Width=0
Main_Font_Underline=0
Main_Font_Quality=3
Main_Font_StrikeOut=0
Main_Font_CharSet=936 <<<
int CharSet = GetPrivateProfileIntA("MainConfig", "Main_Font_CharSet", 936, ".\\Config.ini");
Setup Guide:
1. Open Server>Tools>Encoder
2. Open Common.txt
3. Edit your IP , save file
4. Drag the file Common.txt to Econder.exe
5. Copy Common.z to Client>data>custom