Request to slightly improve add grid way point comand
Greetings!
curently adding grid way points uses following format: #wp add X Y Z where X is grid id#, Y pause time, and Z is wp id# what i propose is to slightly modify this so if Z is omited, the comand will automaticly use curently max Z+1. this will GREATLY improve easiness of adding new way points. so instead of running around and typing #wp add 71 60 1 #wp add 71 60 2 #wp add 71 60 3 #wp add 71 60 4 etc etc etc till my fingers bleed i will make a hot button with #wp add 71 60 and span simply spam it at will alternatuivly if comand line does not work with omited parameters, let say if i use MAX keyword at the end of the line it will auto calculate Z+1 like this: #wp add 71 60 max thanks =) |
Ya, that would definitely be useful.
|
Here's the code for the wp command:
zone/command.cpp Code:
2256 void command_wp(Client *c, const Seperator *sep) zone/zonedb.h Code:
/* Code:
int ZoneDatabase::GetHighestWaypoint(uint32 zoneid, int32 gridid) { Code:
void command_wp(Client *c, const Seperator *sep) |
Going to test this now. I was trying to compile this, but it errored out. I had to change this:
Code:
void command_wp(Client *c, const Seperator *sep,) Code:
void command_wp(Client *c, const Seperator *sep,int wp) |
If anyone can get this working, I will move the post to server code submissions. I wasn't able to get it to compile, but I don't know what I am doing anyway lol.
|
What kind of error are you getting?
|
I was getting errors about "wp" not being referenced or something like that. I forget the exact error.
|
I thought it would be fine the way I did this, but I guess maybe not.
Quote:
Code:
void command_wp(Client *c, const Seperator *sep) Oh well, that's why KLS & Derision are the "devs", and I just tinker :D |
Derision isn't an official Dev yet, but he probably should be :)
I will give that a try later and see if it compiles like that. It looks like that could resolve it. But, I was getting a similar error when trying to compile some code with a rule I made up. I will post more after I get to test it. |
So Trev - did you ever managed to get this one working? 8-)
|
I guess I never tried the latest code change AndMetal made on this. Now it compiles just fine. Going to test it later after the next server reboot to verify it works. If so, I will sticky this in the Server Code Submissions section :)
|
that be perfect - trying to populated something as large as West Karana by hand... is simply insane without this feature :grin:
|
The original code didn't work as intended, but I had a chance to compile & debug, and this is what I came up with.
In zone/zonedb.h around line 215 (under the Grids/Paths heading), add Code:
int GetHighestWaypoint(uint32 zoneid, int32 gridid); Code:
int ZoneDatabase::GetHighestWaypoint(uint32 zoneid, int32 gridid) { Code:
void command_wp(Client *c, const Seperator *sep) Code:
void command_wp(Client *c, const Seperator *sep) |
All times are GMT -4. The time now is 05:26 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.