Jump to content

utofaery

Members
  • Posts

    228
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by utofaery

  1. 9 hours ago, AnnieRuru said:

    db/re/map_zone_db.conf is hercules only

    you have (24) ... you have 2 more OnAgitStart, I can understand 1 is from previous script, but you have 1 more extra
    try find that one out


    gm use @agitstart
    [Status]: NPC_Event:[OnAgitStart] Run (23) Events by @AgitStart.
    [Info]: HCP: War of Emperium has been initiated.
    [Info]: HCP: '@agitstart' was used
     

    Resolved.

    But after trial, 

    killedrid is no changed at all and stuck at 1002??...

    clicking on this TesterClone#TC02 then killing all the poring drops etc...

    then the whole map end up with lots of poring nothing else...

    is there any other way to get what monster died??

    Spoiler

    -    script    Tester    4_M_PAY_SOLDIER,{
    OnCase1Test:

        deletearray( .@map_woe$ );
        deletearray( .@MobSpawnID );

        .@mapx = 46;
        .@mapy = 46;
        setarray .@map_woe$, // yours woe map

    //        "aldeg_cas01", "aldeg_cas02", "aldeg_cas03", "aldeg_cas04", "aldeg_cas05", 
    //        "gefg_cas01", "gefg_cas02", "gefg_cas03", "gefg_cas04", "gefg_cas05", 
    //        "payg_cas01", "payg_cas02", "payg_cas03", "payg_cas04", "payg_cas05", 
    //        "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05", 
    //        "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05",
    //        "schg_cas01", "schg_cas02", "schg_cas03", "schg_cas04", "schg_cas05";
            "guild_vs2";

        setarray .@MobSpawnID[0],

    //        1646, 5, // Lord Knight Seyren
    //        1647, 5, // Assassin Cross Eremes
    //        1648, 5, // Whitesmith Harword
    //        1649, 5, // High Priest Magaleta
    //        1650, 5, // Sniper Shecil
    //        1651, 5, // High Wizard Katrinn

    //        2235, 5, // Paladin Randel
    //        2236, 5, // Creator Flamel
    //        2237, 5, // Professor Celia
    //        2238, 5, // Champion Chen
    //        2239, 5, // Stalker Gertie
    //        2240, 5, // Clown Alphoccio

    //        2241, 5; // Gypsy Trentini

            1031, 3, //Poporing
            1062, 3, //Santa Poring
            1090, 3, //Mastering
    //        1096, 3, //Angeling
            1113, 3, //Drops
    //        1120, 3, //Ghostring
            1242, 3, //Marin
            1388, 3, //Arc Angeling
    //        1582, 3, //Deviling
            1613, 3, //Metaling
            1784, 3, //Stapo
            2093, 3, //Botaring
            1002, 3; //Poring

        for ( .@n = 0 ; .@n < getarraysize(.@map_woe$) ; ++.@n ) {
            if ( getcastledata(.@map_woe$[.@n], 1) ) {
                for ( .@m = 0 ; .@m < getarraysize(.@MobSpawnID) ; .@m += 2 ) {
                    for ( .@j = 0; .@j < .@MobSpawnID[.@m +1]; ++.@j ) 
                        guardian .@map_woe$[.@n], .@mapx, .@mapy, "--ja--", .@MobSpawnID[.@m], "Tester::OnCase1Dead";
                }
            } else {
                for ( .@m = 0 ; .@m < getarraysize(.@MobSpawnID) ; .@m += 2 ) {
                        monster .@map_woe$[.@n], .@mapx, .@mapy, "--ja--", .@MobSpawnID[.@m], .@MobSpawnID[.@m + 1 ], "Tester::OnCase1Dead";
                }
            }
        }

        end;

    OnCase1Dead:
        sleep2 10;
        announce "killedrid :: " + killedrid,bc_all|bc_woe; //<< doesn't UPDATE at all?? and I end up with tons of Poring....in that map

        if ( getcastledata( strcharinfo(PC_MAP), 1 ) ) {
            guardian strcharinfo(PC_MAP), 0,0,"--ja--", killedrid, strnpcinfo(0)+"::OnCase1Dead";
        } else {
            monster strcharinfo(PC_MAP), 0,0, "--ja--", killedrid, 1, strnpcinfo(0)+"::OnCase1Dead";
        }
        end;

    }

    prontera,154,174,5    duplicate(Tester)    TesterClone#TC01    4_M_PAY_SOLDIER
    guild_vs2,46,46,5    duplicate(Tester)    TesterClone#TC02    4_F_01

    guild_vs2,53,46,5    script    TesterClone#TC03    4_F_01,{
        atcommand "@reloadscript";
        end;
    }

     

    Something Interesting I found,

    While Killedrid is really nifty, but when player killed multiple monster in the same milisecond

    if killed monster consist of poporing drops poring etc, 

    and they all die in the same frame ( same milisecond)

    announce "killedrid :: " + killedrid,bc_all|bc_woe;  <<<  announce killedrid is the same if poporing was first registered as killedrid

    then the whole row of announce become poporing but no drops poring etc, 

    so is there any other way to avoid this?

    Spoiler


    -    script    EmperiumGuardian    FAKE_NPC,{
    onTestStart:// when woe start
        sleep 2;
        for( .@i = 0; .@i < .size_mob; .@i++ ) {
            for( .@j = 0; .@j < .size_map; .@j++ ) {
                if( getcastledata( .map_woe$[.@j],1 ) ) {
                    for( .@k = 0; .@k < .mob_count[.@i]; .@k++ )
                        guardian .map_woe$[.@j],0,0,"--ja--", .mob_ID[.@i];
                }
                else
                    monster .map_woe$[.@j],0,0,"--ja--", .mob_ID[.@i], .mob_count[.@i],"";
            }
        }
        end;
    onTestEnd:// when woe end
        sleep 2;
        for( .@i = 0; .@i < .size_map; .@i++ ) {
            sleep2 1;
            killmonsterall .map_woe$[.@i];
        }
        end;
    OnNPCKillEvent:
        sleep2 1;
        if( agitcheck() && compare( .mob_id_c$, killedrid +"" ) && compare( .map_woe_c$, strcharinfo(3) ) ) {// check is woe on + if mob in .mob_ID list + map in .map_woe$ list
            if( getcastledata( strcharinfo(3),1 ) ) {
                announce "killedrid :: " + killedrid,bc_all|bc_woe;
                guardian strcharinfo(3),0,0,"--ja--", killedrid;
            } else {
                announce "killedrid :: " + killedrid,bc_all|bc_woe;
                monster strcharinfo(3),0,0,"--ja--", killedrid,1,"";
            }
        }
        end;

    OnInit:
    // ------- setting

        setarray .mob_ID, 
    //        1646, // Lord Knight Seyren
    //        1647, // Assassin Cross Eremes
    //        1648, // Whitesmith Harword
    //        1649, // High Priest Magaleta
    //        1650, // Sniper Shecil
    //        1651, // High Wizard Katrinn

    //        2235, // Paladin Randel
    //        2236, // Creator Flamel
    //        2237, // Professor Celia
    //        2238, // Champion Chen
    //        2239, // Stalker Gertie
    //        2240, // Clown Alphoccio
    //        2241, // Gypsy Trentini

            1031, //Poporing
            1062, //Santa Poring
            1090, //Mastering
    //        1096, //Angeling
            1113, //Drops
    //        1120, //Ghostring
            1242, //Marin
            1388, //Arc Angeling
    //        1582, //Deviling
            1613, //Metaling
            1784, //Stapo
            2093, //Botaring
            1002, //Poring

            1002; // xsa // change this !!!

            setarray .mob_count, // number of mobs summoned / .mob_ID array column
                    5, 5, 5, 5, 5, 5,

                    5, 5, 5, 5, 5, 5, 5,

                    0; // xsa // change this !!!
            
            setarray .map_woe$, // yours woe map
    /*
                "aldeg_cas01", "aldeg_cas02", "aldeg_cas03", "aldeg_cas04", "aldeg_cas05", 
                "gefg_cas01", "gefg_cas02", "gefg_cas03", "gefg_cas04", "gefg_cas05", 
                "payg_cas01", "payg_cas02", "payg_cas03", "payg_cas04", "payg_cas05", 
                "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05", 
                "arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05",
                "schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05";
    */
            "guild_vs2";

    //-------- end of setting
        .size_mob = getarraysize( .mob_ID );
        .size_map = getarraysize( .map_woe$ );
        for( .@i = 0; .@i < .size_mob; .@i++ )
            .@tmp$[.@i] = .mob_ID[.@i];
        .mob_id_c$ = implode( .@tmp$, "|" );
        .map_woe_c$ = implode( .map_woe$, "|" );
        end;
    }
     

     

  2. 5 hours ago, FePa said:

    If player B casts any spell on Player A, even "agi up", cancels the cast of player A

    If I do understand you correctly, what you want should have everything to do with source edit.

    something to do with golden bug card which ( nullify spells ),  but even golden bug card don't even cancel casting of spell but only nullify spell effect or damage.

     

    I began to wonder what @FePa are asking  are not "Prevents casting from being interrupted " 

    but deny spell casting if Player has the itembonus equipped.

  3. 47 minutes ago, AnnieRuru said:

    btw nice to know some members still using hercules, thought that forum dead
    think should go back hercules support more and less on rathena forum ...

    Well there it's like niflheim 

    here is like prontera...

     

    And there you need to be self researching, self sufficient, self doing a lot of things.

    rathena is like half spoon half of anything else.

    • Love 1
  4. When the player takes a physical hit, the cast does not cancel << Scenario 1
    Explanation from:: 
    1.  item bonus .txt
    

    bonus bNoCastCancel,`n`;            | Prevents casting from being interrupted when hit (does not work in GvG | `n` is meaningless)

    2.       Iteminfo.lua/iteminfo.lub

                 item description...2365
                "Enables skill cast cannot be interrupted (except during WoE).",

    Conclusion:  It works exactly the way it should be...

     

    but when cast any skill he targets, his cast is canceled << What is this mean??  << Scenario 2

    Q. > single targeting skill if performed, gets canceled automatically or it block the spell from being casted???

    or you are trying to create new item bonus

     

     

  5. 29 minutes ago, AnnieRuru said:

    the screenshot was tested on hercules

    
    	setunitdata .@mobid, UDT_HP, 5;
    	setunitdata .@mobid, UDT_MAXHP, 5;

    UDT_ is hercules constant

    I understand it work the thing I not understand is why it throw infinite loop in map server.

     

    Process of infinite loop happened?!

    Start serv.bat then 

    gm use @agitstart  << in map server did this

    Map server throw error::


    [Status]: NPC_Event:[OnAgitStart] Run (24) Events by @AgitStart.
    [Info]: HCP: War of Emperium has been initiated.
    [Info]: HCP: '@agitstart' was used
    [Error]: run_script: infinity loop !

  6. 3 hours ago, lllaaazzz said:

    Sorry dude, i would help you out but im on Hercules Emulator, you should consider switching, and then just hang around here because they wont help you either. 

    Same same here lol.

     

    4 hours ago, Arthas said:
    case 4: // MaxSP +100%
      sc_start(ss, bl, SC_INCMSPRATE, 100, 100, time);
      if (tsd) clif_gospel_info(tsd, 0x18);
      break;

    try 

     

    sc_start(ss, bl, SC_INCMSPRATE, 100, 100, time);

    to 

     

    sc_start(ss, bl, SC_INCMSPRATE, 200, 200, time);

       
  7. 5 hours ago, AnnieRuru said:

    no, its not missing end, its call fall through
    if you do like this, the flag emblem will not load when the server startup

    the same with the label OnEmpBreak:
    the way you do it, the emperium wont respawn whenever someone break the emperium

     

    where is the infinite loop ? I only see lots of MVP in the map ... map-server.exe all green
     

    1. Thanks for the clarification of the "end;"

    2. I meant script1 is working correctly on rathena. no loop anything except me kepo kacau put in the end;

    3.  The loop occur however in script 2 when used on hercules.  I wonder why if you do something like 

    Spoiler

            for ( .@i = 0; .@i < .mobsize; .@i += 2 ) // <<< Loop 1
                for ( .@j = 0; .@j < .mob[.@i +1]; ++.@j ) // <<< Loop 2

    double loop in hercules if the loop 2 need to loop through may be value bigger than 10 or more then it auto infinite loop ( tested multiple times with different script)

    This is what I mean if this script run in hercules map server spit infinite loop

    9 hours ago, utofaery said:

    Script 2 running on Hercules has infinite loop, Why?

      Reveal hidden contents

    /* db\castle_db.txt
    99,guild_vs2,guild_vs2 Test Castle,test flag,1
    */
    guild_vs2,52,52,4    script    test flag    GUILD_FLAG,{
        dispbottom "=========================";
        .@gid = getcastledata("guild_vs2", 1); //CD_GUILD_ID == rathena ,  1 == hercules
        dispbottom "owner of the castle : "+( ( .@gid )? "["+ getguildname(.@gid) +"]" : "<none>" );
        dispbottom "agit check : "+( ( agitcheck() )?"on":"off" );
        dispbottom "gvg_castle mapflag : "+( ( getmapflag( strcharinfo(3), mf_gvg_castle )?"on":"off" ) );
        dispbottom "=========================";
        end;
    OnInit:
        if ( agitcheck() == false && !getcastledata("guild_vs2", 1) || agitcheck() == true )
            donpcevent strnpcinfo(0)+"::OnAgitStart";
        setmapflag "guild_vs2", mf_gvg_castle;
        flagemblem getcastledata("guild_vs2", 1);

        setarray .mob,
            1646,3, // Lord Knight Seyren
            1647,3, // Assassin Cross Eremes
            1648,3, // Whitesmith Harword
            1649,3, // High Priest Magaleta
            1650,3, // Sniper Shecil
            1651,3, // High Wizard Katrinn

            2235,3, // Paladin Randel
            2236,3, // Creator Flamel
            2237,3, // Professor Celia
            2238,3, // Champion Chen
            2239,3, // Stalker Gertie
            2240,3, // Clown Alphoccio
            2241,3; // Gypsy Trentini
        .mobsize = getarraysize(.mob);
        end;
    OnEmpBreak:
        announce "The Emperium has fallen", bc_map|bc_woe;
        killmonster strnpcinfo(4), strnpcinfo(0)+"::OnGuardianDead";
        setcastledata "guild_vs2", 1, getcharid(2);
        donpcevent "::OnRecvCastle123";
        maprespawnguildid "guild_vs2", getcharid(2), 2;
        sleep 7000;
        if ( agitcheck() == false ) end;
        end; // xsa missing end???
    OnAgitStart:

        .@mobid = monster("guild_vs2",49,49,"EMPERIUM",1288,1,strnpcinfo(NPC_NAME)+"::OnEmpBreak");
        setunitdata .@mobid, UDT_HP, 5;
        setunitdata .@mobid, UDT_MAXHP, 5;

        if ( getcastledata("guild_vs2", 1) ) {
            for ( .@i = 0; .@i < .mobsize; .@i += 2 )
                for ( .@j = 0; .@j < .mob[.@i +1]; ++.@j )
                    guardian "guild_vs2", 0, 0, "--ja--", .mob[.@i], strnpcinfo(0)+"::OnGuardianDead";
        }
        else {
            for ( .@i = 0; .@i < .mobsize; .@i += 2 )
                monster "guild_vs2", 0,0, "--ja--", .mob[.@i], .mob[.@i +1], strnpcinfo(0)+"::OnGuardianDead";
        }
        end;
    OnAgitEnd:
        killmonster strnpcinfo(4), strnpcinfo(0)+"::OnEmpBreak";
        killmonster strnpcinfo(4), strnpcinfo(0)+"::OnGuardianDead";
        end;
    OnGuardianDead:
        if ( getcastledata( strcharinfo(3), 1 ) )
            guardian strcharinfo(3), 0,0,"--ja--", killedrid, strnpcinfo(0)+"::OnGuardianDead";
        else
            monster strcharinfo(3), 0,0, "--ja--", killedrid, 1, strnpcinfo(0)+"::OnGuardianDead";
        end;
    OnAgitInit:
        requestguildinfo getcastledata("guild_vs2", 1);
        end; // xsa missing end???
    OnRecvCastle123:
        flagemblem getcastledata("guild_vs2", 1);
        end;
    OnGuildBreak:
        setcastledata "guild_vs2", 1, 0;
        donpcevent "::OnRecvCastle123";
        end;
    }

    This could be the part that trigger that infinite loop but why?

    some other script I try the for loop within for loop also causing infinite loop...

      Reveal hidden contents

        if ( getcastledata("guild_vs2", 1) ) {
            for ( .@i = 0; .@i < .mobsize; .@i += 2 )
                for ( .@j = 0; .@j < .mob[.@i +1]; ++.@j )
                    guardian "guild_vs2", 0, 0, "--ja--", .mob[.@i], strnpcinfo(0)+"::OnGuardianDead";
        }
        else {
            for ( .@i = 0; .@i < .mobsize; .@i += 2 )
                monster "guild_vs2", 0,0, "--ja--", .mob[.@i], .mob[.@i +1], strnpcinfo(0)+"::OnGuardianDead";
        }

     

     

  8. Script 1:  Running fine on rathena

    Spoiler

    /* db\castle_db.txt
    99,guild_vs2,guild_vs2 Test Castle,test flag,1
    */
    guild_vs2,52,52,4    script    test flag    GUILD_FLAG,{
        dispbottom "=========================";
        .@gid = getcastledata("guild_vs2", CD_GUILD_ID);
        dispbottom "owner of the castle : "+( ( .@gid )? "["+ getguildname(.@gid) +"]" : "<none>" );
        dispbottom "agit check : "+( ( agitcheck() )?"on":"off" );
        dispbottom "gvg_castle mapflag : "+( ( getmapflag( strcharinfo(3), mf_gvg_castle )?"on":"off" ) );
        dispbottom "=========================";
        end;
    OnInit:
        if ( agitcheck() == false && !getcastledata("guild_vs2", CD_GUILD_ID) || agitcheck() == true )
            donpcevent strnpcinfo(0)+"::OnAgitStart";
        setmapflag "guild_vs2", mf_gvg_castle;
        flagemblem getcastledata("guild_vs2", CD_GUILD_ID);
        setarray .mob,
            1646,3, // Lord Knight Seyren
            1647,3, // Assassin Cross Eremes
            1648,3, // Whitesmith Harword
            1649,3, // High Priest Magaleta
            1650,3, // Sniper Shecil
            1651,3, // High Wizard Katrinn
            2235,3, // Paladin Randel
            2236,3, // Creator Flamel
            2237,3, // Professor Celia
            2238,3, // Champion Chen
            2239,3, // Stalker Gertie
            2240,3, // Clown Alphoccio
            2241,3; // Gypsy Trentini
        .mobsize = getarraysize(.mob);
        end;
    OnEmpBreak:
        announce "The Emperium has fallen", bc_map|bc_woe;
        killmonster strnpcinfo(4), strnpcinfo(0)+"::OnGuardianDead";
        setcastledata "guild_vs2", 1, getcharid(2);
        donpcevent "::OnRecvCastle123";
        maprespawnguildid "guild_vs2", getcharid(2), 2;
        sleep 7000;
        if ( agitcheck() == false ) end;
        end; // xsa missing end???
    OnAgitStart:
        $@mobid = monster ("guild_vs2",49,49,"EMPERIUM",1288,1,strnpcinfo(0)+"::OnEmpBreak");
        setunitdata $@mobid, UMOB_HP, 5;

        if ( getcastledata("guild_vs2", CD_GUILD_ID) ) {
            for ( .@i = 0; .@i < .mobsize; .@i += 2 )
                for ( .@j = 0; .@j < .mob[.@i +1]; ++.@j )
                    guardian "guild_vs2", 0, 0, "--ja--", .mob[.@i], strnpcinfo(0)+"::OnGuardianDead";
        }
        else {
            for ( .@i = 0; .@i < .mobsize; .@i += 2 )
                monster "guild_vs2", 0,0, "--ja--", .mob[.@i], .mob[.@i +1], strnpcinfo(0)+"::OnGuardianDead";
        }
        end;
    OnAgitEnd:
        killmonster strnpcinfo(4), strnpcinfo(0)+"::OnEmpBreak";
        killmonster strnpcinfo(4), strnpcinfo(0)+"::OnGuardianDead";
        end;
    OnGuardianDead:
        if ( getcastledata( strcharinfo(3), CD_GUILD_ID ) )
            guardian strcharinfo(3), 0,0,"--ja--", killedrid, strnpcinfo(0)+"::OnGuardianDead";
        else
            monster strcharinfo(3), 0,0, "--ja--", killedrid, 1, strnpcinfo(0)+"::OnGuardianDead";
        end;
    OnAgitInit:
        requestguildinfo getcastledata("guild_vs2", CD_GUILD_ID);
        end; // xsa missing end???
    OnRecvCastle123:
        flagemblem getcastledata("guild_vs2", CD_GUILD_ID);
        end;
    OnGuildBreak:
        setcastledata "guild_vs2", 1, 0;
        donpcevent "::OnRecvCastle123";
        end;
    }
     

     

    Script 2 running on Hercules has infinite loop, Why?

    Spoiler

    /* db\castle_db.txt
    99,guild_vs2,guild_vs2 Test Castle,test flag,1
    */
    guild_vs2,52,52,4    script    test flag    GUILD_FLAG,{
        dispbottom "=========================";
        .@gid = getcastledata("guild_vs2", 1); //CD_GUILD_ID == rathena ,  1 == hercules
        dispbottom "owner of the castle : "+( ( .@gid )? "["+ getguildname(.@gid) +"]" : "<none>" );
        dispbottom "agit check : "+( ( agitcheck() )?"on":"off" );
        dispbottom "gvg_castle mapflag : "+( ( getmapflag( strcharinfo(3), mf_gvg_castle )?"on":"off" ) );
        dispbottom "=========================";
        end;
    OnInit:
        if ( agitcheck() == false && !getcastledata("guild_vs2", 1) || agitcheck() == true )
            donpcevent strnpcinfo(0)+"::OnAgitStart";
        setmapflag "guild_vs2", mf_gvg_castle;
        flagemblem getcastledata("guild_vs2", 1);

        setarray .mob,
            1646,3, // Lord Knight Seyren
            1647,3, // Assassin Cross Eremes
            1648,3, // Whitesmith Harword
            1649,3, // High Priest Magaleta
            1650,3, // Sniper Shecil
            1651,3, // High Wizard Katrinn

            2235,3, // Paladin Randel
            2236,3, // Creator Flamel
            2237,3, // Professor Celia
            2238,3, // Champion Chen
            2239,3, // Stalker Gertie
            2240,3, // Clown Alphoccio
            2241,3; // Gypsy Trentini
        .mobsize = getarraysize(.mob);
        end;
    OnEmpBreak:
        announce "The Emperium has fallen", bc_map|bc_woe;
        killmonster strnpcinfo(4), strnpcinfo(0)+"::OnGuardianDead";
        setcastledata "guild_vs2", 1, getcharid(2);
        donpcevent "::OnRecvCastle123";
        maprespawnguildid "guild_vs2", getcharid(2), 2;
        sleep 7000;
        if ( agitcheck() == false ) end;
        end; // xsa missing end???
    OnAgitStart:

        .@mobid = monster("guild_vs2",49,49,"EMPERIUM",1288,1,strnpcinfo(NPC_NAME)+"::OnEmpBreak");
        setunitdata .@mobid, UDT_HP, 5;
        setunitdata .@mobid, UDT_MAXHP, 5;

        if ( getcastledata("guild_vs2", 1) ) {
            for ( .@i = 0; .@i < .mobsize; .@i += 2 )
                for ( .@j = 0; .@j < .mob[.@i +1]; ++.@j )
                    guardian "guild_vs2", 0, 0, "--ja--", .mob[.@i], strnpcinfo(0)+"::OnGuardianDead";
        }
        else {
            for ( .@i = 0; .@i < .mobsize; .@i += 2 )
                monster "guild_vs2", 0,0, "--ja--", .mob[.@i], .mob[.@i +1], strnpcinfo(0)+"::OnGuardianDead";
        }
        end;
    OnAgitEnd:
        killmonster strnpcinfo(4), strnpcinfo(0)+"::OnEmpBreak";
        killmonster strnpcinfo(4), strnpcinfo(0)+"::OnGuardianDead";
        end;
    OnGuardianDead:
        if ( getcastledata( strcharinfo(3), 1 ) )
            guardian strcharinfo(3), 0,0,"--ja--", killedrid, strnpcinfo(0)+"::OnGuardianDead";
        else
            monster strcharinfo(3), 0,0, "--ja--", killedrid, 1, strnpcinfo(0)+"::OnGuardianDead";
        end;
    OnAgitInit:
        requestguildinfo getcastledata("guild_vs2", 1);
        end; // xsa missing end???
    OnRecvCastle123:
        flagemblem getcastledata("guild_vs2", 1);
        end;
    OnGuildBreak:
        setcastledata "guild_vs2", 1, 0;
        donpcevent "::OnRecvCastle123";
        end;
    }

    This could be the part that trigger that infinite loop but why?

    some other script I try the for loop within for loop also causing infinite loop...

    Spoiler

        if ( getcastledata("guild_vs2", 1) ) {
            for ( .@i = 0; .@i < .mobsize; .@i += 2 )
                for ( .@j = 0; .@j < .mob[.@i +1]; ++.@j )
                    guardian "guild_vs2", 0, 0, "--ja--", .mob[.@i], strnpcinfo(0)+"::OnGuardianDead";
        }
        else {
            for ( .@i = 0; .@i < .mobsize; .@i += 2 )
                monster "guild_vs2", 0,0, "--ja--", .mob[.@i], .mob[.@i +1], strnpcinfo(0)+"::OnGuardianDead";
        }

     

  9. I am trying to insert this condition check of preventing selling things in the array into the script in below

    but everytime I tried it goes into infinite loop

    Spoiler

       setarray(.@noSell0x[0], 1065, 6124, 40101, 40102, 40103, 40105 );

     

    Spoiler

    function    script    F_ETCSELLRefined    {
        setarray .Overcharge[0], 0, 7,9,11,13,15,17,19,21,23,24;
        disable_items;
        getinventorylist;
        for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) {
            if ( getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC ) {
                .@id[.@c] = @inventorylist_id[.@i];
                .@amount[.@c] = @inventorylist_amount[.@i];
                .@zeny_total += getiteminfo( .@id[.@c], ITEMINFO_SELLPRICE ) * .@amount[.@c] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100;
                ++.@c;
            }
        }
        if ( !.@c ) {
            mes "you don't have any items to sell";
            close;
        }
        mes "Are you sure selling :";
        for ( .@i = 0; .@i < .@c; ++.@i )
            mes .@amount[.@i] +"x "+ getitemname(.@id[.@i]);
        mes "for "+ F_InsertComma(.@zeny_total) +" Zeny ?";
        next;
        if ( select( "Yes", "No" ) == 2 ) close;
        if ( Zeny + .@zeny_total > MAX_ZENY ) {
            mes "You can't carry that much Zeny.";
            close;
        }
        for ( .@i = 0; .@i < .@c; ++.@i )
            delitem .@id[.@i], .@amount[.@i];
        mes "All item sold for "+ F_InsertComma(.@zeny_total) +" Zeny";
        Zeny += .@zeny_total;
        return;
    }


    The Broken Script:: (Loop till infiniti)

    Spoiler

    function    script    F_ETCSELLRefined    {
        setarray(.@noSell0x[0], 1065, 6124, 40101, 40102, 40103, 40105 );
        setarray .Overcharge[0], 0, 7,9,11,13,15,17,19,21,23,24;
        disable_items;
        getinventorylist;
        for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) {
            if ( getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_ETC ) {
                .@FCheck = 0;
                for( .@c = 0; .@c < getarraysize(.@noSell0x); ++.@c ) {
                        if ( @inventorylist_id[.@i] == .@noSell0x[.@c] ) {
                                .@FCheck = 1;
                        }
                }
                if ( .@FCheck == 0 ) {
                    .@id[.@c] = @inventorylist_id[.@i];
                    .@amount[.@c] = @inventorylist_amount[.@i];
                    .@zeny_total += getiteminfo( .@id[.@c], ITEMINFO_SELLPRICE ) * .@amount[.@c] *(100 + .Overcharge[ getskilllv(MC_OVERCHARGE)] )/100;
                }
                ++.@c;
            }
        }
        if ( !.@c ) {
            mes "you don't have any items to sell";
            close;
        }
        mes "Are you sure selling :";
        for ( .@i = 0; .@i < .@c; ++.@i )
            mes .@amount[.@i] +"x "+ getitemname(.@id[.@i]);
        mes "for "+ F_InsertComma(.@zeny_total) +" Zeny ?";
        next;
        if ( select( "Yes", "No" ) == 2 ) close;
        if ( Zeny + .@zeny_total > MAX_ZENY ) {
            mes "You can't carry that much Zeny.";
            close;
        }
        for ( .@i = 0; .@i < .@c; ++.@i )
            delitem .@id[.@i], .@amount[.@i];
        mes "All item sold for "+ F_InsertComma(.@zeny_total) +" Zeny";
        Zeny += .@zeny_total;
        return;
    }

    Edit:

    Does it has something to do with how much Etc item I has inside my inventory?

    like when I don't have more than 40 Count of different types of Etc Item it doesn't go to loop

    but when I exceed to count 80 of different type of Etc item the loop happens.

  10. Did you compare

    gospel without (sp increasing card equip item usable)

    gospel with (sp increasing card equip item usable)

    and see if it bring any different?

     

    if it did then that gospel may change only base MSP rather than total MSP

  11. 2 hours ago, AnnieRuru said:

     

    
    -	script	EmperiumGuardian	FAKE_NPC,{
    OnInit:
    	setarray .mob,
    		1646,5, // Lord Knight Seyren
    		1647,5, // Assassin Cross Eremes
    		1648,5, // Whitesmith Harword
    		1649,5, // High Priest Magaleta
    		1650,5, // Sniper Shecil
    		1651,5, // High Wizard Katrinn
    		        
    		2235,5, // Paladin Randel
    		2236,5, // Creator Flamel
    		2237,5, // Professor Celia
    		2238,5, // Champion Chen
    		2239,5, // Stalker Gertie
    		2240,5, // Clown Alphoccio
    		2241,5; // Gypsy Trentini
    	.mobsize = getarraysize(.mob);
    
    	setarray .castle$[0],
    		"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05",
    		"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05",
    		"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05",
    		"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05",
    		"arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05",
    		"schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05";
    	end;
    OnAgitStart:  callsub OnAgitStartFunction, 0, 20;
    OnAgitStart2: callsub OnAgitStartFunction, 20, 30;
    OnAgitStartFunction:
    	.@start_index = getarg(0);
    	.@end_index = getarg(1);
    	for ( .@i = .@start_index; .@i < .@end_index; ++.@i ) {
    		if ( getcastledata( .castle$[.@i], CD_GUILD_ID ) ) {
    			for ( .@j = 0; .@j < .mobsize; .@j += 2 )
    				for ( .@k = 0; .@k < .mob[.@j +1]; ++.@k )
    					guardian .castle$[.@i], 0, 0, "--ja--", .mob[.@j], strnpcinfo(0)+"::OnGuardianDead";
    		}
    		else {
    			for ( .@j = 0; .@j < .mobsize; .@j += 2 ) 
    				monster .castle$[.@i], 0,0, "--ja--", .mob[.@j], .mob[.@j +1], strnpcinfo(0)+"::OnGuardianDead";
    		}
    	}
    	end;
    OnAgitEnd:  callsub OnAgitEndFunction, 0, 20;
    OnAgitEnd2: callsub OnAgitEndFunction, 20, 30;
    OnAgitEndFunction:
    	.@start_index = getarg(0);
    	.@end_index = getarg(1);
    	for ( .@i = .@start_index; .@i < .@end_index; ++.@i )
    		killmonster .castle$[.@i], strnpcinfo(0)+"::OnGuardianDead";
    	end;
    OnGuardianDead:
    	if ( getcastledata( strcharinfo(3), CD_GUILD_ID ) )
    		guardian strcharinfo(3), 0,0,"--ja--", killedrid, strnpcinfo(0)+"::OnGuardianDead";
    	else
    		monster strcharinfo(3), 0,0, "--ja--", killedrid, 1, strnpcinfo(0)+"::OnGuardianDead";
    	end;
    //OnAgitBreakEvent:
    	// donpcevent can't include getarg, like a function ....
    }

    there is still something missing here, when the emperium breaks, all these monster has to replace with guardians

    1.
    Do I just use the script as it is and when emperium gets spawned those array monster will spawn to help protect the emperium?
    
    2.
    This script was not a replacement for those lame guardian...(guardian no mobs as support so easy die)
    It is mean to increase defense strength of defender so more hard for any one to invade ...
    so that people would actually need to form party and not solo till the emperium room to break emp...

    3. 

    Could I make a request?>

    On testing script

    I found out that on WOE:SE half of the monster actually spawn outside of WOE'ing area (guild member convenience area),

    and I am not good with the part of 

    .@j += 2

    thing 

    so could you make changes to the script so the monster is actually spawn'ed by those stone guardian like those guardian but without the defense investment level spawning stuff??

    WOE:SE script is a huge maze for me..

     

     

  12. 1.  what about the source part?

    Does he clone the whole part of @clone into skill.c??  for that new custom skill??

    Spoiler contain parts from atcommand.cpp ACMD_FUNC(clone) don't need to open!

    Spoiler


    // @clone/@slaveclone/@evilclone <playername> [Valaris]
    ACMD_FUNC(clone)
    {
        int x=0,y=0,flag=0,master=0,i=0;
        struct map_session_data *pl_sd=NULL;

        memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));

        if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
            clif_displaymessage(sd->fd,msg_txt(sd,1323)); // You must enter a player name or ID.
            return 0;
        }

        if((pl_sd=map_nick2sd(atcmd_player_name,true)) == NULL && (pl_sd=map_charid2sd(atoi(atcmd_player_name))) == NULL) {
            clif_displaymessage(fd, msg_txt(sd,3));    // Character not found.
            return 0;
        }

        if(pc_get_group_level(pl_sd) > pc_get_group_level(sd)) {
            clif_displaymessage(fd, msg_txt(sd,126));    // Cannot clone a player of higher GM level than yourself.
            return 0;
        }

        parent_cmd = atcommand_checkalias(command+1);

        if (strcmpi(parent_cmd, "clone") == 0)
            flag = 1;
        else if (strcmpi(parent_cmd, "slaveclone") == 0) {
            flag = 2;
            if(pc_isdead(sd)){
                clif_displaymessage(fd, msg_txt(sd,129+flag*2));
                return 0;
            }
            master = sd->bl.id;
            if (battle_config.atc_slave_clone_limit
                && mob_countslave(&sd->bl) >= battle_config.atc_slave_clone_limit) {
                clif_displaymessage(fd, msg_txt(sd,127));    // You've reached your slave clones limit.
                return 0;
            }
        }

        do {
            x = sd->bl.x + (rnd() % 10 - 5);
            y = sd->bl.y + (rnd() % 10 - 5);
        } while (map_getcell(sd->bl.m,x,y,CELL_CHKNOPASS) && i++ < 10);

        if (i >= 10) {
            x = sd->bl.x;
            y = sd->bl.y;
        }

        if((x = mob_clone_spawn(pl_sd, sd->bl.m, x, y, "", master, MD_NONE, flag?1:0, 0)) > 0) {
            clif_displaymessage(fd, msg_txt(sd,128+flag*2));    // Evil Clone spawned. Clone spawned. Slave clone spawned.
            return 0;
        }
        clif_displaymessage(fd, msg_txt(sd,129+flag*2));    // Unable to spawn evil clone. Unable to spawn clone. Unable to spawn slave clone.
        return 0;
    }

     

    OFFtopic::

    I have a question though,

    why rathena or the eathena so long time and yet have not the file "Skill_avail.txt",

    just like the item_avail.txt or mob_avail.txt??

    so we can definitely clone skill and test 

    eg.

    Asura (original)

    Asura (nerfed)

    Asura (Buffed)

    then test which one is the more like'd and then decide what to change in source.

     

  13. -	script	EmperiumGuardian	FAKE_NPC,{
    OnAgitStart:// when woe start
    	sleep 2;
    	for( .@i = 0; .@i < .size_mob; .@i++ ) {
    		for( .@j = 0; .@j < .size_map; .@j++ ) {
    			if( getcastledata( .map_woe$[.@j],1 ) ) {
    				for( .@k = 0; .@k < .mob_count[.@i]; .@k++ )
    					guardian .map_woe$[.@j],0,0,"--ja--", .mob_ID[.@i];
    			}
    			else
    				monster .map_woe$[.@j],0,0,"--ja--", .mob_ID[.@i], .mob_count[.@i],"";
    		}
    	}
    	end;
    OnAgitEnd:// when woe end
    	sleep 2;
    	for( .@i = 0; .@i < .size_map; .@i++ ) {
    		sleep2 1;
    		killmonsterall .map_woe$[.@i];
    	}
    	end;
    OnNPCKillEvent:
    	sleep2 1;
    	if( agitcheck() && compare( .mob_id_c$, killedrid +"" ) && compare( .map_woe_c$, strcharinfo(3) ) ) {// check is woe on + if mob in .mob_ID list + map in .map_woe$ list
    		if( getcastledata( strcharinfo(3),1 ) )
    			guardian strcharinfo(3),0,0,"--ja--", killedrid;
    		else
    			monster strcharinfo(3),0,0,"--ja--", killedrid,1,"";
    	}
    	end;
    
    OnInit:
    // ------- setting
    
    	setarray .mob_ID, 
    		1646, // Lord Knight Seyren
    		1647, // Assassin Cross Eremes
    		1648, // Whitesmith Harword
    		1649, // High Priest Magaleta
    		1650, // Sniper Shecil
    		1651, // High Wizard Katrinn
    
    		2235, // Paladin Randel
    		2236, // Creator Flamel
    		2237, // Professor Celia
    		2238, // Champion Chen
    		2239, // Stalker Gertie
    		2240, // Clown Alphoccio
    		2241, // Gypsy Trentini
    
    		1002; // xsa // change this !!!
    
    		setarray .mob_count, // number of mobs summoned / .mob_ID array column
    				5,
    				5,
    				5,
    				5,
    				5,
    				5,
    
    				5,
    				5,
    				5,
    				5,
    				5,
    				5,
    				5,
    
    				0; // xsa // change this !!!
    		
    		setarray .map_woe$, // yours woe map
    				"aldeg_cas01", 
    				"aldeg_cas02", 
    				"aldeg_cas03", 
    				"aldeg_cas04", 
    				"aldeg_cas05", 
    				"gefg_cas01", 
    				"gefg_cas02", 
    				"gefg_cas03", 
    				"gefg_cas04", 
    				"gefg_cas05", 
    				"payg_cas01", 
    				"payg_cas02", 
    				"payg_cas03", 
    				"payg_cas04", 
    				"payg_cas05", 
    				"prtg_cas01", 
    				"prtg_cas02", 
    				"prtg_cas03", 
    				"prtg_cas04", 
    				"prtg_cas05", 
    				"arug_cas01",
    				"arug_cas02",
    				"arug_cas03",
    				"arug_cas04",
    				"arug_cas05",
    				"schg_cas01",
    				"schg_cas02",
    				"schg_cas03",
    				"schg_cas04",
    				"schg_cas05";
    
    //-------- end of setting
    	.size_mob = getarraysize( .mob_ID );
    	.size_map = getarraysize( .map_woe$ );
    	for( .@i = 0; .@i < .size_mob; .@i++ )
    		.@tmp$[.@i] = .mob_ID[.@i];
    	.mob_id_c$ = implode( .@tmp$, "|" );
    	.map_woe_c$ = implode( .map_woe$, "|" );
    	end;
    }
    
    
    
    
    
    
    
    
    
    
    
    
    /*
    
    
    Add in guild/agit_main.txt
    
    killmonsterall strcharinfo(3);
    after
    
    // The Emperium has been broken.
    OnAgitBreak:
    	set .@GID,getcharid(2);
     
    
    and
    
    	donpcevent "EmperiumGuardian::OnAgitStart";
    after
    
    announce "The [" + getcastlename(strnpcinfo(2)) + "] castle has been conquered by the [" + getguildName(.@GID) + "] guild.",bc_all|bc_woe;
    
    
    */

    this script make for fun and extra guild guardian but I need help plug this script in woe2 guild war files

     

  14. 19 minutes ago, AnnieRuru said:

     

    
    // https://rathena.org/board/topic/118185-woe-random-castle/
    
    //	remember to disable these links
    //== npc\guild\agit_controller.txt
    //== npc\guild2\agit_start_se.txt
    //== npc\re\guild3\agit_start_te.txt
    
    -	script	castle_randomize	FAKE_NPC,{
    OnInit:
    	setarray .castle$[0],
    		"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05",
    		"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05",
    		"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05",
    		"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05",
    		"arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05",
    		"schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05";
    //	bindatcmd "cas", strnpcinfo(0)+"::OnDebug", 99, 100;
    	end;
    OnWed2000:
    OnSat2000:
    OnAgitInit:
    	if ( ( gettime(DT_DAYOFWEEK) == WEDNESDAY && gettime(DT_HOUR) >= 20 && gettime(DT_HOUR) < 22 ) || ( gettime(DT_DAYOFWEEK) == SATURDAY && gettime(DT_HOUR) >= 20 && gettime(DT_HOUR) < 22 ) )
    		agitstart;
    	end;
    OnWed2200:
    OnSat2200:
    	agitend;
    	end;
    OnAgitStart:
    	.@r = rand(0,19);
    	sleep 100;
    	announce "The Castles open today is "+ getcastlename( .castle$[.@r] ) +" !!", bc_woe;
    	for ( .@i = 0; .@i < 20; ++.@i ) {
    		if ( .castle$[.@i] != .castle$[.@r] ) {
    			removemapflag .castle$[.@i], mf_gvg_castle;
    			killmonster .castle$[.@i], "Agit#"+ .castle$[.@i] +"::OnAgitBreak";	
    			gvgoff .castle$[.@i];
    		}
    	}
    	end;
    OnAgitEnd:
    	for ( .@i = 0; .@i < 20; ++.@i )
    		if ( !getmapflag( .castle$[.@i], mf_gvg_castle ) )
    			setmapflag .castle$[.@i], mf_gvg_castle;
    	end;
    
    OnSun2000:
    OnAgitInit2:
    	if ( ( gettime(DT_DAYOFWEEK) == SUNDAY && gettime(DT_HOUR) >= 20 && gettime(DT_HOUR) < 22 ) )
    		agitstart2;
    	end;
    OnSun2200:
    	agitend2;
    	end;
    OnAgitStart2:
    	.@r = rand(20,29);
    	sleep 100;
    	announce "The Castles open today is "+ getcastlename( .castle$[.@r] ) +" !!", bc_woe;
    	for ( .@i = 20; .@i < 30; ++.@i ) {
    		if ( .castle$[.@i] != .castle$[.@r] ) {
    			.@str$ = substr( .castle$[.@i], 0, 1 ) + substr( .castle$[.@i], 8, 9 );
    			removemapflag .castle$[.@i], mf_gvg_castle;
    			killmonster .castle$[.@i], "Steward#"+ .@str$ +"::OnStartArena";
    			gvgoff .castle$[.@i];
    		}
    	}
    	end;
    OnAgitEnd2:
    	for ( .@i = 20; .@i < 30; ++.@i )
    		if ( !getmapflag( .castle$[.@i], mf_gvg_castle ) )
    			setmapflag .castle$[.@i], mf_gvg_castle;
    	end;
    
    //OnDebug:
    	switch ( atoi( .@atcmd_parameters$ ) ) {
    	case 0: warp "aldeg_cas01",216,23; end;
    	case 1: warp "aldeg_cas02",213,23; end;
    	case 2: warp "aldeg_cas03",205,31; end;
    	case 3: warp "aldeg_cas04",36,217; end;
    	case 4: warp "aldeg_cas05",27,101; end;
    	case 5: warp "gefg_cas01",197,181; end;
    	case 6: warp "gefg_cas02",176,178; end;
    	case 7: warp "gefg_cas03",244,166; end;
    	case 8: warp "gefg_cas04",174,177; end;
    	case 9: warp "gefg_cas05",194,184; end;
    	case 10: warp "payg_cas01",139,139; end;
    	case 11: warp "payg_cas02",38,25;   end;
    	case 12: warp "payg_cas03",269,265; end;
    	case 13: warp "payg_cas04",270,28;  end;
    	case 14: warp "payg_cas05",30,30;   end;
    	case 15: warp "prtg_cas01",197,197; end;
    	case 16: warp "prtg_cas02",157,174; end;
    	case 17: warp "prtg_cas03",16,220;  end;
    	case 18: warp "prtg_cas04",291,14;  end;
    	case 19: warp "prtg_cas05",266,266; end;
    	case 20: warp "arug_cas01",87,219; end;
    	case 21: warp "arug_cas02",89,256; end;
    	case 22: warp "arug_cas03",141,293; end;
    	case 23: warp "arug_cas04",141,293; end;
    	case 24: warp "arug_cas05",141,293; end;
    	case 25: warp "schg_cas01",120,272; end;
    	case 26: warp "schg_cas02",162,193; end;
    	case 27: warp "schg_cas03",338,202; end;
    	case 28: warp "schg_cas04",120,272; end;
    	case 29: warp "schg_cas05",120,272; end;
    	default:
    	}
    	end;
    }

     

    So in essence using this means no woe_setter from npc/custom/woe_controller.txt (no sure it's controller or setter)?

    and disable this files too?

    //	remember to disable these links
    //== npc\guild\agit_controller.txt
    //== npc\guild2\agit_start_se.txt
    //== npc\re\guild3\agit_start_te.txt

     

  15. On 2/3/2019 at 7:32 AM, AnnieRuru said:

    PS: use Shift+Enter instead of Enter

    What would this do?

    and at where should this be executed?

     

    2. 

    Hercules are correct in the regard of emulator should be hosting friendly instead of acting like most game client be.

    because it's a server thing so if crash it should always run and faster startup

    comparing cases if disable all npc but keep simple and global npc, guild npc, warps, monster, and some custom npc

    rathena would took 7 ~ 10 seconds to actually startup (including db reading which is the longest time taken half of the total time to restart server)

    hercules on the other hand if crash ... took 3 seconds if you do side by side compare... or any test

×
×
  • Create New...