EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Quests (https://www.eqemulator.org/forums/forumdisplay.php?f=624)
-   -   $wp variable..fix? (https://www.eqemulator.org/forums/showthread.php?t=15340)

Cripp 08-14-2004 05:58 AM

$wp variable..fix?
 
HI, I am not sure if $wp variable works for everyone or not, but after adding the 2 grid system for me it didnt work. not sure if 2grid system broke it or not but heres what i did to fix it.

embparser.cpp around line 285 replace:
Code:

                case EVENT_WAYPOINT: {
                        std::string temp = "wp";
                                temp += itoa(npcid);
                        ExportVar(packagename.c_str(), temp.c_str(), data);
                        SendCommands(packagename.c_str(), "EVENT_WAYPOINT", npcid, npcmob, mob);
                        break;
                }

with

Code:

                case EVENT_WAYPOINT: {
                        //std::string temp = "wp";
                        //        temp += itoa(npcid);
                        //ExportVar(packagename.c_str(), temp.c_str(), data);
                        ExportVar(packagename.c_str(), "wp", itoa( (int)npcmob->cur_wp ));
                        SendCommands(packagename.c_str(), "EVENT_WAYPOINT", npcid, npcmob, mob);
                        break;
                }

parser.cpp around line 445 replace:

Code:

                case EVENT_WAYPOINT: {
                        temp = "wp." + (string)itoa(npcid);
                        AddVar(temp,data);
                        SendCommands("event_waypoint", qstID, npcmob, mob);
                        break;
                }

with

Code:

                case EVENT_WAYPOINT: {
                        temp = "wp." + (string)itoa(npcid);
                        AddVar(temp,itoa( (int)npcmob->cur_wp ));
                        //AddVar(temp,data);
                        SendCommands("event_waypoint", qstID, npcmob, mob);
                        break;
                }

and finally in mob.h around line 760 replace:

Code:

        int                max_wp;
        int                cur_wp;
// used by quest wandering commands

with

Code:

        int                max_wp;
        public:
        int                cur_wp;
        protected:
// used by quest wandering commands

works perfectly for me now :D hope this helps.

govtcheeze 08-14-2004 07:13 AM

Very nice fix!

sotonin 08-14-2004 07:57 AM

maybe they'll add 2 grid into the cvs now. o.O... finally

Cripp 08-14-2004 09:15 AM

i hope so, its so much better. i am havin some troubles getting it working tho. so far i only have the circular type working with it.


All times are GMT -4. The time now is 12:20 AM.

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