Need help with my #lock command.
I'm adding a #lock command so you can lock your worldserver without using telnet. Here is the code, it should work fine, the thing I need help with is sending a packet to tell the world server to lock. In the world server its stored in net.world_locked. So I suppose I would need to send a packet with "net.world_locked = true/false" , but I'm not good with packets. Can anyone help me out?
/* else if ((strcasecmp(sep.arg[0], "#lock") == 0 && admin >= 200) { if (sep.arg[1][0] == '1') { net.world_locked = true; client->Message(0, "World locked."); } else if (sep.arg[1][0] == '0') { net.world_locked = false; client->Message(0, "World unlocked."); } else Message(0, "Usage: #lock [1/0]"); }*/ |
The problem is that code segment runs in zone.exe, but the "net.world_locked" variable is only in world.exe. You need to use the TCP serverpackets to have zone.exe tell world.exe to change the variable, there's no way to do it directly.
|
All times are GMT -4. The time now is 03:42 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.