Solution for $wp bug
sub EVENT_WAYPOINT is supposed to assign the number of a wandering mob's current waypoint to $wp, but this has been broken for some time.
Cripp posted a fix here, which fixed the $wp problem for me in 6.0 DR3, but caused a new problem: sub EVENT_WAYPOINT was triggered twice each time a waypoint was hit. For instance, I wrote a quest that had the mob say "I'm at waypoint $wp", and each time he reached a waypoint he said that twice. Well I don't know any C++, but I played with Cripp's fix and got it to work, at least as far as I can tell. So here's what I came up with: In embparser.cpp replace Code:
case EVENT_WAYPOINT: { Code:
case EVENT_WAYPOINT: { Code:
int max_wp; Code:
int max_wp; |
Well in hindsight there seems to be a minor bug: the first waypoint gets assigned to $wp as 0 instead of 1, and waypoint 2 is assigned "1", and so on. Someone less likely to break the code than I am may want to fix that :P
|
Quote:
I think when using this its used like this.. ($wpGridID whatever WpID) for example, if($wp10 == 1) { quest::depop(); I dont know, you could try it with the sub EVENT_WP or Waypoint, whichever it is.. It works for me, but I think ruben fixed it for our serv. lol |
ok
the more accurate fix to this is below. This is a result of whoever wrote embparser not understanding the old .qst parser well enough as they wrote the perl stuff. Code:
Index: embparser.cpp |
All times are GMT -4. The time now is 09:33 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.