Jump to content

spinzaku

Members
  • Posts

    82
  • Joined

  • Last visited

Posts posted by spinzaku

  1. On 3/6/2022 at 5:11 PM, Emistry said:
    -	script	atcmd_example	-1,{
    OnInit:
    	.max_slot = 5;
    	bindatcmd "killcount", strnpcinfo(3) + "::OnAtcommand";
    	end;
    	
    OnAtcommand:
    	if (compare(.@atcmd_parameters$[0], "reset")) {
    		if (.@atcmd_parameters$[1] == "all") {
    			for (.@i = 0; .@i < .max_slot; .@i++)
    				dispbottom .@atcmd_command$+" removed "+getmonsterinfo(#killcount_mob_id[.@i], MOB_NAME)+" from slot "+.@i+" successfully.";
    			deletearray #killcount_mob_id;
    			deletearray #killcount_amount;
    		}
    		else if (.@atcmd_parameters$[1] != "") {
    			.@index = atoi(.@atcmd_parameters$[1]);
    			if (.@index < 0 || .@index >= .max_slot) {
    				dispbottom .@atcmd_command$+" invalid slot #"+.@index+" (min = 0, max = "+.max_slot+").";
    				end;
    			}
    		}
    		else {
    			dispbottom .@atcmd_command$+" removed "+getmonsterinfo(#killcount_mob_id[.@index], MOB_NAME)+" from slot "+.@index+" successfully.";
    			#killcount_mob_id[.@index] = 0;
    			#killcount_amount[.@index] = 0;
    		}
    		#killcount_mob_id$ = "#";
    		for (.@i = 0; .@i < .max_slot; .@i++)
    			#killcount_mob_id$ = #killcount_mob_id$ + #killcount_mob_id[.@i] + "#";
    	}
    	else if (getmonsterinfo(atoi(.@atcmd_parameters$[0]), MOB_NAME) != "null") {
    		.@killcount_mob_id = atoi(.@atcmd_parameters$[0]);
    		if (.@atcmd_parameters$[1] != "") {
    			.@index = atoi(.@atcmd_parameters$[1]);
    			if (.@index < 0 || .@index >= .max_slot) {
    				dispbottom .@atcmd_command$+" invalid slot #"+.@index+" (min = 0, max = "+.max_slot+").";
    				end;
    			}
    		}
    		
    		.@temp_index = inarray(#killcount_mob_id, .@killcount_mob_id);
    		if (.@temp_index != -1) {
    			dispbottom .@atcmd_command$+" already registerd "+getmonsterinfo(#killcount_mob_id[.@temp_index], MOB_NAME)+" at slot "+.@temp_index+" with current "+F_InsertComma(#killcount_amount[.@index])+" kills.";
    			end;
    		}
    		
    		if (.@killcount_mob_id != #killcount_mob_id) {
    			#killcount_mob_id[.@index] = .@killcount_mob_id;
    			#killcount_amount[.@index] = 0;
    			dispbottom .@atcmd_command$+" registered "+getmonsterinfo(#killcount_mob_id[.@index], MOB_NAME)+" at slot "+.@temp_index+", will start counting.";
    		}
    		#killcount_mob_id$ = "#";
    		for (.@i = 0; .@i < .max_slot; .@i++)
    			#killcount_mob_id$ = #killcount_mob_id$ + #killcount_mob_id[.@i] + "#";
    	}
    	else if (compare(.@atcmd_parameters$[0], "list")) {
    		for (.@i = 0; .@i < .max_slot; .@i++)
    			dispbottom getmonsterinfo(#killcount_mob_id[.@i], MOB_NAME)+" Kill: "+F_InsertComma(#killcount_amount[.@i]);
    	}
    	else {
    		dispbottom .@atcmd_command$+" failed. Usage: "+.@atcmd_command$+" <list|reset|mob_id> {slot}";
    	}
    	end;
    	
    OnNPCKillEvent:
    	.@killedrid = killedrid;
    	if (compare(#killcount_mob_id$, "#"+.@killedrid+"#")) {
    		.@index = inarray(#killcount_mob_id, .@killedrid);
    		#killcount_amount[.@index]++;
    		dispbottom getmonsterinfo(.@killedrid, MOB_NAME)+" Kill: "+F_InsertComma(#killcount_amount[.@index]);
    	}
    	end;
    }

     

    hello @Emistry somethings wrong with this script. when i listed 5 mobs, everytime i register a mob it would say i am adding it to slot #-1.
    Numbering is also very confusing. shouldn't it be 1 to 5? script thinks its #0 to #4.

    image.png.7fcfa903350156d3e9410019a47114a6.png

     

    also @killcount reset only erases slot #0.
    nothing happens if i try:
    @killcount reset 0
    @killcount reset 1
    @killcount reset 2
    @killcount reset 3
    @killcount reset 4

    I can only delete the first registered mob with @killcount reset
    image.png.9268556e877c265bc02f9d95e54f38be.png

    i can't erase 1 by 1. have to remove all using @killcount reset all which works.

  2. I tried to put this on my server, renamed verdant_prontera to verdant_pro to make the map load.

     

     

    I wanted to replace original prontera with this, so i renamed verdant_prontera to prontera (replacing the original), put all data/texture/sprite files in client.

    changed map cache in server.


    when map is loading i get

    ---------------------------
    Error
    ---------------------------
    Block Attr ÀÌ Áö¿øµÇÁö ¾Ê´Â ¿¾¹öÁ¯ÀÇ GAT ÆÄÀÏÀÔ´Ï´Ù. »õ ¹öÁ¯ÀÇ RPGSTUDIO ¿¡¼­ ±³Á¤Çϼ¼¿ä
    ---------------------------
    OK   
    ---------------------------

    client crash

    Is there a guide to use this as the new prontera? (replacing old one)

    • Upvote 1
  3. On 12/16/2020 at 7:48 AM, Paranoia said:

    image.png.05f5f90c2e4fcc438af7c677c4011748.png

     

    is it okay getting this errors?

    To fix this error:

    in src/map/itemdb.cpp

    invalidWarning(node["Defense"], "Item defense %d exceeds DEFTYPE_MAX (%d), capping to DEFTYPE_MAX.\n", def, DEFTYPE_MAX);
    to
    //invalidWarning(node["Defense"], "Item defense %d exceeds DEFTYPE_MAX (%d), capping to DEFTYPE_MAX.\n", def, DEFTYPE_MAX);

    Thanks to @sader1992

  4. First of all I am unsure if this is possible via Script or needs Source edit? *Please transfer this to source request if scripting is not possible* 

    Anyway my request is to make /w or /who more complete. Show both Online players + Autotraders. Making them separate, makes more honest server approach and not deceive your players.

    Example when a player does /w
     

    Quote

    X players are currently online.
    X autotraders are currently online
    Total: Total: X Players + X Autotraders



    or
     

    Quote

    Total: X Players + X Autotraders



    is this possible?

  5. Thank you for this awesome script. I wish there was a setting for
    MAX Guild members so we can set (3v3,5v5,7v7)
    Maybe let guild members queue instead of guild leader? when it reaches minimum # then those who registered get ported inside?(gepard protection on queue setting?)
    It's 1 point per kill correct?

    Maybe last man standing setting.

  6. Thank you for this script.

    There seems to be a bug sometimes when killing required monsters. Lets say iv given a task to kill 400 porings. Sometimes killing 1 poring gives me 50 kill count instead of only 1 kill count. Sometimes the bug happens sometimes does not on different monsters.
    If you use @monster  summon no bug. 

    go to area where the mob is. Sometimes i can go 5/200 then at 6 it would suddenly become 56/200

    EDIT: might have figured it out because i duplicated this npc in many areas. thats why count per kill is not correct. need to disable duplicate
     

  7. -    script    No Multiple Client    -1,{
        
    OnPCLoadMapEvent:
        set .@charmap$, strcharinfo(3);
        if(!compare(.tmp$,.@charmap$)) end;
        set .@len, query_sql("SELECT DISTINCT `account_id` FROM `char` WHERE `account_id` IN "+
            "(SELECT `account_id` FROM `login` WHERE `last_unique_id` = "+
            "(SELECT `last_unique_id` FROM `login` WHERE `account_id`="+getcharid(3)+")) AND `online` <> 0;",.@a);
        if(.@len-1) {
            for(set(.@d,0);.@d<.@len;set(.@d,.@d+1)) {
                getmapxy(.@map$,.@x,.@y,0,rid2name(.@a[.@d]));
                if(.@charmap$==.@map$&&rid2name(.@a[.@d])!=strcharinfo(0)) {
                    dispbottom "Dual accounts not allowed in this Map.";
                    warp "prontera",156,186;
                }
            }
        }
        end;
        
    OnInit:
        setarray   .maps$  ,    "prtg_cas01","prtg_cas02","prtg_cas03";
        set        .lens   ,    getarraysize(.maps$)                                   ;
        for(set(.a,0);.a<.lens;set(.a,.a+1)) {
            setmapflag .maps$[.a],    mf_loadevent ;
            set .tmp$  ,.tmp$+.maps$[.a]+",";
        }
    }


    Error:
     

    [Warning]: script: buildin_getmapxy: Invalid type 0.
    [Debug]: Source (NPC): No Multiple Client (invisible/not on a map)
    [Warning]: script: buildin_getmapxy: Invalid type 0.
    [Debug]: Source (NPC): No Multiple Client (invisible/not on a map)


    I am running latest rAthena 2e3e8b8
    Also have Gepard

  8. Thank you for your hardwork. But i get this error when i use your prontera.

     

    ---------------------------
    Error
    ---------------------------
    Resource File Loading fail
    prontera_re\Catholic_01_h5.rsm
    model\prontera_re\catholic_01_h5.rsm
    ---------------------------
    OK   
    ---------------------------
    ---------------------------
    Error
    ---------------------------
    Resource File Loading fail
    prontera_re\Catholic_01_h3.rsm
    model\prontera_re\catholic_01_h3.rsm
    ---------------------------
    OK   
    ---------------------------
    ---------------------------
    Error
    ---------------------------
    Resource File Loading fail
    prontera_re\Catholic_01_h4.rsm
    model\prontera_re\catholic_01_h4.rsm
    ---------------------------
    OK   
    ---------------------------
    ---------------------------
    Error
    ---------------------------
    Resource File Loading fail
    prontera_re\Catholic_01_h2.rsm
    model\prontera_re\catholic_01_h2.rsm
    ---------------------------
    OK   
    ---------------------------

     

×
×
  • Create New...