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.c84
1 files changed, 42 insertions, 42 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 767402512..a995b12bb 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -9090,48 +9090,48 @@ int buildin_failedremovecards(struct script_state *st)
return 0;
}
-/* ================================================================
- * mapwarp "<from map>","<to map>",<x>,<y>,<type>,<ID for Type>;
- * type: 0=everyone, 1=guild, 2=party(uncoded); [Reddozen]
- * ================================================================
- */
-int buildin_mapwarp(struct script_state *st) // Added by RoVeRT
-{
- int x,y,m,check_val=0,check_ID=0,i=0;
- char *str;
- char *mapname;
- unsigned int index;
- mapname=conv_str(st,& (st->stack->stack_data[st->start+2]));
- str=conv_str(st,& (st->stack->stack_data[st->start+3]));
- x=conv_num(st,& (st->stack->stack_data[st->start+4]));
- y=conv_num(st,& (st->stack->stack_data[st->start+5]));
- check_val=conv_num(st,& (st->stack->stack_data[st->start+6]));
- check_ID=conv_num(st,& (st->stack->stack_data[st->start+7]));
-
- if( (m=map_mapname2mapid(mapname))< 0)
- return 0;
-
- if(!(index=mapindex_name2id(str)))
- return 0;
-
- if(!(check_val))
- map_foreachinmap(buildin_areawarp_sub,
- m,BL_PC,index,x,y);
-
- if(check_val==1){
- struct guild *g = guild_search(check_ID);
-
- if (g){
- for( i=0; i < g->max_member; i++)
- {
- if(g->member[i].sd && g->member[i].sd->bl.m==m){
- pc_setpos(g->member[i].sd,index,x,y,3);
- }
- }
- }
- }
-
- return 0;
+/* ================================================================
+ * mapwarp "<from map>","<to map>",<x>,<y>,<type>,<ID for Type>;
+ * type: 0=everyone, 1=guild, 2=party(uncoded); [Reddozen]
+ * ================================================================
+ */
+int buildin_mapwarp(struct script_state *st) // Added by RoVeRT
+{
+ int x,y,m,check_val=0,check_ID=0,i=0;
+ char *str;
+ char *mapname;
+ unsigned int index;
+ mapname=conv_str(st,& (st->stack->stack_data[st->start+2]));
+ str=conv_str(st,& (st->stack->stack_data[st->start+3]));
+ x=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ y=conv_num(st,& (st->stack->stack_data[st->start+5]));
+ check_val=conv_num(st,& (st->stack->stack_data[st->start+6]));
+ check_ID=conv_num(st,& (st->stack->stack_data[st->start+7]));
+
+ if( (m=map_mapname2mapid(mapname))< 0)
+ return 0;
+
+ if(!(index=mapindex_name2id(str)))
+ return 0;
+
+ if(!(check_val))
+ map_foreachinmap(buildin_areawarp_sub,
+ m,BL_PC,index,x,y);
+
+ if(check_val==1){
+ struct guild *g = guild_search(check_ID);
+
+ if (g){
+ for( i=0; i < g->max_member; i++)
+ {
+ if(g->member[i].sd && g->member[i].sd->bl.m==m){
+ pc_setpos(g->member[i].sd,index,x,y,3);
+ }
+ }
+ }
+ }
+
+ return 0;
}
int buildin_cmdothernpc(struct script_state *st) // Added by RoVeRT