Jump to content

Haruka Mayumi

Members
  • Posts

    477
  • Joined

  • Last visited

  • Days Won

    27

Posts posted by Haruka Mayumi

  1. yes it will affect the @warp command and /where
    Example you want to change the name of prontera map
    1. copy the prontera.gat
    2. rename prontera.gat to your desired name example mymap.gat
    3. add the mymap.gat on your map_cache.dat
    4. add mymap on conf/maps_athena.conf and db/map_index.txt
    5. simply add the following line to your resnametable on grf folder.

    mymap.gnd#prontera.gnd#
    mymap.gat#prontera.gat#
    mymap.rsw#prontera.rsw#
    유저인터페이스\map\mymap.bmp#유저인터페이스\map\prontera.bmp#

    all you need is to restart the server now and your client.

    • Upvote 1
  2. I don't understand why you need the complete code when there's the query for it already.

    Emperium Breaker:

    		mes "Top 10 Emperium Breaker";
    		if(!(.@nb = query_sql("SELECT B.`name`,B.`guild_id`,A.`count` FROM `breaker_ladder` AS A LEFT JOIN `char` AS B ON A.`char_id` = B.`char_id` ORDER BY `count` DESC LIMIT 10", .@name$,.@gid,.@count))) {
    			mes "No data found.";
    			close;
    		}
    		for ( .@i = 0; .@i < .@nb; .@i++ ) {
    			mes (.@i+1) +". "+ .@name$[.@i] +" ~ "+(getguildname(.@gid[.@i]) == "null" ? "None":getguildname(.@gid[.@i]))+" ~ "+ .@count[.@i] +" breaks.";
    		}

    for the WoT Ranking. i'll leave this to you so you can learn how to left join.

    EDIT: FYI you actually don't need to create a breaker_ladder sql.. just use a character variable such as "set EmpBreak,EmBreak+1;" then simply join the char_reg_num with char table. although it has certain delay

    • Like 1
  3. It's nice to use function for this but with just 2 comparable string.. you can just use the compare function like this

    604,Branch_Of_Dead_Tree,Dead Branch,2,50,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ if( compare(strcharinfo(3),"dbroom") || compare(strcharinfo(3),"06guild_")) { delitem 604,1; monster "this",-1,-1,"--ja--",-1,1,""; } else dispbottom "This item cannot be used within this are. please use the db room!"; },{},{}

     

    • Upvote 1
  4. bonus bStr,readparam(bStr)*20/100;
    bonus bAgi,readparam(bAgi)*20/100;
    bonus bVit,readparam(bVit)*20/100;
    bonus bInt,readparam(bInt)*20/100;
    bonus bDex,readparam(bDex)*20/100;
    bonus bLuk,readparam(bLuk)*20/100;

     

     

    18 hours ago, alexander03 said:

    sir thank u for your reply, really appreciated, may i ask question more sir what is the meaning of 100? this number *20/100 <== this number sir 100 whats that means ?

    • Convert the problem to an equation using the percentage formula: (Percent * NUM = M) / 100  = Answer
    • Percent is 20, NUM is readparam(bStr), so the equation is 20% * 100%(let's say your Str is 100) = M
    • So in the equation: 20 * 100 = (M becomes 2000) / 100 = Answer
    • Answer = 20
    • So 20% of 100 is 20

    This one is easy if rAthena can use float but the sad thing is.. The script only accept integers.. Easiest way is readparam(bStr)*0.20 wherein 0.20 is float.

    • MVP 1
  5. Just now, nasaankaalex said:

    Now with my limited knowledge of scripting/codes. Im curious as to what data does this foreach returns?

    it doesn't return anything it will just make the players do the NPC Event specified on the foreach..

    Just now, nasaankaalex said:

    Im trying to implement/use foreachinarea to heal a group of players centered around the npc(hence im using the foreachinarea) every x amount of seconds. Note that this group of players changes every x seconds. This uses an infinite loop yet I dont know how to implement the foreachinarea inside the infinite loop.

    You don't actually need this diff since there's getareaunits to get their name or game id's

    *getunits(<type>{,<array_variable>[<first value>]})
    *getmapunits(<type>,<"map name">{,<array_variable>[<first value>]})
    *getareaunits(<type>,<"map name">,<x1>,<y1>,<x2>,<y2>{,<array_variable>[<first value>]})
    
    The 'getunits' command will return the number of <type> objects active on the server.
    
    The 'getmapunits' command will return the number of <type> objects active on the
    specified <"map name">.
    
    The 'getareaunits' command will return the number of <type> objects actively located
    within the specified area where <x1>, <y1>, <x2>, <y2> form the area.
    
    Type is the type of object to search for:
    
    	BL_PC   - Character objects
    	BL_MOB  - Monster objects
    	BL_PET  - Pet objects
    	BL_HOM  - Homunculus objects
    	BL_MER  - Mercenary objects
    	BL_NPC  - NPC objects
    	BL_ELEM - Elemental objects
    
    If <array_variable> is provided:
    	- An int variable will return the list of GID.
    	- A string variable will return the list of names.

    then finally use sc_start and specialeffect2 to buff them.

    • Upvote 1
  6. prontera,150,182,4	script	Healer	10173,5,5,{
    OnTouch:
    while( .@i < .sc_size ){
    	sc_end .sc_status[.@i];
    	set .@i,.@i + 1;
    }
    
    sc_start SC_BLESSING,.buff_duration,10;
    sc_start SC_INCREASEAGI,.buff_duration,10;
    
    
    percentheal 100,100;
    
    while( getbrokenid(1) )
    	// repair getbrokenid(1);
    	repairall;
    	 // atcommand "@repairall";
    end;
    
    
    OnInit:
    set .buff_duration,600000;
    
    setarray .sc_status,
    	SC_STONE,SC_FREEZE,SC_STUN,SC_SLEEP,SC_POISON,SC_CURSE,SC_SILENCE,SC_CONFUSION,SC_BLIND,SC_BLEEDING,
    	SC_QUAGMIRE,SC_AETERNA,SC_HALLUCINATION,SC_SLOWDOWN,SC_BERSERK,SC_CHANGEUNDEAD,
    	SC_STRIPWEAPON,SC_STRIPSHIELD,SC_STRIPARMOR,SC_STRIPHELM;	
    set .sc_size,getarraysize( .sc_status );
    waitingroom "Free Heal",0;
    end;
    }

     

  7. *checkoption(<option number>{,<char_id>})
    *checkoption1(<option number>{,<char_id>})
    *checkoption2(<option number>{,<char_id>})
    *setoption <option number>{,<flag>{,<char_id>}};
    
    The 'setoption' series of functions check for a so-called option that is set on
    the invoking character. 'Options' are used to store status conditions and a lot
    of other non-permanent character data of the yes-no kind. For most common cases,
    it is better to use 'checkcart','checkfalcon','checkriding' and other similar
    functions, but there are some options which you cannot get at this way. They
    return 1 if the option is set and 0 if the option is not set.
    
    Option numbers valid for the first (option) version of this command are:
    
    0x1       - Sight in effect.
    0x2       - Hide in effect.
    0x4       - Cloaking in effect.
    0x8       - Cart number 1 present.
    0x10      - Falcon present.
    0x20      - Peco Peco present.
    0x40      - GM Perfect Hide in effect.
    0x80      - Cart number 2 present.
    0x100     - Cart number 3 present.
    0x200     - Cart number 4 present.
    0x400     - Cart number 5 present.
    0x800     - Orc head present.
    0x1000    - The character is wearing a wedding sprite.
    0x2000    - Ruwach is in effect.
    0x4000    - Chasewalk in effect.
    0x8000    - Flying or Xmas suit.
    0x10000   - Sighttrasher.
    0x100000  - Warg present.
    0x200000  - The character is riding a warg.

    Grandcross is an AoE skill will most likely fail if it doesn't have stats not like sight thrasher.. you need target skills

    10 minutes ago, celeron0134 said:

    grandcross skill doesnt work also

    • Love 1
  8. prontera,155,170,3	script	Tamadora	10110,3,3,{
    end;
    OnTouch_:
    	if(gettime(DT_HOUR) < 7) end;	// 7AM Onwards
    	if(!.Active){
    		initnpctimer;
    		.Active = 1;
    		.CFail = 0;
    	}
    end;
    
    OnTimer1000:
    	getmapxy(.@map$,.@x,.@y,BL_NPC);
    	.@c = getareaunits(BL_PC,.@map$,[email protected],[email protected],.@x+.Cells,.@y+.Cells,.@aid);
    	if(!.@c){
    		if(++.CFail>=.Fail){
    			stopnpctimer;
    			.Active = 0;
    			end;
    		}
    		initnpctimer;
    		end;
    	}
    	if(.CurrentCD >= .Countdown){
    		.@idx = rand(getarraysize(.ItemDrop));
    		makeitem .ItemDrop[.@idx],.ItemAmt[.@idx],.@map$,rand([email protected],.@x+.Cells),rand([email protected],.@y+.Cells);
    	}
    	if(.Countdown-.CurrentCD <= 0) .CurrentCD = 0;
    	if(.CurrentCD%3==0){
    		for(.@i=0;.@i<.@c;.@i++){
    			.@idx2 = rand(getarraysize(.SkillID));
    			unitskilluseid getnpcid(0),.SkillID[.@idx2],.SkillLV[.@idx2],.@aid[.@i],-1;
    		}
    		showscript "~ < "+(.Countdown-.CurrentCD++)+" > ~",getnpcid(0),AREA;
    		sleep 1000;
    	}
    	showscript "~ < "+(.Countdown-.CurrentCD++)+" > ~",getnpcid(0),AREA;
    	npcwalkto rand(.XY[0],.XY[2]),rand(.XY[1],.XY[3]);
    	initnpctimer;
    end;
    
    OnInit:
    	.Countdown = 120;	//seconds
    	.Fail = 3;	//3 seconds
    	.Cells = 5;	//3 Cells Away
    	npcspeed 150;
    	setarray .XY[0],150,175,160,165;
    	setarray .ItemDrop[0],7929;
    	setarray .ItemAmt[0],1;
    	setarray .SkillID[0],489,16,29,30,34;
    	setarray .SkillLV[0],15,20,10,10,10;
    end;
    }

     

    • Upvote 1
×
×
  • Create New...