MQ2uDupe [for EQEmu]

inshikijo

Spammer
Joined
Mar 1, 2008
Messages
51
Reaction score
0
Points
0
I don't know if he wants it posted here, but UnKnoWn405 posted the source code to his dupe plugin for EQEmu.
 
As much as i'm sure it's good info, they don't want their info cross posted the same way we don't. Removed the link.
 
NA really isn't competition for you but I understand, np.
 
Not worried about competition, worried about ownership of plugins. Unless given express consent to posting the plugins, we do not need to deal with them.
 
Unknown spoke with me and gave permission for his plugin to be posted here. You may post the source, but not a link to another site with this information. Thanks.
 
Code:
Commands:
/plat -- Force buy from merchant free
/dupe -- Force sell to merchant (no drops work)
/xxx (removed) -- Apparently it works on EQ Live so was removed
/trainit -- Set the Skill ID and train at your GM without skill points
/autospend -- Spend aa's without the points, broken
/forcesplit -- Force split set amount of platinum, broken
/coin -- Get free Guk Coins (KMRA Server), never worked
/trickcast -- Cast a spell you normally can't, still being worked on
/imem -- Instantly memorize a spell (doesn't need to be scribed)
/iscribe -- Instantly scribe a spell

MQ2uDupe.cpp


Code:
//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);
}


uDupe.h
Code:
#define uBUY      0x221E
typedef struct _BuyPkt {
   /*0000*/ DWORD TargetID;
   /*0000*/ DWORD SpawnID;
   /*0000*/ DWORD SlotNum;
   /*0000*/ DWORD Price;
   /*0000*/ DWORD Quantity;
} BuyPkt;

#define uCOINS 0x5FC7
typedef struct _CoinsPkt {
   BYTE Chksum;
} CoinsPkt;

#define uSELL 0xE13
typedef struct _SellPkt {
   /*0000*/ DWORD TargetID;
   /*0000*/ DWORD SlotNum;
   /*0000*/ DWORD Quantity;
   /*0000*/ DWORD Price;
} SellPkt;

#define uCASTSPELL 0x304B
typedef struct _CastPkt {
  DWORD SlotNum;
  DWORD SpellID;
  DWORD Unknown_Mask; 
  DWORD TargetID; 
  DWORD APICheck;
} CastPkt, *PCastPacket; 

#define uAUTOSPLIT      0x4848
typedef struct _SplitPkt {
   DWORD Platinum;
   DWORD Gold;
   DWORD Silver;
   DWORD Copper;
} SplitPkt;

#define uAASPEND 0x681
typedef struct _AASpendPkt {
/*0000*/ DWORD FunctionM;
/*0004*/ DWORD Index;
/*0008*/ DWORD unk1;
       DWORD unk2;
} AASpendPkt;

#define uTRAINING      0x11D2
typedef struct _TrainPkt {
   DWORD TargetID;
   DWORD Some_Flag; //set to 0
   DWORD SlotID; //slot ID of the skill
} TrainPkt;

#define uMEMSPELL      0x308E   //also scribe
typedef struct _ScribeSpellPkt {
   DWORD some_flag; //set to 0
   DWORD SpellID;
   DWORD SpellBookSlot;
   DWORD unknown0x1; //set to 0x3ff (1023)
} ScribeSpellPkt;

typedef struct _MemSpellPkt {
   DWORD SpellBookSlot;
   DWORD SpellID;
   DWORD some_flag; //set to 0
   DWORD unknown0x1; //set to 0x3ff (1023)
} MemSpellPkt;
 
can't get it to work... the plugin loads without any problems... i type /plat or something else buit won't work...

could anyone help me ?
 
Read the comments on the source, that part is broke, most of it is broke.
 
Can't get it to work... could anyone take a look at this plugin and fix it maybe? would be nice

I think it is broken
 
Read the comments on the source, that part is broke, most of it is broke.

most of it was patched so basicly he just posted to crush our happiness or he just posted so people can work on it
 
use sell bags

use sell bags to dupe item, buy back from vendor after u have shared banked teh other copy .
 
Read the damn comments above the commands, stop being lazy. Most of it is broke, all of the dupe parts are broken which is obviously why the source code was posted. How the dupe parts worked were leaked to some people and Mort found out and told EQEmu devs, who then stopped it.

Some cool stuff that still works is..
/uspell <spell ID>
/slot <0-8 spell gems>
/imem
**instantly memorize a spell, don't have to sit or anything first**

/uskill <Skill ID>
/trainit
**trains your skill without any points**

Some other stuff works, I'm not going to sit here and explain it to all the lazy people. Why don't you just open that CPP file in wordpad and read through all the comments that UnKnoWn405 was nice enough to write out before he made it public.

Also, this source has been leaked on other sites for a week or two now so the chances that all of this has been fixed is pretty high. Also, this source code was not posted for any other reason than the dupe part which is the only part that's really important was broken.

This was not posted so that people could fix it, because it is not fixable. This was just posted so that people could see how it was done and maybe add on to stuff that does work.