//UnKnoWn405 @ WWW.NOTADDICTED.COM
/*
This was made by UnKnoWn405. It was originally made with ONLY PlatDupe but eventually
got turned in to some massive plugin with tons of different dupe methods I've tried. I
usually ended up putting a lot of packet hacks that didn't have to do with dupe, such as
training without any GM points in here. I hope everyone enjoys it, feel free to edit it or
add on to it as long as you leave my name in it then I have no problem.
*/
#include "../MQ2Plugin.h"
#include "uDupe.h"
//Sets up all of the variables that can be changed in game
int SlotNum = 1;
int Quantity = 0;
int Price = 0;
int SpellID = 1;
int APICheck = 1;
int ItemID = 1;
PreSetup("MQ2UDupe");
// Command: /plat
// How to: /slotnum <Slot number of item on merchant you wanted to buy>
// /uquantity <set to 0 for no quantity, 1 for things that you could stack>
// /uprice <set to 0, if it didn't work set to 1>
// /echo ${Merchant[Name].ID} to print out the ID of the item you declare
// /echo $Merchant.Item[#].ID} to print out the name of the item ID you declare
// -------------------------------------------------------------------------------------//
// NOTES:
// EQEmu broke this about a week ago. I'm sorry the source is released after it's broke
// but maybe you can still do something with it. You would just find the ID of the item on the
// merchant and then declare it with /slotnum, then set price to 0 and quantity to whatever
// amount you wanted. Then type /plat and it would buy from the merchant for free. This was great
// on KMRA, I made a macro to buy 8 bags full of water flasks (sell for like 600 plat there) and
// then sell them all back, it was all profit. I made over a million in minutes with a macro
// running.
VOID PlatDupe(PSPAWNINFO pChar, PCHAR szLine){
PSPAWNINFO pMyTarget = (PSPAWNINFO)pTarget;
PSPAWNINFO pMe = GetCharInfo()->pSpawn;
if (!pTarget || !ppTarget)
return;
BuyPkt mp;
ZeroMemory(&mp, sizeof(mp));
mp.Price = Price;
mp.Quantity = Quantity;
mp.SlotNum = SlotNum;
mp.SpawnID = pMe->SpawnID;
mp.TargetID = pMyTarget->SpawnID;
SendEQMessage(uBUY, &mp,sizeof(mp));
}
// REMOVED BECAUSE ITS GLITCHY BUT WORKS ON LIVE
*/
-----------------
-----------------
-----------------
/*
// Command: /coindupe
// How to: Target coin person and type /coindupe
// -------------------------------------------------------------------------------------//
// NOTES:
// Was made to dupe GUK coins on KMRA server.
VOID CoinDupe(PSPAWNINFO pChar, PCHAR szLine){
PSPAWNINFO pMyTarget = (PSPAWNINFO)pTarget;
PSPAWNINFO pMe = GetCharInfo()->pSpawn;
if (!pTarget || !ppTarget)
return;
CoinsPkt cp;
ZeroMemory(&cp, sizeof(cp));
cp.Chksum = 12;
SendEQMessage(uCOINS, &cp,sizeof(cp));
}
// Command: /dupeit
// How to: /slotnum <slot number of item you want sold>
// /uprice <set to 0 for bags and such, 1 for things with more than 1 quantity>
// /uquantity <ammount you want to sell, 0 for things not stackable>
// -------------------------------------------------------------------------------------//
// NOTES:
// EQEMu fucking broke this about a week ago, sorry that I release the source AFTER it's broke
// but maybe you can still do something with it. This also let you sell NO DROP items, then buy
// on a different toon who didn't even have to be hacking because merchant would sell for nothing.
VOID DupeIt(PSPAWNINFO pChar, PCHAR szLine){
PSPAWNINFO pMyTarget = (PSPAWNINFO)pTarget;
PSPAWNINFO pMe = GetCharInfo()->pSpawn;
if (!pTarget || !ppTarget) return;
SellPkt sp;
ZeroMemory(&sp, sizeof(sp));
sp.TargetID = pMyTarget->SpawnID;
sp.SlotNum = SlotNum;
sp.Price = Price;
sp.Quantity = Quantity;
SendEQMessage(uSELL, &sp,sizeof(sp));
}
// Command: /trickcast
// How to: /slotnum <slot number of spell you want to cast>
// /uspell <id of spell you want to cast>
// /echo ${Spell[Name].ID} to print out the ID of the spell you declare
// /uAPI <API Check number of spell you are casting>
// -------------------------------------------------------------------------------------//
// NOTES:
// The meaning of this was to cast a spell that you're not actually allowed to cast.
// Even with a working API Check, this doesn't seem to work unless you actually are able to cast
// the spell. I'm sure with more testing something like this could be possible, but at this
// time it's just not working. Feel free to work on this and send me the results.
// UnKnoWn405 on WWW.NOTADDICTED.COM
VOID TrickCast(PSPAWNINFO pChar, PCHAR szLine) {
PSPAWNINFO pMyTarget = (PSPAWNINFO)pTarget;
if (!pTarget || !ppTarget) return;
CastPkt cs;
cs.SlotNum = SlotNum;
cs.SpellID = SpellID;
cs.Unknown_Mask = 29;
cs.TargetID = pMyTarget->SpawnID;
cs.APICheck = APICheck; //2330500735
SendEQMessage(uCASTSPELL, &cs,sizeof(cs));
}
// Command: /forcesplit
// How to: /uquantity <amount in platinum you want to split>
// -------------------------------------------------------------------------------------//
// NOTES:
// I made this for yet another attempt at a possible dupe plugin that would be easier.
// I almost knew it would not work but decided to keep it here anyway, just in case I
// ever wanted it. There is a server side check comparing amount you are splitting to amount'
// on your persons.
VOID AutoSplit(PSPAWNINFO pChar, PCHAR szLine) {
PSPAWNINFO pMyTarget = (PSPAWNINFO)pTarget;
if (!pTarget || !ppTarget) return;
SplitPkt sp;
sp.Platinum = Quantity;
sp.Gold = 0;
sp.Silver = 0;
sp.Copper = 0;
SendEQMessage(uAUTOSPLIT, &sp,sizeof(sp));
}
// Command: /autospend
// How to: /slotnum <ID of the AA you want to train>
// /uspell <id of spell you want to memorize>
// /echo ${Spell[Name].ID} to print out the ID of the spell you declare
// -------------------------------------------------------------------------------------//
// NOTES:
// This is actually quite useless. I made it to test if you could send a packet request to
// train in a certain AA without having enough AA's to train it. But it ended up not working,
// there is a server side check comparing your AA's to how much AA's it costs to upgrade.
VOID AASpend(PSPAWNINFO pChar, PCHAR szLine) {
PSPAWNINFO pMyTarget = (PSPAWNINFO)pTarget;
if (!pTarget || !ppTarget) return;
AASpendPkt sp;
sp.FunctionM = 3;
sp.Index = SlotNum;
sp.unk1 = 0;
sp.unk2 = 0;
SendEQMessage(uAASPEND, &sp,sizeof(sp));
}
// Command: /trainit
// How to: /slotnum <ID of the skill you want to train> -- see Skills.h for full list
VOID Trainer(PSPAWNINFO pChar, PCHAR szLine) {
PSPAWNINFO pMyTarget = (PSPAWNINFO)pTarget;
if (!pTarget || !ppTarget) return;
TrainPkt tp;
tp.SlotID = SlotNum;
tp.Some_Flag = 0;
tp.TargetID = pMyTarget->SpawnID;
SendEQMessage(uTRAINING, &tp,sizeof(tp));
}
// Command: /iscribe
// How to: /slotnum <slot number you want scribed>
// /uspell <id of spell you want to scribe>
// /echo ${Spell[Name].ID} to print out the ID of the spell you declare
// -------------------------------------------------------------------------------------//
// NOTES:
// There is no point in scribing a spell unless you want to, because you can memorize it
// even if it's not scribed on EQ Emu
VOID InstaScribeSpell(PSPAWNINFO pChar, PCHAR szLine) {
PSPAWNINFO pMyTarget = (PSPAWNINFO)pTarget;
ScribeSpellPkt sp;
ZeroMemory(&sp,sizeof(sp));
sp.SpellBookSlot = SlotNum;
sp.SpellID = SpellID;
sp.unknown0x1 = 0;
SendEQMessage(uMEMSPELL, &sp,sizeof(sp));
}
// Command: /imem
// How to: /slotnum <slot number you want memorized>
// /uspell <id of spell you want to memorize>
// /echo ${Spell[Name].ID} to print out the ID of the spell you declare
VOID InstaMemSpell(PSPAWNINFO pChar, PCHAR szLine) {
PSPAWNINFO pMyTarget = (PSPAWNINFO)pTarget;
PSPAWNINFO pMe = GetCharInfo()->pSpawn;
MemSpellPkt mp;
ZeroMemory(&mp,sizeof(mp));
mp.SpellBookSlot = SlotNum;
mp.SpellID = SpellID;
mp.unknown0x1 = 1023;
mp.some_flag = 1;
SendEQMessage(uMEMSPELL, &mp,sizeof(mp));
}
// I made a help command, so you can do /udupehelp but I never actually finished it.
// This plugin was for my personal use to dupe a bunch of different things, and have
// an advantage without fucking up the economy. I never really planned on releasing this,
// and because I know how my own plugin works I just never bothered finishing a /help command.
// feel free to add this if you want, and re-release it.
VOID uDupeHelp(PSPAWNINFO pChar, PCHAR szLine) {
WriteChatColor("MQ2uDupe Help",CONCOLOR_YELLOW);
WriteChatColor("------------------",CONCOLOR_YELLOW);;
}
//Here is where all of the variables can be changed in game. You can change Spell ID,
//API Check (absolutely no point, you can't trick the server even with the right API),
//Slot number, Price, and Quantity.
VOID uSpellID(PSPAWNINFO pChar, PCHAR szLine) {
CHAR szMsg[MAX_STRING] = {0};
CHAR szArg[MAX_STRING] = {0};
GetArg(szArg,szLine,1);
if(IsNumber(szArg)){
SpellID = atoi(szLine);
sprintf(szMsg,"Spell ID set to: %d",SpellID);
WriteChatColor(szMsg, CONCOLOR_YELLOW);
} else {
sprintf(szMsg,"Spell ID is currently: %d",SpellID);
WriteChatColor(szMsg, CONCOLOR_YELLOW);
}
return;
}
VOID uItemID(PSPAWNINFO pChar, PCHAR szLine) {
CHAR szMsg[MAX_STRING] = {0};
CHAR szArg[MAX_STRING] = {0};
GetArg(szArg,szLine,1);
if(IsNumber(szArg)){
ItemID = atoi(szLine);
sprintf(szMsg,"Item ID set to: %d",ItemID);
WriteChatColor(szMsg, CONCOLOR_YELLOW);
} else {
sprintf(szMsg,"Item ID is currently: %d",ItemID);
WriteChatColor(szMsg, CONCOLOR_YELLOW);
}
return;
}
VOID uAPICheck(PSPAWNINFO pChar, PCHAR szLine) {
CHAR szMsg[MAX_STRING] = {0};
CHAR szArg[MAX_STRING] = {0};
GetArg(szArg,szLine,1);
if(IsNumber(szArg)){
APICheck = atoi(szLine);
sprintf(szMsg,"API Check set to: %d",APICheck);
WriteChatColor(szMsg, CONCOLOR_YELLOW);
} else {
sprintf(szMsg,"API Check is currently: %d",APICheck);
WriteChatColor(szMsg, CONCOLOR_YELLOW);
}
return;
}
VOID uSlotNum(PSPAWNINFO pChar, PCHAR szLine) {
CHAR szMsg[MAX_STRING] = {0};
CHAR szArg[MAX_STRING] = {0};
GetArg(szArg,szLine,1);
if(IsNumber(szArg)){
SlotNum = atoi(szLine);
sprintf(szMsg,"SlotNum set to: %d",SlotNum);
WriteChatColor(szMsg, CONCOLOR_YELLOW);
} else {
sprintf(szMsg,"SlotNum is currently: %d",SlotNum);
WriteChatColor(szMsg, CONCOLOR_YELLOW);
}
return;
}
VOID uQuantity(PSPAWNINFO pChar, PCHAR szLine) {
CHAR szMsg[MAX_STRING] = {0};
CHAR szArg[MAX_STRING] = {0};
GetArg(szArg,szLine,1);
if(IsNumber(szArg)){
Quantity = atoi(szLine);
sprintf(szMsg,"Quantity set to: %d",Quantity);
WriteChatColor(szMsg, CONCOLOR_YELLOW);
} else {
sprintf(szMsg,"Quantity is currently: %d",Quantity);
WriteChatColor(szMsg, CONCOLOR_YELLOW);
}
return;
}
VOID uPrice(PSPAWNINFO pChar, PCHAR szLine) {
CHAR szMsg[MAX_STRING] = {0};
CHAR szArg[MAX_STRING] = {0};
GetArg(szArg,szLine,1);
if(IsNumber(szArg)){
Price = atoi(szLine);
sprintf(szMsg,"Price set to: %d",Price);
WriteChatColor(szMsg, CONCOLOR_YELLOW);
} else {
sprintf(szMsg,"Price is currently: %d",Price);
WriteChatColor(szMsg, CONCOLOR_YELLOW);
}
return;
}
// Called once, when the plugin is to initialize
PLUGIN_API VOID InitializePlugin(VOID)
{
DebugSpewAlways("Initializing MQ2UDupe");
AddCommand("/dupeit",DupeIt);
AddCommand("/slotnum",uSlotNum);
AddCommand("/uprice",uPrice);
AddCommand("/uquantity",uQuantity);
AddCommand("/uapi",uAPICheck);
AddCommand("/uitemid",uItemID);
AddCommand("/uspell",uSpellID);
AddCommand("/platdupe",PlatDupe);
AddCommand("/coindupe",CoinDupe);
AddCommand("/trickcast",TrickCast);
AddCommand("/trainit",Trainer);
AddCommand("/forcesplit",AutoSplit);
AddCommand("/autospend",AASpend);
AddCommand("/iscribe",InstaScribeSpell);
AddCommand("/imem",InstaMemSpell);
AddCommand("/dupehelp",uDupeHelp);
WriteChatColor("MQ2uDupe Status :: Loaded!!",CONCOLOR_YELLOW);
WriteChatColor("Created by: UnKnoWn405",CONCOLOR_YELLOW);
WriteChatColor("Type /dupehelp for plugin info",CONCOLOR_YELLOW);
}
// Called once, when the plugin is to shutdown
PLUGIN_API VOID ShutdownPlugin(VOID)
{
DebugSpewAlways("Shutting down MQ2UDupe");
RemoveCommand("/dupeit");
RemoveCommand("/slotnum");
RemoveCommand("/uprice");
RemoveCommand("/uquantity");
RemoveCommand("/uapi");
RemoveCommand("/uitemid");
RemoveCommand("/uspell");
RemoveCommand("/platdupe");
RemoveCommand("/coindupe");
RemoveCommand("/trickcast");
RemoveCommand("/trainit");
RemoveCommand("/forcesplit");
RemoveCommand("/autospend");
RemoveCommand("/iscribe");
RemoveCommand("/dupehelp");
WriteChatColor("MQ2uDupe Status :: Unloaded!!",CONCOLOR_YELLOW);
}