Jump to content

OscarScorp

Members
  • Posts

    217
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by OscarScorp

  1. Hey, it's me bothering again.
    Tried what you told me and I can read the cards equipped in the weapon but can't manage to read if the weapon is forged or if it has at least 1 "Very".
    When reading the parameter 0, does "255" mean's it's Forged?

    I think I'm, understanding...
    wat.png.2e056a8893817db6390f5de9c944a63b.png

    I just need to know how to obtain the Name of the Forger. I can't find how to with NPC scripting, but I may require using a Function from SRC?

    image.png

    On 9/8/2021 at 6:24 PM, LearningRO said:

    are u is that script in pre renewal mode?
    if yes u must add all item_randomopt_db.yml to your pre re folder

    I'm using renewal and have item_randomopt_db.TXT , but not yml (my code is old).
    If I add the ymls manually, doesn't work either.

    Can't update rathena because I have my src heavily modified and don't want to lose all my changes (custom skills, etc).
    Is there a way to fix this?

  2. 7 hours ago, WhiteEagle said:

    I don't have test it, but it should work.
    Go in itemdb.cpp and search for 
     

    /** Specifies if item-type should drop unidentified.
    * @param nameid ID of item
    */
    char itemdb_isidentified(t_itemid nameid) {
    	int type=itemdb_type(nameid);
    	switch (type) {
    		case IT_WEAPON:
    		case IT_ARMOR:
    		case IT_PETARMOR:
    		case IT_SHADOWGEAR:
    		case IT_CHARM:
    			return 0;
    		default:
    			return 1;
    	}
    }

     and change it to:

    /** Specifies if item-type should drop unidentified.
    * @param nameid ID of item
    */
    char itemdb_isidentified(t_itemid nameid) {
    	int type=itemdb_type(nameid);
    {
    			return 1;
    	}
    }


    or if you want only for weapons and armor:
     

    /** Specifies if item-type should drop unidentified.
    * @param nameid ID of item
    */
    char itemdb_isidentified(t_itemid nameid) {
    	int type=itemdb_type(nameid);
    	switch (type) {
    		case IT_WEAPON:
                return 1;
    		case IT_ARMOR:
                return 1;
    		case IT_PETARMOR:
    		case IT_SHADOWGEAR:
    		case IT_CHARM:
    			return 0;
    		default:
    			return 1;
    	}
    }

     

    Works. Thank you so much!

  3. 6 hours ago, sader1992 said:

    try this , I am not sure why you are getting this error , however this will use item2 if there is no options found

     

    sader_s_enchant.txt 16.21 kB · 0 downloads

    Thanks! The script doesn't throw an error anymore and the process can be completed, except, what I'm looking for is enchant a Forged weapon.
    Tried with regular Dagger and it can enchant up to 4 times. Tried with a "Very Strong" Dagger and no bonus is added.
     

     

    6 hours ago, LearningRO said:

    are u is that script in pre renewal mode?
    if yes u must add all item_randomopt_db.yml to your pre re folder

    My code is old and don't have the yml randomopt files. I added the file manually to db folder but, is it there anything else I need to edit to make my RO read the yml instead of the txt?

    dagg.png

  4. Hello everyone,
    I wonder if anyone can help me out finding the database files for the new Ragnarok Zero equipment such as new Forges and drops from desert monsters and orcs.
    New refines like Sunset Buster and Indigo Sword: https://wiki.playragnarokzero.com/wiki/Weapon_Materials

    New equipments such as Sand Crystal Rod:

    https://wiki.playragnarokzero.com/w/images/5/5d/Options_gear.png

    If possible, the Option drop file for Ro:Zero mobs: https://wiki.playragnarokzero.com/wiki/Random_Options

    Any help is appreciated!

  5. On 3/19/2020 at 5:54 PM, Gladius said:

    No... 

    This diff is from 2012 lol
    I took a look at diff and tried to apply it, but the codes are very different.
    Someone needs to update the code, or create a new one.

     

    Wish someone could help out updating this! /no1

  6. On 2/6/2021 at 10:06 PM, jayvz17 said:

    What edit did you do on this file?

    Just change the number values to the max amount of hairstyles, hair dyes or cloth colors as you want.

    //Additional hairstyles and dyes
    max_hair_style: 100 /*<--- This */
    max_hair_color: 120 /*<--- This */
    max_cloth_color: 300 /*<--- This */

     

  7. On 4/26/2020 at 3:59 PM, Haruka Mayumi said:

    trunk/conf/battle/skill.conf
    Change it to 1

    
    // Which finger offensive style will be used?
    // 0 = Aegis style (single multi-hit attack)
    // 1 = Athena style (multiple consecutive attacks)
    finger_offensive_type: 0

     

    Changing it to 1 won't fix the issue on my end. It still shows only 1 attack and only 1 sphere is consumed if used at lv.5.
    Was there any change affecting this skill?

     

    Edit: I think I know what's going on. So apparently an Official update is to only use 1 Spirit Sphere and damage is reduced to 1600% at lv.5.

    Source: https://www.divine-pride.net/forum/index.php?/topic/3453-kro-mass-skills-balance-1st-2nd-and-transcendent-classes-skills/

  8. Sorry for necroposting but if anyone's interested on making this mod, go to mob.cpp.

    Find and edit:

    	//if( test_autoloot ) {	//Autoloot. <- Change this line to...
    	if( test_autoloot && md->status.class_ != CLASS_BOSS ) {	//<- Change it to this.
    		struct party_data *p = party_search(sd->status.party_id);
    
    		if ((itemdb_search(ditem->item_data.nameid))->flag.broadcast &&
    			(!p || !(p->party.item & 2)) // Somehow, if party's pickup distribution is 'Even Share', no announcemet

    Cheers!

  9. I assume this request goes in this section because I can't find in src on how to edit this:

    I have a custom ability similar to Meteor Storm, which inflicts area damage in random locations, but the difference between MS and my skill is that each meteor does not makes the caster perform an attack animation, while my custom ability makes it so every hit, the character performs an attack animation, making it very difficult to move around or to perform any other action while the skill is performing all the hits.

    My request is if anyone knows how to make this happen, and if so, is it by Hexing my client?

    Thank you in advance!

  10. In src/map/skill.cpp, find:
    case SM_MAGNUM:
    ...
    sc_start4(src,src,SC_WATK_ELEMENT,100,3,20,0,0,skill_get_time2(skill_id, skill_lv));

    Add:
    sc_start(src, src, SC_FIREWEAPON, 100, skill_lv, skill_get_time2(skill_id, skill_lv));

    So it looks like:

    case SM_MAGNUM:
    ...
    sc_start4(src,src,SC_WATK_ELEMENT,100,3,20,0,0,skill_get_time2(skill_id, skill_lv));
    sc_start(src, src, SC_FIREWEAPON, 100, skill_lv, skill_get_time2(skill_id, skill_lv));

    Re-compile server and try it!

  11. Hello everyone, hope you are safe during these times.

    I want to modify clif_item_skill(sd, auto_skill_id, auto_skill_lv) so it can accept skills that are not learned by the user, since Clif Item Skill can only use skills that are learned by the user.

    This clif is used by Abracadabra (Hocus-pocus) and I would like to create a new ability which will use a skill that is not learned by the user.

    Any idea how to modify it so it can launch/use skills that are not learned by the player?
    Thanks in advance!

  12. Hello, back to this old post again.
    Now I seek to make it so users are able to autoattack a specific monster ID, as JulianChz suggested:

    On 5/22/2017 at 8:24 AM, JuLiAnChz said:

     

    
    static int buildin_autoattack_sub(struct block_list *bl, va_list ap) {
    	int *target_id = va_arg(ap, int *);
    	*target_id = bl->id;
    	struct mob_data* *md2 = va_arg(ap, struct mob_data* *);
    	*md2 = BL_CAST(BL_MOB, bl);
    	return 1;
    }
    
    void autoattack_motion(struct map_session_data* sd, int mob_id){
    	int i, target_id;
    	struct mob_data* md2;
    	
    	for (i = 0;i <= 9;i++) {
    		target_id = 0;
    		map_foreachinarea(buildin_autoattack_sub, sd->bl.m, sd->bl.x - i, sd->bl.y - i, sd->bl.x + i, sd->bl.y + i, BL_MOB, &target_id, &md2);
    		if (target_id) {
    			if (mob_id != 0 && mob_id == md2->mob_id) {
    				unit_attack(&sd->bl, target_id, 1);
    			} else if (mob_id == 0) {
    				unit_attack(&sd->bl, target_id, 1);
    			} else {
    				target_id = 0;
    			}
    			break;
    		}
    		target_id = 0;
    	}
    	if (!target_id) {
    		unit_walktoxy(&sd->bl, sd->bl.x + (rand() % 2 == 0 ? -1 : 1)*(rand() % 10), sd->bl.y + (rand() % 2 == 0 ? -1 : 1)*(rand() % 10), 0);
    	}
    	return;
    }
    
    int autoattack_timer(int tid, unsigned int tick, int id, intptr_t data) {
    	struct map_session_data *sd = NULL;
    	int mob_id = (int *)data;
    	sd = map_id2sd(id);
    
    	if (sd == NULL)
    		return 0;
    	if (sd->sc.option & OPTION_AUTOATTACK) {
    		autoattack_motion(sd, mob_id);
    		add_timer(gettick() + 1000, autoattack_timer, sd->bl.id, (intptr_t)mob_id);
    	}
    	return 0;
    }
    ACMD_FUNC(autoattack) {
    	nullpo_retr(-1, sd);
    	int mob_id = 0;
    	char monster[NAME_LENGTH];
    
    	memset(monster, '\0', sizeof(monster));
    	
    	if (message || *message) {
    		if (sscanf(message, "%23s", monster) > 0) {
    			if ((mob_id = mobdb_searchname(monster)) == 0)
    				mob_id = mobdb_checkid(atoi(monster));
    			
    			if (mob_id == 0) {
    				clif_displaymessage(fd, msg_txt(sd, 40)); // Invalid monster ID or name.
    				return -1;
    			}
    		}
    	}
    
    	if (sd->sc.option & OPTION_AUTOATTACK) {
    		sd->sc.option &= ~OPTION_AUTOATTACK;
    		unit_stop_attack(&sd->bl);
    		clif_displaymessage(fd, "Has desactivado AutoAtaque");
    	} else {
    		sd->sc.option |= OPTION_AUTOATTACK;
    		add_timer(gettick() + 200, autoattack_timer, sd->bl.id, (intptr_t)mob_id);
    		clif_displaymessage(fd, "Has Activado AutoAtaque");
    	}
    	clif_changeoption(&sd->bl);
    	return 0;
    }

    @autoattack - All
    @autoattack poring - Only poring
    @autoattack 1002 - Only poring

    Problem is I can't make it work due to two different lines. My basic autoattack command (without specific mob ID) works like:

    static TIMER_FUNC(autoattack_timer)
    {
    	struct map_session_data *sd=NULL;
    	int mob_id = data;
    	sd=map_id2sd(id);
    	...

    while Julian's is:

    int autoattack_timer(int tid, unsigned int tick, int id, intptr_t data) {
    	struct map_session_data *sd = NULL;
    	int mob_id = (int *)data;
    	sd = map_id2sd(id);
    	...

    If I change my code to int autoattack_timer(int tid, unsigned int tick, int id, intptr_t data), the code won't run in my rAthena, forcing me to use TIMER_FUNC as LearningRO suggested (works).

    Is there any way to obtain the intptr_t data variable through a static TIMER_FUNC ?

    Thanks in advance!

×
×
  • Create New...