Jump to content

Bringer

Members
  • Posts

    745
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Bringer

  1. On 11/24/2022 at 2:57 PM, mastersancheszue said:

    anyone can help me with this error?

    fgvhfgvhccg.PNG

    Create table

     

    CREATE TABLE IF NOT EXISTS `e_fabre_punch_rank` (

    `cid` INT(11) UNSIGNED NOT NULL DEFAULT '0',

    `name` NVARCHAR(30) NOT NULL DEFAULT '',

    `point` INT(11) SIGNED NOT NULL DEFAULT '0',

    `rank` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',

    PRIMARY KEY (`cid`)

    ) ENGINE=MyISAM;

    • Love 1
  2. i think that will only show the icons.

    the issue is when you recast the devotion skill you will need also to retoggle the defender skill just like

     

    Ohh yes only icon

    im looking commit about the defender too can't find it

  3. On 2/3/2022 at 12:10 PM, lLoydxx said:

    In the past I used this formula to spend a little time with the frozen character.

    But this formula is not being accepted when compiling the error emulator in the following name SCDEF_LVL_DIFF , below is the complete formula used. Could anyone help me make it work? Please.

    Directory: src/map/status.cpp

     

        case SC_FREEZE:
                sc_def = status->mdef*100;
                sc_def2 = status->luk*10 + SCDEF_LVL_DIFF(bl, src, 99, 10); // error > SCDEF_LVL_DIFF <
                tick_def = status->luk*10 + status_get_lv(bl)*10 - status_get_lv(src)*10;
                if(status->luk >= 300) {
                    tick_def2 = INT_MIN;
                } else {
                tick_def2 = status->luk*30;
                }
                break;

    On Latest Rathena

    /**
     * Applies SC defense to a given status change
     * This function also determines whether or not the status change will be applied
     * @param src: Source of the status change [PC|MOB|HOM|MER|ELEM|NPC]
     * @param bl: Target of the status change
     * @param type: Status change (SC_*)
     * @param rate: Initial percentage rate of affecting bl (0~10000)
     * @param tick: Initial duration that the status change affects bl
     * @param flag: Value which determines what parts to calculate. See e_status_change_start_flags
     * @return adjusted duration based on flag values
     */
    t_tick status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_type type, int rate, t_tick tick, unsigned char flag)
    {
        /// Resistance rate: 10000 = 100%
        /// Example:    50% (5000) -> sc_def = 5000 -> 25%;
        ///                5000ms -> tick_def = 5000 -> 2500ms
        int sc_def = 0, tick_def = -1; // -1 = use sc_def
        /// Fixed resistance value (after rate calculation)
        /// Example:    25% (2500) -> sc_def2 = 2000 -> 5%;
        ///                2500ms -> tick_def2=2000 -> 500ms
        int sc_def2 = 0, tick_def2 = 0;
    
        struct status_data *status, *status_src;
        struct status_change *sc;
        struct map_session_data *sd;
    
        nullpo_ret(bl);
        if (src == NULL)
            return tick?tick:1; // This should not happen in current implementation, but leave it anyway



    on old formula
     

    //Applies SC defense to a given status change.
    //Returns the adjusted duration based on flag values.
    //the flag values are the same as in status->change_start.
    int status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int tick, int flag) {
        //Percentual resistance: 10000 = 100% Resist
        //Example: 50% -> sc_def=5000 -> 25%; 5000ms -> tick_def=5000 -> 2500ms
        int sc_def = 0, tick_def = -1; //-1 = use sc_def
        //Linear resistance substracted from rate and tick after percentual resistance was applied
        //Example: 25% -> sc_def2=2000 -> 5%; 2500ms -> tick_def2=2000 -> 500ms
        int sc_def2 = 0, tick_def2 = -1; //-1 = use sc_def2
    
        struct status_data *st;
        struct status_change *sc;
        struct map_session_data *sd;
    
        nullpo_ret(bl);
    
        if(!src)
            return tick ? tick : 1; // If no source, it can't be resisted (NPC given)
    
    /// Returns the 'bl's level, capped to 'cap'
    #define SCDEF_LVL_CAP(bl, cap) ( (bl) ? (status->get_lv(bl) > (cap) ? (cap) : status->get_lv(bl)) : 0 )
    /// Renewal level modifier.
    /// In renewal, returns the difference between the levels of 'bl' and 'src', both capped to 'maxlv', multiplied by 'factor'
    /// In pre-renewal, returns zero.
    #if VERSION == 1
    #define SCDEF_LVL_DIFF(bl, src, maxlv, factor) ((SCDEF_LVL_CAP((bl), (maxlv)) - SCDEF_LVL_CAP((src), (maxlv)) ) * (factor))
    #else
    #define SCDEF_LVL_DIFF(bl, src, maxlv, factor) 0
    #endif

     

  4. 4 hours ago, Dev Yhams said:

    I'm having a problem with my Gypsy class wherein its etc tab/3rd tab skills are still disabled after being soul linked as show in the first image below,

    Comparing it to my Ministrel wherein its etc tab/3rd tab skills are enabled after being soul linked as shown in the second image below.

    How do I enable the skills of my Gypsy in etc/3rd tab skills after being soul linked? Thanks a lot for the help!

    2.png

    1.PNG.e32de52fe8924ac896cec673c50f4f19.png

    try this

    https://github.com/rathena/rathena/pull/5055/commits/f0af1e2067420823bcdf2c8f0bdd952fb951ee33

  5. i dont know if i post on right section

    Left Image is Double Space mes on Right Image is 1 Space Mes

    image.png.9e28ce1e04c927d54356df53f61d1577.png

    closer look of the fonts space
    image.png.4bcad73bf7d84200998edc943157cda8.png

    any idea how to change it ? even the font 

  6. 	//rodatazone says that Overrefined bonuses are part of baseatk
    	//Here we also apply the weapon_atk_rate bonus so it is correctly applied on left/right hands.
    	if(sd) {
    		if (type == EQI_HAND_L) {
    			if(sd->left_weapon.overrefine)
    				damage += rnd()%sd->left_weapon.overrefine+1;
    			if (sd->weapon_atk_rate[sd->weapontype2])
    				damage += damage * sd->weapon_atk_rate[sd->weapontype2] / 100;
    		} else { //Right hand
    			if(sd->right_weapon.overrefine)
    				damage += rnd()%sd->right_weapon.overrefine+1;
    			if (sd->weapon_atk_rate[sd->weapontype1])
    				damage += damage * sd->weapon_atk_rate[sd->weapontype1] / 100;
    		}
    	}
    
    	return damage;
    }

    on hercules there will be 

    int64 battle_calc_base_damage2 / int64 battle_calc_base_damage2

    on rathena i saw this code

    static int64 battle_calc_base_damage(struct block_list *src, struct status_data *status, struct weapon_atk *wa, struct status_change *sc, unsigned short t_size, int flag)

    No Static int64 battle_calc_base_damage2 and i saw this code 

    /** Calculates overrefine damage bonus and weapon related bonuses (unofficial)
    * @param sd Player
    * @param damage Current damage
    * @param lr_type EQI_HAND_L:left-hand weapon, EQI_HAND_R:right-hand weapon
    */
    static void battle_add_weapon_damage(struct map_session_data *sd, int64 *damage, int lr_type) {
    	if (!sd)
    		return;
    	//rodatazone says that Overrefine bonuses are part of baseatk
    	//Here we also apply the weapon_damage_rate bonus so it is correctly applied on left/right hands.
    	if (lr_type == EQI_HAND_L) {
    		if (sd->left_weapon.overrefine)
    			(*damage) = (*damage) + rnd() % sd->left_weapon.overrefine + 1;
    		if (sd->weapon_damage_rate[sd->weapontype2])
    			(*damage) += (*damage) * sd->weapon_damage_rate[sd->weapontype2] / 100;
    	}
    	else if (lr_type == EQI_HAND_R) {
    		if (sd->right_weapon.overrefine)
    			(*damage) = (*damage) + rnd() % sd->right_weapon.overrefine + 1;
    		if (sd->weapon_damage_rate[sd->weapontype1])
    			(*damage) += (*damage) * sd->weapon_damage_rate[sd->weapontype1] / 100;
    	}
    }


    can anyone help me to convert this to latest rathena
     

  7. mmo.hpp

    //These mark the ID of the jobs, as expected by the client. [Skotlex]
    enum e_job {
    
    	JOB_STAR_EMPEROR,
    	JOB_SOUL_REAPER,
    	JOB_BABY_STAR_EMPEROR,
    	JOB_BABY_SOUL_REAPER,
    	JOB_STAR_EMPEROR2,
    	JOB_BABY_STAR_EMPEROR2,
    
    	JOB_PADAWAN = 4230,
    	JOB_JEDI = 4231,
    	JOB_SITH = 4232,
    	JOB_MAX,
    };

    map.hpp

    //First Jobs
    //Note the oddity of the novice:
    //Super Novices are considered the 2-1 version of the novice! Novices are considered a first class type, too...
    enum e_mapid : uint64{
    
    //Baby 3-2 Jobs
    	MAPID_BABY_ROYAL_GUARD = JOBL_THIRD|MAPID_BABY_CRUSADER,
    	MAPID_BABY_SORCERER,
    	MAPID_BABY_MINSTRELWANDERER,
    	MAPID_BABY_SURA,
    	MAPID_BABY_GENETIC,
    	MAPID_BABY_SHADOW_CHASER,
    	MAPID_BABY_SOUL_REAPER,
    
    //Star Wars Job
    	MAPID_PADAWAN,
    	MAPID_JEDI = JOBL_2_1 | MAPID_PADAWAN,
    	MAPID_SITH = JOBL_2_2 | MAPID_PADAWAN,
    // Additional constants
    	MAPID_ALL = UINT64_MAX
    };

    pc.cpp
     

    /*==========================================
     * Convert's from the client's lame Job ID system
     * to the map server's 'makes sense' system. [Skotlex]
     *------------------------------------------*/
    int pc_jobid2mapid(unsigned short b_class)
    
    	//Baby 3-2 Jobs
    		case JOB_BABY_ROYAL_GUARD:      return MAPID_BABY_ROYAL_GUARD;
    		case JOB_BABY_SORCERER:         return MAPID_BABY_SORCERER;
    		case JOB_BABY_MINSTREL:
    		case JOB_BABY_WANDERER:         return MAPID_BABY_MINSTRELWANDERER;
    		case JOB_BABY_SURA:             return MAPID_BABY_SURA;
    		case JOB_BABY_GENETIC:          return MAPID_BABY_GENETIC;
    		case JOB_BABY_SHADOW_CHASER:    return MAPID_BABY_SHADOW_CHASER;
    		case JOB_BABY_SOUL_REAPER:      return MAPID_BABY_SOUL_REAPER;
    	//Doram Jobs
    		case JOB_SUMMONER:              return MAPID_SUMMONER;
    	//Custom Jobs
    		case JOB_PADAWAN:               return MAPID_PADAWAN;
    		case JOB_JEDI:                  return MAPID_JEDI;
    		case JOB_SITH:                  return MAPID_SITH;
    		default:
    			return -1;
    	}
    }
    
    //Reverts the map-style class id to the client-style one.
    int pc_mapid2jobid(unsigned short class_, int sex)
    {
    
    	//Baby 3-2 Jobs
    		case MAPID_BABY_ROYAL_GUARD:      return JOB_BABY_ROYAL_GUARD;
    		case MAPID_BABY_SORCERER:         return JOB_BABY_SORCERER;
    		case MAPID_BABY_MINSTRELWANDERER: return sex?JOB_BABY_MINSTREL:JOB_BABY_WANDERER;
    		case MAPID_BABY_SURA:             return JOB_BABY_SURA;
    		case MAPID_BABY_GENETIC:          return JOB_BABY_GENETIC;
    		case MAPID_BABY_SHADOW_CHASER:    return JOB_BABY_SHADOW_CHASER;
    		case MAPID_BABY_SOUL_REAPER:      return JOB_BABY_SOUL_REAPER;
    	//Doram Jobs
    		case MAPID_SUMMONER:              return JOB_SUMMONER;
    	//Custom Jobs
    		case MAPID_PADAWAN:               return JOB_PADAWAN;
    		case MAPID_JEDI:                  return JOB_JEDI;
    		case MAPID_SITH:                  return JOB_SITH;
    		default:
    			return -1;
    	}
    
    /*====================================================
     * This function return the name of the job (by [Yor])
     *----------------------------------------------------*/
    const char* job_name(int class_)
    {
    
    	case JOB_STAR_EMPEROR:
    	case JOB_SOUL_REAPER:
    	case JOB_BABY_STAR_EMPEROR:
    	case JOB_BABY_SOUL_REAPER:
    		return msg_txt(NULL,782 - JOB_STAR_EMPEROR + class_);
    
    	case JOB_STAR_EMPEROR2:
    		return msg_txt(NULL,782);
    
    	case JOB_BABY_STAR_EMPEROR2:
    		return msg_txt(NULL,784);
    
    	case JOB_PADAWAN: // Custom Jobs
    	case JOB_JEDI:
    	case JOB_SITH:
    		return msg_txt(NULL,790 - JOB_PADAWAN + class_);
    
    	default:
    		return msg_txt(NULL,655);
    	}
    }

    script_constants.hpp
     

    	export_constant(JOB_STAR_EMPEROR);
    	export_constant(JOB_SOUL_REAPER);
    	export_constant(JOB_BABY_STAR_EMPEROR);
    	export_constant(JOB_BABY_SOUL_REAPER);
    	export_constant(JOB_STAR_EMPEROR2);
    	export_constant(JOB_BABY_STAR_EMPEROR2);
    	export_constant(JOB_PADAWAN);
    	export_constant(JOB_JEDI);
    	export_constant(JOB_SITH);
    
    	export_constant2("EAJ_SUPER_NOVICE",MAPID_SUPER_NOVICE);
    	export_constant2("EAJ_SUPERNOVICE",MAPID_SUPER_NOVICE);
    	export_constant2("EAJ_SUPER_BABY",MAPID_SUPER_BABY);
    	export_constant2("EAJ_SUPER_NOVICE_E",MAPID_SUPER_NOVICE_E);
    	export_constant2("EAJ_SUPER_BABY_E",MAPID_SUPER_BABY_E);
    
    	export_constant2("EAJ_SUMMONER",MAPID_SUMMONER);
    
    	export_constant2("EAJ_PADAWAN", MAPID_PADAWAN);
    	export_constant2("EAJ_JEDI", MAPID_JEDI);
    	export_constant2("EAJ_SITH", MAPID_SITH);

    inter.cpp

    /* from pc.cpp due to @accinfo. any ideas to replace this crap are more than welcome. */
    const char* job_name(int class_) {
    
    
    		case JOB_PADAWAN:
    		case JOB_JEDI:
    		case JOB_SITH:
    			return msg_txt(790 - JOB_PADAWAN + class_);
    
    		default:
    			return msg_txt(199);
    	}
    }

    anyone can tell what is missing ?

×
×
  • Create New...