• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

MQ2tHacks Plugin by a_troll_01

a_troll_01

Active member
Joined
Oct 5, 2006
RedCents
21¢
Just a little plugin that I wrote for fun. It might have some use...or not; but it was fun to do a little poking around. :D

/tHacks - Help
/tEat - you will not consume food, but you get the benefits of the stats
/tDrink - you will not consume drink, but you get the benefits of the stats
/tStats - raises your stats to 450 client side (I avoided STA, Wis & Int for obvious reasons). No encumber and all that good stuff.
/tResists - Raises your resists to 650 client side.

Rich (BB code):
// 
// Plugin: MQ2THack
//
// Version: 1.0		Date: 10/7/2006
// 
// Author: a_troll_01 for RedGuides
//
// Commands: /tStats - set all stats to max/normal
//	       /tResists - set all resists to max/normal
//	       /tFaerune - place the faerune buff in the bard song window
//	       /tEat - no longer need to eat
//	       /tDrink - no longer need to drink
//	       /tHacks - Plugin help



#include "../MQ2Plugin.h"


PreSetup("MQ2THacks");

// Stats
bool bModifyStats = false;
DWORD MaxStats = 450;
DWORD STR;
DWORD STA;
DWORD CHA;
DWORD DEX;
DWORD INTEL;
DWORD AGI;
DWORD WIS;
DWORD mana;
DWORD baseHP;

// Resists
bool bModifyResists = false;
DWORD MaxResist = 650;
DWORD PR;	//SavePoison
DWORD MR;	//Save Magic
DWORD DR;	//SaveDisease
DWORD CrR;	//SaveCorruption
DWORD FR;	//SaveFire
DWORD CR;	//SaveCold

bool bFaerune=false;
int dFaeruneBuffSlot=30;

bool bEat = true;  // You will consume food normally
bool bDrink = true; // You will consume drink normally

char szMsg[MAX_STRING]; 

PCHARINFO pCharInfo = GetCharInfo(); 
PCHARINFO2 pCharInfo2 = GetCharInfo2(); 

VOID ModifyStats(PSPAWNINFO pChar, PCHAR szLine) {
	bModifyStats = (bModifyStats==false?true:false);
	sprintf(szMsg,"/tHacks msg: Stats set to %s.",(bModifyStats==true?"maximum":"normal"));
	WriteChatColor(szMsg,(bModifyStats==true?USERCOLOR_DEFAULT:CONCOLOR_RED));

	if (bModifyStats == false){
		pCharInfo->STR=STR;
		pCharInfo->CHA=CHA;
		pCharInfo->DEX=DEX;
		pCharInfo->AGI=AGI;
	} else if (bModifyStats == true) {
		STR = pCharInfo->STR;
		STA = pCharInfo->STA;
		CHA = pCharInfo->CHA;
		DEX = pCharInfo->DEX;
		INTEL = pCharInfo->INT;
		AGI = pCharInfo->AGI;
		WIS = pCharInfo->WIS;
		mana=pCharInfo2->Mana;
		baseHP=pCharInfo2->BaseHP;

		pCharInfo->STR=MaxStats;
		pCharInfo->CHA=MaxStats;
		pCharInfo->DEX=MaxStats;
		pCharInfo->AGI=MaxStats;
		pCharInfo->ManaRegenBonus=65;
		}
	return;
}


VOID ModifyResists(PSPAWNINFO pChar, PCHAR szLine)
{
	bModifyResists = (bModifyResists==false?true:false);
	sprintf(szMsg,"/tHacks msg: Resists set to %s.",(bModifyResists==true?"maximum":"normal"));
	WriteChatColor(szMsg,(bModifyResists==true?USERCOLOR_DEFAULT:CONCOLOR_RED));

	if (bModifyResists == false){
		pCharInfo->SavePoison = PR;
		pCharInfo->SaveMagic = MR;
		pCharInfo->SaveDisease = DR;
		pCharInfo->SaveCorruption = CrR;
		pCharInfo->SaveFire = FR;
		pCharInfo->SaveCold = CR;
	} else if (bModifyResists == true) {
		//set the stats to the maximum
		PR=pCharInfo->SavePoison;
		MR=pCharInfo->SaveMagic;
		DR=pCharInfo->SaveDisease;
		CrR=pCharInfo->SaveCorruption;
		FR=pCharInfo->SaveFire;
		CR=pCharInfo->SaveCold;

		pCharInfo->SavePoison = MaxResist;
		pCharInfo->SaveMagic = MaxResist;
		pCharInfo->SaveDisease = MaxResist;
		pCharInfo->SaveCorruption = MaxResist;
		pCharInfo->SaveFire = MaxResist;
		pCharInfo->SaveCold = MaxResist;
	}

	return;
}

