From 6e4d98865963ef3e85df488716e9a97bfcacc98b Mon Sep 17 00:00:00 2001 From: Lance Date: Thu, 16 Mar 2006 16:08:01 +0000 Subject: * mob_chat_sub fix. Added buildin_pcblockmove. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5628 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/map/script.c') diff --git a/src/map/script.c b/src/map/script.c index 2de03d940..9b4690ca7 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -410,6 +410,7 @@ int buildin_pctalk(struct script_state *st); int buildin_pcemote(struct script_state *st); int buildin_pcfollow(struct script_state *st); int buildin_pcstopfollow(struct script_state *st); +int buildin_pcblockmove(struct script_state *st); // <--- [zBuffer] List of player cont commands // [zBuffer] List of mob control commands ---> int buildin_spawnmob(struct script_state *st); @@ -737,6 +738,7 @@ struct { {buildin_pcemote,"pcemote","ii"}, {buildin_pcfollow,"pcfollow","ii"}, {buildin_pcstopfollow,"pcstopfollow","i"}, + {buildin_pcblockmove,"pcblockmove","ii"}, // <--- [zBuffer] List of player cont commands // [zBuffer] List of mob control commands ---> {buildin_spawnmob,"spawnmob","*"}, @@ -9847,6 +9849,24 @@ int buildin_pcwalkxy(struct script_state *st){ return 0; } +int buildin_pcblockmove(struct script_state *st){ + int id, flag; + struct map_session_data *sd = NULL; + + id = conv_num(st, & (st->stack->stack_data[st->start + 2])); + flag = conv_num(st, & (st->stack->stack_data[st->start + 3])); + + if(id) + sd = map_id2sd(id); + else + sd = script_rid2sd(st); + + if(sd) + sd->state.blockedmove = flag > 0; + + return 0; +} + int buildin_pctalk(struct script_state *st){ int id; char *str; -- cgit v1.2.3-60-g2f50