Plugin: MQ2Rez

OK Thanks for clearing that up. I will compile this version and give it a try.

I was using the version being included in the current compile which I confused with this one.
 
Go for it, Sadge. I'd post one myself, but I'm too lazy to download the zip, deal with the compiler, etc.
 
Here's the .dll

Here's the .dll (in case you didn't download new compile)
 

Attachments

  • MQ2Rez.dll
    132 KB · Views: 12
Woot

I tested Thez's newest compile ( one released in most recent compile zip ).

Did 15 tests, each one passed perfectly, the loot all working like a charm.

Thanks for all the hard work.
 
I was going to suggest one improvement if possible to code in the plugin. Can you get the name of the person who is casting the rez and display that in the MQ window? I believe right now the plugiun says something like Accepting rez ... Maybe have it say something like Accepting 0% rez from Botcleric1 or something similar. Thanks for a great plugin :)
 
knowing who rezed you would make it a whole lot easier to send a thank-you tell :) thanks for updating this!
 
I will look into it, possibly this weekend during halftimes. I think that there is a picture of the rez window earlier in this thread -- if not, would someone mind posting one? I need to see the text to see the location of the person's name.
 
Here is an image of a 0% rez from a shaman also. Hope that helps.

 
I was looking at the source, and trying it out, and noticed it was not workign for 0% rezzes. Here is the modification I made to allow 0% rezzes to work, it seemed to work for me, but someone else may be able to make it work better :)

Code:
int ExpRezBox() {

   CXWnd *Child;
   CXWnd *pWnd;
   char InputCXStr[128],*p;
   int v;

   pWnd=(CXWnd *)FindMQ2Window("ConfirmationDialogBox");
   if(pWnd)
   {
      if (((PCSIDLWND)(pWnd))->Show==0) return -1;
      Child=pWnd->GetChildItem("cd_textoutput");
      if(Child)
      {
         ZeroMemory(InputCXStr,sizeof(InputCXStr));
         GetCXStr(Child->SidlText,InputCXStr,sizeof(InputCXStr));
[COLOR="Red"]	 p = strstr(InputCXStr,"attempting to return you");
	 if (p) return 0;
[/COLOR]         p = strstr(InputCXStr,"(");
         if (!p) return -1;
         v = atoi(p+1);
         p = strstr(p,"percent");
         if (!p) return -1;

         return v;
      }
   }
   return -1;
}

The code in red is the changed lines, basically it looks for the text on the 0% rez box, and returns 0 if it finds that text. I don't know if anything else will trigger this though, so let me know if you think of or find anything else with this text that would possibly trigger this event.

I am working on the addition of the character rezzing you into the return message, I am just having some issues with the syntax still. I am pretty much a hack programmer, I can usually figure stuff out, but it may not be pretty and it may take a bit :)

I will try to finish it up in a little bit :)
 
My stab at adding in the message about who rezzed you. Let me know how it goes. Also added in Night's patch about 0% rezzes.

Code:
Updated on first page.
 
Last edited:
1>------ Build started: Project: MQ2Rez, Configuration: Release Win32 ------
1>Compiling...
1>MQ2Rez.cpp
1>EQLIB_IMPORTS
1>.\MQ2Rez.cpp(86) : error C2664: 'strncpy' : cannot convert parameter 3 from 'char *' to 'size_t'
1> There is no context in which this conversion is possible
1>Build log was saved at "file://c:\Documents and Settings\Me\My Documents\MQ2 Precompiled\MQ2Rez\Intermediate\BuildLog.htm"
1>MQ2Rez - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

As soon as ya can fix this I'll post the .dll so people can test it (as long as you don't tell me not to).
 
Sorry...I'm working with functions in C that I've never really used before...has a little bit of trial and error involved, since I'm writing based on really simple examples online. Try this:

Code:
Updated on first page.
 
Last edited:
Has anyone tested that function, or is this a "tree falling in a forest when no one is there" issue?
 
I'm sorry to say that I can't test anything atm. I blew out the video card on my laptop and am waiting for a replacement part that probably won't get to me until the end of next week at the earliest.

It's sad because I'm using a really old P3 laptop that takes 15 mins to boot up and has no HD disk space so i haven't even tried to install C++ on it.
 
using new one with latest compile its crashing me to desktop after it accepts rez.
 
Did it spit out the "Soandso just cast an X% rez on you" message first, or do you remember? Would be the difference between the message working and there being a crash elsewhere (which would be a big issue, since nothing should have changed in the older code to make it cause a crash), or a crash because I coded the message wrong (which would be something not too surprising, since I haven't seen any feedback until now and I've never used those particular string functions before).
 
Okay, I'm going to call it quits on this round of updates. Nightmare's patch to fix shaman/druid rezes has been added, I'm going to (finally) update the source on the first page, and admit that this plugin has about as much done to it that it's going to get at this point.
 
thez,

I had it crashign after accepting rezzes as well, and no, there was no further text string after Accepting Rez Now