summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c20
1 files changed, 20 insertions, 0 deletions
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;