It is currently Fri Dec 15, 2017 6:43 pm
Welcome to helbreath.info, a community for all things Helbreath!
Register today to gain access to post, download pak edits, source files, and much more.


Deutsch Espanol Francais Italiano Portugues Russian Arabic Japanese Korean Simplified Chinese


helbreath.info is closing down in 2018
(read more)



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: [Code] Client GM-related stuff
PostPosted: Thu Jun 08, 2017 5:47 pm 
Giant Ant
Giant Ant

Joined: Thu May 25, 2017 10:51 pm
Posts: 9

Thanks given: 0 times
Thanked: 12 times
Code: Client GM-related stuff by Boreas/sLeeq
Author: Boreas/sLeeq
Description: Decorative options for GMs. Ability to change the color of name and title of each GM.
Enable/Disable GM sprite without GM Shield & additional mage hero aura. Remove the // to enable these.


Image

File: Game.cpp
Function: DrawObjectName

Find:
Code:
PutString2(sX, sY, cTxt, 255,255,255);


Replace with:
Code:
// Client GM-related stuff by Boreas
if (strcmp(pName, GM1_NAME) == 0) PutString2(sX, sY, cTxt, GM1_NAME_COLOR);
else if (strcmp(pName, GM2_NAME) == 0) PutString2(sX, sY, cTxt, GM2_NAME_COLOR);
else if (strcmp(pName, GM3_NAME) == 0) PutString2(sX, sY, cTxt, GM3_NAME_COLOR);
else if (strcmp(pName, GM4_NAME) == 0) PutString2(sX, sY, cTxt, GM4_NAME_COLOR);
else if (strcmp(pName, GM5_NAME) == 0) PutString2(sX, sY, cTxt, GM5_NAME_COLOR);
else if (strcmp(pName, GM6_NAME) == 0) PutString2(sX, sY, cTxt, GM6_NAME_COLOR);
else if (strcmp(pName, GM7_NAME) == 0) PutString2(sX, sY, cTxt, GM7_NAME_COLOR);
else if (strcmp(pName, GM8_NAME) == 0) PutString2(sX, sY, cTxt, GM8_NAME_COLOR);
else if (strcmp(pName, GM9_NAME) == 0) PutString2(sX, sY, cTxt, GM9_NAME_COLOR);
else if (strcmp(pName, GM10_NAME) == 0) PutString2(sX, sY, cTxt, GM10_NAME_COLOR);
else PutString2(sX, sY, cTxt, 255,255,255);


Find:
Code:
PutString2(sX, sY+14 +iAddY, cTxt, sR, sG, sB);


Add below:
Code:
// Client GM-related stuff by Boreas
if ((strcmp(pName, GM1_NAME) == 0) && (strlen(GM1_TITLE) != 0)) PutString2(sX, sY+28 +iAddY, GM1_TITLE, GM1_TITLE_COLOR);
else if ((strcmp(pName, GM2_NAME) == 0) && (strlen(GM2_TITLE) != 0)) PutString2(sX, sY+28 +iAddY, GM2_TITLE, GM2_TITLE_COLOR);
else if ((strcmp(pName, GM3_NAME) == 0) && (strlen(GM3_TITLE) != 0)) PutString2(sX, sY+28 +iAddY, GM3_TITLE, GM3_TITLE_COLOR);
else if ((strcmp(pName, GM4_NAME) == 0) && (strlen(GM4_TITLE) != 0)) PutString2(sX, sY+28 +iAddY, GM4_TITLE, GM4_TITLE_COLOR);
else if ((strcmp(pName, GM5_NAME) == 0) && (strlen(GM5_TITLE) != 0)) PutString2(sX, sY+28 +iAddY, GM5_TITLE, GM5_TITLE_COLOR);
else if ((strcmp(pName, GM6_NAME) == 0) && (strlen(GM6_TITLE) != 0)) PutString2(sX, sY+28 +iAddY, GM6_TITLE, GM6_TITLE_COLOR);
else if ((strcmp(pName, GM7_NAME) == 0) && (strlen(GM7_TITLE) != 0)) PutString2(sX, sY+28 +iAddY, GM7_TITLE, GM7_TITLE_COLOR);
else if ((strcmp(pName, GM8_NAME) == 0) && (strlen(GM8_TITLE) != 0)) PutString2(sX, sY+28 +iAddY, GM8_TITLE, GM8_TITLE_COLOR);
else if ((strcmp(pName, GM9_NAME) == 0) && (strlen(GM9_TITLE) != 0)) PutString2(sX, sY+28 +iAddY, GM9_TITLE, GM9_TITLE_COLOR);
else if ((strcmp(pName, GM10_NAME) == 0) && (strlen(GM10_TITLE) != 0)) PutString2(sX, sY+28 +iAddY, GM10_TITLE, GM10_TITLE_COLOR);


