• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

uber plugin needs struct update MQ2SetClicky (1 Viewer)

shroomheadofmarbles

New member
Joined
Apr 5, 2005
RedCents
MQ2SetClicky uber plugin needs struct update

#include "../MQ2Plugin.h"

PreSetup("MQ2SetClicky");
VOID SetCursorSpell (PSPAWNINFO, PCHAR);

PLUGIN_API VOID InitializePlugin(VOID)
{
DebugSpewAlways("Initializing MQ2SetClicky");


AddCommand("/setspell",SetCursorSpell);

}

PLUGIN_API VOID ShutdownPlugin(VOID)
{
DebugSpewAlways("Shutting down MQ2SetClicky");


RemoveCommand("/setspell");

}


VOID SetCursorSpell(PSPAWNINFO pChar, PCHAR szLine)
{
CHAR Arg1[MAX_STRING] = {0};
CHAR Arg2[MAX_STRING] = {0};
if (!pChar->pCharInfo->Cursor) {
WriteChatColor("Please have an item on the cursor to use this command.",USERCOLOR_DEFAULT);
return;
}
GetArg(Arg1,szLine,1);
GetArg(Arg2,szLine,2);
if (Arg1[0]==0) {
WriteChatColor("Usage: /setcursorspell <spellname>");
return;
}
PSPELLLIST pSpell = GetSpellByName(Arg1);
if (!pSpell) {
WriteChatColor("Unknown spell.",USERCOLOR_DEFAULT);
return;
}
SetItemWornEffect(pChar->pCharInfo->Cursor->Item,pSpell->ID);
if (Arg2[0]!=0) pChar->pCharInfo->Cursor->Item->Level = atoi(Arg2);
}

BOOL DoesCharHaveSpellItem(PSPAWNINFO pChar, DWORD SpellID)
{
DWORD i;
if (!pChar) return FALSE;
if (!pChar->pCharInfo) return FALSE;
for (i=0;i<22;i++) {
if (!pChar->pCharInfo->InventoryArray) continue;
if (!pChar->pCharInfo->InventoryArray->Item) continue;
if (pChar->pCharInfo->InventoryArray->Item->SpellId == SpellID) return TRUE;
}
return FALSE;
}
--------------------------------------------------------

(399): error C2039: 'Level' : is not a member of 'EQData::_ITEMINFO'
(410): error C2039: 'SpellId' : is not a member of 'EQData::_ITEMINFO'
(393): error C2065: 'pSpell' : undeclared identifier
(393): error C2065: 'PSPELLLIST' : undeclared identifier
(398): error C2227: left of '->ID' must point to class/struct/union
(394): error C3861: 'pSpell': identifier not found, even with argument-dependent lookup
(398): error C3861: 'pSpell': identifier not found, even with argument-dependent lookup
(398): error C3861: 'SetItemWornEffect': identifier not found, even with argument-dependent lookup
 
Last edited:
need help

been trying all afternoon to fix im not very good with structures guess ill have to wait for soultaker tone or one of the more experienced programmers to attempt a fix if they are willing
 
so with this plugin if it worked.. could i set a effect on say a Rusty Longsword that has a instant clicky with no recast timer that did say 1k dmg like for exzample the cleric spell Orfer.. 1219 DD an a shield with a good chanter haste spell and so on?
 
It only works on spells your char can cast i think. I inherited alot of source when a guild friend gave up on EQ earlier this month was working in april of this year and possibly may seems very similiar to this plugin of cronics:

MQ2CSpells
Once loaded, this plugin removes all delays and the need to sit when you memorize a spell. You can instantly memorize spells from your spell book, change spell sets, or right click on an empty spell slot and choose a spell from the menu. This one is great with multiple spell sets because you can instantly shift your entire spell bank (excellent for raid buffing). Additionally, this plugin allows you to cause your client to believe that an item has any given spell effect. For example, you can trick the client into thinking your head item has Faerune to allow yourself vision mods.

Note: /imbue only works for client-side effects. HP buffs, regeneration, attack speed, etc. are all controlled by the server. /imbue head "Kodiac's Endless Intellect" would accomplish nothing.