VOID Faerune(PSPAWNINFO pChar, PCHAR szLine)
{
	//idea completely stolen from Fossil on Kenetixeq
	PSPELL pSpell = GetSpellByName("Faerune");
	bFaerune = (bFaerune==true?false:true);

	sprintf(szMsg,"/tHacks msg: Faerune is now %s.",(bModifyResists==true?"on":"off"));
	WriteChatColor(szMsg,(bFaerune==true?USERCOLOR_DEFAULT:CONCOLOR_RED));

	if(bFaerune==false){
		GetCharInfo2()->Buff[dFaeruneBuffSlot].SpellID = (DWORD)0; 
		GetCharInfo2()->Buff[dFaeruneBuffSlot].Duration = (DWORD)0; 
	} else {
		GetCharInfo2()->Buff[dFaeruneBuffSlot].SpellID = (DWORD)pSpell->ID; 
		GetCharInfo2()->Buff[dFaeruneBuffSlot].Duration = (DWORD)9990; 
	}
	return;
}

VOID RunSpeed(PSPAWNINFO pChar, PCHAR szLine)
{
	sprintf(szMsg,"This function has not been implimented");
	WriteChatColor(szMsg,USERCOLOR_DEFAULT);
}

VOID Eat(PSPAWNINFO pChar, PCHAR szLine)
{
	bEat = (bEat==false?true:false);
	sprintf(szMsg,"tHack msg: You will %s.", (bEat == true?"eat normally":"no longer eat"));
	WriteChatColor(szMsg,(bEat==false?USERCOLOR_DEFAULT:CONCOLOR_RED));
}

VOID Drink(PSPAWNINFO pChar, PCHAR szLine)
{
	bDrink = (bDrink == false?true:false);
	sprintf(szMsg,"tHack msg: You will %s.", (bEat == true?"drink normally":"no longer drink"));
	WriteChatColor(szMsg,(bDrink==false?USERCOLOR_DEFAULT:CONCOLOR_RED));
	
}

VOID LongBuffs(PSPAWNINFO pChar, PCHAR szLine)
{
	int i;
	WriteChatColor("tHask msg: Increasing duraction of all buffs",USERCOLOR_DEFAULT);
	for (i=0;i<23;i++) {
		if(GetCharInfo2()->Buff.SpellID > 0) {
			GetCharInfo2()->Buff[20+i].SpellID=GetCharInfo2()->Buff.SpellID;
			GetCharInfo2()->Buff[20+i].Duration = (DWORD)9990;
			GetCharInfo2()->Buff.Duration = (DWORD)9990;
		}
	}
}

VOID tHacks(PSPAWNINFO pChar, PCHAR szLine)
{
	WriteChatColor("/tResists",USERCOLOR_DEFAULT);
	WriteChatColor("/tStats",USERCOLOR_DEFAULT);
	WriteChatColor("/tFaerune",USERCOLOR_DEFAULT);
	WriteChatColor("/tEat",USERCOLOR_DEFAULT);
	WriteChatColor("/tDrink",USERCOLOR_DEFAULT);
}



PLUGIN_API VOID SetGameState(DWORD GameState)
{
	int i;
	//idea completely stolen from Fossil on Kenetixeq
	if (bFaerune==true && GameState==GAMESTATE_INGAME) {
		if ((ppCharData) && (pCharData)) {
			PSPELL pSpell = GetSpellByName("Faerune");
			GetCharInfo2()->Buff[dFaeruneBuffSlot].SpellID = (DWORD)pSpell->ID; 
			GetCharInfo2()->Buff[dFaeruneBuffSlot].Duration = (DWORD)9990; 
					}
	}

	for (i=1;i<23;i++) {
		if(GetCharInfo2()->Buff.SpellID > 0) {
			GetCharInfo2()->Buff[20+i].SpellID=GetCharInfo2()->Buff.SpellID;
			GetCharInfo2()->Buff[20+i].Duration = (DWORD)9990;
		}
	}
}


PLUGIN_API VOID OnPulse(VOID) 
{ 
	if (bModifyResists) {
		pCharInfo->SavePoison = MaxResist;
		pCharInfo->SaveMagic = MaxResist;
		pCharInfo->SaveDisease = MaxResist;
		pCharInfo->SaveCorruption = MaxResist;
		pCharInfo->SaveFire = MaxResist;
		pCharInfo->SaveCold = MaxResist;
	}

	if (bModifyStats) {
		pCharInfo->STR=MaxStats;
		//pCharInfo->STA=MaxStats;
		pCharInfo->CHA=MaxStats;
		pCharInfo->DEX=MaxStats;
		//pCharInfo->INT=MaxStats;
		pCharInfo->AGI=MaxStats;
		//pCharInfo->WIS=MaxStats;
	}

	if (bDrink == false) pCharInfo2->thirstlevel = 6256;
	if (bEat == false) pCharInfo2->hungerlevel = 6256;

}

PLUGIN_API VOID InitializePlugin(VOID)
{
	DebugSpewAlways("Initializing MQ2THacks");
	AddCommand("/thacks",tHacks);
	AddCommand("/tstats", ModifyStats);
	AddCommand("/tresists", ModifyResists);
	AddCommand("/tfaerune", Faerune);
	AddCommand("/trun", RunSpeed);
	AddCommand("/teat", Eat);
	AddCommand("/tdrink", Drink);
	AddCommand("/tbuffs", LongBuffs);
}