Function: DrawObject_OnAttack

Find:
Code:
CheckActiveAura2(sX, sY, dwTime,  _tmp_sOwnerType);


Add Below:
Code:
#ifdef GM_SPRITE_WITHOUT_SHIELD // Client GM-related stuff by Boreas
      if ((strcmp(_tmp_cName, GM1_NAME) == 0) || (strcmp(_tmp_cName, GM2_NAME) == 0) || (strcmp(_tmp_cName, GM3_NAME) == 0) || (strcmp(_tmp_cName, GM4_NAME) == 0) || (strcmp(_tmp_cName, GM5_NAME) == 0) || (strcmp(_tmp_cName, GM6_NAME) == 0) || (strcmp(_tmp_cName, GM7_NAME) == 0) || (strcmp(_tmp_cName, GM8_NAME) == 0) || (strcmp(_tmp_cName, GM9_NAME) == 0) || (strcmp(_tmp_cName, GM10_NAME) == 0)) {
         m_pEffectSpr[45]->PutTransSprite(sX - 13, sY - 34, 0, dwTime);
#ifdef GM_HERO_FLAG
         m_pEffectSpr[87]->PutTransSprite70(sX + 53, sY + 54, _tmp_iEffectFrame%29, dwTime);
#endif
      }
#endif


Function: DrawObject_OnAttackMove

Find:
Code:
if (bDashDraw == TRUE) {
         m_pSprite[iBodyIndex + (_tmp_cDir - 1)]->PutTransSpriteRGB(sX+dsx, sY+dsy, _tmp_cFrame, m_wR[10] -(m_wR[0]/3), m_wG[10] -(m_wG[0]/3), m_wB[10] -(m_wB[0]/3), dwTime);
         if (iWeaponIndex != -1) m_pSprite[iWeaponIndex]->PutTransSpriteRGB(sX+dsx, sY+dsy, _tmp_cFrame, m_wR[10] -(m_wR[0]/3), m_wG[10] -(m_wG[0]/3), m_wB[10] -(m_wB[0]/3), dwTime);
         if (iShieldIndex != -1) m_pSprite[iShieldIndex]->PutTransSpriteRGB(sX+dsx, sY+dsy, (_tmp_cDir-1) * 8 + _tmp_cFrame, m_wR[10] -(m_wR[0]/3), m_wG[10] -(m_wG[0]/3), m_wB[10] -(m_wB[0]/3), dwTime);
      }


Add below:
Code:
#ifdef GM_SPRITE_WITHOUT_SHIELD // Client GM-related stuff by Boreas
      if ((strcmp(_tmp_cName, GM1_NAME) == 0) || (strcmp(_tmp_cName, GM2_NAME) == 0) || (strcmp(_tmp_cName, GM3_NAME) == 0) || (strcmp(_tmp_cName, GM4_NAME) == 0) || (strcmp(_tmp_cName, GM5_NAME) == 0) || (strcmp(_tmp_cName, GM6_NAME) == 0) || (strcmp(_tmp_cName, GM7_NAME) == 0) || (strcmp(_tmp_cName, GM8_NAME) == 0) || (strcmp(_tmp_cName, GM9_NAME) == 0) || (strcmp(_tmp_cName, GM10_NAME) == 0)) {
         m_pEffectSpr[45]->PutTransSprite(sX + dx - 13, sY + dy - 34, 0, dwTime);
#ifdef GM_HERO_FLAG
         m_pEffectSpr[87]->PutTransSprite70(sX + dx + 53, sY + dy + 54, _tmp_iEffectFrame%29, dwTime);
#endif
      }
#endif


Function: DrawObject_OnMagic

Find:
Code:
CheckActiveAura2(sX, sY, dwTime,  _tmp_sOwnerType);


