Jump to content

Haruka Mayumi

Members
  • Posts

    485
  • Joined

  • Last visited

  • Days Won

    27

Posts posted by Haruka Mayumi

  1. prontera,166,190,4	script	Pre-Register Rewards	510,{
    if( !#Freebiesa313 && getcharid(3) < 2000275 ){//<<<< THIS ONE TOO
    set #Freebiesa313,1;
    mes "Welcome to Arrival RO. Please Take your rewards.";
    	getitembound 12411,2,Bound_Account;
    	getitembound 12264,2,Bound_Account;
    	getitembound 50002,1,Bound_Account;
    }
    
    else	{
    mes "You either have claimed your reward or didn't participate in Pre register Event";
    }
    close;
    }	
  2. Using logical operator AND (&&) instead of OR (||) for this code.

    AND && Operator

    Spoiler

    TRUE && TRUE = TRUE
    TRUE && FALSE = FALSE
    FALSE && TRUE = FALSE
    FALSE && FALSE = FALSE

    OR || Operator:

    Spoiler

    TRUE || TRUE = TRUE
    TRUE || FALSE = TRUE
    FALSE || TRUE = TRUE
    FALSE || FALSE = FALSE


    if (countitem(7060) < 1 && Zeny < 3000) 

    if both are true. it will do the bracket of the IF statement. if any is false. it will skip the bracket

    • MVP 1
  3. 4 possible problem..

    1. the most common sense is it was really unknown account and was not on your db..
    2. your server gepard_shield.conf is off, but your client side is enabled. or vice versa, gepard_shield.conf is on but client side is disabled.
    3. client doesn't have all the files related to gepard such as mss32.dll, msvcp and msvcr sent by functor..
    4. maybe it was not functor you contact?

    • Upvote 1
  4. 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
  5. 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
  6. 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
  7. 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
×
×
  • Create New...