PLUGIN_API VOID ShutdownPlugin(VOID)
{
	DebugSpewAlways("Shutting down MQ2THacks");
	AddCommand("/thacks",tHacks);
	RemoveCommand("/tstats");
	RemoveCommand("/tresists");
	RemoveCommand("/tfaerune");
	RemoveCommand("/trun");
	RemoveCommand("/teat");
	RemoveCommand("/tdrink");
	RemoveCommand("/tbuffs");
}
 
Last edited:
kaneda86 said:
so /tfaerune also is a command

Yes there are a few other commands in the plugin but nothing noteworthy. Credit was giving to the author of Faerune.

//idea completely stolen from Fossil on Kenetixeq

There is also a /tbuff command which changes the client side buff duration. In other words, it does nothing since the buff timer gets syned server side.


I do have an idea for an actual useful plugin that I'm going to start screwing around with.
 
aside from the consuming food thing and faerune isnt this whole thing useless? Not a shot at you at all, but i never understood why anyone wanted the increase stats and resists thing if they dont work anyway.
 
Actually, the food / drink doesn't work either. That's controlled serverside. So while you wouldn't be getting the messages, it should still consume your food, and when you run out, it will still have the same effects...serverside. So while you wouldn't see it, it'd be like using the plugin to buff out your HP and Mana pool numbers, but not being able to use the mana that the server didn't see you as having.
 
good for bragging rights with a S/S of stats without having a magelo :P

cool plugin to just play with.

but for actuall usage, nothing at all. giving a "cent" just cuase its fun. :)

<----- think a_troll_01 may be an upcoming star soon ;)

keep up the woork man. i see you going places.
 
thez said:
Actually, the food / drink doesn't work either. That's controlled serverside. So while you wouldn't be getting the messages, it should still consume your food, and when you run out, it will still have the same effects...serverside. So while you wouldn't see it, it'd be like using the plugin to buff out your HP and Mana pool numbers, but not being able to use the mana that the server didn't see you as having.


The food and drink thing does work. Check it out.
 
Cheesymac said:
aside from the consuming food thing and faerune isnt this whole thing useless? Not a shot at you at all, but i never understood why anyone wanted the increase stats and resists thing if they dont work anyway.


Pretty much. I was just having a bit of fun learning the structures of EQ and the interworkings of MQ2. There are some uses to increased stats. The client uses some stats; i.e. STR calculate encumbrance, Wis/Int for fizzle rate, and CHA for vendor purchase price.

I don't mind the title of useless noob hacker, everyone started somewhere! :D
 
Nice work Troll, Yea I played with this and it seemed to work, will watch over the weekend when I have more time. str works tried on my 50 chanter and was able to carry more stuff? used coppers and was able to carry much more, per str increase. As for use? but its fun to mess with
 
Increasing stats in Uqua might be nice. At least I seem to recall Uqua being the zone that dropped everyones STR and left all the Int caster moving like a slug through salt.

I'm messing around with a damage parser to see if the increased stats affect DPS. I'll pick an instance zone, probably Hide & Seek Hive, to see if there is a noticable change in my DPS.
 
really likes this for the eating part any chance of getting reworked since new updates are out???
 
arsson_451 said:
really likes this for the eating part any chance of getting reworked since new updates are out???

I'm working on a precompile with the MQ2 20061207 source. I'll add this into that release.

Cheers
 
Do you have:
Did you compile the plugin?
or
Copy the attached file to your MQ2 folder?

MQ2thacks.dll in your Mq2 folder?

did you mistype /plugin MQ2thacks?

Are you using redquest or your own compile from MQ2 forums?

If your own did you disable the check for plugins having to be newer then MQ2Main.dll?
 
Last edited:
This also wasnt working a few months ago so I never reinstalled it again. I used it all the time before thet to buy cheaper summonstones and never carry food/drink.
 
still cant get thacks to work now ini file and it says thack or thacks cant be loaded
 
Did the plugin itself land in a diffrent folder? or saved under a wrong name?
sometimes its the simple missed thing one cant see.

GL
 
Non of the normal /plugin blah blah blah works for me either. Bad plugin I'm guessing. bummer
 
That would rock I love this plugin and it hasn't worked in a while for me. I can still get it to load though, dunno what the problem is there.
 
Those of you who it's not working for: Are you using Redquest?

a_troll, are you?
 
I just downloaded Reds compile and got the same thing :confused: If you could repost the plugin again that be cool. Thx
 
Alright...confirmed. This doesn't work with the Redquest zip.

Oh, and btw...this plugin is a crash waiting to happen: You have an AddCommand in your RemoveCommand section.
 
ive not had a problem with this plugin adn have been using redquest compile. but then i only use /teat and /tdrink on it save some money and still gives me stats have not tried with 6.0 yet
 
i still cant get this to work im usin request v 6.1 i havent got to work for a while now
 
do this still work or do anyone of this for the EQEmu 2005-10-31 eqclient?
 
MQ2tHacks Plugin by a_troll_01

Users who are viewing this thread

Back
Top
Cart