Add Below:
Code:
#ifdef GM_SPRITE_WITHOUT_SHIELD // Client GM-related stuff by Boreas
      if ((strcmp(_tmp_cName, GM1_NAME) == 0) || (strcmp(_tmp_cName, GM2_NAME) == 0) || (strcmp(_tmp_cName, GM3_NAME) == 0) || (strcmp(_tmp_cName, GM4_NAME) == 0) || (strcmp(_tmp_cName, GM5_NAME) == 0) || (strcmp(_tmp_cName, GM6_NAME) == 0) || (strcmp(_tmp_cName, GM7_NAME) == 0) || (strcmp(_tmp_cName, GM8_NAME) == 0) || (strcmp(_tmp_cName, GM9_NAME) == 0) || (strcmp(_tmp_cName, GM10_NAME) == 0)) {
         m_pEffectSpr[45]->PutTransSprite(sX - 13, sY - 34, 0, dwTime);
#ifdef GM_HERO_FLAG
         m_pEffectSpr[87]->PutTransSprite70(sX + 53, sY + 54, _tmp_iEffectFrame%29, dwTime);
#endif
      }
#endif


Function: DrawObject_OnGetItem

Find:
Code:
CheckActiveAura2(sX, sY, dwTime,  _tmp_sOwnerType);


Add below:
Code:
#ifdef GM_SPRITE_WITHOUT_SHIELD // Client GM-related stuff by Boreas
      if ((strcmp(_tmp_cName, GM1_NAME) == 0) || (strcmp(_tmp_cName, GM2_NAME) == 0) || (strcmp(_tmp_cName, GM3_NAME) == 0) || (strcmp(_tmp_cName, GM4_NAME) == 0) || (strcmp(_tmp_cName, GM5_NAME) == 0) || (strcmp(_tmp_cName, GM6_NAME) == 0) || (strcmp(_tmp_cName, GM7_NAME) == 0) || (strcmp(_tmp_cName, GM8_NAME) == 0) || (strcmp(_tmp_cName, GM9_NAME) == 0) || (strcmp(_tmp_cName, GM10_NAME) == 0)) {
         m_pEffectSpr[45]->PutTransSprite(sX - 13, sY - 34, 0, dwTime);
#ifdef GM_HERO_FLAG
         m_pEffectSpr[87]->PutTransSprite70(sX + 53, sY + 54, _tmp_iEffectFrame%29, dwTime);
#endif
      }
#endif


Function: DrawObject_OnDamage

Find:
Code:
CheckActiveAura2(sX, sY, dwTime,  _tmp_sOwnerType);


Add below:
Code:
#ifdef GM_SPRITE_WITHOUT_SHIELD // Client GM-related stuff by Boreas
      if ((strcmp(_tmp_cName, GM1_NAME) == 0) || (strcmp(_tmp_cName, GM2_NAME) == 0) || (strcmp(_tmp_cName, GM3_NAME) == 0) || (strcmp(_tmp_cName, GM4_NAME) == 0) || (strcmp(_tmp_cName, GM5_NAME) == 0) || (strcmp(_tmp_cName, GM6_NAME) == 0) || (strcmp(_tmp_cName, GM7_NAME) == 0) || (strcmp(_tmp_cName, GM8_NAME) == 0) || (strcmp(_tmp_cName, GM9_NAME) == 0) || (strcmp(_tmp_cName, GM10_NAME) == 0)) {
         m_pEffectSpr[45]->PutTransSprite(sX - 13, sY - 34, 0, dwTime);
#ifdef GM_HERO_FLAG
         m_pEffectSpr[87]->PutTransSprite70(sX + 53, sY + 54, _tmp_iEffectFrame%29, dwTime);
#endif
      }
#endif


Function: DrawObject_OnMove

Find:
Code:
CheckActiveAura2(sX+dx, sY+dy, dwTime,  _tmp_sOwnerType);