$35 for three licenses, $10 for each additional license.

But then again I might be way off was not privy to this plugin when it was operational
 
If this is one of cronics private plugins that he sells, shouldn't you just contact cronic? I am sure he is not to happy with having his private stuff posted.
 
I don't think this is HIS plugin, just one that does the same thing in the end. Like he sells a warp plugin but not all warping plugins are his
 
// size is 0xc 01-27-2005
typedef struct _ITEMSPELLS {
/*0x00*/ DWORD SpellID;
/*0x04*/ BYTE RequiredLevel;
/*0x05*/ BYTE EffectType;
/*0x06*/ BYTE Unknown[2];
/*0x08*/ DWORD Unknown0x08;
} ITEMSPELLS, *PITEMSPELLS;

/*0x1a4*/ struct _ITEMSPELLS Clicky;
/*0x1b0*/ struct _ITEMSPELLS Proc;
/*0x1bc*/ struct _ITEMSPELLS Worn;
/*0x1c8*/ struct _ITEMSPELLS Focus;
/*0x1d4*/ struct _ITEMSPELLS Scroll;
/*0x1e0*/ DWORD Unknown0x1e0;

anyone have any idea what needs to change here?

(399): error C2039: 'Level' : is not a member of 'EQData::_ITEMINFO'
(410): error C2039: 'SpellId' : is not a member of 'EQData::_ITEMINFO'
(393): error C2065: 'pSpell' : undeclared identifier
(393): error C2065: 'PSPELLLIST' : undeclared identifier
(398): error C2227: left of '->ID' must point to class/struct/union
(394): error C3861: 'pSpell': identifier not found, even with argument-dependent lookup
(398): error C3861: 'pSpell': identifier not found, even with argument-dependent lookup
(398): error C3861: 'SetItemWornEffect': identifier not found, even with argument-dependent lookup
 
Almost have it fixed....Give me alittle more time I'll publish a completed copy.

Down to last error, corrected many. I don't think it will make much of a difference posting which error I am on, since no one seems to know how to do this..or has posted attempts

But here it is anyways
(398): error C3861: 'SetItemWornEffect': identifier not found, even with argument-dependent lookup

In my compiler it returns as an undefined identifier. I am still working on fixing that

I have an idea or two, and both of those ideas involve me having to redo a bunch of stuff...
 
Last edited:
cool mochila, when u get it, PM it to me (just in case it gets removed lol). I would try and help, but dont know anything about plugins lol
 
Don't need to know a ton, and a good thing to remember is when it says that "Randomitemname" isn't a member of _Iteminfo or _Charinfo. The struct has moved since the last patch and all you need to do is redirect it.

The one thing it seems necessary to change in EQData.h is add a struct to _Contents called _CHARINFO2 , so that it recognizes it as a valid struct.
 
Mochila said:
Almost have it fixed....Give me alittle more time I'll publish a completed copy.

Down to last error, corrected many. I don't think it will make much of a difference posting which error I am on, since no one seems to know how to do this..or has posted attempts

But here it is anyways
(398): error C3861: 'SetItemWornEffect': identifier not found, even with argument-dependent lookup

In my compiler it returns as an undefined identifier. I am still working on fixing that

I have an idea or two, and both of those ideas involve me having to redo a bunch of stuff...

Well that error there is kind of crucial :) You are missing a function to set the effect on the item. I haven't looked at this much but from just seeing the code posted in the simplest case it would be something along the lines of properly setting one or more of the _ITEMSPELLS structures. So you just need to populate the structure(s) for the item in this call.
 
Mmm I tried adjusting it to ItemSpells, Worn, and Effect Type.....and every combination of these 3 and these 3 individually has returned a undefined identifier.

Edit: These are the only ones I can think of working.....any ideas?
 
Mochila said:
Mmm I tried adjusting it to ItemSpells, Worn, and Effect Type.....and every combination of these 3 and these 3 individually has returned a undefined identifier.

Edit: These are the only ones I can think of working.....any ideas?

