Jump to content

Haziel

Content Moderator
  • Posts

    639
  • Joined

  • Last visited

  • Days Won

    90

Posts posted by Haziel

  1. não é a pasta que vc tem que substituir , é o banco de dados dos monstros .. mob_db , porem se colocar o do brA, terá de mudar como lê , e por assim vai.

    Mudar o DB não muda o nome dado pelos Spawns, à não ser em spawns que estejam com --en--, como não é o caso dos arquivos padrão, então sim, tem que substituir a pasta se for só para mudar os nomes.

    Porém, por algum motivo, o brAthena está com os Spawns em Inglês também, devem ter implementado o modo re/pre-re do rAthena e ainda não retraduziram.

  2. Well, it depends HOW you want to do this.
    If you want only one to be summoned at a time, It's fairly simple:

    @summon <monster name/ID> {<duration>}
    
    Spawns mobs that treat you as their master.
    If a duration is specified, they will stay with you until the duration has ended.
    

    @summon has a duration field (in minutes), once you set it on item usage, you just need to put a delay on Item with the same duration the monster lasts.
    You can edit Item Delays on db/(pre-)re/item_delay.txt.

    If it's not what you wnat, be more specific, there's other ways to do it.

     

  3. Ok, forget all I did before, please revert the diffs.

    The problem is, after reading part of the source, I was led to believe that that 'signature' with the name of the char was read by the checks as an EQP_COSTUME_HEAD_TOP, EQP_COSTUME_HEAD_MID, EQP_COSTUME_HEAD_LOW or EQP_COSTUME_GARMENT. That's not true.

    So, let's do it pretty easily.
    First of all, there's the case of WHICH diff are you using. I'm currently using rAmod, but I'll assume you're using this diff.

    If so, yet on src/map/pc.c, find the function pc_isequip, I'll guide myself by the one Fantastik posted.

    /*=================================================
     * Checks if the player can equip the item at index n in inventory.
     * @param sd
     * @param n Item index in inventory
     * @return ITEM_EQUIP_ACK_OK(0) if can be equipped, or ITEM_EQUIP_ACK_FAIL(1)/ITEM_EQUIP_ACK_FAILLEVEL(2) if can't
     *------------------------------------------------*/
    uint8 pc_isequip(struct map_session_data *sd,int n)
    {
    	struct item_data *item;
    
    	nullpo_retr(ITEM_EQUIP_ACK_FAIL, sd);
    
    	item = sd->inventory_data[n];
    
    	if(pc_has_permission(sd, PC_PERM_USE_ALL_EQUIPMENT))
    		return ITEM_EQUIP_ACK_OK;
    
    	if(item == NULL)
    		return ITEM_EQUIP_ACK_FAIL;
    	if(item->elv && sd->status.base_level < (unsigned int)item->elv)
    		return ITEM_EQUIP_ACK_FAILLEVEL;
    	if(item->elvmax && sd->status.base_level > (unsigned int)item->elvmax)
    		return ITEM_EQUIP_ACK_FAILLEVEL;
    	if(item->sex != 2 && sd->status.sex != item->sex)
    		return ITEM_EQUIP_ACK_FAIL;
    
    	if (sd->sc.count) {
    		if(item->equip & EQP_ARMS && item->type == IT_WEAPON && sd->sc.data[SC_STRIPWEAPON]) // Also works with left-hand weapons [DracoRPG]
    			return ITEM_EQUIP_ACK_FAIL;
    		if(item->equip & EQP_SHIELD && item->type == IT_ARMOR && sd->sc.data[SC_STRIPSHIELD])
    			return ITEM_EQUIP_ACK_FAIL;
    		if(item->equip & EQP_ARMOR && sd->sc.data[SC_STRIPARMOR])
    			return ITEM_EQUIP_ACK_FAIL;
    		if(item->equip & EQP_HEAD_TOP && sd->sc.data[SC_STRIPHELM])
    			return ITEM_EQUIP_ACK_FAIL;
    		if(item->equip & EQP_ACC && sd->sc.data[SC__STRIPACCESSORY])
    			return ITEM_EQUIP_ACK_FAIL;
    		if(item->equip && sd->sc.data[SC_KYOUGAKU])
    			return ITEM_EQUIP_ACK_FAIL;
    
    		if (sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_SUPERNOVICE) {
    			//Spirit of Super Novice equip bonuses. [Skotlex]
    			if (sd->status.base_level > 90 && item->equip & EQP_HELM)
    				return ITEM_EQUIP_ACK_OK; //Can equip all helms
    			
    			//if (sd->status.base_level > 96 && item->equip & EQP_ARMS && item->type == IT_WEAPON && item->wlv == 4)
    			if (sd->status.base_level > 96 && item->equip & EQP_ARMS && item->type == IT_WEAPON) // Modificado 17/09/2015
    				switch(item->look) { //In weapons, the look determines type of weapon.
    					case W_DAGGER: //All level 4 - Daggers
    					case W_1HSWORD: //All level 4 - 1H Swords
    					case W_1HAXE: //All level 4 - 1H Axes
    					case W_MACE: //All level 4 - 1H Maces
    					case W_STAFF: //All level 4 - 1H Staves
    					case W_2HSTAFF: //All level 4 - 2H Staves
    						return ITEM_EQUIP_ACK_OK;
    				}
    		}
    	}
    
    	//fail to equip if item is restricted
    	if (!battle_config.allow_equip_restricted_item && itemdb_isNoEquip(item, sd->bl.m))
    		return ITEM_EQUIP_ACK_FAIL;
    
    	//Not equipable by class. [Skotlex]
    	if (!(1<<(sd->class_&MAPID_BASEMASK)&item->class_base[(sd->class_&JOBL_2_1)?1:((sd->class_&JOBL_2_2)?2:0)]))
    		return ITEM_EQUIP_ACK_FAIL;
    	
    	if (!pc_isItemClass(sd,item))
    		return ITEM_EQUIP_ACK_FAIL;
    
    	return ITEM_EQUIP_ACK_OK;
    }
    

    So, find this fragment:

    	struct item_data *item;
    
    	nullpo_ret(sd);
    
    	item = sd->inventory_data[n];
    

    And turn into this:

    	struct item equip;	
    	struct item_data *item;
    	int char_id = 0;
    	
    	nullpo_ret(sd);
    
    	equip = sd->status.inventory[n];
    	item = sd->inventory_data[n];
    

    So we can get the important info, which is, if the item has a signature (I don't know how you name it, I'm talking about the name that appears when someone produce an Item, in costume itens it appears Costume in blue), and, if so, if it's the name of the Reserved Char ID for it.

    So, now the function.
    Now, find this fragment:

        if(item == NULL)
            return false;
    

    And, just below it, paste this check:

    	if( equip.card[0] == CARD0_CREATE ){
    		char_id = MakeDWord(equip.card[2],equip.card[3]);
    		if( battle_config.reserved_costume_id && char_id == battle_config.reserved_costume_id)
    			return true;
    	}	
    

    I hope all the functions needed exists on your Costume Snippet.
    This one was tested, but I did it on rAmod, so don't know exactly the differences.

  4. Also, found an error on my suggestion, tho, the Garment Item as with a typo, edited my previous answer.
    Just change all EQP_COSTUME_HEAD_GARMENT to EQP_COSTUME_GARMENT, look if the problem persists.

    About the weight, maybe, on src/map/pc.c find:

    	sd->weight += w;
    	clif_updatestatus(sd,SP_WEIGHT);
    

    And try:

    if (!item->equip & EQP_COSTUME_HEAD_TOP && !item->equip & EQP_COSTUME_HEAD_MID && !item->equip & EQP_COSTUME_HEAD_LOW && !item->equip & EQP_COSTUME_GARMENT){
    	sd->weight += w;
    	clif_updatestatus(sd,SP_WEIGHT);
    }
    
  5. If I recall correctly, a logarithm is the calculation about which exponent a base must be raised to reach a value.
    If I also recall correctly, there is not a in-built function which calculates that, so, you need a Custom Function.

    I made this one:

    prontera,150,150,3	script	Test#log	420,{
    	mes "" + callfunc("Logarithim",10,10000) + "";
    	close;
    }
    	
    function	script	Logarithim	{
    	set @basis, getarg(0);
    	set @value, getarg(1);
    	
    	set @m, @basis;
    	for (set @n, 2; @m < @value; set @n, @n + 1){
    		for (set @o, 1; @o < @n; set @o, @o + 1){
    			set @m, @m * @basis;	
    		}
    		if (@m == @value)
    			return @n;
    		else if (@m > @value)
    			return (@n - 1);
    		else 
    			set @m, @basis;
    	}
    	return 0;
    }
    
    
    

    It's just a scratch and I don't know if it works perfectly.

    By the way, you can enter an basis and a target value, it will returns either the correct Logarithim or the closest one.

  6. Dunno, the patch you're using, so, I'll assume it's similar to eAmod one, which converts the signed items to real Costume Itens for the Source eyes.

     

    So, the fuction you're looking for is on src/map/pc.c.

    /*=================================================
     * Checks if the player can equip the item at index n in inventory.
     * @param sd
     * @param n Item index in inventory
     * @return ITEM_EQUIP_ACK_OK(0) if can be equipped, or ITEM_EQUIP_ACK_FAIL(1)/ITEM_EQUIP_ACK_FAILLEVEL(2) if can't
     *------------------------------------------------*/
    uint8 pc_isequip(struct map_session_data *sd,int n)
    {
    	struct item_data *item;
    
    	nullpo_retr(ITEM_EQUIP_ACK_FAIL, sd);
    
    	item = sd->inventory_data[n];
    
    	if(pc_has_permission(sd, PC_PERM_USE_ALL_EQUIPMENT))
    		return ITEM_EQUIP_ACK_OK;
    
    	if(item == NULL)
    		return ITEM_EQUIP_ACK_FAIL;
    	if(item->elv && sd->status.base_level < (unsigned int)item->elv)
    		return ITEM_EQUIP_ACK_FAILLEVEL;
    	if(item->elvmax && sd->status.base_level > (unsigned int)item->elvmax)
    		return ITEM_EQUIP_ACK_FAILLEVEL;
    	if(item->sex != 2 && sd->status.sex != item->sex)
    		return ITEM_EQUIP_ACK_FAIL;
    
    	if (sd->sc.count) {
    		if(item->equip & EQP_ARMS && item->type == IT_WEAPON && sd->sc.data[SC_STRIPWEAPON]) // Also works with left-hand weapons [DracoRPG]
    			return ITEM_EQUIP_ACK_FAIL;
    		if(item->equip & EQP_SHIELD && item->type == IT_ARMOR && sd->sc.data[SC_STRIPSHIELD])
    			return ITEM_EQUIP_ACK_FAIL;
    		if(item->equip & EQP_ARMOR && sd->sc.data[SC_STRIPARMOR])
    			return ITEM_EQUIP_ACK_FAIL;
    		if(item->equip & EQP_HEAD_TOP && sd->sc.data[SC_STRIPHELM])
    			return ITEM_EQUIP_ACK_FAIL;
    		if(item->equip & EQP_ACC && sd->sc.data[SC__STRIPACCESSORY])
    			return ITEM_EQUIP_ACK_FAIL;
    		if(item->equip && sd->sc.data[SC_KYOUGAKU])
    			return ITEM_EQUIP_ACK_FAIL;
    
    		if (sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_SUPERNOVICE) {
    			//Spirit of Super Novice equip bonuses. [Skotlex]
    			if (sd->status.base_level > 90 && item->equip & EQP_HELM)
    				return ITEM_EQUIP_ACK_OK; //Can equip all helms
    			
    			//if (sd->status.base_level > 96 && item->equip & EQP_ARMS && item->type == IT_WEAPON && item->wlv == 4)
    			if (sd->status.base_level > 96 && item->equip & EQP_ARMS && item->type == IT_WEAPON) // Modificado 17/09/2015
    				switch(item->look) { //In weapons, the look determines type of weapon.
    					case W_DAGGER: //All level 4 - Daggers
    					case W_1HSWORD: //All level 4 - 1H Swords
    					case W_1HAXE: //All level 4 - 1H Axes
    					case W_MACE: //All level 4 - 1H Maces
    					case W_STAFF: //All level 4 - 1H Staves
    					case W_2HSTAFF: //All level 4 - 2H Staves
    						return ITEM_EQUIP_ACK_OK;
    				}
    		}
    	}
    
    	//fail to equip if item is restricted
    	if (!battle_config.allow_equip_restricted_item && itemdb_isNoEquip(item, sd->bl.m))
    		return ITEM_EQUIP_ACK_FAIL;
    
    	//Not equipable by class. [Skotlex]
    	if (!(1<<(sd->class_&MAPID_BASEMASK)&item->class_base[(sd->class_&JOBL_2_1)?1:((sd->class_&JOBL_2_2)?2:0)]))
    		return ITEM_EQUIP_ACK_FAIL;
    	
    	if (!pc_isItemClass(sd,item))
    		return ITEM_EQUIP_ACK_FAIL;
    
    	return ITEM_EQUIP_ACK_OK;
    }
    

    There is a check for every limitation on equip a player may have.

    So, what you need to do is edit:

    if(item->elv && sd->status.base_level < (unsigned int)item->elv)
    		return ITEM_EQUIP_ACK_FAILLEVEL;
    

    And

    //Not equipable by class. [Skotlex]
    if (!(1<<(sd->class_&MAPID_BASEMASK)&item->class_base[(sd->class_&JOBL_2_1)?1:((sd->class_&JOBL_2_2)?2:0)]))
    	return ITEM_EQUIP_ACK_FAIL;
    

    So they ignore this restriction if the item is a costume.

    I GUESS adding this check to each If you want to ignore, may do the trick:

    && (!item->equip & EQP_COSTUME_HEAD_TOP && !item->equip & EQP_COSTUME_HEAD_MID && !item->equip & EQP_COSTUME_HEAD_LOW && !item->equip & EQP_COSTUME_GARMENT)
    

    Like:

    if(item->elv && sd->status.base_level < (unsigned int)item->elv && (!item->equip & EQP_COSTUME_HEAD_TOP && !item->equip & EQP_COSTUME_HEAD_MID && !item->equip & EQP_COSTUME_HEAD_LOW && !item->equip & EQP_COSTUME_GARMENT))
    	return ITEM_EQUIP_ACK_FAILLEVEL;
    

    And:

    if (!(1<<(sd->class_&MAPID_BASEMASK)&item->class_base[(sd->class_&JOBL_2_1)?1:((sd->class_&JOBL_2_2)?2:0)]) 	&& (!item->equip & EQP_COSTUME_HEAD_TOP && !item->equip & EQP_COSTUME_HEAD_MID && !item->equip & EQP_COSTUME_HEAD_LOW && !item->equip & EQP_COSTUME_GARMENT))
    	return ITEM_EQUIP_ACK_FAIL;
    

    I only figured a way to do it it's UNTESTED, try it at YOUR OWN RISK.

  7. First of all, get your data files here: here.

    Question #1:
    Update your data, you're using wrong msgstringtable.txt.

     

    Question #2:

    If you used /showname and it doesn't change, you need to reDiff your Client properly, also enabling /showname.

     

    Question #3:

    About the pink circle, it's because the item was the newest added to your inventory.

    About your Sprite Error:
    Man, look at your own screens, your file names, you did put them on wrong folder...

    Look:
    QNKHDPt.png

    ¿© folder and ³² files!

    • Upvote 1
  8. Problem #1:
    This only occurs with this item? If so, post the Item Script, please.

     

    Problem #2:

    Use /showname.

     

    Problem #3:
    If your NPC is not casting errors on console, check on .conf files (scripts_custom.conf in example) if it's name is listed correctly to be load when the server starts.

  9. The Screenshots are unclear, and maybe, 1 hour can be a little much and broke the Script.
    My config is set to 15s and it's working properly.

    // Time in milliseconds to activate protection against Kill Steal
    // Set to 0 to disable it.
    // If this is activated and a player is using @noks, damage from others players (KS) not in the party
    // will be reduced to 0.
    ksprotection: 15000
    
  10. Always organize the script before putting it into one line.

    bonus bAllStats,5; bonus bdef,5; bonus2 bSubRace,RC_DemiHuman,12; bonus2 bAddRace,RC_DemiHuman,5; bonus bDelayRate,-20; if(BaseJob == Job_Bard) bonus3 bAutoSpell,"CG_ARROWVULCAN","CG_TAROTCARD",5','100; skill "DC_DONTFORGETME",1; else if(BaseJob == Job_Dancer) bonus3 bAutoSpell,"CG_ARROWVULCAN","CG_TAROTCARD",5,100; bonus bBaseAtk,(JobLevel*2)/7; skill "BA_POEMBRAGI",1;
    

    First part:

    	bonus bAllStats,5; 
    	bonus bdef,5; 
    	bonus2 bSubRace,RC_DemiHuman,12; 
    	bonus2 bAddRace,RC_DemiHuman,5; 
    	bonus bDelayRate,-20;
    

    Appears to be okay, nothing wrong.

    Second part:

    if(BaseJob == Job_Bard) 
    	bonus3 bAutoSpell,"CG_ARROWVULCAN","CG_TAROTCARD",5','100; 
    	skill "DC_DONTFORGETME",1;
    

    If you're putting more than one command inside an If, you must put { }.

    By the way:

    bonus3 bAutoSpell,"CG_ARROWVULCAN","CG_TAROTCARD",5,100;
    

    If I recall correctly, if you will make more than one skill to activate when he character hit, you need to put one line for each.

    bonus3 bAutoSpell,"CG_ARROWVULCAN",10,100; //I presume you wanted to put it level 10
    bonus3 bAutoSpell,"CG_TAROTCARD",5,100;
    

    So, this block would be:

    if(BaseJob == Job_Bard){ 
    	bonus3 bAutoSpell,"CG_ARROWVULCAN",10,100; 
    	bonus3 bAutoSpell,"CG_TAROTCARD",5,100; 
    	skill "DC_DONTFORGETME",1;
    }
    

    Now, the final block:

    else if(BaseJob == Job_Dancer) 
    	bonus3 bAutoSpell,"CG_ARROWVULCAN","CG_TAROTCARD",5,100; 
    	bonus bBaseAtk,(JobLevel*2)/7; 
    	skill "BA_POEMBRAGI",1;
    

    Same errors made before.
    The result should be:

    else if(BaseJob == Job_Dancer){
    	bonus3 bAutoSpell,"CG_ARROWVULCAN",10,100;
    	bonus3 bAutoSpell,"CG_TAROTCARD",5,100;
    	bonus bBaseAtk,(JobLevel*2)/7; 
    	skill "BA_POEMBRAGI",1;
    }
    

    No, as a result, the final Script may be:

    	bonus bAllStats,5; 
    	bonus bdef,5; 
    	bonus2 bSubRace,RC_DemiHuman,12; 
    	bonus2 bAddRace,RC_DemiHuman,5; 
    	bonus bDelayRate,-20;
    	
    	if(BaseJob == Job_Bard){ 
    		bonus3 bAutoSpell,"CG_ARROWVULCAN",10,100; 
    		bonus3 bAutoSpell,"CG_TAROTCARD",5,100; 
    		skill "DC_DONTFORGETME",1;
    	} else if(BaseJob == Job_Dancer){
    		bonus3 bAutoSpell,"CG_ARROWVULCAN",10,100;
    		bonus3 bAutoSpell,"CG_TAROTCARD",5,100;
    		bonus bBaseAtk,(JobLevel*2)/7; 
    		skill "BA_POEMBRAGI",1;
    	}
    

    In one line:

    bonus bAllStats,5; bonus bdef,5; bonus2 bSubRace,RC_DemiHuman,12; bonus2 bAddRace,RC_DemiHuman,5; bonus bDelayRate,-20; if(BaseJob == Job_Bard){ bonus3 bAutoSpell,"CG_ARROWVULCAN",10,100; bonus3 bAutoSpell,"CG_TAROTCARD",5,100; skill "DC_DONTFORGETME",1; } else if(BaseJob == Job_Dancer){ 	bonus3 bAutoSpell,"CG_ARROWVULCAN",10,100; bonus3 bAutoSpell,"CG_TAROTCARD",5,100; bonus bBaseAtk,(JobLevel*2)/7; skill "BA_POEMBRAGI",1; }
    

    And on Item Script:

    20091,Dark_Valkyrie_Helm,Dark Valkyrie Helm,5,10000,,10,,10,,1,0xFFFFFFFF,7,2,256,,0,1,1091,{ bonus bAllStats,5; bonus bdef,5; bonus2 bSubRace,RC_DemiHuman,12; bonus2 bAddRace,RC_DemiHuman,5; bonus bDelayRate,-20; if(BaseJob == Job_Bard){ bonus3 bAutoSpell,"CG_ARROWVULCAN",10,100; bonus3 bAutoSpell,"CG_TAROTCARD",5,100; skill "DC_DONTFORGETME",1; } else if(BaseJob == Job_Dancer){ bonus3 bAutoSpell,"CG_ARROWVULCAN",10,100; bonus3 bAutoSpell,"CG_TAROTCARD",5,100; bonus bBaseAtk,(JobLevel*2)/7; skill "BA_POEMBRAGI",1; } },{},{}
    
    

    Mother of Odin.

  11. On src/map/pc.c.
    There's a function that grants or take the Transcedent Classes' Bonus when a non-Trans turn into Trans and vice-versa.

    	// Give or reduce transcendent status points
    	if( (b_class&JOBL_UPPER) && !(sd->class_&JOBL_UPPER) ){ // Change from a non t class to a t class -> give points
    		sd->status.status_point += battle_config.transcendent_status_points;
    		clif_updatestatus(sd,SP_STATUSPOINT);
    	}else if( !(b_class&JOBL_UPPER) && (sd->class_&JOBL_UPPER) ){ // Change from a t class to a non t class -> remove points
    		if( sd->status.status_point < battle_config.transcendent_status_points ){
    			// The player already used his bonus points, so we have to reset his status points
    			pc_resetstate(sd);
    		}
    		sd->status.status_point -= battle_config.transcendent_status_points;
    		clif_updatestatus(sd,SP_STATUSPOINT);
    	}
    

    The answer for your task may be there, try to modify, disable or comment it.

  12. Well, the Max Party Members is not located in .conf files at the momment.

    It's on src/common/mmo.h

    #define MAX_PARTY 12 ///Max party member
    

    Remember to recompile it after.

    Also, the Share Level Cap is setted in conf/inter_athena.conf.

    // Level range for sharing within a party
    party_share_level: 10
    

    By the way, both your questions could be answered using the Search Tool, like here, here, here, here and here, try it next time.

  13. You need to edit the source in order to refresh the effect once you change from one map to another.
    I don't remember exactly the fragment where it can be set, but that's the way.

    I guess that usually the Client-Side take care of keeping the effect active while the SC is active, but, since it's a Custom Skill, a Custom Function will be needed.
    The easy way is do that with Scripts, using OnPCMapLoadEvent, but it's a McGyver, not a real solution.

  14. Sorry, but, you're absolutely not being clear.
    You said, first, that your problem is the Icon doesn't change.

    Icon is only related to Client-Side once a proper ID is given to Skill.
    Editions on skillid.lub, skilldescript.lub and skillinfolist.lub are needed for the Icon to show.

    Now if this is settled and you have a new problem, please, be more specific.

×
×
  • Create New...