Add below:
Code:
#ifdef GM_SPRITE_WITHOUT_SHIELD // Client GM-related stuff by Boreas
      if ((strcmp(_tmp_cName, GM1_NAME) == 0) || (strcmp(_tmp_cName, GM2_NAME) == 0) || (strcmp(_tmp_cName, GM3_NAME) == 0) || (strcmp(_tmp_cName, GM4_NAME) == 0) || (strcmp(_tmp_cName, GM5_NAME) == 0) || (strcmp(_tmp_cName, GM6_NAME) == 0) || (strcmp(_tmp_cName, GM7_NAME) == 0) || (strcmp(_tmp_cName, GM8_NAME) == 0) || (strcmp(_tmp_cName, GM9_NAME) == 0) || (strcmp(_tmp_cName, GM10_NAME) == 0)) {
         m_pEffectSpr[45]->PutTransSprite(sX + dx - 13, sY + dy - 34, 0, dwTime);
#ifdef GM_HERO_FLAG
         m_pEffectSpr[87]->PutTransSprite70(sX + dx + 53, sY + dy + 54, _tmp_iEffectFrame%29, dwTime);
#endif
      }
#endif


Function: DrawObject_OnDamageMove

Find:
Code:
CheckActiveAura2(sX+dx, sY+dy, dwTime,  _tmp_sOwnerType);


Add below:
Code:
#ifdef GM_SPRITE_WITHOUT_SHIELD // Client GM-related stuff by Boreas
      if ((strcmp(_tmp_cName, GM1_NAME) == 0) || (strcmp(_tmp_cName, GM2_NAME) == 0) || (strcmp(_tmp_cName, GM3_NAME) == 0) || (strcmp(_tmp_cName, GM4_NAME) == 0) || (strcmp(_tmp_cName, GM5_NAME) == 0) || (strcmp(_tmp_cName, GM6_NAME) == 0) || (strcmp(_tmp_cName, GM7_NAME) == 0) || (strcmp(_tmp_cName, GM8_NAME) == 0) || (strcmp(_tmp_cName, GM9_NAME) == 0) || (strcmp(_tmp_cName, GM10_NAME) == 0)) {
         m_pEffectSpr[45]->PutTransSprite(sX + dx - 13, sY + dy - 34, 0, dwTime);
#ifdef GM_HERO_FLAG
         m_pEffectSpr[87]->PutTransSprite70(sX + dx + 53, sY + dy + 54, _tmp_iEffectFrame%29, dwTime);
#endif
      }
#endif


Function: DrawObject_OnStop

Find:
Code:
CheckActiveAura2(sX, sY, dwTime,  _tmp_sOwnerType);


Add below:
Code:
#ifdef GM_SPRITE_WITHOUT_SHIELD // Client GM-related stuff by Boreas
      if ((strcmp(_tmp_cName, GM1_NAME) == 0) || (strcmp(_tmp_cName, GM2_NAME) == 0) || (strcmp(_tmp_cName, GM3_NAME) == 0) || (strcmp(_tmp_cName, GM4_NAME) == 0) || (strcmp(_tmp_cName, GM5_NAME) == 0) || (strcmp(_tmp_cName, GM6_NAME) == 0) || (strcmp(_tmp_cName, GM7_NAME) == 0) || (strcmp(_tmp_cName, GM8_NAME) == 0) || (strcmp(_tmp_cName, GM9_NAME) == 0) || (strcmp(_tmp_cName, GM10_NAME) == 0)) {
         m_pEffectSpr[45]->PutTransSprite(sX - 13, sY - 34, 0, dwTime);
#ifdef GM_HERO_FLAG
         m_pEffectSpr[87]->PutTransSprite70(sX + 53, sY + 54, _tmp_iEffectFrame%29, dwTime);
#endif
      }
#endif


Function: DrawObject_OnRun

Find:
Code:
CheckActiveAura2(sX+dx, sY+dy, dwTime,  _tmp_sOwnerType);


Add below:
Code:
#ifdef GM_SPRITE_WITHOUT_SHIELD // Client GM-related stuff by Boreas
      if ((strcmp(_tmp_cName, GM1_NAME) == 0) || (strcmp(_tmp_cName, GM2_NAME) == 0) || (strcmp(_tmp_cName, GM3_NAME) == 0) || (strcmp(_tmp_cName, GM4_NAME) == 0) || (strcmp(_tmp_cName, GM5_NAME) == 0) || (strcmp(_tmp_cName, GM6_NAME) == 0) || (strcmp(_tmp_cName, GM7_NAME) == 0) || (strcmp(_tmp_cName, GM8_NAME) == 0) || (strcmp(_tmp_cName, GM9_NAME) == 0) || (strcmp(_tmp_cName, GM10_NAME) == 0)) {
         m_pEffectSpr[45]->PutTransSprite(sX + dx - 13, sY + dy - 34, 0, dwTime);
#ifdef GM_HERO_FLAG
         m_pEffectSpr[87]->PutTransSprite70(sX + dx + 53, sY + dy + 54, _tmp_iEffectFrame%29, dwTime);
#endif
      }
