diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/pc.c | 1 | ||||
-rw-r--r-- | src/map/script.c | 84 |
2 files changed, 42 insertions, 43 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index d3eec5935..dd5ea32c3 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -783,7 +783,6 @@ int pc_authfail(struct map_session_data *sd) { //Attempts to set a mob. int pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list *bl) { - const char hate_var[3][NAME_LENGTH] = {"PC_HATE_MOB_SUN","PC_HATE_MOB_MOON","PC_HATE_MOB_STAR"}; int class_; if (!sd || !bl || pos < 0 || pos > 2) return 0; 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 |