Experienced Elementalist
- Joined
- Apr 16, 2013
- Messages
- 241
- Reaction score
- 59
since the thread is kinda dead here i leave the source to change main font for season 6.
https://mega.nz/#F!IMdhlbLY!7kM0KDBPxQ7g4QUosQQHMAYou could share your main, because there are so many mains rolling around.
since the thread is kinda dead here i leave the source to change main font for season 6.
Font.cpp
Code://--------------------------------------------------------------------------- #include "stdafx.h" #include "Util.h" #include "Font.h" //--------------------------------------------------------------------------- Font gFont; //--------------------------------------------------------------------------- char MyFontFaceName[100]; 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"); //--------------------------------------------------------------------------- void Font::Load() { GetPrivateProfileStringA("MainConfig", "Main_Font_Name", "Tahoma", MyFontFaceName, 100, ".\\Config.ini"); //-- SetCompleteHook(0xE8, Offset_CreateFontA1, &Font::LoadNewFont); SetCompleteHook(0xE8, Offset_CreateFontA2, &Font::LoadNewFont); SetCompleteHook(0xE8, Offset_CreateFontA3, &Font::LoadNewFont); SetCompleteHook(0xE8, Offset_CreateFontA4, &Font::LoadNewFont); SetCompleteHook(0xE8, Offset_CreateFontA5, &Font::LoadNewFont); //-- SetByte((Offset_CreateFontA1 + 5), 0x90); SetByte((Offset_CreateFontA2 + 5), 0x90); SetByte((Offset_CreateFontA3 + 5), 0x90); SetByte((Offset_CreateFontA4 + 5), 0x90); SetByte((Offset_CreateFontA5 + 5), 0x90); } //--------------------------------------------------------------------------- HFONT Font::LoadNewFont() { HFONT MyFont; //-- 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); } } return MyFont; } //---------------------------------------------------------------------------
Font.h
Code://--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- #define Offset_CreateFontA1 0x004060D0 #define Offset_CreateFontA2 0x004D2882 #define Offset_CreateFontA3 0x004D28EB #define Offset_CreateFontA4 0x004D2957 #define Offset_CreateFontA5 0x004D29C1 //--------------------------------------------------------------------------- class Font { public: //-- Font(){}; ~Font(){}; //-- void Load(); HFONT LoadNewFont(); //-- }; extern Font gFont; //---------------------------------------------------------------------------
Ini File
Code:[MainConfig] Main_Font_Name=Comic Sans MS Main_Font_Bold=0 Main_Font_Height=15 Main_Font_Italic=0 Main_Font_Unicode=1 Main_Font_Width=0 Main_Font_Underline=0 Main_Font_Quality=3 Main_Font_StrikeOut=0
#define Offset_CreateFontA1 0x00406153
#define Offset_CreateFontA2 0x005E5B15
#define Offset_CreateFontA3 0x005E5B7C
#define Offset_CreateFontA4 0x005E5BE5
#define Offset_CreateFontA5 0x005E5C4E
Guys has anyone tried to change the color of the chat ?
Tell me how I can change it from yellow to the other ?
the code doesnt change too much, just research the offsets, there are already some of them used in the hp bar.How to add Time interface zTeam style? can share .cpp and .h or too much to ask?
compile the main.dll and works. ^^InitHackCheck();
No; you could set (code) an 'event-like' notification when its killed (the way white mage killer gets advertised); and after that; inmediatly start a timer, to advertise each X minutes; that Y minutes lacking to respawn.HI
there any way to know the time remaining respawn of Selupan or other monster?
After they kill
Thanks
No; you could set (code) an 'event-like' notification when its killed (the way white mage killer gets advertised); and after that; inmediatly start a timer, to advertise each X minutes; that Y minutes lacking to respawn.
Where x: time between ads.
And y: respawn times - x *(times advertised already)
Example: if you kill it at 18:00, and it has a 60 mins respawntime; ypu could display a message every 20 minutes saying:
"Mob respawns in 60 mins."
"Mob respawns in 40mins"
"Mob respawns in 20mins"
"Mob spawned"
It should be an easy-code to implement; but don't ask ME to do it for you, im on mobile and wont be home for a few days, so no IDE close to me. (Besides Im not doing this as I dont like this idea that much)
You dont need any extra timer, the server already know when will be respawned, because of the regen time.
When you kill the monster, this timer will be 0 and it will start to count (GetTickCount() ) so you can calculate the repaswn time by MedusaRegenTime-MedusaDieRegentime=remaining time for the respawn, it will be in sec, so need to /60 than it will be in minutes-
Hi
ENG: I wanted was that players know the time remaining for it to reappear, because if you kill at dawn many are left not knowing what time it reappear.
PD:There is no way of knowing in the server, the missing time without knowing the time he was killed?
(traductor google)
ESP:Lo que queria era que los jugadores sepan el tiempo restante para que vuelva aparecer, ya que si lo matan en la madrugada muchos se quedan sin saber la hora que reaparecera.
PD:No hay manera de saber en el servidor, el tiempo que falta sin saber el tiempo que lo mataron?
Thanks
Eng: the gameserver starts the tickcount (timer) when mob gets killed; so its the bedt way if you use same counter and display a message with some coumtdown.Hi
ENG: I wanted was that players know the time remaining for it to reappear, because if you kill at dawn many are left not knowing what time it reappear.
PD:There is no way of knowing in the server, the missing time without knowing the time he was killed?
(traductor google)
ESP:Lo que queria era que los jugadores sepan el tiempo restante para que vuelva aparecer, ya que si lo matan en la madrugada muchos se quedan sin saber la hora que reaparecera.
PD:No hay manera de saber en el servidor, el tiempo que falta sin saber el tiempo que lo mataron?
Thanks
This is another way to do it....but imo its better to do this directly in-game.Than create a table in the database and save the data and display on the website :dddd