* Updated Chase Walk
* Added 'checkoption2' and 'checkoption3' script functions git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@472 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
8deba892f5
commit
fc01eec347
@ -1,4 +1,9 @@
|
|||||||
Date Added
|
Date Added
|
||||||
|
12/6
|
||||||
|
* Updated Chase Walk [celest]
|
||||||
|
* Added 'checkoption2' and 'checkoption3' script functions - Refer to
|
||||||
|
/npc/sample/npc_testchkoption.txt for similiar examples [celest]
|
||||||
|
|
||||||
12/5
|
12/5
|
||||||
* Fixed another crash sending updates to disconnected
|
* Fixed another crash sending updates to disconnected
|
||||||
clients [MouseJstr]
|
clients [MouseJstr]
|
||||||
|
@ -4962,13 +4962,14 @@ int battle_check_range(struct block_list *src,struct block_list *bl,int range)
|
|||||||
|
|
||||||
if( range>0 && range < arange ) {// 遠すぎる
|
if( range>0 && range < arange ) {// 遠すぎる
|
||||||
// be lenient if the skill was cast before we have moved to the correct position [Celest]
|
// be lenient if the skill was cast before we have moved to the correct position [Celest]
|
||||||
if (src->type == BL_PC && bl->type == BL_PC) {
|
/* Celest: Hmm, bl isn't necessarily BL_PC... i think i'll test this more first >.< */
|
||||||
|
/*if (src->type == BL_PC && bl->type == BL_PC) {
|
||||||
struct map_session_data *sd;
|
struct map_session_data *sd;
|
||||||
nullpo_retr(0, (sd=(struct map_session_data *)bl));
|
nullpo_retr(0, (sd=(struct map_session_data *)bl));
|
||||||
if (sd->walktimer != -1 && !((arange-=battle_config.skill_range_leniency)<=range))
|
if (sd->walktimer != -1 && !((arange-=battle_config.skill_range_leniency)<=range))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else return 0;
|
else*/ return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( arange<2 ) // 同じマスか隣接
|
if( arange<2 ) // 同じマスか隣接
|
||||||
|
@ -289,6 +289,8 @@ int buildin_npcspeed(struct script_state *st); // [Valaris]
|
|||||||
int buildin_npcwalkto(struct script_state *st); // [Valaris]
|
int buildin_npcwalkto(struct script_state *st); // [Valaris]
|
||||||
int buildin_npcstop(struct script_state *st); // [Valaris]
|
int buildin_npcstop(struct script_state *st); // [Valaris]
|
||||||
int buildin_getmapxy(struct script_state *st); //get map position for player/npc/pet/mob by Lorky [Lupus]
|
int buildin_getmapxy(struct script_state *st); //get map position for player/npc/pet/mob by Lorky [Lupus]
|
||||||
|
int buildin_checkoption2(struct script_state *st); // [celest]
|
||||||
|
int buildin_checkoption3(struct script_state *st); // [celest]
|
||||||
|
|
||||||
|
|
||||||
void push_val(struct script_stack *stack,int type,int val);
|
void push_val(struct script_stack *stack,int type,int val);
|
||||||
@ -499,6 +501,8 @@ struct {
|
|||||||
{buildin_npcwalkto,"npcwalkto","ii"}, // [Valaris]
|
{buildin_npcwalkto,"npcwalkto","ii"}, // [Valaris]
|
||||||
{buildin_npcstop,"npcstop",""}, // [Valaris]
|
{buildin_npcstop,"npcstop",""}, // [Valaris]
|
||||||
{buildin_getmapxy,"getmapxy","siii*"}, //by Lorky [Lupus]
|
{buildin_getmapxy,"getmapxy","siii*"}, //by Lorky [Lupus]
|
||||||
|
{buildin_checkoption2,"checkoption2","i"},
|
||||||
|
{buildin_checkoption3,"checkoption3","i"},
|
||||||
{NULL,NULL,NULL},
|
{NULL,NULL,NULL},
|
||||||
};
|
};
|
||||||
int buildin_message(struct script_state *st); // [MouseJstr]
|
int buildin_message(struct script_state *st); // [MouseJstr]
|
||||||
@ -3299,6 +3303,46 @@ int buildin_checkoption(struct script_state *st)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
/*==========================================
|
||||||
|
*
|
||||||
|
*------------------------------------------
|
||||||
|
*/
|
||||||
|
int buildin_checkoption2(struct script_state *st)
|
||||||
|
{
|
||||||
|
int type;
|
||||||
|
struct map_session_data *sd;
|
||||||
|
|
||||||
|
type=conv_num(st,& (st->stack->stack_data[st->start+2]));
|
||||||
|
sd=script_rid2sd(st);
|
||||||
|
|
||||||
|
if(sd->opt2 & type){
|
||||||
|
push_val(st->stack,C_INT,1);
|
||||||
|
} else {
|
||||||
|
push_val(st->stack,C_INT,0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
/*==========================================
|
||||||
|
*
|
||||||
|
*------------------------------------------
|
||||||
|
*/
|
||||||
|
int buildin_checkoption3(struct script_state *st)
|
||||||
|
{
|
||||||
|
int type;
|
||||||
|
struct map_session_data *sd;
|
||||||
|
|
||||||
|
type=conv_num(st,& (st->stack->stack_data[st->start+2]));
|
||||||
|
sd=script_rid2sd(st);
|
||||||
|
|
||||||
|
if(sd->opt3 & type){
|
||||||
|
push_val(st->stack,C_INT,1);
|
||||||
|
} else {
|
||||||
|
push_val(st->stack,C_INT,0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*==========================================
|
/*==========================================
|
||||||
*
|
*
|
||||||
|
@ -234,9 +234,7 @@ int SkillStatusChangeTable[]={ /* skill.h
|
|||||||
SC_GOSPEL,
|
SC_GOSPEL,
|
||||||
/* 370- */
|
/* 370- */
|
||||||
-1,-1,-1,-1,-1,-1,-1,-1,
|
-1,-1,-1,-1,-1,-1,-1,-1,
|
||||||
|
|
||||||
SC_EDP,
|
SC_EDP,
|
||||||
|
|
||||||
-1,
|
-1,
|
||||||
/* 380- */
|
/* 380- */
|
||||||
SC_TRUESIGHT,
|
SC_TRUESIGHT,
|
||||||
@ -1080,7 +1078,7 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
|
|||||||
if(pc_steal_item(sd,bl))
|
if(pc_steal_item(sd,bl))
|
||||||
clif_skill_nodamage(src,bl,TF_STEAL,skill2,1);
|
clif_skill_nodamage(src,bl,TF_STEAL,skill2,1);
|
||||||
else if (battle_config.display_snatcher_skill_fail)
|
else if (battle_config.display_snatcher_skill_fail)
|
||||||
clif_skill_fail(sd,skillid,0,0); // it's annoying! =p [Celest]
|
clif_skill_fail(sd,skillid,0,0);
|
||||||
}
|
}
|
||||||
// エンチャントデットリ?ポイズン(猛毒?果)
|
// エンチャントデットリ?ポイズン(猛毒?果)
|
||||||
if (sd && sd->sc_data[SC_EDP].timer != -1 && rand() % 10000 < sd->sc_data[SC_EDP].val2 * sc_def_vit) {
|
if (sd && sd->sc_data[SC_EDP].timer != -1 && rand() % 10000 < sd->sc_data[SC_EDP].val2 * sc_def_vit) {
|
||||||
@ -1151,7 +1149,7 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
|
|||||||
struct status_change *sc_data = battle_get_sc_data(bl);
|
struct status_change *sc_data = battle_get_sc_data(bl);
|
||||||
if(sc_data) {
|
if(sc_data) {
|
||||||
sc_data[SC_FREEZE].val3++;
|
sc_data[SC_FREEZE].val3++;
|
||||||
if(sc_data[SC_FREEZE].val3 >= 3 && rand()%1000 < skilllv*sc_def_mdef/100)
|
if(sc_data[SC_FREEZE].val3 >= 3)
|
||||||
skill_status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
|
skill_status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -7343,7 +7341,9 @@ int skill_use_id( struct map_session_data *sd, int target_id,
|
|||||||
if( sd->opt1>0 )
|
if( sd->opt1>0 )
|
||||||
return 0;
|
return 0;
|
||||||
if(sc_data){
|
if(sc_data){
|
||||||
if(sc_data[SC_CHASEWALK].timer != -1) return 0;
|
// allow to use only Chasewalk [celest]
|
||||||
|
if(sc_data[SC_CHASEWALK].timer != -1 && skill_num != ST_CHASEWALK)
|
||||||
|
return 0;
|
||||||
if(sc_data[SC_VOLCANO].timer != -1){
|
if(sc_data[SC_VOLCANO].timer != -1){
|
||||||
if(skill_num==WZ_ICEWALL) return 0;
|
if(skill_num==WZ_ICEWALL) return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user