Jump to content

malufett

Members
  • Posts

    554
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by malufett

  1. here I'll give you a clue..

    
    /*==========================================
    * Does cast-time reductions based on dex, item bonuses and config setting
    *------------------------------------------*/
    int skill_castfix (struct block_list *bl, int skill_id, int skill_lv) {
    int time = skill_get_cast(skill_id, skill_lv);
    
    nullpo_ret(bl);
    #ifndef RENEWAL_CAST
    {
    	struct map_session_data *sd;
    
    	sd = BL_CAST(BL_PC, bl);
    
    	// calculate base cast time (reduced by dex)
    	if( !(skill_get_castnodex(skill_id, skill_lv)&1) ) {
    		int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
    		if( scale > 0 )	// not instant cast
    			time = time * scale / battle_config.castrate_dex_scale;
    		else
    			return 0;	// instant cast
    	}
    
    	// calculate cast time reduced by item/card bonuses
    	if( !(skill_get_castnodex(skill_id, skill_lv)&4) && sd )
    	{
    		int i;
    		if( sd->castrate != 100 )
    			time = time * sd->castrate / 100;
    		for( i = 0; i < ARRAYLENGTH(sd->skillcast) && sd->skillcast[i].id; i++ )
    		{
    			if( sd->skillcast[i].id == skill_id )
    			{
    				time+= time * sd->skillcast[i].val / 100;
    				break;
    			}
    		}
    	}
    
    }
    #endif
    // config cast time multiplier
    if (battle_config.cast_rate != 100)
    	time = time * battle_config.cast_rate / 100;
    // return final cast time
    return (time > 0) ? time : 0;
    }
    

    and sorry I can't do it for you right now.. :)

    :meow:

    • Upvote 1
  2. Hi fellows..

    Regarding this one: post:137564

    can we make it something like Aegis format??

    // Mob Type:
    // 0x0 All type
    // 0x1 Demi-Human
    //
    // Type:
    // 0=exp, 1=mvpexp, 2=drop, 3=mvpdrop
    //Type, Mob Type, Level Diffirence, Rate
    1, 0x0, 10, 100
    

    And can we add some custom stuffs..like mob type(just an example)..please suggest if you want other customs/features to be included..

    Thanks..

    :meow:

    • Upvote 1
  3. nope we don't have..but you can add it by your own..

    @script.c

    BUILDIN_FUNC(issitting)
    {
    TBL_PC* sd;
    
    sd = script_rid2sd(st);
    if( sd == NULL )
    	return 0;// no player attached, report source
    
    if( pc_issit(sd) )
    	script_pushint(st, 1);
    else
    	script_pushint(st, 0);
    
    return 0;
    }

    BUILDIN_DEF(issitting,""),

    :meow:

    • Upvote 1
  4. there are many ways to have an instant cast..

    Option 1 set your server to pre-casting by commenting this line @ renewal.h

    /// renewal cast time
    /// (disable by commenting the line)
    ///
    /// leave this line to enable renewal casting time algorithms
    /// cast time is decreased by DEX * 2 + INT while 20% of the cast time is not reduced by stats.
    /// example:
    ///  on a skill whos cast time is 10s, only 8s may be reduced. the other 2s are part of a
    ///  "fixed cast time" which can only be reduced by specialist items and skills
    #define RENEWAL_CAST

    then set your desire value for this config

    // At what dex does the cast time become zero (instacast)?
    castrate_dex_scale: 150

    Option 2 if you want to use renewal casting but there is a chance to have an instant cast

    then edit this in your config to your desire value

    // How much (dex*2+int) does variable cast turns zero?
    
    vcast_stat_scale: 530

    and edit your skill_cast_db by setting -1 to all skills you want to have an instant cast when it reaches the value you set..

    // Structure of Database:

    // SkillID,CastingTime,AfterCastActDelay,AfterCastWalkDelay,Duration1,Duration2,Cool Down,Fixed Casting Time

    example:

    //-- MG_STONECURSE 16,1000,0,0,5000,20000,0,-1

    :meow:

  5. tmp_item.card[1]=((sc*5)<<8)+ele;

    this value holds the star crumb flag and the element..and it was bit shifted to hold multiply value..

    btw this is the part where it was disassemble

    if(sd->status.inventory[index].card[0]==CARD0_FORGE)
    { // Forged weapon
        wd->star += (sd->status.inventory[index].card[1]>>8);
        if(wd->star >= 15) wd->star = 40; // 3 Star Crumbs now give +40 dmg
        if(pc_famerank(MakeDWord(sd->status.inventory[index].card[2],sd->status.inventory[index].card[3]) ,MAPID_BLACKSMITH))
             wd->star += 10;
    
        if (!wa->ele) //Do not overwrite element from previous bonuses.
             wa->ele = (sd->status.inventory[index].card[1]&0x0f);
    }

    :meow:

  6. this one checks what stone is used so it can determined its element..

    @skill.c

    	for(i=0,sc=0,ele=0;i<3;i++){ //Note that qty should always be one if you are using these!
    	int j;
    	if( slot[i]<=0 )
    		continue;
    	j = pc_search_inventory(sd,slot[i]);
    	if(j < 0)
    		continue;
    	if(slot[i]==1000){	/* Star Crumb */
    		pc_delitem(sd,j,1,1,0,LOG_TYPE_PRODUCE);
    		sc++;
    	}
    	if(slot[i]>=994 && slot[i]<=997 && ele==0){	/* Flame Heart . . . Great Nature */
    		static const int ele_table[4]={3,1,4,2};
    		pc_delitem(sd,j,1,1,0,LOG_TYPE_PRODUCE);
    		ele=ele_table[slot[i]-994];
    	}
    }

    so the output are the ele(element of the forged item) & sc(damage bonus from star crumb) variable..

    :meow:

×
×
  • Create New...