Jump to content

playniks

Members
  • Posts

    45
  • Joined

  • Last visited

Posts posted by playniks

  1. Hi! This script Guild Limiter kind of interest me a lot and figured out that this is really a useful script for my upcoming server. Thanks a lot for those people who made the script useful.

    Would anyone kind enough to share the inclusion list of those approved guilds on this script for Player Menu? Like there will be a list for those registered guilds. Thank you.

  2. On 4/4/2024 at 2:17 PM, Hoze said:

    Hello, did you fixed it? @playniks

    Hi @Hoze yeah I actually managed to resolved the problem and other skills that bypasses the golden thief bug effect like ground spells of professor classes and esma/estun of soul linkers.

    Same as @Playtester

    status.c

    find:

    if (skill != nullptr && skill->skill_type == BF_MAGIC

     

    Then input the aegis name of the skills you want to bypass gtb effect. Here's mine for Soul Link, Esma, Fogwall, Deluge, Volcano and Violentgale

            if (skill != nullptr && skill->skill_type == BF_MAGIC && type != SC_SPIRIT && type != SC_SMA && type != SC_FOGWALL && type != SC_DELUGE && type != SC_VOLCANO && type != SC_VIOLENTGALE            && // Basic  magic skill
                !skill->inf2[INF2_IGNOREGTB] && // Specific skill to bypass
                ((skill->inf == INF_ATTACK_SKILL || skill->inf == INF_GROUND_SKILL || skill->inf == INF_SUPPORT_SKILL) || // Target skills should get blocked even when cast on self
                 (skill->inf == INF_SELF_SKILL && src != bl))) // Self skills should get blocked on all targets except self
                return 0;

  3. Hello! Thank you so much for this great concept. This is truly a very useful mod and a content to my server.
    I was able to have it work as stackable item, but how do we apply the item script even when the items are stacking?

    So my itemscript is "bonus bStr,100;" .  so If I have 5 pcs charm item stacking on my inventory it should give me 500 str, but it only count 5pcs charm item as one thus giving me only str+100.

    So even if I have 5pcs charm item stacking on my inventory, How do we make it give Str +500?

  4. On 2/6/2024 at 11:45 AM, Wazaby said:

    Is it possible for you to point to which npc or script? Or just post a snippet of the code that you want help with?

    Quote

    guildhall,101,93,3    script    Designer Fernan#eventhat    4_CAT_SAILOR5,{
        if (checkweight(1301,1) == 0) {
            mes "- Please stop here!! -";
            mes "- You have carried too much items, -";
            mes "- Therefore unable receive any item again, -";
            mes "- Please reduce your weight, -";
            mes "- And come back again later! -";
            close;
        }
        disable_items;
        mes "[Designer Fernan]";
        mes "^ff0000Make sure to storage first your main costumes to prevent destroying^000000";
        mes "^ff0000I'm not responsible if you accidentally click your costume, so please storage it first before exchanging.^000000";    
        mes "I am Designer Fernan, who has all kinds of cool costumes in the World.";
        mes "If you have any spare costume with you, let me swap it to costume coin!";
        next;
        if (select( "Exchange costume for Costume Coin", "Continue conversation" ) == 2) {
            mes "[Designer Fernan]";
            mes "Though I look out of shape right now, I used to be a well known fashion model and designer!";
            next;
            mes "[Designer Fernan]";
            mes "Don't pity me! I am well aware of my looks, but I like who I am inside.";
            close;
        }
        mes "[Designer Fernan]";
        mes "Oh, Do you have spare costumes? then I can exchange it for Costume Coin.";
        next;
        mes "- Rummaging -";
        next;
        // ===================================================================
        // =================== Costume Coin ===================
        // ===================================================================
        .@box_list[0] = 41002;        // Costume Coin
        setarray .@item_list_0[0],
        // HEADGEARS
            36202,
            36201,  
            36466;
            
        freeloop(1);    
        while(1) {
            for ( .@i = 0; .@i < 18; ++.@i ) {
                if (getiteminfo(.@box_list[.@i], ITEMINFO_TYPE) == -1)    // temporary check
                    continue;
                .@size = getarraysize( getd(".@item_list_" + .@i) );
                for ( .@h = 0; .@h < .@size; ++.@h ) {
                    .@id = getd( ".@item_list_" + .@i + "[" + .@h + "]" );
                    if (getiteminfo(.@id, ITEMINFO_TYPE) == -1)    // temporary check
                        continue;
                    if (isequipped(.@id)) {
                        mes "^ff0000You are still wearing a same item you want to dispose. Please move your equipped costume to your storage.^000000";
                        close;
                        }
                    if(!isequipped(.@id)) {
                    if (countitem(.@id) < 1)
                        continue;
                    mes "[Designer Fernan]";
                    mes "I see that you have a ^3131FF" + getitemname(.@id) + "^000000. Do you want to exchange this for a Costume Coin?";
                    next;
                    switch( select( "Exchange", "Look for something else", "Stop Exchanging" ) ) {
                    case 1:
                        mes "[Designer Fernan]";
                        if (countitem(.@id) < 1)
                            mes "Oh~ Something suddenly disappeared...";
                        else {
                            mes "Exchange Completed.";
                            delitem .@id, 1;
                            getitem .@box_list[.@i], 1;
                        }
                        mes "Let me check you for another item to exchange...";
                        next;
                        break;
                    case 2:
                        break;
                    case 3:
                        mes "[Designer Fernan]";
                        mes "Meow? Where are you going?";
                        close;
                        }
                    }
                }
            }
            mes "[Designer Fernan]";
            mes "Guess that is all.";
            next;
            if (select( "Look more", "Quit" ) == 2) {
                mes "[Designer Fernan]";
                mes "Bye~";
                close;
            }
        }
    OnInit:
        initnpctimer;
        end;
    OnTimer1000:
        showscript("Costume Exchanger");
        setnpctimer 0;
        end;
    close;
    }



    I want it to have callshop func so I can sell multiple costumes instead of converting it one by one... Is there a solution for this? The original script came from re/merchants/malangdo_costume

    FIXEDD THANKSS

  5. 9 hours ago, jannickz said:

    What determines the exchange rate between costumes and coins/points? Is it based on rarity, complexity, or other factors?

     All I want is just simple, exchange costume to a coin.. With the use of the malangdo exchange script, It seems that it only exchange 1 costume at a time.. I want it to have a callshop wherein multiple costume will be exchange rather than 1 by 1..

  6. On 1/31/2024 at 4:28 PM, Wazaby said:

     

    Hello! It seems like it doesnt work anymore? And also I would like it to be callshop function wherein I can sell multiple costumes I want and trade it to points/item depends on the range per costume

  7. Hi there beloved master scripters!
    May I request a modified script of Flavius Battleground which has auto shuffle joining players? A script like anniruru's BG_pvp_round.txt that automatically shuffles players when joining battleground.

    Quote

    //===== rAthena Script =======================================
    //= BattleGround System - Flavius
    //===== Description: =========================================
    //= [Official Conversion]
    //= Flavius Battleground.
    //= - Winning Team: 9 badges (11 if VIP)
    //= - Losing Team: 3 badges (5 if VIP)
    //===== Changelogs: ==========================================
    //= 1.0 First Version. [L0ne_W0lf]
    //= 1.1 Fixed pink crystal spawning as blue. [L0ne_W0lf]
    //= 1.2 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
    //= 1.3 Removed MaxLvl check in waitingrooms. Replaced setwall with setcell.
    //= 1.4 Label standardization. [Euphy]
    //= 1.5 Added GM management function. [Euphy]
    //= 1.6 Added VIP features and created a reward function. [Euphy]
    //= 1.7 Made Crystals immune to attacks until Guardians are defeated. [Cydh/Aleos]
    //= 1.8 Added battle_config checks to allow this script to use the new queue interface or the previous method. [Aleos]
    //============================================================

    // Waiting Room NPCs
    //============================================================

    bat_room,86,227,4    script    Lieutenant Ator    418,{
        end;
    OnInit:
        waitingroom "Battle Station",11,"start#bat_b01::OnReadyCheck",1,0,80;
        end;
    OnEnterBG:
        set $@FlaviusBG1_id1, waitingroom2bg("bat_b01",10,290,"start#bat_b01::OnGuillaumeQuit","");
        end;
    }

    bat_room,85,204,0    script    Lieutenant Thelokus    414,{
        end;
    OnInit:
        waitingroom "Battle Station",11,"start#bat_b01::OnReadyCheck",1,0,80;
        end;
    OnEnterBG:
        set $@FlaviusBG1_id2, waitingroom2bg("bat_b01",390,10,"start#bat_b01::OnCroixQuit","");
        end;
    }

    bat_room,85,220,0    warp    back_bgroomb01a    1,1,bat_room,154,150
    bat_room,85,211,0    warp    back_bgroomb01b    1,1,bat_room,154,150

    bat_room,2,151,3    script    #bat_b01_timer    844,{
        end;

    OnInit:
        if (getbattleflag("feature.bgqueue"))
            end;
    OnEnable:
        initnpctimer;
        end;

    OnStop:
        stopnpctimer;
        end;

    OnTimer1000:
        stopnpctimer;
        if (bg_get_data($@FlaviusBG1_id1, 0) == 0 && bg_get_data($@FlaviusBG1_id2, 0) == 0) {
            donpcevent "countdown#bat_b01::OnStop";
            if (getbattleflag("feature.bgqueue"))
                bg_reserve "bat_b01", true;
            $@FlaviusBG1 = 0;
            if( $@FlaviusBG1_id1 ) { bg_destroy $@FlaviusBG1_id1; $@FlaviusBG1_id1 = 0; }
            if( $@FlaviusBG1_id2 ) { bg_destroy $@FlaviusBG1_id2; $@FlaviusBG1_id2 = 0; }
            if (getbattleflag("feature.bgqueue"))
                bg_unbook "bat_b01";
            end;
        }
        initnpctimer;
        end;
    }

    // Flavius Battleground Engine
    //============================================================
    bat_b01,15,15,3    script    start#bat_b01    844,{
    OnInit:
        if (getbattleflag("feature.bgqueue"))
            bg_unbook "bat_b01";
        mapwarp "bat_b01","bat_room",154,150;
        end;

    OnReadyCheck:
        if( $@FlaviusBG1 )
            end;
        if (!getbattleflag("feature.bgqueue")) {
            set .@Guillaume, getwaitingroomstate(0,"Lieutenant Ator");
            set .@Croix, getwaitingroomstate(0,"Lieutenant Thelokus");
            if( !.@Guillaume && !.@Croix ) {
                donpcevent "#bat_b01_timer::OnStop";
                end;
            }
            if( .@Guillaume < 1 || .@Croix < 1 )
                end;
        }
        set $@FlaviusBG1, 1;
        set $@FlaviusBG1_Victory, 0;
        set $@Croix_ScoreBG1, 0;
        set $@Guill_ScoreBG1, 0;
        bg_updatescore "bat_b01",$@Guill_ScoreBG1,$@Croix_ScoreBG1;

        if (!getbattleflag("feature.bgqueue")) {
            donpcevent "Lieutenant Ator::OnEnterBG";
            donpcevent "Lieutenant Thelokus::OnEnterBG";
        }
        donpcevent "OBJ#bat_b01_a::OnKill";
        donpcevent "OBJ#bat_b01_a::OnEnable";
        donpcevent "OBJ#bat_b01_b::OnKill";
        donpcevent "OBJ#bat_b01_b::OnEnable";
        donpcevent "guardian#bat_b01_a::OnKill";
        donpcevent "guardian#bat_b01_b::OnKill";
        donpcevent "guardian#bat_b01_a::OnEnable";
        donpcevent "guardian#bat_b01_b::OnEnable";
        donpcevent "cell#bat_b01_a::OnRed";
        donpcevent "cell#bat_b01_b::OnRed";
        donpcevent "time#bat_b01::OnEnable";
        disablenpc "Guillaume Vintenar#b01_a";
        disablenpc "Croix Vintenar#b01_b";
        disablenpc "Vintenar#bat_b01_aover";
        disablenpc "Vintenar#bat_b01_bover";
        bg_warp $@FlaviusBG1_id1,"bat_b01",87,75;
        bg_warp $@FlaviusBG1_id2,"bat_b01",311,224;
        donpcevent "countdown#bat_b01::OnEnable";
        initnpctimer;
        end;

    OnReset:
        donpcevent "OBJ#bat_b01_a::OnKill";
        donpcevent "OBJ#bat_b01_a::OnEnable";
        donpcevent "OBJ#bat_b01_b::OnKill";
        donpcevent "OBJ#bat_b01_b::OnEnable";
        donpcevent "guardian#bat_b01_a::OnKill";
        donpcevent "guardian#bat_b01_b::OnKill";
        donpcevent "guardian#bat_b01_a::OnEnable";
        donpcevent "guardian#bat_b01_b::OnEnable";
        donpcevent "cell#bat_b01_a::OnRed";
        donpcevent "cell#bat_b01_b::OnRed";
        end;

    OnGuillaumeActive:
        warp "bat_b01",87,75;
        end;

    OnCroixActive:
        warp "bat_b01",311,224;
        end;

    OnGuillaumeQuit:
    OnCroixQuit:
        if (getbattleflag("feature.bgqueue"))
            bg_desert;
        else
            bg_leave;
        end;

    OnTimer10000:
        stopnpctimer;
        donpcevent "#bat_b01_timer::OnEnable";
        end;
    }

    bat_b01,1,1,3    script    OBJ#bat_b01_a    844,{
    OnEnable:
        $@FlavBG1_C1_ID = bg_monster($@FlaviusBG1_id1,"bat_b01",61,150,"Pink Crystal",1915,"OBJ#bat_b01_a::OnMyMobDead");
        setunitdata $@FlavBG1_C1_ID,UMOB_DMGIMMUNE,1; // Make Crystal immune to damage until Guardians are defeated
        end;

    OnKill:
        killmonster "bat_b01","OBJ#bat_b01_a::OnMyMobDead";
        end;

    OnMyMobDead:
        if (mobcount("bat_b01","OBJ#bat_b01_a::OnMyMobDead") < 1) {
            mapannounce "bat_b01", "Guillaume's Crystal has been destroyed.",bc_map,"0xFFCE00";
            if ($@Croix_ScoreBG1 > 0) {
                set $@FlaviusBG1_Victory,2;
                set $@Croix_ScoreBG1,$@Croix_ScoreBG1+1;
                enablenpc "Guillaume Vintenar#b01_a";
                enablenpc "Croix Vintenar#b01_b";
                donpcevent "time#bat_b01::OnStop";
                if (getbattleflag("feature.bgqueue"))
                    bg_reserve "bat_b01", true;
            }
            else {
                set $@Croix_ScoreBG1,1;
                donpcevent "time#bat_b01::OnEnable";
                donpcevent "start#bat_b01::OnReset";
            }
            donpcevent "#bat_b01_timer::OnStop";
            bg_updatescore "bat_b01",$@Guill_ScoreBG1,$@Croix_ScoreBG1;
            bg_warp $@FlaviusBG1_id1,"bat_b01",10,290;
            bg_warp $@FlaviusBG1_id2,"bat_b01",390,10;
            donpcevent "#bat_b01_timer::OnEnable";
        }
        end;
    }

    bat_b01,1,2,3    script    OBJ#bat_b01_b    844,{
    OnEnable:
        $@FlavBG1_C2_ID = bg_monster($@FlaviusBG1_id2,"bat_b01",328,150,"Blue Crystal",1914,"OBJ#bat_b01_b::OnMyMobDead");
        setunitdata $@FlavBG1_C2_ID,UMOB_DMGIMMUNE,1; // Make Crystal immune to damage until Guardians are defeated
        end;

    OnKill:
        killmonster "bat_b01","OBJ#bat_b01_b::OnMyMobDead";
        end;

    OnMyMobDead:
        if (mobcount("bat_b01","OBJ#bat_b01_b::OnMyMobDead") < 1) {
            mapannounce "bat_b01", "Croix's Crystal has been destroyed.",bc_map,"0xFFCE00";
            if ($@Guill_ScoreBG1 > 0) {
                set $@FlaviusBG1_Victory,1;
                set $@Guill_ScoreBG1,$@Guill_ScoreBG1+1;
                enablenpc "Guillaume Vintenar#b01_a";
                enablenpc "Croix Vintenar#b01_b";
                donpcevent "time#bat_b01::OnStop";
                if (getbattleflag("feature.bgqueue"))
                    bg_reserve "bat_b01", true;
            }
            else {
                set $@Guill_ScoreBG1,1;
                donpcevent "time#bat_b01::OnEnable";
                donpcevent "start#bat_b01::OnReset";
            }
            donpcevent "#bat_b01_timer::OnStop";
            bg_updatescore "bat_b01",$@Guill_ScoreBG1,$@Croix_ScoreBG1;
            bg_warp $@FlaviusBG1_id1,"bat_b01",10,290;
            bg_warp $@FlaviusBG1_id2,"bat_b01",390,10;
            donpcevent "#bat_b01_timer::OnEnable";
        }
        end;
    }

    bat_b01,1,3,3    script    guardian#bat_b01_a    844,{
    OnEnable:
        bg_monster $@FlaviusBG1_id1,"bat_b01",108,159,"Guillaume Camp Guardian",1949,"guardian#bat_b01_a::OnMyMobDead";
        bg_monster $@FlaviusBG1_id1,"bat_b01",108,141,"Guillaume Camp Guardian",1949,"guardian#bat_b01_a::OnMyMobDead";
        end;

    OnKill:
        killmonster "bat_b01","guardian#bat_b01_a::OnMyMobDead";
        end;

    OnMyMobDead:
        if (mobcount("bat_b01","guardian#bat_b01_a::OnMyMobDead") < 1) {
            donpcevent "cell#bat_b01_a::OnGreen";
            mapannounce "bat_b01", "The Guardian protecting Guillaume's Crystal has been slain.",bc_map,"0xFFCE00";
            setunitdata $@FlavBG1_C1_ID,UMOB_DMGIMMUNE,0; // Make Crystal damageable again
        }
        end;
    }

    bat_b01,1,3,3    script    guardian#bat_b01_b    844,{
    OnEnable:
        bg_monster $@FlaviusBG1_id2,"bat_b01",307,160,"Croix Camp Guardian",1949,"guardian#bat_b01_b::OnMyMobDead";
        bg_monster $@FlaviusBG1_id2,"bat_b01",307,138,"Croix Camp Guardian",1949,"guardian#bat_b01_b::OnMyMobDead";
        end;

    OnKill:
        killmonster "bat_b01","guardian#bat_b01_b::OnMyMobDead";
        end;

    OnMyMobDead:
        if (mobcount("bat_b01","guardian#bat_b01_b::OnMyMobDead") < 1) {
            donpcevent "cell#bat_b01_b::OnGreen";
            mapannounce "bat_b01", "The Guardian protecting Croix's Crystal has been slain.",bc_map,"0xFFCE00";
            setunitdata $@FlavBG1_C2_ID,UMOB_DMGIMMUNE,0; // Make Crystal damageable again
        }
        end;
    }

    bat_b01,1,4,3    script    cell#bat_b01_a    844,{
    OnRed:
        setcell "bat_b01",62,149,60,151,cell_basilica,1;
        setcell "bat_b01",62,149,60,151,cell_walkable,0;
        end;

    OnGreen:
        setcell "bat_b01",62,149,60,151,cell_basilica,0;
        setcell "bat_b01",62,149,60,151,cell_walkable,1;
        end;
    }

    bat_b01,1,5,3    script    cell#bat_b01_b    844,{
    OnRed:
        setcell "bat_b01",327,151,329,149,cell_basilica,1;
        setcell "bat_b01",327,151,329,149,cell_walkable,0;
        end;

    OnGreen:
        setcell "bat_b01",327,151,329,149,cell_basilica,0;
        setcell "bat_b01",327,151,329,149,cell_walkable,1;
        end;
    }

    bat_b01,1,6,1    script    time#bat_b01    844,{
    OnEnable:
        donpcevent "Battle Therapist#b01_a::OnEnable";
        donpcevent "Battle Therapist#b01_b::OnEnable";
        end;

    OnStop:
        donpcevent "Battle Therapist#b01_a::OnStop";
        donpcevent "Battle Therapist#b01_b::OnStop";
        end;
    }

    bat_b01,10,294,3    script    Battle Therapist#b01_a    95,{
        specialeffect2 EF_HEAL;
        mes "[Battle Therapist]";
        mes "Just close your eyes,";
        mes "and take a deep breath.";
        mes "You can be free from pain.";
        close;

    OnTimer25000:
        specialeffect EF_SANCTUARY;
        // enablenpc "bat_b01_rp1_a_warp";
        areapercentheal "bat_b01",0,280,20,300,100,100;
        areawarp "bat_b01",0,280,20,300,"bat_b01",87,73;
        end;

    // OnTimer26000:
        // disablenpc "bat_b01_rp1_a_warp";
        // end;

    OnTimer26500:
        stopnpctimer;
        donpcevent "Battle Therapist#b01_a::OnEnable";
        end;

    OnEnable:
        initnpctimer;
        enablenpc "Battle Therapist#b01_a";
        end;

    OnStop:
        // disablenpc "bat_b01_rp1_a_warp";
        disablenpc "Battle Therapist#b01_a";
        stopnpctimer;
        end;
    }

    /*
    // replaced by areapercentheal and areawarp to prevent enqueue issue
    bat_b01,10,290,0    script    bat_b01_rp1_a_warp    45,10,10,{
    OnInit:
        disablenpc "bat_b01_rp1_a_warp";
        end;

    OnTouch:
        percentheal 100,100;
        warp "bat_b01",87,73;
        end;
    }
    */

    bat_b01,389,14,3    script    Battle Therapist#b01_b    95,{
        specialeffect2 EF_HEAL;
        mes "[Battle Therapist]";
        mes "Just close your eyes,";
        mes "and take a deep breath.";
        mes "You can be free from pain.";
        close;

    OnTimer25000:
        specialeffect EF_SANCTUARY;
        // enablenpc "bat_b01_rp1_b_warp";
        areapercentheal "bat_b01",379,0,399,20,100,100;
        areawarp "bat_b01",379,0,399,20,"bat_b01",312,225;
        end;

    // OnTimer26000:
        // disablenpc "bat_b01_rp1_b_warp";
        // end;

    OnTimer26500:
        stopnpctimer;
        donpcevent "Battle Therapist#b01_b::OnEnable";
        end;

    OnEnable:
        initnpctimer;
        enablenpc "Battle Therapist#b01_b";
        end;

    OnStop:
        // disablenpc "bat_b01_rp1_b_warp";
        disablenpc "Battle Therapist#b01_b";
        stopnpctimer;
        end;
    }

    /*
    bat_b01,389,10,0    script    bat_b01_rp1_b_warp    45,10,10,{
    OnInit:
        disablenpc "bat_b01_rp1_b_warp";
        end;

    OnTouch:
        percentheal 100,100;
        warp "bat_b01",312,225;
        end;
    }
    */

    bat_b01,87,76,0    script    A_CODE#bat_b01    -1,5,5,{
    OnTouch:
        if (checkquest(2070) < 0)
            setquest 2070;
        end;
    }

    bat_b01,312,224,0    script    B_CODE#bat_b01    -1,5,5,{
    OnTouch:
        if (checkquest(2070) < 0)
            setquest 2070;
        end;
    }

    bat_b01,10,294,3    script    Guillaume Vintenar#b01_a    934,{
        if ($@FlaviusBG1_id1 == getcharid(4)) {
            if ($@FlaviusBG1_Victory == 1)
                callfunc "F_BG_Badge",1,"Guillaume","Flavius";
            else
                callfunc "F_BG_Badge",0,"Guillaume","Flavius";
        }
        bg_leave;
        if (!getbattleflag("feature.bgqueue"))
            warp "bat_room",154,150;
        end;

    OnInit:
        disablenpc "Guillaume Vintenar#b01_a";
        end;
    }

    bat_b01,389,14,3    script    Croix Vintenar#b01_b    934,{
        if ($@FlaviusBG1_id2 == getcharid(4)) {
            if ($@FlaviusBG1_Victory == 2)
                callfunc "F_BG_Badge",1,"Croix","Flavius";
            else
                callfunc "F_BG_Badge",0,"Croix","Flavius";
        }
        bg_leave;
        if (!getbattleflag("feature.bgqueue"))
            warp "bat_room",154,150;
        end;

    OnInit:
        disablenpc "Croix Vintenar#b01_b";
        end;
    }

    bat_b01,1,5,3    script    countdown#bat_b01    844,{
    OnInit:
        stopnpctimer;
        end;

    OnEnable:
        stopnpctimer;
        initnpctimer;
        end;

    OnStop:
        stopnpctimer;
        end;

    OnTimer7000:
        mapannounce "bat_b01", "Guillaume Vintenar Axl Rose : Let's attack to destroy that Crystal!",bc_map,"0xFF9900";
        end;

    OnTimer8000:
        mapannounce "bat_b01", "Croix Vintenar Swandery : Even though Guillaume is struggling to win against us, the victory is ours. Let's show them our power.",bc_map,"0xFF99CC";
        end;

    OnTimer1800000:
        mapannounce "bat_b01", "Marollo VII : Guillaume Marollo, Croix Marollo! And their followers!",bc_map,"0x99CC00";
        end;

    OnTimer1803000:
        mapannounce "bat_b01", "Marollo VII : Both camps are competitive, so it's hard to judge which team is superior.",bc_map,"0x99CC00";
        end;

    OnTimer1808000:
        mapannounce "bat_b01", "Marollo VII : This battle of Flavian is such a waste of time. I will decide victory and defeat by your progress.",bc_map,"0x99CC00";
        end;

    OnTimer1822000:
        mapannounce "bat_b01", "Marollo VII : If you can't accept the results, try again in another valley battle!",bc_map,"0x99CC00";
        end;

    OnTimer1825000:
        mapannounce "bat_b01", "Axl Rose, Swandery : Yes, sir.",bc_map,"0x99CC00";
        end;

    OnTimer1830000:
        donpcevent "time#bat_b01::OnStop";
        bg_warp $@FlaviusBG1_id1,"bat_b01",10,290;
        bg_warp $@FlaviusBG1_id2,"bat_b01",390,10;
        enablenpc "Vintenar#bat_b01_aover";
        enablenpc "Vintenar#bat_b01_bover";
        if (getbattleflag("feature.bgqueue"))
            bg_reserve "bat_b01", true;
        end;

    OnTimer1900000:
        mapwarp "bat_b01","bat_room",154,150;
        donpcevent "countdown#bat_b01::OnStop";
        end;
    }

    bat_b01,81,83,3    script    Guillaume Camp#flag21    973,{ end; }
    bat_b01,94,83,3    script    Guillaume Camp#flag22    973,{ end; }
    bat_b01,81,66,3    script    Guillaume Camp#flag23    973,{ end; }
    bat_b01,94,66,3    script    Guillaume Camp#flag24    973,{ end; }
    bat_b01,139,142,3    script    Guillaume Camp#flag25    973,{ end; }
    bat_b01,139,158,3    script    Guillaume Camp#flag26    973,{ end; }
    bat_b01,110,161,3    script    Guillaume Camp#flag27    973,{ end; }
    bat_b01,110,137,3    script    Guillaume Camp#flag28    973,{ end; }
    bat_b01,63,135,3    script    Guillaume Camp#flag29    973,{ end; }
    bat_b01,63,165,3    script    Guillaume Camp#flag30    973,{ end; }
    bat_b01,10,296,3    script    Guillaume Camp#flag31    973,{ end; }

    bat_b01,306,233,3    script    Croix Camp#flag21    974,{ end; }
    bat_b01,317,233,3    script    Croix Camp#flag22    974,{ end; }
    bat_b01,306,216,3    script    Croix Camp#flag23    974,{ end; }
    bat_b01,317,216,3    script    Croix Camp#flag24    974,{ end; }
    bat_b01,257,158,3    script    Croix Camp#flag25    974,{ end; }
    bat_b01,257,141,3    script    Croix Camp#flag26    974,{ end; }
    bat_b01,297,164,3    script    Croix Camp#flag27    974,{ end; }
    bat_b01,297,136,3    script    Croix Camp#flag28    974,{ end; }
    bat_b01,336,161,3    script    Croix Camp#flag29    974,{ end; }
    bat_b01,336,139,3    script    Croix Camp#flag30    974,{ end; }
    bat_b01,389,16,3    script    Croix Camp#flag31    974,{ end; }

    bat_b01,10,294,3    script    Vintenar#bat_b01_aover    419,{
        set .@A_B_gap,$@Guill_ScoreBG1 - $@Croix_ScoreBG1;
        if ($@FlaviusBG1_id1 == getcharid(4)) {
            if (.@A_B_gap > 0)
                callfunc "F_BG_Badge",1,"Guillaume","Flavius"; //Guillaume wins
            else if (.@A_B_gap == 0)
                callfunc "F_BG_Badge",0,"Guillaume","Flavius"; //Tie
            else
                callfunc "F_BG_Badge",0,"Guillaume","Flavius"; //Croix wins
        }
        else {
            mes "[Axl Rose]";
            mes "Why are you here, Croix mercenary? I am definitely sure of victory against foolish Croix such as you. Ha!";
            close;
        }
        bg_leave;
        if (!getbattleflag("feature.bgqueue"))
            warp "bat_room",154,150;
        end;

    OnInit:
        disablenpc "Vintenar#bat_b01_aover";
        end;
    }

    bat_b01,389,14,3    script    Vintenar#bat_b01_bover    415,{
        set .@A_B_gap,$@Guill_ScoreBG1 - $@Croix_ScoreBG1;
        if ($@FlaviusBG1_id2 == getcharid(4)) {
            if (.@A_B_gap > 0)
                callfunc "F_BG_Badge",0,"Croix","Flavius"; //Guillaume wins
            else if (.@A_B_gap == 0)
                callfunc "F_BG_Badge",0,"Croix","Flavius"; //Tie
            else
                callfunc "F_BG_Badge",1,"Croix","Flavius"; //Croix wins
        }
        else {
            mes "[Swandery]";
            mes "Why do you come here as a Guillaume? You will be sent to where you should be!";
            close;
        }
        bg_leave;
        if (!getbattleflag("feature.bgqueue"))
            warp "bat_room",154,150;
        end;

    OnInit:
        disablenpc "Vintenar#bat_b01_bover";
        end;
    }

    bat_b01,1,10,3    script    Release all#b01    81,{
        set .@i, callfunc("F_GM_NPC",1854,0);
        if (.@i == -1) {
            mes "Cancelled.";
            close;
        } else if (.@i == 0) {
            end;
        } else {
            mes "May I help you?";
            next;
            switch(select("Release all.:Cancel.")) {
            case 1:
                mes "Bye.";
                close2;
                mapwarp "bat_b01","bat_room",154,150;
                end;
            case 2:
                mes "Cancelled.";
                close;
            }
        }
    }

    // BG Queue makes these scripts useless
    -    script    BGQueueInit#flavius01    -1,{
        end;

    OnInit:
        if (getbattleflag("feature.bgqueue")) {
            unloadnpc "Lieutenant Ator";
            unloadnpc "Lieutenant Thelokus";
            unloadnpc "back_bgroomb01a";
            unloadnpc "back_bgroomb01b";
            unloadnpc "A_CODE#bat_b01";
            unloadnpc "B_CODE#bat_b01";
        }
        end;
    }
     

     

  8.  

    On 3/26/2022 at 10:56 PM, funtwocrasher said:

    Hi! I added a custom status icon (VIP Users). But I have trouble implementing them. This is what I did.

    1. src/map/status.cpp
    Added 
    case SC_VIPSTATE:
    After
    case SC_JEXPBOOST:

    2. src/map/status.hpp
    Added
    SC_VIPSTATE = 1500,
    Before
    SC_MAX,

    3. src/map/status.hpp
    Added
    EFST_VIPSTATE = 1500,
    Before
    EFST_MAX,

    4. src/map/script_constants.hpp

    Added the following on their respective lines.
    export_constant(SC_VIPSTATE);
    export_deprecated_constant2("SI_VIPSTATE",1500);
    export_constant(EFST_VIPSTATE);

    5. efstids.lub

    EFST_VIPSTATE = 1500,

     stateiconimginfo.lub
    [EFST_IDs.EFST_VIPSTATE] = "vip.tga",

     stateiconinfo.lub

    StateIconList[EFST_IDs.EFST_VIPSTATE] = {
        haveTimeLimit = 1,
        posTimeLimitStr = 2,
        descript = {
            { "VIP MEMBER", COLOR_TITLE_BUFF },
            { "Exp Bonus 10%" },
            { "Job Exp Bonus 10%" },
            { "Drop Rate Bonus 10%" },
            { "Additional 300 Storage Slot" },
            { "Can use command" },
            { "@autoattack" },
            { "@autotrade" },
            { "@autoloot" },
            { "Can get Fairy Buff for +5 All stats" }
        }
        
    }


    6. Iteminfo.yml

     Script: |
          vip_time(1440); sc_start SC_VIPSTATE,-1,0;






    I did all these things but i still receive an error and nothing works,
    image.png.e4fdbca5d1f2939a832aa51f1e27cd9e.png

    If anyone can help me, I would really appreciate it. Thank you very much!

    Hi I'm sorry for reviving this topic, but may I know how did you resolve the problem about the 
    Error: status_change_start: Invalid status change (1500)!? I tried to use different status change id like 1418, 976 and the error just don't disappear.  Some say that if this error exist this means that the status is still not exist. I followed every step you did on this thread but I can't seem to resolve the problem about the error. Can you help me, please?

    • Upvote 1
  9. On 10/18/2022 at 1:10 PM, Tero said:

    Someone on my server asked for this, and I saw that many people had been using an old script that doesn't work anymore, so I made a new one.

     

    If playing PRE-RE, you need to pull RE's costume headgears into your PRE-RE item database first.  Open re's item-db and search for 19500, and copy all the items from there until 20499 into pre-re's item database, under costume system.

     

    This script also requires code changes to a few files, but they are purely additions, nothing needs to be changed.

     

    In script.cpp

    Near all of the other defs, you need this line:

    BUILDIN_DEF(getcostumeid,"i?"),

     

    You also need to add this function, anywhere in the class:

    /*==========================================
     * Returns the costume id associated with an equip slot, if one exists
     * return costume id number or -1
     * getcostumeid(<equipment slot>{,<char_id>})
     *------------------------------------------*/
    BUILDIN_FUNC(getcostumeid)
    {
    	int i, num;
    	TBL_PC* sd;
    	struct item_data* item;
    	unsigned short returnid;
    
    	if (!script_charid2sd(3, sd)) {
    		script_pushint(st, -1);
    		return SCRIPT_CMD_FAILURE;
    	}
    
    	num = script_getnum(st, 2);
    	if (!equip_index_check(num))
    	{
    		script_pushint(st, -1);
    		return SCRIPT_CMD_SUCCESS;
    	}
    
    	// get inventory position of item
    	i = pc_checkequip(sd, equip_bitmask[num]);
    	if (i < 0)
    	{
    		script_pushint(st, -1);
    		return SCRIPT_CMD_SUCCESS;
    	}
    
    	item = sd->inventory_data[i];
    	if (item != 0) {
    		// search item db for an item with the same view id
    		returnid = itemdb_findmatchinglook(item);
    		script_pushint(st, returnid);
    	}
    	else
    		script_pushint(st, -1);
    
    	return SCRIPT_CMD_SUCCESS;
    }

     

    In itemdb.hpp:

    Add this near all the other method declarations:

    int itemdb_findmatchinglook(struct item_data* data);

     

    In itemdb.cpp:

    Add this somewhere in the class.

    static int itemdb_searchlook(DBKey key, DBData* data, va_list ap)
    {
    	struct item_data* item = (struct item_data*)db_data2ptr(data), * tomatch, ** dst;
    	tomatch = va_arg(ap, struct item_data*);
    	dst = va_arg(ap, struct item_data**);
    
    	//We want items that have the same look but not the same id
    	if (dst != NULL && item->look == tomatch->look && item->nameid > 19432 && item->nameid < 20500 && item->nameid != tomatch->nameid)
    		*dst = item;
    
    	return 0;
    }
    
    int itemdb_findmatchinglook(struct item_data* data) {
    	struct item_data* item = NULL;
    
    	itemdb->foreach(itemdb, itemdb_searchlook, data, &item, NULL);
    
    	if (item) {
    		return (int)item->nameid;
    	}
    	else {
    		return -1;
    	}
    }

     

    Then just recompile and add the script to your npc folder and to script_athena.conf or any similar file.

    //===== rAthena Script ======================================= 
    //= Costume Trader NPC
    //===== By: ================================================== 
    //= Tero
    //===== Current Version: ===================================== 
    //= 1.0
    //===== Compatible With: ===================================== 
    //= rAthena Project
    //===== Description: ========================================= 
    //= Can trade headgears for costumes.
    //===== Additional Comments: ================================= 
    //= 
    //============================================================ 
    
    prontera,145,211,4	script	Costume Trader#prt	612,{
    	mes "[Costume Trader]";
    	mes "I'm the costume trader.";
    	mes "I can trade your headgear for costume versions.";
    	mes "These items don't affect your stats, so you can wear other headgear with them.";
    	mes "Do you want to trade for a costume?";
    	next;
    	switch(select("Trade for a costume:Cancel")) {
    	case 1:
    		setarray .@indices[1], EQI_HEAD_TOP, EQI_HEAD_MID, EQI_HEAD_LOW;
    		for(.@i = 1; .@i<getarraysize(.@indices); ++.@i) {
    		if(getequipisequiped(.@indices[.@i])) {
    			.@menu$ = .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
    			.@equipped = 1;
    		}
    		.@menu$ = .@menu$ + ":";
    		}
    		if (.@equipped == 0) {
    			mes "[Costume Trader]";
    			mes "It doesn't seem you have anything you can trade.";
    			close;
    		}
    		mes "[Costume Trader]";
    		mes "Here's what you're wearing right now.";
    		next;
    		.@part = .@indices[select(.@menu$)];
    		.@baseitemid = getequipid(.@part);
    		.@costumeid = getcostumeid(.@part);
    		if (.@costumeid < 19433 || .@costumeid > 20499 ) {
    			mes "[Costume Trader]";
    			mes "Unfortunately, it doesn't seem like a costume exists for this item.";
    			mes "I guess you'll just have to keep wearing it.";
    			mes "I think it looks good on you at least.";
    			close;
    		}
    		mes "[Costume Trader]";
    		mes "A costume is available for that item.";
    		mes "If you trade, the costume will have no stats,";
    		mes "and any cards in it will be lost";
    		mes "Are you sure you want to trade?";
    		next;
    		switch(select("Do the trade!:Cancel")) {
    			case 1:
    				// anti-hack
    				if (callfunc("F_IsEquipIDHack", .@part, .@baseitemid)) {
    					mes "[Costume Trader]";
    					emotion ET_FRET;
    					mes "Wait a second...";
    					mes "Do you think I'm stupid?!";
    					mes "You switched the item while I wasn't looking! Get out of here!";
    					close;
    				}
    				delequip .@part;
    				getitem .@costumeid, 1;
    				mes "[Costume Trader]";
    				mes "Tada!";
    				mes "It's a shiny new costume item!";
    				mes "Aren't I amazing?";
    				mes "Come back again!";
    				close;
    			case 2:
    				mes "[Costume Trader]";
    				mes "That's too bad.";
    				mes "But I understand you might be attached to it.";
    				mes "Come back again.";
    				close;
    		}
    	case 2:
    		mes "[Costume Trader]";
    		mes "That's too bad.";
    		mes "Collect more cute headgear and come back.";
    		close;
    	}
    }

    Enjoy costumes!

    Hi, there sir @Tero! Good day! Does this convert the item into costume while disabling its ""item script bonus"" but not removing its ""item sockets""?

×
×
  • Create New...