# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /home/lighta/Documents/Myscript/RO/Servs/rathena
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: src/common/core.c
--- src/common/core.c Base (BASE)
+++ src/common/core.c Locally Modified (Based On LOCAL)
@@ -20,7 +20,7 @@
#ifndef _WIN32
#include <unistd.h>
#else
-#include "../common/winapi.h" // Console close event handling
+#include "winapi.h" // Console close event handling
#endif
Index: src/map/atcommand.c
--- src/map/atcommand.c Base (BASE)
+++ src/map/atcommand.c Locally Modified (Based On LOCAL)
@@ -3404,7 +3404,7 @@
if( sd->spiritball > 0 )
pc_delspiritball(sd, sd->spiritball, 1);
sd->spiritball = number;
- clif_spiritball(sd);
+ clif_spiritball(&sd->bl);
// no message, player can look the difference
return 0;
Index: src/map/battle.c
--- src/map/battle.c Base (BASE)
+++ src/map/battle.c Locally Modified (Based On LOCAL)
@@ -367,6 +367,7 @@
if( tsc->data[SC_CRYSTALIZE] && target->type != BL_MOB)
status_change_end(target, SC_CRYSTALIZE, INVALID_TIMER);
if( tsc->data[SC_EARTH_INSIGNIA]) damage += damage/2;
+ if ( tsc->data[SC_ASH]) damage = damage * tsc->data[SC_ASH]->val2 / 100;
break;
case ELE_HOLY:
if( tsc->data[SC_ORATIO]) ratio += tsc->data[SC_ORATIO]->val1 * 2;
@@ -730,6 +731,16 @@
//Reduction: 6% + 6% every 20%
damage -= damage * 6 * (1+per) / 100;
}
+ if(sc->data[SC_GRANITIC_ARMOR]){
+ damage -= damage * sc->data[SC_GRANITIC_ARMOR]->val2/100;
+ }
+ if(sc->data[SC_PAIN_KILLER]){
+ damage -= damage * sc->data[SC_PAIN_KILLER]->val3/100;
+ }
+ if((sce=sc->data[SC_MAGMA_FLOW]) && (rnd()%100 <= sce->val2) ){
+ skill_castend_damage_id(bl,src,MH_MAGMA_FLOW,sce->val1,gettick(),0);
+ }
+
/**
* In renewal steel body reduces all incoming damage by 1/10
**/
@@ -787,6 +798,10 @@
if( sd && (sce = sc->data[SC_FORCEOFVANGUARD]) && flag&BF_WEAPON && rnd()%100 < sce->val2 )
pc_addspiritball(sd,skill_get_time(LG_FORCEOFVANGUARD,sce->val1),sce->val3);
+ if (sc->data[SC_STYLE_CHANGE] && rnd() % 100 < 50) {
+ TBL_HOM *hd = BL_CAST(BL_HOM,bl);
+ if (hd) hom_addspiritball(hd, 10); //rajoute une sphere
+ }
if( sc->data[SC__DEADLYINFECT] && damage > 0 && rnd()%100 < 65 + 5 * sc->data[SC__DEADLYINFECT]->val1 )
status_change_spread(bl, src); // Deadly infect attacked side
@@ -846,7 +861,11 @@
sc_start(bl,sc->data[SC_POISONINGWEAPON]->val2,100,sc->data[SC_POISONINGWEAPON]->val1,skill_get_time2(GC_POISONINGWEAPON, 1));
if( sc->data[SC__DEADLYINFECT] && damage > 0 && rnd()%100 < 65 + 5 * sc->data[SC__DEADLYINFECT]->val1 )
status_change_spread(src, bl);
+ if (sc->data[SC_STYLE_CHANGE] && rnd() % 100 < 50) {
+ TBL_HOM *hd = BL_CAST(BL_HOM,bl);
+ if (hd) hom_addspiritball(hd, 10);
}
+ }
if (battle_config.pk_mode && sd && bl->type == BL_PC && damage && map[bl->m].flag.pvp)
{
@@ -1480,6 +1499,14 @@
break;
}
+ if (!(nk & NK_NO_ELEFIX) && !n_ele)
+ if (src->type == BL_HOM)
+ n_ele = true; //element is "not elemental"
+ if (sc && sc->data[SC_GOLDENE_FERSE] && ((!skill_num && (rnd() % 100 < sc->data[SC_GOLDENE_FERSE]->val4)) || skill_num == MH_STAHL_HORN)) {
+ s_ele = s_ele_ = ELE_HOLY;
+ n_ele = false;
+ }
+
if(!skill_num)
{ //Skills ALWAYS use ONLY your right-hand weapon (tested on Aegis 10.2)
if (sd && sd->weapontype1 == 0 && sd->weapontype2 > 0)
@@ -1818,7 +1845,7 @@
skillratio += sc->data[SC_OVERTHRUST]->val3;
if(sc->data[SC_MAXOVERTHRUST])
skillratio += sc->data[SC_MAXOVERTHRUST]->val2;
- if(sc->data[SC_BERSERK] || sc->data[SC__BLOODYLUST])
+ if (sc->data[SC_BERSERK] || sc->data[SC_SATURDAYNIGHTFEVER] || sc->data[SC__BLOODYLUST])
skillratio += 100;
if(sc->data[SC_ZENKAI] && sstatus->rhw.ele == sc->data[SC_ZENKAI]->val2 )
skillratio += sc->data[SC_ZENKAI]->val1 * 2;
@@ -2564,12 +2591,18 @@
case KO_BAKURETSU:
skillratio = 50 * skill_lv * (sd?pc_checkskill(sd,NJ_TOBIDOUGU):10);
break;
+ case MH_NEEDLE_OF_PARALYZE:
+ skillratio += 600 + 100 * skill_lv;
+ break;
case MH_STAHL_HORN:
- skillratio += 500 + 100 * skill_lv;
+ skillratio += 400 + 100 * skill_lv;
break;
case MH_LAVA_SLIDE:
skillratio = 70 * skill_lv;
break;
+ case MH_MAGMA_FLOW:
+ skillratio += -100 + 100 * skill_lv;
+ break;
}
ATK_RATE(skillratio);
@@ -2686,8 +2719,13 @@
ATK_ADDRATE(sc->data[SC_EDP]->val3);
}
}
+ if(sc->data[SC_STYLE_CHANGE]){
+ TBL_HOM *hd = BL_CAST(BL_HOM,src);
+ if (hd) ATK_ADD(hd->spiritball * 3);
}
+ }
+
switch (skill_num) {
case AS_SONICBLOW:
if (sc && sc->data[SC_SPIRIT] &&
@@ -3895,6 +3933,18 @@
else
skillratio += 500 + 400 * skill_lv;
break;
+ case MH_XENO_SLASHER:
+ if(skill_lv<5)
+ skillratio += 300 + 100 * skill_lv;
+ else
+ skillratio += 600;
+ break;
+ case MH_HEILIGE_STANGE:
+ skillratio += 400 + 250 * skill_lv;
+ break;
+ case MH_POISON_MIST:
+ skillratio += 100 * skill_lv;
+ break;
}
MATK_RATE(skillratio);
Index: src/map/clif.c
--- src/map/clif.c Base (BASE)
+++ src/map/clif.c Locally Modified (Based On LOCAL)
@@ -1356,7 +1356,7 @@
TBL_PC *sd = ((TBL_PC*)bl);
int i;
if (sd->spiritball > 0)
- clif_spiritball(sd);
+ clif_spiritball(&sd->bl);
if(sd->state.size==SZ_BIG) // tiny/big players [Valaris]
clif_specialeffect(bl,423,AREA);
else if(sd->state.size==SZ_MEDIUM)
@@ -6897,21 +6897,27 @@
clif_send(buf, packet_len(0x1cf), src, AREA);
}
+/*==========================================
+ * Server tells clients nearby 'sd' (and himself) to display 'sd->spiritball' number of spiritballs on 'sd'
+ * Notifies clients in an area of an object's spirits.
+ * 01d0 <id>.L <amount>.W (ZC_SPIRITS)
+ * 01e1 <id>.L <amount>.W (ZC_SPIRITS2)
+ *------------------------------------------*/
+void clif_spiritball(struct block_list *bl) {
+ unsigned char buf[16];
+ TBL_PC *sd = BL_CAST(BL_PC,bl);
+ TBL_HOM *hd = BL_CAST(BL_HOM,bl);
-/// Notifies clients in an area of an object's spirits.
-/// 01d0 <id>.L <amount>.W (ZC_SPIRITS)
-/// 01e1 <id>.L <amount>.W (ZC_SPIRITS2)
-void clif_spiritball(struct map_session_data *sd)
-{
- unsigned char buf[8];
+ nullpo_retv(bl);
- nullpo_retv(sd);
-
- WBUFW(buf,0)=0x1d0;
- WBUFL(buf,2)=sd->bl.id;
- WBUFW(buf,6)=sd->spiritball;
- clif_send(buf,packet_len(0x1d0),&sd->bl,AREA);
+ WBUFW(buf, 0) = 0x1d0;
+ WBUFL(buf, 2) = bl->id;
+ switch(bl->type){
+ case BL_PC: WBUFW(buf, 6) = sd->spiritball; break;
+ case BL_HOM: WBUFW(buf, 6) = hd->spiritball; break;
}
+ clif_send(buf, packet_len(0x1d0), bl, AREA);
+}
/// Notifies clients in area of a character's combo delay (ZC_COMBODELAY).
Index: src/map/clif.h
--- src/map/clif.h Base (BASE)
+++ src/map/clif.h Locally Modified (Based On LOCAL)
@@ -454,7 +454,7 @@
void clif_autospell(struct map_session_data *sd,int skilllv);
void clif_devotion(struct block_list *src, struct map_session_data *tsd);
-void clif_spiritball(struct map_session_data *sd);
+void clif_spiritball(struct block_list *bl);
void clif_combo_delay(struct block_list *bl,int wait);
void clif_bladestop(struct block_list *src, int dst_id, int active);
void clif_changemapcell(int fd, int m, int x, int y, int type, enum send_target target);
Index: src/map/guild.c
--- src/map/guild.c Base (BASE)
+++ src/map/guild.c Locally Modified (Based On LOCAL)
@@ -408,7 +408,7 @@
sd->status.guild_id=guild_id;
clif_guild_created(sd,0);
if(battle_config.guild_emperium_check)
- pc_delitem(sd,pc_search_inventory(sd,714),1,0,0,LOG_TYPE_CONSUME); // ᅵGᅵᅵᅵyᅵᅵᅵEᅵᅵᅵᅵᅵᅵ
+ pc_delitem(sd,pc_search_inventory(sd,714),1,0,0,LOG_TYPE_CONSUME); //emperium consumption
return 0;
}
Index: src/map/homunculus.c
--- src/map/homunculus.c Base (BASE)
+++ src/map/homunculus.c Locally Modified (Based On LOCAL)
@@ -81,6 +81,46 @@
}
}
+int hom_addspiritball(TBL_HOM *hd, int max) {
+ nullpo_ret(hd);
+
+ if (max > MAX_SKILL_LEVEL)
+ max = MAX_SKILL_LEVEL;
+ if (hd->spiritball < 0)
+ hd->spiritball = 0;
+
+ if (hd->spiritball && hd->spiritball >= max) {
+ hd->spiritball = max;
+ }
+ else
+ hd->spiritball++;
+
+ clif_spiritball(&hd->bl);
+
+ return 0;
+}
+
+int hom_delspiritball(TBL_HOM *hd, int count, int type) {
+ nullpo_ret(hd);
+
+ if (hd->spiritball <= 0) {
+ hd->spiritball = 0;
+ return 0;
+ }
+ if (count <= 0)
+ return 0;
+ if (count > MAX_SKILL_LEVEL)
+ count = MAX_SKILL_LEVEL;
+ if (count > hd->spiritball)
+ count = hd->spiritball;
+
+ hd->spiritball -= count;
+ if (!type)
+ clif_spiritball(&hd->bl);
+
+ return 0;
+}
+
void merc_damage(struct homun_data *hd) {
clif_hominfo(hd->master,hd,0);
}
Index: src/map/homunculus.h
--- src/map/homunculus.h Base (BASE)
+++ src/map/homunculus.h Locally Modified (Based On LOCAL)
@@ -45,6 +45,8 @@
int hungry_timer; //[orn]
unsigned int exp_next;
char blockskill[MAX_SKILL]; // [orn]
+
+ int spiritball; //for homun S [lighta]
};
#define HOM_EVO 0x100 //256
@@ -112,4 +114,7 @@
void merc_skill_reload(void);
void merc_reload(void);
+int hom_addspiritball(TBL_HOM *hd, int max);
+int hom_delspiritball(TBL_HOM *hd, int count, int type);
+
#endif /* _HOMUNCULUS_H_ */
Index: src/map/map.h
--- src/map/map.h Base (BASE)
+++ src/map/map.h Locally Modified (Based On LOCAL)
@@ -718,7 +718,6 @@
#define mapit_geteachnpc() mapit_alloc(MAPIT_NORMAL,BL_NPC)
#define mapit_geteachiddb() mapit_alloc(MAPIT_NORMAL,BL_ALL)
-// ᅵᅵᅵÌᅵ
int map_check_dir(int s_dir,int t_dir);
unsigned char map_calc_dir( struct block_list *src,int x,int y);
int map_random_dir(struct block_list *bl, short *x, short *y); // [Skotlex]
Index: src/map/mob.c
--- src/map/mob.c Base (BASE)
+++ src/map/mob.c Locally Modified (Based On LOCAL)
@@ -900,10 +900,16 @@
return 0;
}
-static int mob_count_sub(struct block_list *bl,va_list ap)
-{
- return 1;
+int mob_count_sub(struct block_list *bl, va_list ap) {
+ int mobid[10], i;
+ ARR_FIND(0, 10, i, (mobid[i] = va_arg(ap, int)) == 0); //fetch till 0
+ if (mobid[0]) { //if there one let's check it otherwise go backward
+ TBL_MOB *md = BL_CAST(BL_MOB, bl);
+ ARR_FIND(0, 10, i, md->class_ == mobid[i]);
+ return (i < 10) ? 1 : 0;
}
+ return 1; //backward compatibility [Lighta]
+}
/*==========================================
* Mob spawning. Initialization is also variously here.
Index: src/map/mob.h
--- src/map/mob.h Base (BASE)
+++ src/map/mob.h Locally Modified (Based On LOCAL)
@@ -291,6 +291,7 @@
int mobskill_castend_pos( int tid, unsigned int tick, int id,int data );
int mob_summonslave(struct mob_data *md2,int *value,int amount,int skill_id);
int mob_countslave(struct block_list *bl);
+int mob_count_sub(struct block_list *bl, va_list ap);
int mob_is_clone(int class_);
Index: src/map/npc.c
--- src/map/npc.c Base (BASE)
+++ src/map/npc.c Locally Modified (Based On LOCAL)
@@ -2236,7 +2236,7 @@
}
/**
- * NPCã®ã©ãã«ããŒã¿ã³ã³ããŒã
+ * NPC other label
* Not sure, seem to add label in a chainlink
* @see DBApply
*/
Index: src/map/pc.c
--- src/map/pc.c Base (BASE)
+++ src/map/pc.c Locally Modified (Based On LOCAL)
@@ -171,7 +171,7 @@
memmove(sd->spirit_timer+i, sd->spirit_timer+i+1, (sd->spiritball-i)*sizeof(int));
sd->spirit_timer[sd->spiritball] = INVALID_TIMER;
- clif_spiritball(sd);
+ clif_spiritball(&sd->bl);
return 0;
}
@@ -206,7 +206,7 @@
if( (sd->class_&MAPID_THIRDMASK) == MAPID_ROYAL_GUARD )
clif_millenniumshield(sd,sd->spiritball);
else
- clif_spiritball(sd);
+ clif_spiritball(&sd->bl);
return 0;
}
@@ -245,7 +245,7 @@
if( (sd->class_&MAPID_THIRDMASK) == MAPID_ROYAL_GUARD )
clif_millenniumshield(sd,sd->spiritball);
else
- clif_spiritball(sd);
+ clif_spiritball(&sd->bl);
}
return 0;
}
@@ -2618,7 +2618,7 @@
}
/*==========================================
- * ? ???i????\????~{??i?X???
+ * Player bonus (type) with args type2 and val, called trough bonus2 (npc)
*------------------------------------------*/
int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
{
@@ -4859,13 +4859,10 @@
}
/*==========================================
- * ??????X????X?L???????`?F?b?N
- * ????F
- * struct map_session_data *sd ?Z?b?V?????f??^
- * int nameid ????iID
- * ???l?F
- * 0 ??X???
- * -1 ?X?L????????
+ * Chk if we still have the correct weapon to continue the skill (actually status)
+ * If not ending it
+ * Return
+ * 0 - No status found or all done
*------------------------------------------*/
int pc_checkallowskill(struct map_session_data *sd)
{
@@ -4916,7 +4913,9 @@
/*==========================================
* Return equiped itemid? on player sd at pos
- * if -1 mean nothing equiped
+ * Return
+ * -1 : mean nothing equiped
+ * idx : (this index could be used in inventory to found item_data)
*------------------------------------------*/
int pc_checkequip(struct map_session_data *sd,int pos)
{
@@ -6448,8 +6447,10 @@
pet_unlocktarget(sd->pd);
}
- if( sd->status.hom_id > 0 && battle_config.homunculus_auto_vapor )
+ if (sd->status.hom_id > 0){
+ if(battle_config.homunculus_auto_vapor && sd->hd && !sd->hd->sc.data[SC_LIGHT_OF_REGENE])
merc_hom_vaporize(sd, 0);
+ }
if( sd->md )
merc_delete(sd->md, 3); // Your mercenary soldier has ran away.
@@ -7490,7 +7491,7 @@
int pc_setfalcon(TBL_PC* sd, int flag)
{
if( flag ){
- if( pc_checkskill(sd,HT_FALCON)>0 ) // ?t?@???R???}?X?^????X?L??????
+ if( pc_checkskill(sd,HT_FALCON)>0 ) // add falcon if he have the skill
pc_setoption(sd,sd->sc.option|OPTION_FALCON);
} else if( pc_isfalcon(sd) ){
pc_setoption(sd,sd->sc.option&~OPTION_FALCON); // remove falcon
@@ -7505,7 +7506,7 @@
int pc_setriding(TBL_PC* sd, int flag)
{
if( flag ){
- if( pc_checkskill(sd,KN_RIDING) > 0 ) // ???C?f?B???O?X?L??????
+ if( pc_checkskill(sd,KN_RIDING) > 0 ) // add peco
pc_setoption(sd, sd->sc.option|OPTION_RIDING);
} else if( pc_isriding(sd) ){
pc_setoption(sd, sd->sc.option&~OPTION_RIDING);
Index: src/map/script.c
--- src/map/script.c Base (BASE)
+++ src/map/script.c Locally Modified (Based On LOCAL)
@@ -283,9 +283,9 @@
int count;
int flag;
struct linkdb_node *case_label;
- } curly[256]; // ᅵEᅵJᅵbᅵRᅵÌᅵᅵ
- int curly_count; // ᅵEᅵJᅵbᅵRᅵÌᅵ
- int index; // ᅵXᅵNᅵᅵᅵvᅵgᅵᅵᅵÅgᅵpᅵᅵᅵᅵᅵ\ᅵᅵᅵÌᅵ
+ } curly[256]; // Information right parenthesis
+ int curly_count; // The number of right brackets
+ int index; // Number of the syntax used in the script
} syntax;
const char* parse_curly_close(const char* p);
@@ -338,7 +338,7 @@
#endif
/*==========================================
- * ᅵᅵᅵ[ᅵJᅵᅵᅵvᅵᅵᅵgᅵ^ᅵCᅵvï¿œéŸ (ᅵKᅵvᅵÈᅵᅵÌᅵ)
+ * (Only those needed) local declaration prototype
*------------------------------------------*/
const char* parse_subexpr(const char* p,int limit);
int run_func(struct script_state *st);
@@ -618,7 +618,7 @@
/*==========================================
- * ᅵGᅵᅵᅵ[ᅵᅵᅵbᅵZᅵ[ᅵWᅵoᅵᅵ
+ * Output error message
*------------------------------------------*/
static void disp_error_message2(const char *mes,const char *pos,int report)
{
@@ -808,7 +808,7 @@
///
/// @param l The id of the str_data entry
-// ᅵÅᅵ16MᅵÜᅵ
+// Maximum up to 16M
static void add_scriptl(int l)
{
int backpatch = str_data[l].backpatch;
@@ -823,7 +823,7 @@
break;
case C_NOP:
case C_USERFUNC:
- // ᅵᅵᅵxᅵᅵᅵÌÂ\ᅵᅵᅵᅵᅵᅵᅵᅵÌᅵbackpatchᅵpᅵfᅵ[ᅵ^ᅵᅵᅵßᅵᅵᅵ
+ // Embedded data backpatch there is a possibility of label
add_scriptc(C_NAME);
str_data[l].backpatch = script_pos;
add_scriptb(backpatch);
@@ -845,7 +845,7 @@
}
/*==========================================
- * ᅵᅵᅵxᅵᅵᅵᅵᅵᅵᅵᅵᅵᅵᅵᅵ
+ * Resolve the label
*------------------------------------------*/
void set_label(int l,int pos, const char* script_pos)
{
@@ -1218,7 +1218,7 @@
}
/*==========================================
- * ᅵᅵᅵÌᅵᅵ
+ * Analysis section
*------------------------------------------*/
const char* parse_simpleexpr(const char *p)
{
@@ -1319,7 +1319,7 @@
}
/*==========================================
- * ᅵᅵᅵÌᅵᅵ
+ * Analysis of the expression
*------------------------------------------*/
const char* parse_subexpr(const char* p,int limit)
{
@@ -1381,7 +1381,7 @@
}
/*==========================================
- * ᅵᅵᅵÌ]ᅵᅵ
+ * Evaluation of the expression
*------------------------------------------*/
const char* parse_expr(const char *p)
{
@@ -1395,7 +1395,7 @@
}
/*==========================================
- * ᅵsᅵÌᅵᅵ
+ * Analysis of the line
*------------------------------------------*/
const char* parse_line(const char* p)
{
@@ -1403,7 +1403,7 @@
p=skip_space(p);
if(*p==';') {
- // if(); for(); while(); ᅵÌᅵᅵßÉÂᅵᅵᅵᅵᅵ
+ //Close decision for if(); for(); while();
p = parse_syntax_close(p + 1);
return p;
}
@@ -1421,7 +1421,7 @@
return parse_curly_close(p);
}
- // ᅵ\ᅵᅵᅵÖAᅵÌᅵᅵᅵ
+ // Syntax-related processing
p2 = parse_syntax(p);
if(p2 != NULL)
return p2;
@@ -1445,13 +1445,13 @@
disp_error_message("parse_line: need ';'",p);
}
- // if, for , while ᅵÌÂᅵᅵᅵᅵᅵ
+ //Binding decision for if(), for(), while()
p = parse_syntax_close(p+1);
return p;
}
-// { ... } ᅵÌÂᅵᅵᅵᅵᅵ
+// { ... } Closing process
const char* parse_curly_close(const char* p)
{
if(syntax.curly_count <= 0) {
@@ -1459,46 +1459,46 @@
return p + 1;
} else if(syntax.curly[syntax.curly_count-1].type == TYPE_NULL) {
syntax.curly_count--;
- // if, for , while ᅵÌÂᅵᅵᅵᅵᅵ
+ //Close decision if, for , while
p = parse_syntax_close(p + 1);
return p;
} else if(syntax.curly[syntax.curly_count-1].type == TYPE_SWITCH) {
- // switch() ᅵÂᅵᅵᅵᅵᅵ
+ //Closing switch()
int pos = syntax.curly_count-1;
char label[256];
int l;
- // ᅵêᅵÏᅵᅵᅵᅵᅵᅵᅵ
+ // Remove temporary variables
sprintf(label,"set $@__SW%x_VAL,0;",syntax.curly[pos].index);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // ᅵᅵᅵᅵᅵᅵᅵÅIᅵᅵᅵ|ᅵCᅵᅵᅵ^ᅵÉÚᅵ
+ // Go to the end pointer unconditionally
sprintf(label,"goto __SW%x_FIN;",syntax.curly[pos].index);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // ᅵᅵᅵÝnᅵÌᅵᅵxᅵᅵᅵᅵtᅵᅵᅵᅵ
+ // You are here labeled
sprintf(label,"__SW%x_%x",syntax.curly[pos].index,syntax.curly[pos].count);
l=add_str(label);
set_label(l,script_pos, p);
if(syntax.curly[pos].flag) {
- // default ᅵᅵᅵᅵᅵÝᅵᅵᅵ
+ //Exists default
sprintf(label,"goto __SW%x_DEF;",syntax.curly[pos].index);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
}
- // ᅵIᅵᅵᅵᅵᅵxᅵᅵᅵᅵtᅵᅵᅵᅵ
+ // Label end
sprintf(label,"__SW%x_FIN",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos, p);
linkdb_final(&syntax.curly[pos].case_label); // free the list of case label
syntax.curly_count--;
- // if, for , while ᅵÌÂᅵᅵᅵᅵᅵ
+ //Closing decision if, for , while
p = parse_syntax_close(p + 1);
return p;
} else {
@@ -1507,9 +1507,9 @@
}
}
-// ᅵ\ᅵᅵᅵÖAᅵÌᅵᅵᅵ
+// Syntax-related processing
// break, case, continue, default, do, for, function,
-// if, switch, while ᅵᅵᅵᅵᅵÌᅵᅵᅵᅵÅᅵᅵᅵᅵᅵᅵÜᅵᅵB
+// if, switch, while ? will handle this internally.
const char* parse_syntax(const char* p)
{
const char *p2 = skip_word(p);
@@ -1518,7 +1518,7 @@
case 'B':
case 'b':
if(p2 - p == 5 && !strncasecmp(p,"break",5)) {
- // break ᅵÌᅵᅵᅵ
+ // break Processing
char label[256];
int pos = syntax.curly_count - 1;
while(pos >= 0) {
@@ -1547,7 +1547,7 @@
p = skip_space(p2);
if(*p != ';')
disp_error_message("parse_syntax: need ';'",p);
- // if, for , while ᅵÌÂᅵᅵᅵᅵᅵ
+ // Closing decision if, for , while
p = parse_syntax_close(p + 1);
return p;
}
@@ -1555,7 +1555,7 @@
case 'c':
case 'C':
if(p2 - p == 4 && !strncasecmp(p,"case",4)) {
- // case ᅵÌᅵᅵᅵ
+ //Processing case
int pos = syntax.curly_count-1;
if(pos < 0 || syntax.curly[pos].type != TYPE_SWITCH) {
disp_error_message("parse_syntax: unexpected 'case' ",p);
@@ -1565,18 +1565,18 @@
int l,v;
char *np;
if(syntax.curly[pos].count != 1) {
- // FALLTHRU ᅵpᅵÌWᅵᅵᅵᅵᅵv
+ //Jump for FALLTHRU
sprintf(label,"goto __SW%x_%xJ;",syntax.curly[pos].index,syntax.curly[pos].count);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // ᅵᅵᅵÝnᅵÌᅵᅵxᅵᅵᅵᅵtᅵᅵᅵᅵ
+ // You are here labeled
sprintf(label,"__SW%x_%x",syntax.curly[pos].index,syntax.curly[pos].count);
l=add_str(label);
set_label(l,script_pos, p);
}
- // switch ᅵᅵᅵè¶
+ //Decision statement switch
p = skip_space(p2);
if(p == p2) {
disp_error_message("parse_syntax: expect space ' '",p);
@@ -1604,12 +1604,12 @@
sprintf(label,"if(%d != $@__SW%x_VAL) goto __SW%x_%x;",
v,syntax.curly[pos].index,syntax.curly[pos].index,syntax.curly[pos].count+1);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
- // ᅵQᅵᅵparse ᅵᅵᅵÈᅵᅵÆ_ᅵᅵ
+ // Bad I do not parse twice
p2 = parse_line(label);
parse_line(p2);
syntax.curly_count--;
if(syntax.curly[pos].count != 1) {
- // FALLTHRU ᅵIᅵᅵᅵᅵÌᅵᅵxᅵᅵ
+ // Label after the completion of FALLTHRU
sprintf(label,"__SW%x_%xJ",syntax.curly[pos].index,syntax.curly[pos].count);
l=add_str(label);
set_label(l,script_pos,p);
@@ -1628,13 +1628,13 @@
}
return p + 1;
} else if(p2 - p == 8 && !strncasecmp(p,"continue",8)) {
- // continue ᅵÌᅵᅵᅵ
+ // Processing continue
char label[256];
int pos = syntax.curly_count - 1;
while(pos >= 0) {
if(syntax.curly[pos].type == TYPE_DO) {
sprintf(label,"goto __DO%x_NXT;",syntax.curly[pos].index);
- syntax.curly[pos].flag = 1; // continue ᅵpᅵÌᅵᅵᅵᅵNᅵᅵᅵᅵtᅵᅵᅵO
+ syntax.curly[pos].flag = 1; //Flag put the link for continue
break;
} else if(syntax.curly[pos].type == TYPE_FOR) {
sprintf(label,"goto __FR%x_NXT;",syntax.curly[pos].index);
@@ -1655,7 +1655,7 @@
p = skip_space(p2);
if(*p != ';')
disp_error_message("parse_syntax: need ';'",p);
- // if, for , while ᅵÌÂᅵᅵᅵᅵᅵ
+ //Closing decision if, for , while
p = parse_syntax_close(p + 1);
return p;
}
@@ -1663,7 +1663,7 @@
case 'd':
case 'D':
if(p2 - p == 7 && !strncasecmp(p,"default",7)) {
- // switch - default ᅵÌᅵᅵᅵ
+ // Switch - default processing
int pos = syntax.curly_count-1;
if(pos < 0 || syntax.curly[pos].type != TYPE_SWITCH) {
disp_error_message("parse_syntax: unexpected 'default'",p);
@@ -1672,7 +1672,7 @@
} else {
char label[256];
int l;
- // ᅵᅵᅵÝnᅵÌᅵᅵxᅵᅵᅵᅵtᅵᅵᅵᅵ
+ // Put the label location
p = skip_space(p2);
if(*p != ':') {
disp_error_message("parse_syntax: need ':'",p);
@@ -1681,13 +1681,13 @@
l=add_str(label);
set_label(l,script_pos,p);
- // ᅵᅵᅵᅵᅵᅵᅵÅᅵᅵÌᅵᅵᅵᅵNᅵÉᅵÎᅵ
+ // Skip to the next link w/o condition
sprintf(label,"goto __SW%x_%x;",syntax.curly[pos].index,syntax.curly[pos].count+1);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // default ᅵÌᅵᅵxᅵᅵᅵᅵtᅵᅵᅵᅵ
+ // The default label
sprintf(label,"__SW%x_DEF",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
@@ -1705,7 +1705,7 @@
syntax.curly[syntax.curly_count].count = 1;
syntax.curly[syntax.curly_count].index = syntax.index++;
syntax.curly[syntax.curly_count].flag = 0;
- // ᅵᅵᅵÝnᅵÌᅵᅵxᅵᅵᅵ`ᅵᅵᅵᅵᅵᅵ
+ // Label of the (do) form here
sprintf(label,"__DO%x_BGN",syntax.curly[syntax.curly_count].index);
l=add_str(label);
set_label(l,script_pos,p);
@@ -1731,22 +1731,22 @@
disp_error_message("parse_syntax: need '('",p);
p++;
- // ᅵᅵᅵᅵᅵᅵᅵᅵᅵsᅵᅵᅵᅵ
+ // Execute the initialization statement
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
p=parse_line(p);
syntax.curly_count--;
- // ᅵᅵᅵᅵᅵᅵᅵfᅵJᅵnᅵÌᅵᅵxᅵᅵᅵ`ᅵᅵᅵᅵᅵᅵ
+ // Form the start of label decision
sprintf(label,"__FR%x_J",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
p=skip_space(p);
if(*p == ';') {
- // for(;;) ᅵÌpᅵ^ᅵ[ᅵᅵᅵÈÌÅKᅵᅵᅵ^
+ // For (; Because the pattern of always true ;)
;
} else {
- // ᅵᅵᅵᅵᅵᅵᅵUᅵÈᅵIᅵᅵᅵnᅵ_ᅵÉᅵÎᅵ
+ // Skip to the end point if the condition is false
sprintf(label,"__FR%x_FIN",syntax.curly[pos].index);
add_scriptl(add_str("jump_zero"));
add_scriptc(C_ARG);
@@ -1759,32 +1759,32 @@
disp_error_message("parse_syntax: need ';'",p);
p++;
- // ᅵᅵᅵ[ᅵvᅵJᅵnᅵÉᅵÎᅵ
+ // Skip to the beginning of the loop
sprintf(label,"goto __FR%x_BGN;",syntax.curly[pos].index);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // ᅵᅵᅵÌᅵᅵ[ᅵvᅵÖÌᅵᅵxᅵᅵᅵ`ᅵᅵᅵᅵᅵᅵ
+ // Labels to form the next loop
sprintf(label,"__FR%x_NXT",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
- // ᅵᅵᅵÌᅵᅵ[ᅵvᅵÉᅵéᅵÌᅵᅵᅵ
- // for ᅵÅᅵᅵ ')' ᅵᅵ ';' ᅵÆï¿œï¿œÄᅵᅵᅵᅵtᅵᅵᅵO
+ // Process the next time you enter the loop
+ // A ')' last for; flag to be treated as'
parse_syntax_for_flag = 1;
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
p=parse_line(p);
syntax.curly_count--;
parse_syntax_for_flag = 0;
- // ᅵᅵᅵᅵᅵᅵᅵèᅵᅵᅵÉᅵÎᅵ
+ // Skip to the determination process conditions
sprintf(label,"goto __FR%x_J;",syntax.curly[pos].index);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // ᅵᅵᅵ[ᅵvᅵJᅵnᅵÌᅵᅵxᅵᅵᅵtᅵᅵ
+ // Loop start labeling
sprintf(label,"__FR%x_BGN",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
@@ -1811,7 +1811,7 @@
else
disp_error_message("parse_syntax:function: function name is invalid", func_name);
- // if, for , while ᅵÌÂᅵᅵᅵᅵᅵ
+ // Close condition of if, for, while
p = parse_syntax_close(p2 + 1);
return p;
}
@@ -1856,7 +1856,7 @@
case 'i':
case 'I':
if(p2 - p == 2 && !strncasecmp(p,"if",2)) {
- // if() ᅵÌᅵᅵᅵ
+ // If process
char label[256];
p=skip_space(p2);
if(*p != '(') { //Prevent if this {} non-c syntax. from Rayce (jA)
@@ -1880,7 +1880,7 @@
case 's':
case 'S':
if(p2 - p == 6 && !strncasecmp(p,"switch",6)) {
- // switch() ᅵÌᅵᅵᅵ
+ // Processing of switch ()
char label[256];
p=skip_space(p2);
if(*p != '(') {
@@ -1917,12 +1917,12 @@
syntax.curly[syntax.curly_count].count = 1;
syntax.curly[syntax.curly_count].index = syntax.index++;
syntax.curly[syntax.curly_count].flag = 0;
- // ᅵᅵᅵᅵᅵᅵᅵfᅵJᅵnᅵÌᅵᅵxᅵᅵᅵ`ᅵᅵᅵᅵᅵᅵ
+ // Form the start of label decision
sprintf(label,"__WL%x_NXT",syntax.curly[syntax.curly_count].index);
l=add_str(label);
set_label(l,script_pos,p);
- // ᅵᅵᅵᅵᅵᅵᅵUᅵÈᅵIᅵᅵᅵnᅵ_ᅵÉᅵÎᅵ
+ // Skip to the end point if the condition is false
sprintf(label,"__WL%x_FIN",syntax.curly[syntax.curly_count].index);
syntax.curly_count++;
add_scriptl(add_str("jump_zero"));
@@ -1939,7 +1939,7 @@
}
const char* parse_syntax_close(const char *p) {
- // if(...) for(...) hoge(); ï¿œÌæ€ï¿œÉAᅵPᅵxᅵÂᅵᅵᅵêœï¿œï¿œÄxᅵÂᅵᅵᅵᅵé©ï¿œmᅵFᅵᅵᅵᅵ
+ // If (...) for (...) hoge (); as to make sure closed closed once again
int flag;
do {
@@ -1948,9 +1948,9 @@
return p;
}
-// if, for , while , do ᅵÌÂᅵᅵᅵᅵᅵ
-// flag == 1 : ᅵÂᅵᅵᅵêœ
-// flag == 0 : ᅵÂᅵᅵᅵᅵÈᅵ
+// Close judgment if, for, while, of do
+// flag == 1 : closed
+// flag == 0 : not closed
const char* parse_syntax_close_sub(const char* p,int* flag)
{
char label[256];
@@ -1968,13 +1968,13 @@
// if-block and else-block end is a new line
parse_nextline(false, p);
- // if ᅵÅIᅵêᅵÖᅵÎᅵ
+ // Skip to the last location if
sprintf(label,"goto __IF%x_FIN;",syntax.curly[pos].index);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // ᅵᅵᅵÝnᅵÌᅵᅵxᅵᅵᅵᅵtᅵᅵᅵᅵ
+ // Put the label of the location
sprintf(label,"__IF%x_%x",syntax.curly[pos].index,syntax.curly[pos].count);
l=add_str(label);
set_label(l,script_pos,p);
@@ -2010,14 +2010,14 @@
}
}
}
- // if ᅵÂᅵ
+ // Close if
syntax.curly_count--;
- // ᅵÅIᅵnᅵÌᅵᅵxᅵᅵᅵᅵtᅵᅵᅵᅵ
+ // Put the label of the final location
sprintf(label,"__IF%x_FIN",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
if(syntax.curly[pos].flag == 1) {
- // ᅵᅵᅵᅵifᅵÉÎᅵᅵᅵelseᅵᅵᅵᅵÈᅵᅵÌÅ|ᅵCᅵᅵᅵ^ᅵÌÊuᅵÍᅵᅵᅵ
+ // Because the position of the pointer is the same if not else for this
return bp;
}
return p;
@@ -2027,13 +2027,13 @@
const char *p2;
if(syntax.curly[pos].flag) {
- // ᅵᅵᅵÝnᅵÌᅵᅵxᅵᅵᅵ`ᅵᅵᅵᅵᅵᅵ(continue ᅵÅᅵᅵᅵᅵÉᅵᅵᅵ)
+ // (Come here continue) to form the label here
sprintf(label,"__DO%x_NXT",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
}
- // ᅵᅵᅵᅵᅵᅵᅵUᅵÈᅵIᅵᅵᅵnᅵ_ᅵÉᅵÎᅵ
+ // Skip to the end point if the condition is false
p = skip_space(p);
p2 = skip_word(p);
if(p2 - p != 5 || strncasecmp(p,"while",5))
@@ -2055,13 +2055,13 @@
add_scriptl(add_str(label));
add_scriptc(C_FUNC);
- // ᅵJᅵnᅵnᅵ_ᅵÉᅵÎᅵ
+ // Skip to the starting point
sprintf(label,"goto __DO%x_BGN;",syntax.curly[pos].index);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // ᅵᅵᅵᅵᅵIᅵᅵᅵnᅵ_ᅵÌᅵᅵxᅵᅵᅵ`ᅵᅵᅵᅵᅵᅵ
+ // Form label of the end point conditions
sprintf(label,"__DO%x_FIN",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
@@ -2077,13 +2077,13 @@
// for-block end is a new line
parse_nextline(false, p);
- // ᅵᅵᅵÌᅵᅵ[ᅵvᅵÉᅵÎᅵ
+ // Skip to the next loop
sprintf(label,"goto __FR%x_NXT;",syntax.curly[pos].index);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // for ᅵIᅵᅵᅵÌᅵᅵxᅵᅵᅵtᅵᅵ
+ // End for labeling
sprintf(label,"__FR%x_FIN",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
@@ -2093,13 +2093,13 @@
// while-block end is a new line
parse_nextline(false, p);
- // while ᅵᅵᅵᅵᅵᅵᅵfᅵÖᅵÎᅵ
+ // Skip to the decision while
sprintf(label,"goto __WL%x_NXT;",syntax.curly[pos].index);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // while ᅵIᅵᅵᅵÌᅵᅵxᅵᅵᅵtᅵᅵ
+ // End while labeling
sprintf(label,"__WL%x_FIN",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
@@ -2109,13 +2109,13 @@
int pos = syntax.curly_count-1;
char label[256];
int l;
- // ᅵßᅵ
+ // Back
sprintf(label,"return;");
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // ᅵᅵᅵÝnᅵÌᅵᅵxᅵᅵᅵᅵtᅵᅵᅵᅵ
+ // Put the label of the location
sprintf(label,"__FN%x_FIN",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
@@ -2128,7 +2128,7 @@
}
/*==========================================
- * ᅵgᅵÝᅵᅵÝÖᅵᅵÌÇᅵ
+ * Added built-in functions
*------------------------------------------*/
static void add_buildin_func(void)
{
@@ -2158,10 +2158,10 @@
str_data[n].val = i;
str_data[n].func = buildin_func[i].func;
- if( !strcmp(buildin_func[i].name, "set") ) buildin_set_ref = n; else
- if( !strcmp(buildin_func[i].name, "callsub") ) buildin_callsub_ref = n; else
- if( !strcmp(buildin_func[i].name, "callfunc") ) buildin_callfunc_ref = n; else
- if( !strcmp(buildin_func[i].name, "getelementofarray") ) buildin_getelementofarray_ref = n;
+ if (!strcmp(buildin_func[i].name, "set")) buildin_set_ref = n;
+ else if (!strcmp(buildin_func[i].name, "callsub")) buildin_callsub_ref = n;
+ else if (!strcmp(buildin_func[i].name, "callfunc")) buildin_callfunc_ref = n;
+ else if( !strcmp(buildin_func[i].name, "getelementofarray") ) buildin_getelementofarray_ref = n;
}
}
}
@@ -2201,7 +2201,8 @@
}
/*==========================================
- * ᅵèᅵfᅵ[ᅵ^ᅵxᅵ[ᅵXᅵÌÇÝᅵᅵᅵ
+ * Reading constant databases
+ * const.txt
*------------------------------------------*/
static void read_constdb(void)
{
@@ -2229,7 +2230,7 @@
}
/*==========================================
- * ᅵGᅵᅵᅵ[ᅵ\ᅵᅵ
+ * Display emplacement line of script
*------------------------------------------*/
static const char* script_print_line(StringBuf* buf, const char* p, const char* mark, int line)
{
@@ -2251,7 +2252,7 @@
void script_error(const char* src, const char* file, int start_line, const char* error_msg, const char* error_pos)
{
- // ᅵGᅵᅵᅵ[ᅵᅵᅵᅵᅵᅵᅵᅵᅵᅵᅵsᅵᅵᅵᅵᅵßᅵ
+ // Find the line where the error occurred
int j;
int line = start_line;
const char *p;
@@ -2286,7 +2287,7 @@
}
/*==========================================
- * ᅵXᅵNᅵᅵᅵvᅵgᅵÌᅵᅵ
+ * Analysis of the script
*------------------------------------------*/
struct script_code* parse_script(const char *src,const char *file,int line,int options)
{
@@ -2382,7 +2383,7 @@
{
if( *p == '\0' )
disp_error_message("unexpected end of script",p);
- // labelᅵᅵᅵᅵᅵᅵᅵêᅵᅵ
+ // Special handling only label
tmpp=skip_space(skip_word(p));
if(*tmpp==':' && !(!strncasecmp(p,"default:",8) && p + 7 == tmpp)){
i=add_word(p);
@@ -2394,7 +2395,7 @@
continue;
}
- // ᅵᅵᅵÍSᅵᅵᅵêᅵᅵᅵᅵ
+ // All other lumped
p=parse_line(p);
p=skip_space(p);
@@ -2980,7 +2981,7 @@
///
/*==========================================
- * ᅵXᅵNᅵᅵᅵvᅵgᅵËᅵᅵÏᅵᅵAᅵÖᅵᅵËᅵᅵÏᅵᅵÌᅵᅵ
+ * Release script dependent variable, dependent variable of function
*------------------------------------------*/
void script_free_vars(struct DBMap* storage)
{
@@ -3045,10 +3046,10 @@
}
//
-// ᅵᅵᅵsᅵᅵmain
+// Main execution unit
//
/*==========================================
- * ᅵRᅵ}ᅵᅵᅵhᅵÌÇÝᅵᅵ
+ * Read command
*------------------------------------------*/
c_op get_com(unsigned char *script,int *pos)
{
@@ -3065,7 +3066,7 @@
}
/*==========================================
- * ᅵᅵᅵlᅵÌᅵᅵᅵ
+ * Income figures
*------------------------------------------*/
int get_num(unsigned char *script,int *pos)
{
@@ -3079,7 +3080,7 @@
}
/*==========================================
- * ᅵXᅵ^ᅵbᅵNᅵᅵᅵᅵlᅵᅵᅵᅵᅵoᅵᅵ
+ * Remove the value from the stack
*------------------------------------------*/
int pop_val(struct script_state* st)
{
@@ -3540,7 +3541,7 @@
}
/*==========================================
- * ᅵwᅵᅵmᅵ[ᅵhᅵᅵsleep_dbᅵᅵᅵᅵí
+ * Delete the specified node from sleep_db
*------------------------------------------*/
struct linkdb_node* script_erase_sleepdb(struct linkdb_node *n)
{
@@ -3556,11 +3557,11 @@
n->next->prev = n->prev;
retnode = n->next;
aFree( n );
- return retnode; // ᅵᅵᅵÌmᅵ[ᅵhᅵᅵÔᅵ
+ return retnode; // The following; return retnode
}
/*==========================================
- * sleepᅵpᅵ^ᅵCᅵ}ᅵ[ᅵÖᅵ
+ * Timer function for sleep
*------------------------------------------*/
int run_script_timer(int tid, unsigned int tick, int id, intptr_t data)
{
@@ -3664,7 +3665,7 @@
}
/*==========================================
- * ᅵXᅵNᅵᅵᅵvᅵgᅵÌᅵᅵsᅵᅵᅵCᅵᅵᅵᅵᅵᅵ
+ * The main part of the script execution
*------------------------------------------*/
void run_script_main(struct script_state *st)
{
@@ -4137,7 +4138,7 @@
}
#endif
/*==========================================
- * ᅵIᅵᅵ
+ * Destructor
*------------------------------------------*/
int do_final_script() {
int i;
@@ -4249,7 +4250,7 @@
return 0;
}
/*==========================================
- * ᅵᅵᅵᅵ
+ * Initialization
*------------------------------------------*/
int do_init_script() {
userfunc_db=strdb_alloc(DB_OPT_DUP_KEY,0);
@@ -4972,7 +4973,7 @@
}
/*==========================================
- *
+ * Warp sd to str,x,y or Random or SavePoint/Save
*------------------------------------------*/
BUILDIN_FUNC(warp)
{
@@ -5004,7 +5005,7 @@
return 0;
}
/*==========================================
- * ᅵGᅵᅵᅵAᅵwᅵèᅵ[ᅵv
+ * Warp a specified area
*------------------------------------------*/
static int buildin_areawarp_sub(struct block_list *bl,va_list ap)
{
@@ -5293,7 +5294,7 @@
return 0;
}
/*==========================================
- *
+ * Force Heal a player (hp and sp)
*------------------------------------------*/
BUILDIN_FUNC(heal)
{
@@ -5309,7 +5310,7 @@
return 0;
}
/*==========================================
- *
+ * Heal a player by item (get vit bonus etc)
*------------------------------------------*/
BUILDIN_FUNC(itemheal)
{
@@ -6113,7 +6114,11 @@
}
/*==========================================
- * ᅵdᅵÊ`ᅵFᅵbᅵN
+ * Check if item with this amount can fit in inventory
+ * Checking : weight, stack amount >32k, slots amount >(MAX_INVENTORY)
+ * Return
+ * 0 : fail
+ * 1 : success (npc side only)
*------------------------------------------*/
BUILDIN_FUNC(checkweight)
{
@@ -6321,7 +6326,7 @@
c3=(short)script_getnum(st,9);
c4=(short)script_getnum(st,10);
- if(nameid<0) { // ᅵᅵᅵᅵᅵ_ᅵᅵ
+ if(nameid<0) { // Invalide nameid
nameid = -nameid;
flag = 1;
}
@@ -6557,7 +6562,7 @@
} else
m=map_mapname2mapid(mapname);
- if(nameid<0) { // ᅵᅵᅵᅵᅵ_ᅵᅵ
+ if(nameid<0) {
nameid = -nameid;
flag = 1;
}
@@ -6886,7 +6891,8 @@
}
/*==========================================
- *ᅵLᅵᅵᅵᅵᅵÖWᅵÌpᅵᅵᅵᅵᅵ[ᅵ^ᅵæŸ
+ * return the basic stats of sd
+ * chk pc_readparam for available type
*------------------------------------------*/
BUILDIN_FUNC(readparam)
{
@@ -6908,8 +6914,15 @@
return 0;
}
+
/*==========================================
- *ᅵLᅵᅵᅵᅵᅵÖWᅵᅵIDᅵæŸ
+ * Return charid identification
+ * return by @num :
+ * 0 : char_id
+ * 1 : party_id
+ * 2 : guild_id
+ * 3 : account_id
+ * 4 : bg_id
*------------------------------------------*/
BUILDIN_FUNC(getcharid)
{
@@ -6971,8 +6984,10 @@
return 0;
}
+
/*==========================================
- *ᅵwᅵᅵIDᅵᅵPTᅵᅵᅵæŸ
+ * Return the name of the party_id
+ * null if not found
*------------------------------------------*/
BUILDIN_FUNC(getpartyname)
{
@@ -6991,8 +7006,14 @@
}
return 0;
}
+
/*==========================================
- *ᅵwᅵᅵIDᅵᅵPTᅵlᅵᅵᅵÆï¿œï¿œï¿œï¿œoᅵ[IDᅵæŸ
+ * Get the information of the members of a party by type
+ * @party_id, @type
+ * return by @type :
+ * - : nom des membres
+ * 1 : char_id des membres
+ * 2 : account_id des membres
*------------------------------------------*/
BUILDIN_FUNC(getpartymember)
{
@@ -7064,7 +7085,8 @@
}
/*==========================================
- *ᅵwᅵᅵIDᅵÌMᅵᅵᅵhᅵᅵᅵæŸ
+ * Return the name of the @guild_id
+ * null if not found
*------------------------------------------*/
BUILDIN_FUNC(getguildname)
{
@@ -7085,7 +7107,8 @@
}
/*==========================================
- *ᅵwᅵᅵIDᅵᅵGuildMasterᅵᅵᅵæŸ
+ * Return the name of the guild master of @guild_id
+ * null if not found
*------------------------------------------*/
BUILDIN_FUNC(getguildmaster)
{
@@ -7124,7 +7147,13 @@
}
/*==========================================
- * ᅵLᅵᅵᅵᅵᅵNᅵ^ᅵÌᅵᅵO
+ * Get char string information by type :
+ * Return by @type :
+ * 0 : char_name
+ * 1 : party_name or ""
+ * 2 : guild_name or ""
+ * 3 : map_name
+ * - : ""
*------------------------------------------*/
BUILDIN_FUNC(strcharinfo)
{
@@ -7176,7 +7205,13 @@
}
/*==========================================
- * ᅵÄÑoᅵᅵᅵᅵᅵᅵNPCᅵᅵᅵᅵᅵæŸï¿œï¿œï¿œï¿œ
+ * Get npc string information by type
+ * return by @type:
+ * 0 : name
+ * 1 : str#
+ * 2 : #str
+ * 3 : ::str
+ * 4 : map name
*------------------------------------------*/
BUILDIN_FUNC(strnpcinfo)
{
@@ -7265,7 +7300,8 @@
}
/*==========================================
- * ᅵᅵᅵᅵᅵᅵᅵᅵᅵᅵᅵᅵiᅵᅵᅵBᅵᅵᅵjᅵᅵᅵ[ᅵpᅵj
+ * Get the equipement name at pos
+ * return item jname or ""
*------------------------------------------*/
BUILDIN_FUNC(getequipname)
{
@@ -7391,7 +7427,7 @@
}
/*==========================================
- * ᅵᅵᅵᅵᅵ`ᅵFᅵbᅵN
+ * Chk if player have something equiped at pos
*------------------------------------------*/
BUILDIN_FUNC(getequipisequiped)
{
@@ -7414,7 +7450,11 @@
}
/*==========================================
- * ᅵᅵᅵᅵᅵiᅵᅵᅵBᅵÂ\ᅵ`ᅵFᅵbᅵN
+ * Chk if the player have something equiped at pos
+ * if so chk if this item ain't marked not refinable or rental
+ * return (npc)
+ * 1 : true
+ * 0 : false
*------------------------------------------*/
BUILDIN_FUNC(getequipisenableref)
{
@@ -7437,7 +7477,10 @@
}
/*==========================================
- * ᅵᅵᅵᅵᅵiᅵÓᅵ`ᅵFᅵbᅵN
+ * Chk if the item equiped at pos is identify (huh ?)
+ * return (npc)
+ * 1 : true
+ * 0 : false
*------------------------------------------*/
BUILDIN_FUNC(getequipisidentify)
{
@@ -7460,7 +7503,10 @@
}
/*==========================================
- * ᅵᅵᅵᅵᅵiᅵᅵᅵBᅵx
+ * Get the item refined value at pos
+ * return (npc)
+ * x : refine amount
+ * 0 : false (not refined)
*------------------------------------------*/
BUILDIN_FUNC(getequiprefinerycnt)
{
@@ -7483,7 +7529,11 @@
}
/*==========================================
- * ᅵᅵᅵᅵᅵiᅵᅵᅵᅵLV
+ * Get the weapon level value at pos
+ * (pos should normally only be EQI_HAND_L or EQI_HAND_R)
+ * return (npc)
+ * x : weapon level
+ * 0 : false
*------------------------------------------*/
BUILDIN_FUNC(getequipweaponlv)
{
@@ -7506,7 +7556,10 @@
}
/*==========================================
- * ᅵᅵᅵᅵᅵiᅵᅵᅵBᅵᅵᅵᅵᅵᅵ
+ * Get the item refine chance (from refine.txt) for item at pos
+ * return (npc)
+ * x : refine chance
+ * 0 : false (max refine level or unequip..)
*------------------------------------------*/
BUILDIN_FUNC(getequippercentrefinery)
{
@@ -7529,7 +7582,7 @@
}
/*==========================================
- * ᅵᅵᅵBᅵᅵᅵᅵ
+ * Refine +1 item at pos and log and display refine
*------------------------------------------*/
BUILDIN_FUNC(successrefitem)
{
@@ -7583,7 +7636,7 @@
}
/*==========================================
- * ᅵᅵᅵBᅵᅵᅵs
+ * Show a failed Refine +1 attempt
*------------------------------------------*/
BUILDIN_FUNC(failedrefitem)
{
@@ -7599,13 +7652,12 @@
i=pc_checkequip(sd,equip[num-1]);
if(i >= 0) {
sd->status.inventory[i].refine = 0;
- pc_unequipitem(sd,i,3);
- // ᅵᅵᅵBᅵᅵᅵsᅵGᅵtᅵFᅵNᅵgᅵÌpᅵPᅵbᅵg
- clif_refine(sd->fd,1,i,sd->status.inventory[i].refine);
+ pc_unequipitem(sd,i,3); //recalculate bonus
+ clif_refine(sd->fd,1,i,sd->status.inventory[i].refine); //notify client of failure
pc_delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
- // ᅵᅵᅵÌlᅵÉᅵᅵᅵᅵsᅵᅵÊm
- clif_misceffect(&sd->bl,2);
+
+ clif_misceffect(&sd->bl,2); // display failure effect
}
return 0;
@@ -8478,7 +8530,7 @@
}
/*==========================================
- * ᅵJᅵvᅵᅵᅵqᅵÉᅵᅵJᅵᅵ
+ * Open player storage
*------------------------------------------*/
BUILDIN_FUNC(openstorage)
{
@@ -8507,7 +8559,7 @@
}
/*==========================================
- * ᅵAᅵCᅵeᅵᅵᅵÉᅵᅵXᅵLᅵᅵᅵᅵᅵᅵ
+ * Make player use a skill trought item usage
*------------------------------------------*/
/// itemskill <skill id>,<level>
/// itemskill "<skill name>",<level>
@@ -8530,7 +8582,7 @@
return 0;
}
/*==========================================
- * ᅵAᅵCᅵeᅵᅵᅵì¬
+ * Attempt to create an item
*------------------------------------------*/
BUILDIN_FUNC(produce)
{
@@ -8562,7 +8614,7 @@
return 0;
}
/*==========================================
- * NPCᅵÅyᅵbᅵgᅵᅵᅵ
+ * Create a pet
*------------------------------------------*/
BUILDIN_FUNC(makepet)
{
@@ -8590,7 +8642,7 @@
return 0;
}
/*==========================================
- * NPCᅵÅoᅵᅵᅵlᅵã°ï¿œï¿œ
+ * Give player exp base,job * quest_exp_rate/100
*------------------------------------------*/
BUILDIN_FUNC(getexp)
{
@@ -8660,7 +8712,12 @@
}
/*==========================================
- * ᅵᅵᅵᅵᅵXᅵ^ᅵ[ᅵᅵᅵᅵ
+ * Spawn a monster :
+ @mapn,x,y : location
+ @str : monster name
+ @class_ : mob_id
+ @amount : nb to spawn
+ @event : event to attach to mob
*------------------------------------------*/
BUILDIN_FUNC(monster)
{
@@ -8742,7 +8799,7 @@
return 0;
}
/*==========================================
- * ᅵᅵᅵᅵᅵXᅵ^ᅵ[ᅵᅵᅵᅵ
+ * Same as monster but randomize location in x0,x1,y0,y1 area
*------------------------------------------*/
BUILDIN_FUNC(areamonster)
{
@@ -8786,7 +8843,7 @@
return 0;
}
/*==========================================
- * ᅵᅵᅵᅵᅵXᅵ^ᅵ[ᅵí
+ * KillMonster subcheck, verify if mob to kill ain't got an even to handle, could be force kill by allflag
*------------------------------------------*/
static int buildin_killmonster_sub_strip(struct block_list *bl,va_list ap)
{ //same fix but with killmonster instead - stripping events from mobs.
@@ -8941,7 +8998,7 @@
return 0;
}
/*==========================================
- * ᅵCᅵxᅵᅵᅵgᅵᅵᅵs
+ * CxgÀs
*------------------------------------------*/
BUILDIN_FUNC(doevent)
{
@@ -8958,7 +9015,7 @@
return 0;
}
/*==========================================
- * NPCᅵᅵÌCᅵxᅵᅵᅵgᅵᅵᅵs
+ * NPCåÌCxgÀs
*------------------------------------------*/
BUILDIN_FUNC(donpcevent)
{
@@ -8987,7 +9044,7 @@
}
/*==========================================
- * ᅵCᅵxᅵᅵᅵgᅵ^ᅵCᅵ}ᅵ[ᅵÇᅵ
+ * Cxg^C}[ÇÁ
*------------------------------------------*/
BUILDIN_FUNC(addtimer)
{
@@ -9004,7 +9061,7 @@
return 0;
}
/*==========================================
- * ᅵCᅵxᅵᅵᅵgᅵ^ᅵCᅵ}ᅵ[ᅵí
+ * Cxg^C}[í
*------------------------------------------*/
BUILDIN_FUNC(deltimer)
{
@@ -9021,7 +9078,7 @@
return 0;
}
/*==========================================
- * ᅵCᅵxᅵᅵᅵgᅵ^ᅵCᅵ}ᅵ[ᅵÌJᅵEᅵᅵᅵgᅵlᅵÇᅵ
+ * Cxg^C}[ÌJEglÇÁ
*------------------------------------------*/
BUILDIN_FUNC(addtimercount)
{
@@ -9041,7 +9098,7 @@
}
/*==========================================
- * NPCᅵ^ᅵCᅵ}ᅵ[ᅵᅵᅵᅵ
+ * NPC^C}[ú»
*------------------------------------------*/
BUILDIN_FUNC(initnpctimer)
{
@@ -9090,7 +9147,7 @@
return 0;
}
/*==========================================
- * NPCᅵ^ᅵCᅵ}ᅵ[ᅵJᅵn
+ * NPC^C}[Jn
*------------------------------------------*/
BUILDIN_FUNC(startnpctimer)
{
@@ -9137,7 +9194,7 @@
return 0;
}
/*==========================================
- * NPCᅵ^ᅵCᅵ}ᅵ[ᅵᅵ~
+ * NPC^C}[â~
*------------------------------------------*/
BUILDIN_FUNC(stopnpctimer)
{
@@ -9179,7 +9236,7 @@
return 0;
}
/*==========================================
- * NPCᅵ^ᅵCᅵ}ᅵ[ᅵᅵñᅵ
+ * NPC^C}[îñŸ
*------------------------------------------*/
BUILDIN_FUNC(getnpctimer)
{
@@ -9224,7 +9281,7 @@
return 0;
}
/*==========================================
- * NPCᅵ^ᅵCᅵ}ᅵ[ᅵlᅵÝᅵ
+ * NPC^C}[lÝè
*------------------------------------------*/
BUILDIN_FUNC(setnpctimer)
{
@@ -9320,7 +9377,7 @@
}
/*==========================================
- * ᅵVᅵÌᅵᅵAᅵiᅵEᅵᅵᅵX
+ * V̺AiEX
*------------------------------------------*/
BUILDIN_FUNC(announce)
{
@@ -9359,7 +9416,7 @@
return 0;
}
/*==========================================
- * ᅵVᅵÌᅵᅵAᅵiᅵEᅵᅵᅵXᅵiᅵᅵᅵᅵ}ᅵbᅵvᅵj
+ * V̺AiEXiÁè}bvj
*------------------------------------------*/
static int buildin_announce_sub(struct block_list *bl, va_list ap)
{
@@ -9398,7 +9455,7 @@
return 0;
}
/*==========================================
- * ᅵVᅵÌᅵᅵAᅵiᅵEᅵᅵᅵXᅵiᅵᅵᅵᅵGᅵᅵᅵAᅵj
+ * V̺AiEXiÁèGAj
*------------------------------------------*/
BUILDIN_FUNC(areaannounce)
{
@@ -9425,7 +9482,7 @@
}
/*==========================================
- * ᅵᅵᅵ[ᅵUᅵ[ᅵᅵᅵᅵᅵᅵ
+ * [U[Ÿ
*------------------------------------------*/
BUILDIN_FUNC(getusers)
{
@@ -9520,7 +9577,7 @@
return 0;
}
/*==========================================
- * ᅵ}ᅵbᅵvᅵwᅵèᅵ[ᅵUᅵ[ᅵᅵᅵᅵᅵᅵ
+ * }bvwè[U[Ÿ
*------------------------------------------*/
BUILDIN_FUNC(getmapusers)
{
@@ -9535,7 +9592,7 @@
return 0;
}
/*==========================================
- * ᅵGᅵᅵᅵAᅵwᅵèᅵ[ᅵUᅵ[ᅵᅵᅵᅵᅵᅵ
+ * GAwè[U[Ÿ
*------------------------------------------*/
static int buildin_getareausers_sub(struct block_list *bl,va_list ap)
{
@@ -9563,7 +9620,7 @@
}
/*==========================================
- * ᅵGᅵᅵᅵAᅵwᅵᅵhᅵᅵᅵbᅵvᅵAᅵCᅵeᅵᅵᅵᅵᅵᅵᅵᅵ
+ * GAwèhbvACeŸ
*------------------------------------------*/
static int buildin_getareadropitem_sub(struct block_list *bl,va_list ap)
{
@@ -9609,7 +9666,7 @@
return 0;
}
/*==========================================
- * NPCᅵÌLᅵᅵ
+ * NPCÌLø»
*------------------------------------------*/
BUILDIN_FUNC(enablenpc)
{
@@ -9619,7 +9676,7 @@
return 0;
}
/*==========================================
- * NPCᅵÌᅵᅵᅵ
+ * NPC̳ø»
*------------------------------------------*/
BUILDIN_FUNC(disablenpc)
{
@@ -9630,7 +9687,7 @@
}
/*==========================================
- * ᅵBᅵᅵÄᅵᅵᅵNPCᅵÌ\ᅵᅵ
+ * BêÄ¢éNPCÌ\Š
*------------------------------------------*/
BUILDIN_FUNC(hideoffnpc)
{
@@ -9640,7 +9697,7 @@
return 0;
}
/*==========================================
- * NPCᅵᅵᅵnᅵCᅵfᅵBᅵᅵᅵO
+ * NPCðnCfBO
*------------------------------------------*/
BUILDIN_FUNC(hideonnpc)
{
@@ -9802,7 +9859,7 @@
}
/*==========================================
- * ᅵᅵÔÙᅵÏᅵᅵᅵᅵvᅵZᅵᅵᅵᅵᅵmᅵᅵᅵᅵÔᅵ
+ * @FIXME atm will return reduced tick, 0 immune, 1 no tick
*------------------------------------------*/
BUILDIN_FUNC(getscrate)
{
@@ -9811,7 +9868,7 @@
type=script_getnum(st,2);
rate=script_getnum(st,3);
- if( script_hasdata(st,4) ) //ᅵwᅵèµï¿œï¿œï¿œLᅵᅵᅵᅵᅵÌÏᅵᅵᅵᅵvᅵZᅵᅵᅵᅵ
+ if( script_hasdata(st,4) ) //get for the bl assigned
bl = map_id2bl(script_getnum(st,4));
else
bl = map_id2bl(st->rid);
@@ -9885,7 +9942,7 @@
}
/*==========================================
- *ᅵßlᅵAᅵCᅵeᅵᅵᅵgᅵp
+ *ßlACegp
*------------------------------------------*/
BUILDIN_FUNC(catchpet)
{
@@ -10039,7 +10096,7 @@
return 0;
}
/*==========================================
- * ᅵXᅵeᅵ[ᅵ^ᅵXᅵᅵᅵZᅵbᅵg
+ * Xe[^XZbg
*------------------------------------------*/
BUILDIN_FUNC(resetstatus)
{
@@ -10110,7 +10167,7 @@
}
/*==========================================
- * ᅵᅵᅵÊÏᅵ
+ * Unequip all item and request for a changesex to char-serv
*------------------------------------------*/
BUILDIN_FUNC(changesex)
{
@@ -10135,16 +10192,16 @@
struct npc_data *nd = (struct npc_data *)bl;
const char *name=NULL,*mes;
- mes=script_getstr(st,2); // ᅵᅵᅵbᅵZᅵ[ᅵWï¿œÌæŸ
+ mes=script_getstr(st,2);
if(mes==NULL) return 0;
- if(script_hasdata(st,3)){ // NPCï¿œï¿œï¿œÌæŸ(123#456)
+ if(script_hasdata(st,3)){ // npc name to display
name=script_getstr(st,3);
} else {
- name=nd->name;
+ name=nd->name; //use current npc name
}
- npc_globalmessage(name,mes); // ᅵOᅵᅵᅵ[ᅵoᅵᅵᅵᅵᅵbᅵZᅵ[ᅵWᅵᅵᅵM
+ npc_globalmessage(name,mes); // broadcast to all players connected
return 0;
}
@@ -10379,7 +10436,7 @@
}
/*==========================================
- * RIDᅵÌAᅵ^ᅵbᅵ`
+ * Attach sd char id to script and detach current one if any
*------------------------------------------*/
BUILDIN_FUNC(attachrid)
{
@@ -10397,7 +10454,7 @@
return 0;
}
/*==========================================
- * RIDᅵÌfᅵ^ᅵbᅵ`
+ * Detach script to rid
*------------------------------------------*/
BUILDIN_FUNC(detachrid)
{
@@ -10405,7 +10462,7 @@
return 0;
}
/*==========================================
- * ᅵᅵᅵÝ`ᅵFᅵbᅵN
+ * Chk if account connected, (and charid from account if specified)
*------------------------------------------*/
BUILDIN_FUNC(isloggedin)
{
@@ -11029,7 +11086,7 @@
}
/* =====================================================================
- * ᅵMᅵᅵᅵhᅵᅵᅵᅵvᅵᅵᅵᅵᅵᅵ
+ * ?¿œM?¿œ?¿œ?¿œh?¿œ?¿œ?¿œ?¿œv?¿œ?¿œ?¿œ?¿œ?¿œ?¿œ
* ---------------------------------------------------------------------*/
BUILDIN_FUNC(requestguildinfo)
{
@@ -11107,14 +11164,14 @@
item_tmp.nameid = sd->status.inventory[i].card[c];
item_tmp.identify = 1;
- if((flag=pc_additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ // ᅵᅵᅵÄÈᅵᅵÈᅵhᅵᅵᅵbᅵv
+ if((flag=pc_additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ // get back the cart in inventory
clif_additem(sd,0,0,flag);
map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
}
}
- if(cardflag == 1) {// ᅵJᅵ[ᅵhᅵᅵᅵᅵèᅵᅵᅵᅵᅵAᅵCᅵeᅵᅵᅵᅵᅵᅵ
+ if(cardflag == 1) {//if card was remove remplace item with no card
int flag;
struct item item_tmp;
memset(&item_tmp,0,sizeof(item_tmp));
@@ -11129,7 +11186,7 @@
item_tmp.card[j]=sd->status.inventory[i].card[j];
pc_delitem(sd,i,1,0,3,LOG_TYPE_SCRIPT);
- if((flag=pc_additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ // ᅵᅵᅵÄÈᅵᅵÈᅵhᅵᅵᅵbᅵv
+ if((flag=pc_additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ //chk if can be spawn in inventory otherwise put on floor
clif_additem(sd,0,0,flag);
map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
@@ -11183,10 +11240,10 @@
}
if(cardflag == 1) {
- if(typefail == 0 || typefail == 2){ // ᅵᅵᅵï¹ï¿œï¿œ
+ if(typefail == 0 || typefail == 2){ // destroy the item
pc_delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
}
- if(typefail == 1){ // ᅵJᅵ[ᅵhᅵÌÝᅵᅵᅵᅵiᅵᅵᅵᅵᅵÔᅵᅵj
+ if(typefail == 1){ // destroy the card
int flag;
struct item item_tmp;
@@ -11590,7 +11647,7 @@
}
/*==========================================
- * IDᅵᅵᅵᅵItemᅵᅵ
+ * Get the item name by item_id or null
*------------------------------------------*/
BUILDIN_FUNC(getitemname)
{
@@ -11830,7 +11887,11 @@
return 0;
}
/*==========================================
- * PCᅵÌᅵᅵᅵᅵiᅵᅵᅵÇÝᅵᅵ
+ * Set arrays with info of all sd inventory :
+ * @inventorylist_id, @inventorylist_amount, @inventorylist_equip,
+ * @inventorylist_refine, @inventorylist_identify, @inventorylist_attribute,
+ * @inventorylist_card(0..3), @inventorylist_expire
+ * @inventorylist_count = scalar
*------------------------------------------*/
BUILDIN_FUNC(getinventorylist)
{
@@ -11928,9 +11989,8 @@
}
/*==========================================
- * NPCᅵNᅵᅵᅵXᅵ`ᅵFᅵᅵᅵW
- * classᅵÍÏᅵèœï¿œï¿œclass
- * typeᅵÍÊᅵ0ᅵÈÌᅵᅵÈH
+ * Transform a bl to another _class,
+ * @type unused
*------------------------------------------*/
BUILDIN_FUNC(classchange)
{
@@ -11946,7 +12006,7 @@
}
/*==========================================
- * NPCᅵᅵᅵçᅵᅵᅵᅵᅵᅵGᅵtᅵFᅵNᅵg
+ * Display an effect
*------------------------------------------*/
BUILDIN_FUNC(misceffect)
{
@@ -12033,7 +12093,7 @@
}
/*==========================================
- * ᅵTᅵEᅵᅵᅵhᅵGᅵtᅵFᅵNᅵg
+ * Play a .wav sound for sd
*------------------------------------------*/
BUILDIN_FUNC(soundeffect)
{
Index: src/map/skill.c
--- src/map/skill.c Base (BASE)
+++ src/map/skill.c Locally Modified (Based On LOCAL)
@@ -615,6 +615,16 @@
if (hd->blockskill[i] > 0)
return 1;
+ switch(skillid){ //homun special check
+ case MH_LIGHT_OF_REGENE:
+ if(hd->homunculus.intimacy <= 750) //if not cordial
+ return 1;
+ break;
+ case MH_OVERED_BOOST:
+ if(hd->homunculus.hunger <= 1) //if we starving
+ return 1;
+ break;
+ }
//Use master's criteria.
return skillnotok(skillid, hd->master);
@@ -796,17 +806,18 @@
sc_start(src,SC_COMBO, 15, TK_TURNKICK,
(2000 - 4*sstatus->agi - 2*sstatus->dex)))
; //Stance triggered
- else if(sc->data[SC_READYCOUNTER])
- { //additional chance from SG_FRIEND [Komurka]
+ else if (sc->data[SC_READYCOUNTER]) { //additional chance from SG_FRIEND [Komurka]
rate = 20;
if (sc->data[SC_SKILLRATE_UP] && sc->data[SC_SKILLRATE_UP]->val1 == TK_COUNTER) {
rate += rate*sc->data[SC_SKILLRATE_UP]->val2/100;
status_change_end(src, SC_SKILLRATE_UP, INVALID_TIMER);
}
- sc_start4(src,SC_COMBO, rate, TK_COUNTER, bl->id,0,0,
+ sc_start2(src, SC_COMBO, rate, TK_COUNTER, bl->id,
(2000 - 4*sstatus->agi - 2*sstatus->dex));
}
}
+ if(sc && sc->data[SC_PYROCLASTIC] && (rnd() % 1000 <= sstatus->luk * 10 / 3 + 1) )
+ skill_castend_pos2(src, bl->x, bl->y, BS_HAMMERFALL,sc->data[SC_PYROCLASTIC]->val1, tick, 0);
}
if (sc) {
@@ -1350,18 +1361,25 @@
case EL_TYPOON_MIS:
sc_start(bl,SC_SILENCE,10*skilllv,skilllv,skill_get_time(skillid,skilllv));
break;
- case MH_LAVA_SLIDE:
- sc_start4(bl,SC_BURNING,10*skilllv,skilllv,1000,src->id,0,skill_get_time(skillid,skilllv));
- break;
- case MH_STAHL_HORN:
- sc_start(bl,SC_STUN,(20 + 4 * skilllv),skilllv,skill_get_time2(skillid,skilllv));
- break;
case KO_JYUMONJIKIRI: // needs more info
sc_start(bl,SC_JYUMONJIKIRI,25,skilllv,skill_get_time(skillid,skilllv));
break;
case KO_MAKIBISHI:
sc_start(bl, SC_STUN, 100, skilllv, skill_get_time2(skillid,skilllv));
break;
+ case MH_LAVA_SLIDE:
+ sc_start4(bl, SC_BURNING, 10 * skilllv, skilllv, 1000, src->id, 0, skill_get_time(skillid, skilllv));
+ break;
+ case MH_STAHL_HORN:
+ sc_start(bl, SC_STUN, (20 + 4 * (skilllv-1)), skilllv, skill_get_time2(skillid, skilllv));
+ break;
+ case MH_NEEDLE_OF_PARALYZE:
+ sc_start(bl, SC_PARALYSIS, 40 + (5*skilllv), skilllv, skill_get_time(skillid, skilllv));
+ break;
+ case MH_POISON_MIST:
+ if (tsc && !tsc->data[SC_BLIND])
+ status_change_start(bl, SC_BLIND, rnd() % 100 > skilllv * 10, skilllv, skillid, 0, 0, skill_get_time2(skillid, skilllv), 8);
+ break;
}
if (md && battle_config.summons_trigger_autospells && md->master_id && md->special_state.ai)
@@ -3483,7 +3501,6 @@
case WM_SEVERE_RAINSTORM_MELEE:
case WM_GREAT_ECHO:
case GN_SLINGITEM_RANGEMELEEATK:
- case MH_STAHL_HORN:
case KO_JYUMONJIKIRI:
case KO_SETSUDAN:
case KO_KAIHOU:
@@ -3720,7 +3737,6 @@
case SO_VARETYR_SPEAR:
case GN_CART_TORNADO:
case GN_CARTCANNON:
- case MH_LAVA_SLIDE:
case KO_HAPPOKUNAI:
case KO_HUUMARANKA:
case KO_MUCHANAGE:
@@ -4528,6 +4544,21 @@
break;
+ //recursive homon skill
+ case MH_MAGMA_FLOW:
+ case MH_XENO_SLASHER:
+ if(flag & 1)
+ skill_attack(skill_get_type(skillid), src, src, bl, skillid, skilllv, tick, flag);
+ else {
+ map_foreachinrange(skill_area_sub, bl, skill_get_splash(skillid, skilllv), splash_target(src), src, skillid, skilllv, tick, flag | BCT_ENEMY | SD_SPLASH | 1, skill_castend_damage_id);
+ }
+ break;
+ case MH_STAHL_HORN:
+ case MH_NEEDLE_OF_PARALYZE:
+ case MH_POISON_MIST:
+ skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, flag);
+ break;
+
case 0:/* no skill - basic/normal attack */
if(sd) {
if (flag & 3){
@@ -4545,10 +4576,6 @@
break;
default:
- if( skillid >= HM_SKILLBASE && skillid <= HM_SKILLBASE + MAX_HOMUNSKILL ) {
- if( src->type == BL_HOM && ((TBL_HOM*)src)->master->fd )
- clif_colormes(((TBL_HOM*)src)->master, COLOR_RED, "This skill is not yet supported");
- } else /* temporary until all the homun-s skills are supported otherwise console would fill up with pointless warnings */
ShowWarning("skill_castend_damage_id: Unknown skill used:%d\n",skillid);
clif_skill_damage(src, bl, tick, status_get_amotion(src), tstatus->dmotion,
0, abs(skill_get_num(skillid, skilllv)),
@@ -7203,12 +7230,7 @@
clif_skill_fail(sd,skillid,USESKILL_FAIL_LEVEL,0);
}
break;
- case MH_STAHL_HORN:
- if (sd) {
- if( skillid == MH_GOLDENE_FERSE )
- clif_skill_fail(sd,skillid,USESKILL_FAIL_CONDITION,0);
- }
- break;
+
case HAMI_CASTLE: //[orn]
if(rnd()%100 < 20*skilllv && src != bl)
{
@@ -7360,7 +7382,6 @@
break;
case RK_IGNITIONBREAK:
case LG_EARTHDRIVE:
- case MH_LAVA_SLIDE:
clif_skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skillid, skilllv, 6);
i = skill_get_splash(skillid,skilllv);
if( skillid == LG_EARTHDRIVE ) {
@@ -8820,6 +8841,94 @@
map_foreachinrange(skill_area_sub, bl, skill_get_splash(skillid, skilllv), splash_target(src), src, skillid, skilllv, tick, flag|BCT_ENEMY|SD_SPLASH|1, skill_castend_nodamage_id);
}
break;
+ //eira skills
+ case MH_SILENT_BREEZE: {
+ struct status_change *ssc = status_get_sc(src);
+ const enum sc_type scs[] = {
+ SC_MANDRAGORA, SC_HARMONIZE, SC_DEEPSLEEP, SC_VOICEOFSIREN, SC_SLEEP, SC_CONFUSION, SC_HALLUCINATION
+ };
+ int heal;
+ if(tsc){
+ for (i = 0; i < ARRAYLENGTH(scs); i++) {
+ if (tsc->data[scs[i]]) status_change_end(bl, scs[i], INVALID_TIMER);
+ }
+ if (!tsc->data[SC_SILENCE]) //put inavoidable silence on target
+ status_change_start(bl, SC_SILENCE, 100, skilllv, 0,0,0, skill_get_time(skillid, skilllv),1|2|8);
+ if(ssc && !ssc->data[SC_SILENCE]) //put inavoidable silence on homun
+ status_change_start(src, SC_SILENCE, 100, skilllv, 0,0,0, skill_get_time(skillid, skilllv),1|2|8);
+ }
+ heal = status_get_matk_min(src)*4;
+ status_heal(bl, heal, 0, 7);
+ if (hd)
+ skill_blockhomun_start(hd, skillid, skill_get_time2(skillid, skilllv));
+ }
+ break;
+ case MH_OVERED_BOOST:
+ if (hd){
+ struct block_list *s_bl = battle_get_master(src);
+ if(hd->homunculus.hunger>50) //reduce hunger
+ hd->homunculus.hunger = hd->homunculus.hunger/2;
+ else
+ hd->homunculus.hunger = min(1,hd->homunculus.hunger);
+ if(s_bl && s_bl->type==BL_PC){
+ status_set_sp(s_bl,status_get_max_sp(s_bl)/2,0); //master drain 50% sp
+ clif_send_homdata(((TBL_PC *)s_bl), SP_HUNGRY, hd->homunculus.hunger); //refresh hunger info
+ sc_start(s_bl, type, 100, skilllv, skill_get_time(skillid, skilllv)); //gene bonus
+ }
+ skill_blockhomun_start(hd, skillid, skill_get_time2(skillid, skilllv));
+ sc_start(bl, type, 100, skilllv, skill_get_time(skillid, skilllv));
+ }
+ break;
+ case MH_GRANITIC_ARMOR:
+ case MH_PYROCLASTIC:
+ if (hd){
+ struct block_list *s_bl = battle_get_master(src);
+ if(s_bl && s_bl->type==BL_PC){ //start on master
+ sc_start2(s_bl, type, 100, skilllv, hd->homunculus.level, skill_get_time(skillid, skilllv)); //gene bonus
+ }
+ // skill_blockhomun_start(hd, skillid, skill_get_time2(skillid, skilllv));
+ sc_start2(bl, type, 100, skilllv, hd->homunculus.level, skill_get_time(skillid, skilllv));
+ }
+ break;
+
+ //Bayeri skills
+ case MH_STEINWAND: {
+ struct block_list *s_bl = battle_get_master(bl);
+ skill_castend_pos2(bl,bl->x,bl->y,MG_SAFETYWALL,skilllv,tick,flag); //cast on homon
+ skill_castend_pos2(s_bl,s_bl->x,s_bl->y,MG_SAFETYWALL,skilllv,tick,flag); //cast on master
+ // if (hd)
+ // skill_blockhomun_start(hd, skillid, skill_get_time2(skillid, skilllv));
+ }
+ break;
+ case MH_LIGHT_OF_REGENE:
+ case MH_STYLE_CHANGE:
+ case MH_MAGMA_FLOW:
+ case MH_PAIN_KILLER:
+ sc_start(bl, type, 100, skilllv, skill_get_time(skillid, skilllv));
+ // if (hd)
+ // skill_blockhomun_start(hd, skillid, skill_get_time2(skillid, skilllv));
+ break;
+ case MH_SUMMON_LEGION:
+ {
+ int summons[5] = {1004, 1303, 1303, 1994, 1994};
+ int qty[5] = {3 , 3 , 4 , 4 , 5};
+ struct mob_data *md;
+ int i;
+
+ for(i=0; i<qty[skilllv - 1]; i++){ //easy way [Lighta]
+ md = mob_once_spawn_sub(src, src->m, src->x, src->y, status_get_name(src), summons[skilllv - 1], "");
+ if (md) {
+ md->master_id = src->id;
+ md->special_state.ai = 1; //normal summon, add new type here
+ if (md->deletetimer != INVALID_TIMER)
+ delete_timer(md->deletetimer, mob_timer_delete);
+ md->deletetimer = add_timer(gettick() + skill_get_time(skillid, skilllv), mob_timer_delete, md->bl.id, 0);
+ mob_spawn(md); //Now it is ready for spawning.
+ // sc_start4(&md->bl, SC_MODECHANGE, 100, 1, 0, MD_CANMOVE|MD_CANATTACK|MD_ASSIST|MD_AGGRESSIVE, 0, 60000);
+ }
+ }
+ }
+ break;
default:
if( skillid >= HM_SKILLBASE && skillid <= HM_SKILLBASE + MAX_HOMUNSKILL ) {
if( src->type == BL_HOM && ((TBL_HOM*)src)->master->fd )
@@ -9009,8 +9118,11 @@
if(inf&BCT_ENEMY && (sc = status_get_sc(target)) &&
sc->data[SC_FOGWALL] &&
- rnd()%100 < 75)
- { //Fogwall makes all offensive-type targetted skills fail at 75%
+ rnd() % 100 < 75) { //Fogwall makes all offensive-type targetted skills fail at 75%
+ if (sd) clif_skill_fail(sd, ud->skillid, USESKILL_FAIL_LEVEL, 0);
+ break;
+ }
+ if ( (sc = status_get_sc(src)) && sc->data[SC_ASH] && rnd() % 2) { //SC_ASH makes all skills fail at 50%
if (sd) clif_skill_fail(sd,ud->skillid,USESKILL_FAIL_LEVEL,0);
break;
}
@@ -9538,11 +9650,13 @@
case SO_WATER_INSIGNIA:
case SO_WIND_INSIGNIA:
case SO_EARTH_INSIGNIA:
- case MH_POISON_MIST:
case KO_HUUMARANKA:
case KO_MUCHANAGE:
case KO_BAKURETSU:
case KO_ZENKAI:
+ case MH_LAVA_SLIDE:
+ case MH_VOLCANIC_ASH:
+ case MH_POISON_MIST:
flag|=1;//Set flag to 1 to prevent deleting ammo (it will be deleted on group-delete).
case GS_GROUNDDRIFT: //Ammo should be deleted right away.
skill_unitsetting(src,skillid,skilllv,x,y,0);
@@ -10011,6 +10125,15 @@
skill_unitsetting(src,skillid,skilllv,x,y,0);
}
break;
+
+ case MH_XENO_SLASHER: {
+ i = skill_get_splash(skillid, skilllv);
+ map_foreachinarea(skill_area_sub, src->m, x - i, y - i, x + i, y + i, BL_CHAR,
+ src, skillid, skilllv, tick, flag | BCT_ENEMY | 1,
+ skill_castend_damage_id);
+ break;
+ }
+
default:
if( skillid >= HM_SKILLBASE && skillid <= HM_SKILLBASE + MAX_HOMUNSKILL ) {
if( src->type == BL_HOM && ((TBL_HOM*)src)->master->fd )
@@ -10980,6 +11103,12 @@
skill_attack(skill_get_type(sg->skill_id), ss, &src->bl, bl, sg->skill_id, sg->skill_lv, tick, 0);
break;
+ case UNT_VOLCANIC_ASH:
+ ShowInfo("You've step in volcanic ash, skilllv=%d\n",sg->skill_lv);
+ if (!sce)
+ sc_start(bl, SC_ASH, 50, sg->skill_lv, skill_get_time(MH_VOLCANIC_ASH, sg->skill_lv)); //50% chance
+ break;
+
case UNT_GD_LEADERSHIP:
case UNT_GD_GLORYWOUNDS:
case UNT_GD_SOULCOLD:
@@ -13478,6 +13607,8 @@
if (sc && sc->count) {
if (sc->data[SC_SLOWCAST])
time += time * sc->data[SC_SLOWCAST]->val2 / 100;
+ if (sc->data[SC_PARALYSIS])
+ time += sc->data[SC_PARALYSIS]->val3;
if (sc->data[SC_SUFFRAGIUM]) {
time -= time * sc->data[SC_SUFFRAGIUM]->val2 / 100;
status_change_end(bl, SC_SUFFRAGIUM, INVALID_TIMER);
Index: src/map/skill.h
--- src/map/skill.h Base (BASE)
+++ src/map/skill.h Locally Modified (Based On LOCAL)
Index: src/map/status.c
--- src/map/status.c Base (BASE)
+++ src/map/status.c Locally Modified (Based On LOCAL)
@@ -491,6 +491,25 @@
set_sc( HAMI_DEFENCE , SC_DEFENCE , SI_BLANK , SCB_DEF );
set_sc( HAMI_BLOODLUST , SC_BLOODLUST , SI_BLANK , SCB_BATK|SCB_WATK );
+ // Homunculus S
+ add_sc(MH_STAHL_HORN, SC_STUN);
+ set_sc(MH_ANGRIFFS_MODUS, SC_ANGRIFFS_MODUS, SI_ANGRIFFS_MODUS, SCB_BATK | SCB_DEF | SCB_FLEE | SCB_MAXHP);
+ set_sc(MH_GOLDENE_FERSE, SC_GOLDENE_FERSE, SI_GOLDENE_FERSE, SCB_ASPD|SCB_MAXHP);
+ add_sc(MH_ERASER_CUTTER, SC_ERASER_CUTTER);
+ set_sc(MH_OVERED_BOOST, SC_OVERED_BOOST, SI_BLANK, SCB_FLEE|SCB_ASPD);
+ add_sc(MH_LIGHT_OF_REGENE, SC_LIGHT_OF_REGENE);
+ set_sc(MH_VOLCANIC_ASH, SC_ASH, SI_VOLCANIC_ASH, SCB_DEF|SCB_DEF2|SCB_HIT|SCB_BATK|SCB_FLEE);
+ set_sc(MH_GRANITIC_ARMOR, SC_GRANITIC_ARMOR, SI_GRANITIC_ARMOR, SCB_NONE);
+ set_sc(MH_MAGMA_FLOW, SC_MAGMA_FLOW, SI_MAGMA_FLOW, SCB_NONE);
+ set_sc(MH_PYROCLASTIC, SC_PYROCLASTIC, SI_PYROCLASTIC, SCB_BATK|SCB_ATK_ELE);
+ add_sc(MH_LAVA_SLIDE, SC_BURNING);
+ set_sc(MH_NEEDLE_OF_PARALYZE, SC_PARALYSIS, SI_NEEDLE_OF_PARALYZE, SCB_DEF2);
+ add_sc(MH_POISON_MIST, SC_BLIND);
+ set_sc(MH_PAIN_KILLER, SC_PAIN_KILLER, SI_PAIN_KILLER, SCB_ASPD);
+
+ add_sc(MH_STYLE_CHANGE, SC_STYLE_CHANGE);
+
+
add_sc( MER_CRASH , SC_STUN );
set_sc( MER_PROVOKE , SC_PROVOKE , SI_PROVOKE , SCB_DEF|SCB_DEF2|SCB_BATK|SCB_WATK );
add_sc( MS_MAGNUM , SC_WATK_ELEMENT );
@@ -728,13 +747,6 @@
set_sc_with_vfx( OB_AKAITSUKI , SC_AKAITSUKI , SI_AKAITSUKI , SCB_NONE );
set_sc( OB_OBOROGENSOU , SC_GENSOU , SI_GENSOU , SCB_NONE );
- add_sc( MH_STAHL_HORN , SC_STUN );
- set_sc( MH_ANGRIFFS_MODUS , SC_ANGRIFFS_MODUS , SI_ANGRIFFS_MODUS , SCB_BATK|SCB_WATK|SCB_DEF|SCB_FLEE );
- set_sc( MH_GOLDENE_FERSE , SC_GOLDENE_FERSE , SI_GOLDENE_FERSE , SCB_SPEED|SCB_FLEE|SCB_ATK_ELE );
- add_sc( MH_LAVA_SLIDE , SC_BURNING );
- add_sc( MH_POISON_MIST , SC_BLIND );
- set_sc( MH_ERASER_CUTTER , SC_ERASER_CUTTER , SI_BLANK , SCB_NONE );
-
// Storing the target job rather than simply SC_SPIRIT simplifies code later on.
SkillStatusChangeTable[SL_ALCHEMIST] = (sc_type)MAPID_ALCHEMIST,
SkillStatusChangeTable[SL_MONK] = (sc_type)MAPID_MONK,
@@ -1034,6 +1046,9 @@
StatusChangeStateTable[SC_CURSEDCIRCLE_TARGET] |= SCS_NOCAST;
StatusChangeStateTable[SC_SILENCE] |= SCS_NOCAST;
+ //Homon S
+ StatusChangeStateTable[SC_PARALYSIS] |= SCS_NOMOVE;
+
}
static void initDummyData(void)
@@ -1292,14 +1307,25 @@
if( target->type == BL_MOB )
((TBL_MOB*)target)->state.rebirth = 1;
- return hp+sp;
+ return hp + sp;
}
-
- if( target->type == BL_MOB && sc && sc->data[SC_REBIRTH] && !((TBL_MOB*)target)->state.rebirth )
- {// Ensure the monster has not already rebirthed before doing so.
+ if(target->type == BL_PC){
+ TBL_PC *sd = BL_CAST(BL_PC,target);
+ TBL_HOM *hd = sd->hd;
+ if(hd && hd->sc.data[SC_LIGHT_OF_REGENE]){
+ //rez en fonction de l'intimite
+ // clif_skillcasting(&hd->bl, hd->bl.id, target->id, 0,0, MH_LIGHT_OF_REGENE, skill_get_ele(MH_LIGHT_OF_REGENE, 1), skill_get_cast(MH_LIGHT_OF_REGENE, 1));
+ clif_skill_nodamage(&sd->bl, target, ALL_RESURRECTION, 1, status_revive(&sd->bl,10*hd->sc.data[SC_LIGHT_OF_REGENE]->val1,0));
+ hd->homunculus.intimacy = 251; //change to neutral
+ clif_send_homdata(sd, SP_INTIMATE, hd->homunculus.intimacy); //refresh intimacy info
+ status_change_end(&sd->hd->bl,SC_LIGHT_OF_REGENE,INVALID_TIMER);
+ return hp + sp;
+ }
+ }
+ if (target->type == BL_MOB && sc && sc->data[SC_REBIRTH] && !((TBL_MOB*) target)->state.rebirth) {// Ensure the monster has not already rebirthed before doing so.
status_revive(target, sc->data[SC_REBIRTH]->val2, 0);
- status_change_clear(target,0);
- ((TBL_MOB*)target)->state.rebirth = 1;
+ status_change_clear(target, 0);
+ ((TBL_MOB*) target)->state.rebirth = 1;
return hp+sp;
}
@@ -1692,6 +1718,8 @@
return 0;
if(skill_num == PR_LEXAETERNA && (tsc->data[SC_FREEZE] || (tsc->data[SC_STONE] && tsc->opt1 == OPT1_STONE)))
return 0;
+ if ((skill_num != SC_SHADOWFORM && skill_num != SC_STRIPACCESSARY) && tsc->data[SC__MANHOLE])
+ return 0;
}
//If targetting, cloak+hide protect you, otherwise only hiding does.
@@ -4407,10 +4435,19 @@
batk += sc->data[SC_FULL_SWING_K]->val1;
if(sc->data[SC_ODINS_POWER])
batk += 70;
- if(sc->data[SC_ANGRIFFS_MODUS])
- batk += batk * sc->data[SC_ANGRIFFS_MODUS]->val2/100;
if( sc->data[SC_ZANGETSU] )
batk += batk * sc->data[SC_ZANGETSU]->val2 / 100;
+ if(sc->data[SC_ASH] && (bl->type==BL_MOB)){
+ TBL_MOB *md = BL_CAST(BL_MOB,bl);
+ if(md && md->status.def_ele == ELE_WATER) //water type
+ batk = batk*sc->data[SC_ASH]->val2/100;
+ }
+ if(sc->data[SC_PYROCLASTIC])
+ batk += sc->data[SC_PYROCLASTIC]->val2;
+ if (sc->data[SC_ANGRIFFS_MODUS])
+ batk += sc->data[SC_ANGRIFFS_MODUS]->val2;
+
+
return (unsigned short)cap_value(batk,0,USHRT_MAX);
}
@@ -4527,7 +4564,7 @@
if(sc->data[SC_FIRE_INSIGNIA] && sc->data[SC_FIRE_INSIGNIA]->val1 == 3)
matk += 50;
if(sc->data[SC_ODINS_POWER])
- matk += 70;
+ matk += 40 + 30 * sc->data[SC_ODINS_POWER]->val1; //70 lvl1, 100lvl2
if(sc->data[SC_IZAYOI])
matk += 50 * sc->data[SC_IZAYOI]->val1;
if( sc->data[SC_ZANGETSU] )
@@ -4597,6 +4634,8 @@
hit -= hit * 20 / 100;
if(sc->data[SC_INSPIRATION])
hit += 5 * sc->data[SC_INSPIRATION]->val1;
+ if (sc->data[SC_ASH])
+ hit = hit * sc->data[SC_ASH]->val2 / 100;
return (short)cap_value(hit,1,SHRT_MAX);
}
@@ -4668,15 +4707,21 @@
flee += flee * sc->data[SC_ZEPHYR]->val2 / 100;
if( sc->data[SC_MARSHOFABYSS] )
flee -= (9 * sc->data[SC_MARSHOFABYSS]->val3 / 10 + sc->data[SC_MARSHOFABYSS]->val2 / 10) * (bl->type == BL_MOB ? 2 : 1);
- if( sc->data[SC_ANGRIFFS_MODUS] )
- flee -= flee * sc->data[SC_ANGRIFFS_MODUS]->val3 / 100;
- if( sc->data[SC_GOLDENE_FERSE ] )
- flee -= flee * sc->data[SC_GOLDENE_FERSE ]->val2 / 100;
#ifdef RENEWAL
if( sc->data[SC_SPEARQUICKEN] )
flee += 2 * sc->data[SC_SPEARQUICKEN]->val1;
#endif
+ if (sc->data[SC_ANGRIFFS_MODUS])
+ flee -= sc->data[SC_ANGRIFFS_MODUS]->val3;
+ if (sc->data[SC_OVERED_BOOST])
+ flee = max(flee,sc->data[SC_OVERED_BOOST]->val2);
+ if(sc->data[SC_ASH] && (bl->type==BL_MOB)){
+ TBL_MOB *md = BL_CAST(BL_MOB,bl);
+ if(md && md->status.def_ele == ELE_WATER) //water type
+ flee = flee*sc->data[SC_ASH]->val2/100;
+ }
+
return (short)cap_value(flee,1,SHRT_MAX);
}
@@ -4767,6 +4812,12 @@
if( sc->data[SC_ANGRIFFS_MODUS] )
def -= def * sc->data[SC_ANGRIFFS_MODUS]->val4 / 100;
+ if(sc->data[SC_ASH] && (bl->type==BL_MOB)){
+ TBL_MOB *md = BL_CAST(BL_MOB,bl);
+ if(md && md->status.race==RC_PLANT)
+ def = def*sc->data[SC_ASH]->val2/100;
+ }
+
return (defType)cap_value(def,DEFTYPE_MIN,DEFTYPE_MAX);;
}
@@ -4823,6 +4874,13 @@
def2 += (5 + sc->data[SC_BANDING]->val1) * (sc->data[SC_BANDING]->val2);
if( sc->data[SC_GT_REVITALIZE] && sc->data[SC_GT_REVITALIZE]->val4)
def2 += def2 * sc->data[SC_GT_REVITALIZE]->val4 / 100;
+ if(sc->data[SC_ASH] && (bl->type==BL_MOB)){
+ TBL_MOB *md = BL_CAST(BL_MOB,bl);
+ if(md && md->status.race==RC_PLANT)
+ def2 = def2*sc->data[SC_ASH]->val2/100;
+ }
+ if (sc->data[SC_PARALYSIS])
+ def2 -= def2 * sc->data[SC_PARALYSIS]->val2 / 100;
#ifdef RENEWAL
return (short)cap_value(def2,SHRT_MIN,SHRT_MAX);
@@ -4873,10 +4931,10 @@
mdef -= mdef * sc->data[SC_GT_CHANGE]->val4 / 100;
if(sc->data[SC_WATER_BARRIER])
mdef += sc->data[SC_WATER_BARRIER]->val2;
+ if (sc->data[SC_ODINS_POWER])
+ mdef -= 20 * sc->data[SC_ODINS_POWER]->val1;
if(sc->data[SC_EARTH_INSIGNIA] && sc->data[SC_EARTH_INSIGNIA]->val1 == 3)
mdef += 50;
- if(sc->data[SC_ODINS_POWER])
- mdef -= 20;
return (defType)cap_value(mdef,DEFTYPE_MIN,DEFTYPE_MAX);
}
@@ -5189,6 +5247,8 @@
skills2 -= sc->data[SC__INVISIBILITY]->val2 ;
if( sc->data[SC__GROOMY] )
skills2 -= sc->data[SC__GROOMY]->val2;
+ if(sc->data[SC_PAIN_KILLER])
+ skills2 -= sc->data[SC_PAIN_KILLER]->val2;
if( sc->data[SC_SWINGDANCE] )
skills2 += sc->data[SC_SWINGDANCE]->val2;
if( sc->data[SC_DANCEWITHWUG] )
@@ -5199,6 +5259,8 @@
skills2 -= 25;
if( sc->data[SC_GT_CHANGE] )
skills2 += sc->data[SC_GT_CHANGE]->val3;
+ if (sc->data[SC_GOLDENE_FERSE])
+ skills2 += sc->data[SC_GOLDENE_FERSE]->val3;
if( sc->data[SC_MELON_BOMB] )
skills2 -= sc->data[SC_MELON_BOMB]->val1;
if( sc->data[SC_BOOST500] )
@@ -5258,8 +5320,6 @@
max < sc->data[SC_FLEET]->val2)
max = sc->data[SC_FLEET]->val2;
- if( sc->data[SC_GOLDENE_FERSE] && max < sc->data[SC_GOLDENE_FERSE]->val3 )
- max = sc->data[SC_GOLDENE_FERSE]->val3;
if(sc->data[SC_ASSNCROS] &&
max < sc->data[SC_ASSNCROS]->val2)
@@ -5416,6 +5476,8 @@
maxhp -= sc->data[SC_MYSTERIOUS_POWDER]->val1 / 100;
if(sc->data[SC_EARTH_INSIGNIA] && sc->data[SC_EARTH_INSIGNIA]->val1 == 2)
maxhp += 500;
+ if (sc->data[SC_GOLDENE_FERSE])
+ maxhp += (maxhp * sc->data[SC_GOLDENE_FERSE]->val2) / 100;
return cap_value(maxhp,1,UINT_MAX);
}
@@ -5516,8 +5578,8 @@
return ELE_GHOST;
if(sc->data[SC_TIDAL_WEAPON_OPTION] || sc->data[SC_TIDAL_WEAPON] )
return ELE_WATER;
- if(sc->data[SC_GOLDENE_FERSE] && rand()%100 < sc->data[SC_GOLDENE_FERSE]->val4)
- return ELE_HOLY;
+ if(sc->data[SC_PYROCLASTIC])
+ return ELE_FIRE;
return (unsigned char)cap_value(element,0,UCHAR_MAX);
}
@@ -6118,6 +6180,9 @@
case SC_KYOUGAKU:
tick -= 30*status->int_;
break;
+ case SC_PARALYSIS:
+ tick -= 50 * (status->vit + status->luk); //(1000/20);
+ break;
default:
//Effect that cannot be reduced? Likely a buff.
if (!(rnd()%10000 < rate))
@@ -6306,6 +6371,12 @@
undead_flag = battle_check_undead(status->race,status->def_ele);
//Check for inmunities / sc fails
switch (type) {
+ case SC_ANGRIFFS_MODUS:
+ case SC_GOLDENE_FERSE:
+ if ((type==SC_GOLDENE_FERSE && sc->data[SC_ANGRIFFS_MODUS])
+ || (type==SC_ANGRIFFS_MODUS && sc->data[SC_GOLDENE_FERSE])
+ )
+ return 0;
case SC_STONE:
if(sc->data[SC_POWER_OF_GAIA])
return 0;
@@ -6609,6 +6680,7 @@
case SC_BURNING: // Place here until we have info about its behavior on Boss-monsters. [pakpil]
case SC_MARSHOFABYSS:
case SC_ADORAMUS:
+ case SC_PARALYSIS:
// Exploit prevention - kRO Fix
case SC_PYREXIA:
@@ -7654,16 +7726,6 @@
val3 = 3*val1; //Leech chance
val4 = 20; //Leech percent
break;
- case SC_ANGRIFFS_MODUS:
- val2 = 70 + 30*val1; //atk
- val3 = 50 + 20*val1; //flee
- val4 = 60 + 20*val1; //def
- break;
- case SC_GOLDENE_FERSE:
- val2 = 20 + 10*val1; //flee
- val3 = 10 + 4*val1; //aspd
- val4 = 2 + 2*val1; //chance to issue holy-ele attack
- break;
case SC_FLEET:
val2 = 30*val1; //Aspd change
val3 = 5+5*val1; //bAtk/wAtk rate change
@@ -8351,6 +8413,44 @@
status_zap(bl, hp * (lv*4) / 100, status_get_sp(bl) * (lv*3) / 100);
}
break;
+ case SC_ANGRIFFS_MODUS:
+ val2 = 50 + 20 * val1; //atk bonus
+ val3 = 40 + 20 * val1; // Flee reduction.
+ val4 = 30 + 20 * val1; // Def reduction
+ break;
+ case SC_GOLDENE_FERSE:
+ val2 = 10 + 10*val1; //max hp bonus
+ val3 = 10 + 4 * (val1-1); // Aspd Bonus
+ val4 = 2 + 2 * val1; // Chance of holy attack
+ break;
+ case SC_OVERED_BOOST:
+ val2 = 300 + 40*val1; //flee bonus
+ val3 = 179 + 2*val1; //aspd bonus
+ break;
+ case SC_ASH:
+ val2 = 50; //Def,ATK,Flee,Hit, alteration %
+ val3 = 150; //dammage bonus
+ break;
+ case SC_GRANITIC_ARMOR:
+ val2 = 2*val1; //dmg reduction
+ val3 = 6*val1; //dmg on status end
+ break;
+ case SC_MAGMA_FLOW:
+ val2 = 3*val1; //activation chance
+ break;
+ case SC_PYROCLASTIC:
+ val2 += 10*val1; //atk bonus
+ break;
+ case SC_PARALYSIS: //[Lighta] need real info
+ val2 = 2*val1; //def reduction
+ val3 = 500*val1; //varcast augmentation
+ break;
+ case SC_PAIN_KILLER:
+ val2 = 2*val1; //aspd reduction %
+ val3 = 2*val1; //dmg reduction %
+ if(sc->data[SC_PARALYSIS])
+ sc_start(bl, SC_ENDURE, 100, val1, tick); //start endure for same duration
+ break;
default:
if( calc_flag == SCB_NONE && StatusSkillChangeTable[type] == 0 && StatusIconChangeTable[type] == 0 )
{ //Status change with no calc, no icon, and no skill associated...?
@@ -8407,6 +8507,7 @@
case SC_NETHERWORLD:
case SC_MEIKYOUSISUI:
case SC_KYOUGAKU:
+ case SC_PARALYSIS:
unit_stop_walking(bl,1);
break;
case SC_HIDING:
@@ -8877,6 +8978,17 @@
vd = status_get_viewdata(bl);
calc_flag = StatusChangeFlagTable[type];
switch(type){
+ case SC_GRANITIC_ARMOR:{
+ int dammage = status->max_hp*sce->val3/100;
+ if(status->hp < dammage) //to not kill him
+ dammage = status->hp-1;
+ status_damage(NULL, bl, dammage,0,0,1);
+ break;
+ }
+ case SC_PYROCLASTIC:
+ if(bl->type == BL_PC)
+ skill_break_equip(bl,EQP_WEAPON,10000,BCT_SELF);
+ break;
case SC_WEDDING:
case SC_XMAS:
case SC_SUMMER:
Index: src/map/status.h
--- src/map/status.h Base (BASE)
+++ src/map/status.h Locally Modified (Based On LOCAL)
@@ -613,10 +613,6 @@
* To increase the maximum value just add another status type before SC_MAXSPELLBOOK (ex. SC_SPELLBOOK7, SC_SPELLBOOK8 and so on)
**/
SC_MAXSPELLBOOK,
- /* homun-s */
- SC_ANGRIFFS_MODUS,
- SC_GOLDENE_FERSE,
- SC_ERASER_CUTTER,
/* Max HP & SP */
SC_INCMHP,
SC_INCMSP,
@@ -635,6 +631,22 @@
SC_ZANGETSU,
SC_GENSOU,
SC_AKAITSUKI,
+
+ //homon S
+ SC_STYLE_CHANGE,
+ SC_GOLDENE_FERSE,
+ SC_ANGRIFFS_MODUS,
+ SC_ERASER_CUTTER,
+ SC_OVERED_BOOST,
+ SC_LIGHT_OF_REGENE,
+ SC_ASH,
+ SC_GRANITIC_ARMOR,
+ SC_MAGMA_FLOW,
+ SC_PYROCLASTIC,
+ SC_PARALYSIS,
+ SC_PAIN_KILLER,
+
+
#ifdef RENEWAL
SC_EXTREMITYFIST2,
#endif
Index: src/map/unit.c
--- src/map/unit.c Base (BASE)
+++ src/map/unit.c Locally Modified (Based On LOCAL)
@@ -1249,6 +1249,7 @@
case RA_WUGDASH:
if (sc && sc->data[SC_WUGDASH])
casttime = -1;
+ break;
}
// moved here to prevent Suffragium from ending if skill fails
@@ -1325,9 +1326,11 @@
status_change_end(src,SC_CLOAKINGEXCEED, INVALID_TIMER);
if (!src->prev) return 0;
}
+ if (sc->data[SC__MANHOLE]) {
+ status_change_end(src, SC__MANHOLE, -1);
+ if (!src->prev) return 0; //Warped away!
}
-
-
+ }
if( casttime > 0 )
{
ud->skilltimer = add_timer( tick+casttime, skill_castend_id, src->id, 0 );
@@ -1451,7 +1454,11 @@
status_change_end(src, SC_CLOAKINGEXCEED, INVALID_TIMER);
if (!src->prev) return 0;
}
+ if (sc->data[SC__MANHOLE]) {
+ status_change_end(src, SC__MANHOLE, INVALID_TIMER);
+ if (!src->prev) return 0; //Warped away!
}
+ }
// in official this is triggered even if no cast time.
clif_skillcasting(src, src->id, 0, skill_x, skill_y, skill_num, skill_get_ele(skill_num, skill_lv), casttime);
if( casttime > 0 )
@@ -1868,7 +1875,7 @@
return 0;
if (sd && (sd->special_state.no_castcancel2 ||
- (sd->special_state.no_castcancel && !map_flag_gvg(bl->m) && !map[bl->m].flag.battleground))) //fixed flags being read the wrong way around [blackhole89]
+ ((sd->sc.data[SC_UNLIMITEDHUMMINGVOICE] || sd->special_state.no_castcancel) && !map_flag_gvg(bl->m) && !map[bl->m].flag.battleground))) //fixed flags being read the wrong way around [blackhole89]
return 0;
}
@@ -2023,9 +2030,11 @@
status_change_end(bl, SC_CHANGE, INVALID_TIMER);
status_change_end(bl, SC_STOP, INVALID_TIMER);
status_change_end(bl, SC_WUGDASH, INVALID_TIMER);
+ status_change_end(bl, SC_CAMOUFLAGE, INVALID_TIMER);
status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER);
status_change_end(bl, SC__MANHOLE, INVALID_TIMER);
-
+ status_change_end(bl, SC_VACUUM_EXTREME, INVALID_TIMER);
+ status_change_end(bl, SC_CURSEDCIRCLE_ATKER, INVALID_TIMER); //callme before warp
}
if (bl->type&(BL_CHAR|BL_PET)) {