Not sure, so you are saying all the structs are undefined on an item? If they are then obviously your item pointer is wrong.
 
mmm, they're valid structs in EQdata.h . The struct for Worn is within ITEMINFO or Item. ITEMSPELLS is defined too. But maybe I am looking at the wrong pointer.

I've also just tried to do SetWorn or Worn by itself with similiar words, and it gives me a message about needing a function operation, instead of an undefined.....I'm not struct expert at all, but fiddling with let me solve several errors.

Edit: EffectType isn't a struct, just something under ITEMSPELLS , blah. But still.
 
Rich (BB code):
#include "../MQ2Plugin.h"

PreSetup("MQ2SetClicky");
VOID SetCursorSpell (PSPAWNINFO, PCHAR);

PLUGIN_API VOID InitializePlugin(VOID)
{
DebugSpewAlways("Initializing MQ2SetClicky");


AddCommand("/setspell",SetCursorSpell);

}

PLUGIN_API VOID ShutdownPlugin(VOID)
{
DebugSpewAlways("Shutting down MQ2SetClicky");


RemoveCommand("/setspell");

}


VOID SetCursorSpell(PSPAWNINFO pChar, PCHAR szLine)
{
CHAR Arg1[MAX_STRING] = {0};
CHAR Arg2[MAX_STRING] = {0};
if (!pChar->pCharInfo->pCI2->pCharInfo2->Cursor) {
WriteChatColor("Please have an item on the cursor to use this command.",USERCOLOR_DEFAULT);
return;
}
GetArg(Arg1,szLine,1);
GetArg(Arg2,szLine,2);
if (Arg1[0]==0) {
WriteChatColor("Usage: /setcursorspell <spellname>");
return;
}
PSPELLMGR PSPELL= GetSpellByName(Arg1);
if (!PSPELL) {
WriteChatColor("Unknown spell.",USERCOLOR_DEFAULT);
return;
}
SetItemWornEffect=(pChar->pCharInfo->pCI2->pCharInfo2->Cursor->Item,PSPELL->ID);
if (Arg2[0]!=0) pChar->pCharInfo->pCI2->pCharInfo2->Cursor->Item->RequiredLevel = atoi(Arg2);
}

BOOL DoesCharHaveSpellItem(PSPAWNINFO pChar, DWORD SpellID)
{
DWORD i;
if (!pChar) return FALSE;
if (!pChar->pCharInfo) return FALSE;
for (i=0;i<22;i++) {
if (!pChar->pCharInfo->pCI2->pCharInfo2->InventoryArray) continue;
if (!pChar->pCharInfo->pCI2->pCharInfo2->InventoryArray->Item) continue;
if (pChar->pCharInfo->pCI2->pCharInfo2->Buff->SpellID == SpellID) return TRUE;
}
return FALSE;
}


Error report:
C:\MQ2\MQ2Setspell\MQ2Setclicky.cpp(39) : error C2440: 'initializing' : cannot convert from 'struct EQData::_SPELL *' to 'struct EQData::_SPELLMGR *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\MQ2\MQ2Setclicky\MQ2Setclicky.cpp(44) : error C2065: 'SetItemWornEffect' : undeclared identifier
C:\MQ2\MQ2Setclicky\MQ2Setclicky.cpp(44) : error C2039: 'ID' : is not a member of '_SPELLMGR'
C:\MQ2\MQ2Setclicky\../MQ2Main/EQData.h(1248) : see declaration of '_SPELLMGR'
Error executing cl.exe.

MQ2Setclicky.dll - 3 error(s), 0 warning(s)
________________________________________________________________

What isn't fixed is in Dark Red. I pointed all the stuff to the correct structs otherwise....Its 3 things until it is working, but I'm done with it.
 
Really wish someone would/could fix this plugin, I had it long time ago and it rocked, at least for faerune and run speed effects. I know they can be achieved with current plugins, but i just like the way this is one is setup. Nifty little plug in it's time.
 
uber plugin needs struct update MQ2SetClicky

Users who are viewing this thread

Back
Top