#endif



Add all these lines to GlobalDef.h:
Code:
/*
Client GM-related stuff by Boreas
For color list: http://adf.ly/1mso6n
Additional comment: If 10 GMs is not enough, you're free to add more.
Just use your brain and figure out where to edit. ;p
*/

// Always display GM sprite? If commented, no changes will be taken :)
//#define GM_SPRITE_WITHOUT_SHIELD

// Add Mage Hero Flag to GM?
//#define GM_HERO_FLAG

#define GM1_NAME "Boreas[GM]"
#define GM1_NAME_COLOR 255,222,0
#define GM1_TITLE "Admin"
#define GM1_TITLE_COLOR 255,0,55

#define GM2_NAME "Test"
#define GM2_NAME_COLOR 255,100,155
#define GM2_TITLE "Second GM"
#define GM2_TITLE_COLOR 255,255,255

#define GM3_NAME ""
#define GM3_NAME_COLOR 255,255,255
#define GM3_TITLE ""
#define GM3_TITLE_COLOR 255,255,255

#define GM4_NAME ""
#define GM4_NAME_COLOR 255,255,255
#define GM4_TITLE ""
#define GM4_TITLE_COLOR 255,255,255

#define GM5_NAME ""
#define GM5_NAME_COLOR 255,255,255
#define GM5_TITLE ""
#define GM5_TITLE_COLOR 255,255,255

#define GM6_NAME ""
#define GM6_NAME_COLOR 255,255,255
#define GM6_TITLE ""
#define GM6_TITLE_COLOR 255,255,255

#define GM7_NAME ""
#define GM7_NAME_COLOR 255,255,255
#define GM7_TITLE ""
#define GM7_TITLE_COLOR 255,255,255

#define GM8_NAME ""
#define GM8_NAME_COLOR 255,255,255
#define GM8_TITLE ""
#define GM8_TITLE_COLOR 255,255,255

#define GM9_NAME ""
#define GM9_NAME_COLOR 255,255,255
#define GM9_TITLE ""
#define GM9_TITLE_COLOR 255,255,255

#define GM10_NAME ""
#define GM10_NAME_COLOR 255,255,255
#define GM10_TITLE ""
#define GM10_TITLE_COLOR 255,255,255

_________________
Boreas, aka sLeeq


Last edited by Boreas on Sun Jun 18, 2017 7:47 am, edited 2 times in total.



Top
 OfflineProfile  
 Post subject: Re: [Code] Client GM-related stuff
PostPosted: Thu Jun 08, 2017 10:52 pm 
Clay Golem
Clay Golem

Joined: Sat Apr 30, 2016 12:19 am
Posts: 25

Thanks given: 5 times
Thanked: 0 times

Town: Aresden
Thanks for sharing this,it worked :D




Top
 OfflineProfile  
 Post subject: Re: [Code] Client GM-related stuff
PostPosted: Fri Jun 09, 2017 5:18 pm 
Clay Golem
Clay Golem

Joined: Tue Feb 03, 2009 3:43 pm
Posts: 29
Location: Argentina

Thanks given: 3 times
Thanked: 2 times

Character: Centuu
Town: Elvine
Helbreath Servers: Helbreath Olympia
Nice stuff.




Top
 OfflineProfile  
 Post subject: Re: [Code] Client GM-related stuff
PostPosted: Fri Jul 07, 2017 10:36 am 
Troll
Troll
User avatar

Joined: Sun Jul 01, 2012 9:40 am
Posts: 53

Thanks given: 19 times
Thanked: 4 times

Character: Jiraiya
Town: Elvine
Helbreath Servers: Helbreath Fusion
Helbreath Lux
Helbreath Kalyche
Helbreath Glorious
Helbreath Dominal
Helbreath MysticK
Helbreath SonicX
Helbreath Dr
Thank you so much :) It's amazing to know someone is still doing such things.




Top
 OfflineProfile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Powered by phpBB © - View Disclaimer
Style by Daniel St. Jules of Gamexe.net, customized by kinger.