View Single Post
  #1  
Old 08-14-2004, 05:58 AM
Cripp's Avatar
Cripp
Discordant
 
Join Date: Oct 2003
Location: The Shire
Posts: 474
Default $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 hope this helps.
__________________
Nug Blazers - ServerOP / founder
^^comming... later!

www.nugblazers.com
Reply With Quote