EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=621)
-   -   Added fix to givecash() in quests (https://www.eqemulator.org/forums/showthread.php?t=8176)

used_pawn 06-19-2003 09:24 PM

Added fix to givecash() in quests
 
The function givecash() was not working correctly (coin type was backwards, no platinum given, no messages) so, as it started to annoy me, hehe, i fixed it.

at line 866 or thereabouts, replace entire else if () {} statement for givecash() function with this:

../zone/parser.cpp : line 866

Code:

                        else if (strstr(strlwr(arglist[0]),"givecash")) {
                                APPLAYER* outapp = new APPLAYER(OP_MoneyOnCorpse, sizeof(moneyOnCorpseStruct));
                                moneyOnCorpseStruct* d = (moneyOnCorpseStruct*) outapp->pBuffer;
               
                                d->response                = 1;
                                d->unknown1                = 0x5a;
                                d->unknown2                = 0x40;
                                d->unknown3                = 0;
                                if (mob->IsClient()) {
                                        d->copper                = atoi(arglist[1]);
                                        d->silver                = atoi(arglist[2]);
                                        d->gold                        = atoi(arglist[3]);
                                        d->platinum                = atoi(arglist[4]);
                                        mob->CastToClient()->AddMoneyToPP(d->copper, d->silver, d->gold, d->platinum,true);
                                        mob->CastToClient()->QueuePacket(outapp);
                                        if(d->platinum>0) mob->CastToClient()->Message(MT_Emote,"You recieve %i platinum pieces",d->platinum);
                                        if(d->gold>0) mob->CastToClient()->Message(MT_Emote,"You recieve %i gold pieces",d->gold);
                                        if(d->silver>0) mob->CastToClient()->Message(MT_Emote,"You recieve %i silver pieces",d->silver);
                                        if(d->copper>0) mob->CastToClient()->Message(MT_Emote,"You recieve %i copper pieces",d->copper);
                                }
                                delete outapp;
                        }

The textcolor MT_Emote might be wrong, but it looks correct to my memory, heh.

Trumpcard 06-20-2003 02:51 AM

Thanks... Should be available in cvs

used_pawn 06-20-2003 07:21 AM

Thanks!
I also updated my locked doors code, if ya didnt see it.
hmm...maybe next I'll work on...fishing? :D


All times are GMT -4. The time now is 07:36 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.