Jump to content

Gidz Cross

Members
  • Posts

    646
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by Gidz Cross

  1. It depends. First of. How many int your bragi requires for it to use its full potential? To save time and replies. Here's what i did on my Poem of Bragi.

     

    	case BA_POEMBRAGI:
    		val1 = 3 * skill_lv + status->dex / 10; // Casting time reduction
    		//For some reason at level 10 the base delay reduction is 50%.
    		val2 = (skill_lv < 10 ? 3 * skill_lv : 100) + status->int_; // After-cast delay reduction need 100 INT [Gidz]

    I made it like that so my Bard/Clown only needs to put 100 int to use POB's full potential.

    • Like 1
  2. 53 minutes ago, YHWH said:

     

    which one?


    Your kafra cutin (and all other kafra you got there).

    image.png.0382d52d3c204526732c02f79a14d327.png

    *Edit

    NVM. I have found it. Anyway please revert back any changes you made for kafra.
    functions_kafras.txt -- This is the default kafra function

     If you are in payon you should see Prontera, Alberta and Morocc

    	} else if (.@map$ == "payon") {
    		setarray @wrpD$[0], "Prontera", "Alberta", "Morocc";
    		setarray @wrpP[0], 1200, 1200, 1200;

     

    • Love 1
  3. On 5/31/2023 at 10:22 PM, BabaVoss said:

    Hello good day, can i ask for help.
    can you pls add town mapflag to this script pls thaank you
     

    if (sd->sc.option & (OPTION_HIDE | OPTION_CLOAK | OPTION_CHASEWALK) || sd->special_state.perfect_hiding || map_flag_gvg(sd->bl.m)) {

     

    if (sd->sc.option & (OPTION_HIDE | OPTION_CLOAK | OPTION_CHASEWALK) || sd->special_state.perfect_hiding || map_flag_gvg(sd->bl.m) || !map_getmapflag(sd->bl.m, MF_TOWN) {

    • Love 1
  4. 10 hours ago, Litro Endemic said:

    that because current pvp ranking system has it own point rank logic.

    suppose there is 2 player A & B currently in pvp map so the flow should go like..
     

    - player A 5 point, rank 2/2
    - player B 5 point, rank 2/2
    - player A kill player B
    - player A 6 (5 + 1) point, rank 1/2
    - player B 4 (5 - 1) point, rank 2/2
    - player B warp out then goes back
    - player A 6 point, rank 1/2
    - player B 5 point, rank 2/2
    - player B kill player A
    - player B 6 (5 + 1) point, rank 1/2
    - player A 4 (5 - 1) point, rank 2/2
    - player A warp out then goes back
    - player B 6 point, rank 1/2
    - player A 5 point, rank 2/2

    anyway you can debug the code, to see the point acquired by player on map.
     

    /*==========================================
     * Update PVP rank for sd1 in cmp to sd2
     *------------------------------------------*/
    static int pc_calc_pvprank_sub(struct block_list *bl,va_list ap)
    {
    	map_session_data *sd1,*sd2;
    
    	sd1=(map_session_data *)bl;
    	sd2=va_arg(ap,map_session_data *);
    
    	if( pc_isinvisible(sd1) || pc_isinvisible(sd2) )
    	{// cannot register pvp rank for hidden GMs
    		return 0;
    	}
    
    +	ShowDebug("pc_calc_pvprank_sub: player %s (%d:%d) %d pvp point.\n", sd1->status.name, sd1->status.account_id, sd1->status.char_id, sd1->pvp_point);
    +
    	if( sd1->pvp_point > sd2->pvp_point )
    		sd2->pvp_rank++;
    	return 0;
    }
    /*==========================================
     * Calculate new rank beetween all present players (map_foreachinallarea)
     * and display result
     *------------------------------------------*/
    int pc_calc_pvprank(map_session_data *sd)
    {
    	int old = sd->pvp_rank;
    	struct map_data *mapdata = map_getmapdata(sd->bl.m);
    
    +	ShowDebug("pc_calc_pvprank: player %s (%d:%d) %d pvp point.\n", sd->status.name, sd->status.account_id, sd->status.char_id, sd->pvp_point);
    +
    	sd->pvp_rank=1;
    	map_foreachinmap(pc_calc_pvprank_sub,sd->bl.m,BL_PC,sd);
    	if(old!=sd->pvp_rank || sd->pvp_lastusers!=mapdata->users_pvp)
    		clif_pvpset(sd,sd->pvp_rank,sd->pvp_lastusers=mapdata->users_pvp,0);
    	return sd->pvp_rank;
    }

     

    though its bit weird pvp rank timer is allocated to each player in map instead run like dynamic mob,
    i mean the timer attached to map will run when there is player come to map (clif_parse_LoadEndAck ?)
    and stop when there is no one in map.

    albeit it will send 2 times the rank packet (clif_pvpset) when player come to map and timer executed at same time, but it should be no biggie.

     

    Oh or try use client command "/pvpinfo" in each player client to see current point, since rank is based point.

     

    Wow. Thank you so much for these new information.

  5. I have managed to solved the ranking issue but i think its quite yet missing something. But it works (partially).

    Scenario:
    Me kills Player 2. The Player 2 Rank will become 2/2. Warp out then goes back then the same ranking shown 2/2. But when player 2 killed me. The player 2 rank will becomes 1/2. That means the player 2 is in Rank 1 for pvp in that specific map. But when i go back to savepoint then re warp to the same map the player 2 ranking will become 2/2 when my account becomes 1/2.

    Here's what i did to make the ranking works in pk_mode: 1 (conf/misc)

    in pc.c

    	// disable certain pvp functions on pk_mode [Valaris]
    	//if( !battle_config.pk_mode && mapdata->flag[MF_PVP] && !mapdata->flag[MF_PVP_NOCALCRANK] ) {
    		sd->pvp_point -= 5;
    		sd->pvp_lost++;
    		if( src && src->type == BL_PC ) {
    			struct map_session_data *ssd = (struct map_session_data *)src;
    			ssd->pvp_point++;
    			ssd->pvp_won++;
    		}
    		//if( sd->pvp_point < 0 ) {
    			//sd->respawn_tid = add_timer(tick+1000, pc_respawn_timer,sd->bl.id,0);
    			//return 1|8;
    		//}
    	//}

    This is paired with the initical post in clif.c.

    Tagging @joecalis XD

    Is there a proper way to activate or port PVP Ranking, Timer with PK Mode: 1 enabled?

  6. Is this possible? I have managed to make it work but the ranking system is not properly working. I am requesting to have PK Mode set to 1 with PVP Aura, Timer and Ranking that is properly working.

    In clif.c

    	if(!pc_isinvisible(sd) && mapdata->flag[MF_PVP]) {
    		//if(!battle_config.pk_mode) { // remove pvp stuff for pk_mode [Valaris]
    			if (!mapdata->flag[MF_PVP_NOCALCRANK])
    				sd->pvp_timer = add_timer(gettick()+200, pc_calc_pvprank_timer, sd->bl.id, 0);
    			sd->pvp_rank = 0;
    			sd->pvp_lastusers = 0;
    			sd->pvp_point = 5;
    			sd->pvp_won = 0;
    			sd->pvp_lost = 0;
    		//}

     

  7. 17 hours ago, joecalis said:

    Try to change this:

    	if (unit->group->skill_id == PF_SPIDERWEB && unit->bl.id != srcunit->bl.id && unit->group->src_id == src->id) {
    		//skill_delunitgroup(unit->group); // This one is instant Delete
    		unit->limit = min(unit->limit,1000); // This one you can change "1000" to change the timing (lower number = faster deletion)
    		unit->group->limit = unit->limit;
    		return 1;
    	}
    	

    to this:

    	if (unit->group->skill_id == PF_SPIDERWEB && unit->bl.id != srcunit->bl.id && unit->group->src_id == src->id && unit->group->val2) {
    		//skill_delunitgroup(unit->group); // This one is instant Delete
    		unit->limit = min(unit->limit,1000); // This one you can change "1000" to change the timing (lower number = faster deletion)
    		unit->group->limit = unit->limit;
    		return 1;
    	}
    	

     

    Oh my goodness! YOU DA MENSH! ❤️

    PERFECTION!

  8. 19 hours ago, joecalis said:

    Remove what ever code I sent before, and do this instead.

    in skill.cpp

    Find:

    int skill_greed(struct block_list *bl, va_list ap);
    static int skill_cell_overlap(struct block_list *bl, va_list ap);

    Change To:

    int skill_greed(struct block_list *bl, va_list ap);
    static int skill_web_remover(struct block_list *bl, va_list ap);
    static int skill_cell_overlap(struct block_list *bl, va_list ap);

    Find:

    		// Execute on all targets standing on this cell
    		if (range == 0 && active_flag)
    			map_foreachincell(skill_unit_effect,unit->bl.m,unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,gettick(),1);

    Change To:

    		if (skill_id == PF_SPIDERWEB)
    			map_foreachinarea(skill_web_remover, src->m, x - 1, y - 1, x + 1, y + 1, BL_SKILL, src, unit);
    
    		// Execute on all targets standing on this cell
    		if (range == 0 && active_flag)
    			map_foreachincell(skill_unit_effect,unit->bl.m,unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,gettick(),1);

    Find:

    /*==========================================
     * Check new skill unit cell when overlapping in other skill unit cell.
     * Catched skill in cell value pushed to *unit pointer.
     * Set (*alive) to 0 will ends 'new unit' check
     *------------------------------------------*/
    static int skill_cell_overlap(struct block_list *bl, va_list ap)

    Change To:

    static int skill_web_remover(struct block_list* bl, va_list ap)
    {
    	struct block_list* src;
    	struct skill_unit* srcunit;
    	struct skill_unit* unit;
    
    	src = va_arg(ap, struct block_list*);
    	srcunit = va_arg(ap, struct skill_unit*);
    	unit = (struct skill_unit*)bl;
    
    	if (unit == NULL || unit->group == NULL)
    		return 0;
    	if (unit->group->skill_id == PF_SPIDERWEB && unit->bl.id != srcunit->bl.id && unit->group->src_id == src->id) {
    		//skill_delunitgroup(unit->group); // This one is instant Delete
    		unit->limit = min(unit->limit,1000); // This one you can change "1000" to change the timing (lower number = faster deletion)
    		unit->group->limit = unit->limit;
    		return 1;
    	}
    	return 0;
    }
    
    /*==========================================
     * Check new skill unit cell when overlapping in other skill unit cell.
     * Catched skill in cell value pushed to *unit pointer.
     * Set (*alive) to 0 will ends 'new unit' check
     *------------------------------------------*/
    static int skill_cell_overlap(struct block_list *bl, va_list ap)

    This line you can change depending on what you prefer.

    		//skill_delunitgroup(unit->group); // This one is instant Delete
    		unit->limit = min(unit->limit,1000); // This one you can change "1000" to change the timing (lower number = faster deletion)
    		unit->group->limit = unit->limit;

    If you want to make web instantly vanish remove the "//" before the skill_delunitgroup then put "//" before unit->limit and unit->group->limit

    If you want to change the speed of when it disappears edit the "1000" to any number you want, it's in milliseconds.

    This however deletes nearby webs even if you don't have a target and will only delete your own web

     

     

    Sweet! We are getting close. Since you managed to work on the vanishing thingy. But This should only work when you trap the target. But pretty much usable until i get what i want. Thank you so much!

  9. Player.conf

    // When should the server prevent a player from logging out? Have no effect if prevent_logout is disabled. (Note 3)
    // Official servers prevent players from logging out after attacking, casting skills, and taking damage.
    // 0 = Players can always logout
    // 1 = Prevent logout on login
    // 2 = Prevent logout after attacking
    // 4 = Prevent logout after casting skill
    // 8 = Prevent logout after being hit
    prevent_logout_trigger: 10

     

  10. Just now, Ice Bear said:

    I think you need to remove the max instance in the skill_db.yml ? did you check it ? 

    ```

    REMOVE THE ACTIVE INSTANCE? DID U TEST

     - Id: 405
        Name: PF_SPIDERWEB
        Description: Fiber Lock
        MaxLevel: 1
        Type: Magic
        TargetType: Attack
        DamageFlags:
          NoDamage: true
        Range: 7
        Hit: Single
        HitCount: 1
    -   ActiveInstance: 3
        Duration1: 16000
        Duration2: 8000
        Requires:
          SpCost: 30
          ItemCost:
            - Item: Spiderweb
              Amount: 1
        Unit:
          Id: Spiderweb
          Interval: -1
          Target: Enemy
          Flag:
            RemovedByFireRain: true
        Status: SpiderWeb
        
    ```

    The thing is. I want the MaxInstace to work.

  11. 11 minutes ago, Ice Bear said:

    ```

    try to change 

    if (sd && skill_id == PF_SPIDERWEB && !skill_pos_maxcount_check(src, skill_x, skill_y, skill_id, skill_lv, BL_PC, false)) {

    to 

    if (sd && skill_id == PF_SPIDERWEB && !skill_pos_maxcount_check(src, ud->skillx,ud->skilly, ud->skill_id, ud->skill_lv, BL_PC, false)){

    ```

    It works! Thanks bro. This will be my temporary solution.

    Here's another video of the mod that i wanted to have.
     

     

    MaxInstance still works. It can only be spam when you magnet another target since the first web that hit the target will vanish. XD

     

×
×
  • Create New...