The_Piper Report post Posted September 16, 2004 Hi ppl, i have made a small patch which implements a command named #goto x,y. So you can type #goto 25,15 to go to the coordinates 25,15 on your actual map. This patch goes to multiplayer.c. Right behind case RAW_TEXT: { #ifdef GOTOPATCH /* GOTO PATCH */ int gtx, gty; /* GOTO PATCH */ char zwi[64]; /* GOTO PATCH */ char zwi2[64]; /* GOTO PATCH */ sprintf(zwi, "%s: ", username_str); /* GOTO PATCH */ if(strncmp(&in_data[4],zwi,strlen(zwi))==0){/* GOTO PATCH */ strncpy(zwi2, /* GOTO PATCH */ &in_data[4+strlen(username_str)+3], /* GOTO PATCH */ data_lenght-4-strlen(username_str)-3);/* GOTO PATCH */ if(strncmp(zwi2, "#goto ", 6)==0){ /* GOTO PATCH */ sprintf(zwi,"#goto %%d,%%d"); /* GOTO PATCH */ sscanf(zwi2, zwi, >x, >y); /* GOTO PATCH */ if(gtx>0 && gty>0){ /* GOTO PATCH */ if(pf_find_path(gtx, gty)>0){ /* GOTO PATCH */ sprintf(zwi, /* GOTO PATCH */ "Going to %d,%d", gtx,gty); /* GOTO PATCH */ log_to_console(c_green1,zwi); /* GOTO PATCH */ } /* GOTO PATCH */ else{ /* GOTO PATCH */ strcpy(zwi,"You cant go there!");/* GOTO PATCH */ log_to_console(c_red1,zwi); /* GOTO PATCH */ } /* GOTO PATCH */ } /* GOTO PATCH */ data_lenght=0; /* GOTO PATCH */ memset(in_data, 0, sizeof(in_data)); /* GOTO PATCH */ break; /* GOTO PATCH */ } /* GOTO PATCH */ } /* GOTO PATCH */ # endif /* GOTO PATCH */ Piper Share this post Link to post Share on other sites
fred_penner Report post Posted September 16, 2004 I wrote an identical patch about 2 months. It came in handy a couple of times but turned out to be largely useless. Share this post Link to post Share on other sites
The_Piper Report post Posted September 16, 2004 Well, Fred.. this patch is really useful if you know where you died. If youve got the coordinates, it brings you right back to your bag. So always click on the compass before attacking this nasty gobbie or use a death message patch ;-) Piper Share this post Link to post Share on other sites