Jump to content

Forshaken

Members
  • Posts

    148
  • Joined

  • Last visited

Posts posted by Forshaken

  1. On 4/2/2021 at 9:55 PM, PaqnaN said:

    hi is it posible to add demihuman resist like from thara card and magic resistance like from gtb card?

    and how?

    yes.

    ACMD_FUNC(resist) {
        char output[CHAT_SIZE_MAX];
        int i;
        struct {
            const char* format;
            int value;
        } output_table[] = {
            { "   [ %d ] Neutral Resist", 0 },
            { "   [ %d ] Water Resist", 0 },
            { "   [ %d ] Earth Resist", 0 },
            { "   [ %d ] Fire Resist", 0 },
            { "   [ %d ] Wind Resist", 0 },
            { "   [ %d ] Poison Resist", 0 },
            { "   [ %d ] Holy Resist", 0 },
            { "   [ %d ] Dark Resist", 0 },
            { "   [ %d ] Ghost Resist", 0 },
            { "   [ %d ] Undead Resist", 0 },
           ++ { "   [ %d ] Long Range Resistance", 0 },
           ++ { "   [ %d ] Magic Resistance", 0 },
           ++ { "   [ %d ] Demi-Human Resist", 0 },
            { NULL, 0 }
    
        };
        memset(output, '\0', sizeof(output));
        clif_displaymessage(sd->fd, "========= Resistance Values (in percentage) =========");
       output_table[0].value = (sd->indexed_bonus.subele[ELE_NEUTRAL] + sd->indexed_bonus.subele_script[ELE_NEUTRAL] + sd->indexed_bonus.subele[ELE_ALL] + sd->indexed_bonus.subele_script[ELE_ALL]);
        output_table[1].value = (sd->indexed_bonus.subele[ELE_WATER] + sd->indexed_bonus.subele_script[ELE_WATER] + sd->indexed_bonus.subele[ELE_ALL] + sd->indexed_bonus.subele_script[ELE_ALL]);
        output_table[2].value = (sd->indexed_bonus.subele[ELE_EARTH] + sd->indexed_bonus.subele_script[ELE_EARTH] + sd->indexed_bonus.subele[ELE_ALL] + sd->indexed_bonus.subele_script[ELE_ALL]);
        output_table[3].value = (sd->indexed_bonus.subele[ELE_FIRE] + sd->indexed_bonus.subele_script[ELE_FIRE] + sd->indexed_bonus.subele[ELE_ALL] + sd->indexed_bonus.subele_script[ELE_ALL]);
        output_table[4].value = (sd->indexed_bonus.subele[ELE_WIND] + sd->indexed_bonus.subele_script[ELE_WIND]) + sd->indexed_bonus.subele[ELE_ALL] + sd->indexed_bonus.subele_script[ELE_ALL];
        output_table[5].value = (sd->indexed_bonus.subele[ELE_POISON] + sd->indexed_bonus.subele_script[ELE_POISON] + sd->indexed_bonus.subele[ELE_ALL] + sd->indexed_bonus.subele_script[ELE_ALL]);
        output_table[6].value = (sd->indexed_bonus.subele[ELE_HOLY] + sd->indexed_bonus.subele_script[ELE_HOLY] + sd->indexed_bonus.subele[ELE_ALL] + sd->indexed_bonus.subele_script[ELE_ALL]);
        output_table[7].value = (sd->indexed_bonus.subele[ELE_DARK] + sd->indexed_bonus.subele_script[ELE_DARK] + sd->indexed_bonus.subele[ELE_ALL] + sd->indexed_bonus.subele_script[ELE_ALL]);
        output_table[8].value = (sd->indexed_bonus.subele[ELE_GHOST] + sd->indexed_bonus.subele_script[ELE_GHOST] + sd->indexed_bonus.subele[ELE_ALL] + sd->indexed_bonus.subele_script[ELE_ALL]);
        output_table[9].value = (sd->indexed_bonus.subele[ELE_UNDEAD] + sd->indexed_bonus.subele_script[ELE_UNDEAD] + sd->indexed_bonus.subele[ELE_ALL] + sd->indexed_bonus.subele_script[ELE_ALL]);
        ++ output_table[10].value = (sd->bonus.long_attack_def_rate);
        ++ output_table[11].value = (sd->special_state.no_magic_damage + sd->bonus.magic_def_rate);
        ++ output_table[12].value = (sd->subrace[RC_DEMIHUMAN]);
        for (i = 0; output_table.format != NULL; i++) {
            sprintf(output, output_table.format, output_table.value);
            clif_displaymessage(fd, output);
        }
        return 0;
    }


     

    • Upvote 1
    • Love 1
  2. On 3/2/2020 at 11:42 PM, Forshaken said:

    Please let me share my 3 new versions of SC_ITEMSCRIPT. SC_ITEMSCRIPT source code is already embedded on the latest emulator so i will just share my source codes for the version 2 - 4 of SC_ITEMSCRIPT. This function is very usefull in different ways but for me i used it to get an effect from an item without having the actuall item on my storage,inventory or equipment and use it as a additional buff.

    SC_ITEMSCRIPT: Additional bonus effect/buff can be dispell by dispell skill and on death.
    SC_ITEMSCRIPT2: Additional bonus effect/buff can be dispell by dispell skill but not on death.
    SC_ITEMSCRIPT3: Additional bonus effect/buff can be dispell on dearth but not by dispell skill.
    SC_ITEMSCRIPT4: Additional bonus effect/buff cannot by dispell by dispell skill nor on death.

    I know it is an easy script but the idea is useful. ?

    -    script    samplebuff    -1,{
    OnPCLoginEvent:
    //sc_start sc_itemscript,<duration(- value for unlimited duration and + for limited duration)>,<itemid>;
    //use SC_ITEMSCRIPT for buff dispellable by death and dispell skill
    //use SC_ITEMSCRIPT2 for buff not dispellable by death but dispellable by dispell skill
    //use SC_ITEMSCRIPT3 for buff not dispellable by dispell skill but dispellable by death
    //use SC_ITEMSCRIPT4 for buff not dispellable by dispell skill and dispell skill
    //This script use gives 10% Fire resistance from Ring of Flame lord effect permanently (it cannot be dispell by dispell skill nor on death)
    SC_START SC_ITEMSCRIPT4,-1,2678;//additional effect(1000=1sec)
    end;
    }

    SC_ITEMSCRIPT Manual diff.txt 3.93 kB · 28 downloads

    Ok guys here is the bug fix for dispel mechanics.

    SC_ITEMSCRIPT ManualV2.txt

  3. On 12/29/2020 at 5:16 AM, tonn said:

    I'm encountering the same issue. Does anyone know how to debug this, at least?

    Im having the same issue.

    I have fixed the problem. so far there is no disconnection issue. add this codes on your PC.CPP

    struct map_session_data {
        struct block_list bl;
        struct unit_data ud;
        struct view_data vd;
        struct status_data base_status, battle_status;
        struct status_change sc;
        struct regen_data regen;
        struct regen_data_sub sregen, ssregen;
        ++struct autoattack_delay;  // autoattack timer
        //NOTE: When deciding to add a flag to state or special_state, take into consideration that state is preserved in
        //status_calc_pc, while special_state is recalculated in each call. [Skotlex]
        struct s_state {
            unsigned int active : 1; //Marks active player (not active is logging in/out, or changing map servers)
            unsigned int menu_or_input : 1;// if a script is waiting for feedback from the player
            unsigned int dead_sit : 2;
            unsigned int lr_flag : 3;//1: left h. weapon; 2: arrow
    -------------------------------------------------------------------------------------------------
            unsigned int lesseffect : 1;
            unsigned int vending : 1;
            unsigned int noks : 3; // [Zeph Kill Steal Protection]
            ++unsigned autoattack : 1; // Keitenai
            unsigned int changemap : 1;
            unsigned int callshop : 1; // flag to indicate that a script used callshop; on a shop
    -------------------------------------------------------------------------------------------------
        int invincible_timer;
        t_tick canlog_tick;
        t_tick canuseitem_tick;    // [Skotlex]
        t_tick canusecashfood_tick;
        t_tick canequip_tick;    // [Inkfish]
        t_tick cantalk_tick;
        t_tick canskill_tick; // used to prevent abuse from no-delay ACT files
        t_tick cansendmail_tick; // [Mail System Flood Protection]
        t_tick ks_floodprotect_tick; // [Kill Steal Protection]
        ++t_tick autoattack_delay;    // Keitenai
        t_tick equipswitch_tick; // Equip switch

  4. 1 hour ago, fusqueta said:

    is there anyway to prevent to unequip a single item? I'll bind a visual effect to the item sprite and player cannot unequip it

     

    ps: I'm planning to execute a UnEquipScript to equip item again, but seems like a poor way to solve this problem, another better idea?

    why not use OnPCLoginEvent and use changelook script?

    • Upvote 2
  5. Good day everyone! I just wanted to ask if how to fix elemental resist healing on woe/gvg?

    Elemental resist healing is where if your resistance exceeds to 100% on a certain element, that element will heal you when you take damage on it.
    ex. If you got 110% Wind resist and you got hit by Lightning bolt or anything that is wind element will heal you instead of taking damage.

    My current situation is it works on PvP but not on GvG. Please help!!!

  6. On 9/19/2020 at 8:51 AM, MyNaMeArT said:

    Hi, I am newbie for custom server.

     

    I would like to custom item such as If you have Elunium in itemlist then it will have All Status +10, but you can have only 1 Elunium in itemlist.

    How I can do this ?

     

    ps. sorry for bad english.

    You can check this tread --->https://rathena.org/board/topic/97172-charms-items-effect-to-work-while-in-inventory/

     

  7. On 9/6/2017 at 10:03 PM, M4karov said:

    Mapflag NoAttack (MF_NOATTACK)


    Modification created to block the attack on monsters on a given map.

    Script command created to enable / disable attacking players and monsters.

     

    Script:

    
    prontera,171,203,4	script	NoAttack	67,{
    	mes "NoAttack";
    	mes "What can I do for you?";
    	switch(select("Enable Attack:Disable Attack")){
    		case 1:
    			noattack 1;
    			end;
    		case 2:
    			noattack 0;
    			end;
    	}
    }
    prontera	mapflag	noattack

     

    By buying this script, you agree to these terms:

    • You are not allowed to redistribute this script in any way, shape, or form.
    • Chargeback scams are not tolerated and will get you punished on rAthena.
    • I still retain all rights to this script.
    • Terms above may be changed or adjusted without prior notification.

    Copyright © - Emperium Games 2017 - All Rights Reserved


     

    is this working on latest RA?

     

  8. On 4/17/2019 at 1:07 AM, deitalk said:

    Apparently at some point someone decided that it wouldn't exist negative damage on RO anymore and then we lost attr_recover option (on both re and pre-re)... I'm still searching where on src it caps all forms of damage to positive

    do you have any update on this?

     

  9. On 8/27/2019 at 12:34 AM, Zell said:

    [SCRIPT COMMAND] Fake Player


    This modification allows you to create fake players without further using mob_avail for such behavior.

    Usage:

    .@monsterGID = fakeplayer( map, x, y, name, job_id, sex, hair_style, hair_color, weapon, shield, head_top, head_mid, head_bottom, option, cloth_color );


     

    why headgears sprites is not appearing?

×
×
  • Create New...