diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-26 11:58:13 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-26 11:58:13 +0000 |
commit | 2024273648858ab009892ee38e780a835a6bd4dc (patch) | |
tree | e4b575172b0539bef0c925e41a4e9e3ca4a5f202 /src/map/script.c | |
parent | 8f7a18236bc8ad7642cd1b9adf7b484e05b17e24 (diff) | |
download | hercules-2024273648858ab009892ee38e780a835a6bd4dc.tar.gz hercules-2024273648858ab009892ee38e780a835a6bd4dc.tar.bz2 hercules-2024273648858ab009892ee38e780a835a6bd4dc.tar.xz hercules-2024273648858ab009892ee38e780a835a6bd4dc.zip |
Added a few more events in..
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6776 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/map/script.c b/src/map/script.c index d4f607765..75ed89db6 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -10322,20 +10322,25 @@ int buildin_rid2name(struct script_state *st){ }
int buildin_pcwalkxy(struct script_state *st){
- int id, x, y;
+ int id, x, y = 0;
struct map_session_data *sd = NULL;
id = conv_num(st, & (st->stack->stack_data[st->start + 2]));
x = conv_num(st, & (st->stack->stack_data[st->start + 3]));
- y = conv_num(st, & (st->stack->stack_data[st->start + 4]));
+ if(st->end > st->start + 4)
+ y = conv_num(st, & (st->stack->stack_data[st->start + 4]));
if(id)
sd = map_id2sd(id);
else
sd = script_rid2sd(st);
- if(sd)
- unit_walktoxy(&sd->bl, x, y, 0);
+ if(sd){
+ if(y)
+ unit_walktoxy(&sd->bl, x, y, 0);
+ else
+ unit_walktobl(&sd->bl, map_id2bl(x), 65535, 1);
+ }
return 0;
}
|