Jump to content

Amidamaru

Members
  • Posts

    21
  • Joined

  • Last visited

Posts posted by Amidamaru

  1. //===== Hourly Points Script =========================================
    //===== By: ==========================================================
    //= GorthexTiger modified by Nibi
    //===== Current Version: =============================================
    //= 1.4.1
    //===== Compatible With: =============================================
    //= Any eAthena Version
    //===== Description: =================================================
    //= Get Points every successful hours of gameplay, you cannot get
    //= the points even if you miss a second or a minute. A player will
    //= get a very big bonus if they played 3 hours consecutively
    //= or without logging out of the game. If the player is vending
    //= the script will then stop.
    //===== Additional Comments: =========================================
    //= You can modify the script to your liking.
    //= The default points is Free Points change it anyway if you like.
    //= 1.1 = Check Chatting too
    //= 1.2 = 5 Minute Idle Check & @at/@autotrade check.
    //= 1.3 = Corrected the current balance line on 12 Hours Consecutive
    //= 1.4 = Added command to check remaining time and updated idle check. (Skorm)
    //= 1.4.1 = Modified the msgs to display according to .timer. (Skorm)
    //====================================================================
    -	script	hourlypoints3	-1,{
        
    OnPointGet:
    	//Check for idle.
    	while(checkvending() >= 1 || checkchatting() == 1 || checkidle() >= .idle) {
    		if( .@mes$ == "" ) {
    			dispbottom set( .@mes$, "The hourly points event stopped because you were vending, chatting, or idle!" );
    			set @hourly_points_timer, 0;
    		}
    		sleep2 .delay;
    	}
    	
    	@consecutive_timer++;
    	.@time_string$ = Time2Str( @consecutive_timer * ( .timer / 1000 ) );
    	dispbottom "You received "+.points+" Free Point(s) by staying ingame for 1 hour.";
    	#KAFRAPOINTS = #KAFRAPOINTS + .points;
    	dispbottom "Current Balance = "+#KAFRAPOINTS+" Free Point(s)";
    	@consecutive_bonus++;
    
    	//Check for consecutive timer.
    	if(@consecutive_bonus == .cdelay) {
    		@consecutive_bonus = 0;
    		#KAFRAPOINTS = #KAFRAPOINTS + .cpoints;
    		dispbottom "You receive a bonus "+.cpoints+" Free Point(s) by playing for minimum 3 hours consecutively!!!";
    		dispbottom "Current Balance = "+#KAFRAPOINTS+" Free Point(s)";
    	}
    	
    OnPCLoginEvent:
    	addtimer .timer,"hourlypoints3::OnPointGet";
    	@hourly_points_timer = gettimetick(2) + ( .timer / 1000 );
    	end;
    	
    OnCheck:
    	message strcharinfo(0),@hourly_points_timer ? Time2Str( @hourly_points_timer )+" Remaining.":"Something went wrong relog!";
    	end;
    
    OnInit:
    	bindatcmd "check","hourlypoints3::OnCheck"; //@check to view time till next point.
    	.timer   = 1000*60*60; //Timer in milliseconds. ( Default: 1000*60*60 [ = 1 Hour ] )
    	.cdelay  = 3;          //Delay before receiving the consecutive bonus. ( Default: 3 [ { ~ 3 Hours } *Using default timer ] )
    	.cpoints = 10;         //Points gained for consecutive time online. ( Default: 10 )
    	.points  = 1;          //Normal points gained. ( Default: 1 )
    	.delay   = 1000;       //Delay for idle re-check check. ( Default: 1000 [ = 1 Second ] )
    	.idle    = 60*5;       //Player is idle after not moving for this many seconds. ( Default: 60*5 [ = 5 Minutes ] )
    }

    Here, you may use this hourlypoints script. i've tested and it's functioning in my server

    each hour (except idle or vending) you get 1 #KAFRAPOINTS or Freepoint

    you can change into getitem instead of #KAFRAPOINTS

    CMIIW

    • Upvote 2
  2. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
          * ~~~~~~~~  Euphy's MVP Ladder v1.3  ~~~~~~~~ *
          * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    
    
    prontera,144,197,3	script	MVP Ladder	891,{
    mes "[Rank MVP]";
    	mes "Hello.";
    	mes "What are you doing here";
    	next;
    	switch(select("Check Ranking.","My points.",( getgmlevel() >= 99 ) ? "RESET":"" ,"Nothing...")) {
    		case 1:
    			mes "[Rank MVP]";
    			query_sql("SELECT char_id, CAST(`value` AS SIGNED) FROM `char_reg_num` WHERE `key` = 'MVP_Rank' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 20",.@cid,.@value);
    			for(set .@i,0; .@i<getarraysize(.@cid); set .@i,.@i+1) {
    				query_sql("SELECT `name` FROM `char` WHERE char_id = "+.@cid[.@i]+";",.@j$);
    				set .@name$[.@i], .@j$;
    			}
    			if (!getarraysize(.@cid))
    				mes "The rankings are empty.";
    			else for(set .@i,0; .@i<getarraysize(.@cid); set .@i,.@i+1)
    			mes "["+(.@i+1)+"] "+.@name$[.@i]+" ~ "+.@value[.@i]+" kills";
    			close;
    			
    		case 2:
    			mes "[Rank MVP]";
    			mes "You killed "+((MVP_Rank)?"^0055FF"+MVP_Rank:"no")+"^000000 MVP"+((MVP_Rank == 1)?".":"s.");
    			close;
    		case 3:
    			if ( select( "Confirm","Cancel" ) == 1 ) {
    				query_sql("UPDATE `char_reg_num` SET `value` = '0' WHERE `key` ='MVP_Rank'");
    				close2;
    				addrid(0);
    				MVP_Rank = 0;
    				end;
    			}
    			close;
    		default:		
    			close;
    	}
     
    OnNPCKillEvent:
    	if (getmonsterinfo(killedrid,22)) {
    		set MVP_Rank, MVP_Rank+1;
    	if (MVP_Rank == 1)
    		query_sql("INSERT INTO `char_reg_num` (`char_id`,`key`,`index`,`value`) VALUES ("+getcharid(0)+",'MVP_Rank','0',1)");
    	else
    		query_sql("UPDATE `char_reg_num` SET `value` = '"+MVP_Rank+"' WHERE char_id = "+getcharid(0)+" AND `key` ='MVP_Rank'");
    		dispbottom "~ You killed "+MVP_Rank+" MVP"+((MVP_Rank == 1)?"":"s")+". ~";
    		dispbottom " ~ Reward: Cash + 1 ~ ";
    		set #CASHPOINTS, #CASHPOINTS + 1;
    		specialeffect2 313;
    	}
    
    	end;
    		OnInit:
        waitingroom "MVP LADDER!",0;
    }

    Here, I've edited @Euphy MvP Ladder that @Emistry edited. (wrong bracket in switch-case)

    Sorry for editing without permission

    and thank you for sharing the script

  3. Hello Guys,
    I really need your help / support for these scripts.

    So here's the chronology,

    First i am using this hourly points script

    Spoiler

    -    script    hourlypointss    -1,{
        
        OnInit:
            .max_hour = 5;
            .duration = 3600;
            .npc_name$ = strnpcinfo(3);
            bindatcmd "hourly",    .npc_name$ + "::OnCheck";
            end;
            
        OnClock0000:
            query_sql( "DELETE FROM acc_reg_num` WHERE `key` = '#daily_hour_count' AND `account_id` IN ( SELECT `account_id` FROM `char` WHERE `login` = 0 GROUP BY `account_id` ) " );
            addrid(0);
            #daily_hour_count = -1;
            
        OnUpdate:
            deltimer .npc_name$+"::OnUpdate";
            #daily_hour_count++;
            switch ( #daily_hour_count ) {
                case 1:
                    #CASHPOINT += 1;
                    getitem 512,1;
                    break;
                case 2:
                    #CASHPOINT += 2;
                    getitem 512,2;
                    break;
                case 3:
                    #CASHPOINT += 3;
                    getitem 512,3;
                    break;
                case 4:
                    #CASHPOINT += 4;
                    getitem 512,4;
                    break;
                case 5:
                    #CASHPOINT += 5;
                    getitem 512,6;
                    break;
                default: break;
            }
            
        OnPCLoginEvent:
            if ( #daily_hour_count < .max_hour ) {
                @timer = gettimetick(2) + .duration;
                addtimer ( .duration * 1000 ), .npc_name$+"::OnUpdate";
            }
            if ( #daily_hour_count )    dispbottom "[ Hourly Rewards ] " + #daily_hour_count + "/" + .max_hour + " hour" + ((#daily_hour_count > 1)?"s":"") + " played!",0x9ae2d7;
            end;
            
        OnCheck:
            .@min = (@timer - gettimetick(2))/60;
            .@sec = (@timer - gettimetick(2))%60;
            dispbottom "[ Hourly Rewards ] Your next reward will be achieved in " +
                        ((.@min)?            "[ " + .@min + " ] minute"         + ((.@min > 1)?"s":""):"") +
                        ((.@min && .@sec)?    " and ":"") +
                        ((.@sec)?            "[ " + .@sec + " ] second"    + ((.@sec > 1)?"s":""):"") +
                        "!",0x9ae2d7;
            end;            
    }

    The @hourly command is working but until 1 hour. The Cash Point won't add.

    So, i tried using another script provided like this:

    Spoiler

    //===== Hourly Points Script =========================================
    //===== By: ==========================================================
    //= GorthexTiger modified by Nibi
    //===== Current Version: =============================================
    //= 1.4.1
    //===== Compatible With: =============================================
    //= Any eAthena Version
    //===== Description: =================================================
    //= Get Points every successful hours of gameplay, you cannot get
    //= the points even if you miss a second or a minute. A player will
    //= get a very big bonus if they played 3 hours consecutively
    //= or without logging out of the game. If the player is vending
    //= the script will then stop.
    //===== Additional Comments: =========================================
    //= You can modify the script to your liking.
    //= The default points is Kafrapoints change it anyway if you like.
    //= 1.1 = Check Chatting too
    //= 1.2 = 5 Minute Idle Check & @at/@autotrade check.
    //= 1.3 = Corrected the current balance line on 12 Hours Consecutive
    //= 1.4 = Added command to check remaining time and updated idle check. (Skorm)
    //= 1.4.1 = Modified the msgs to display according to .timer. (Skorm)
    //====================================================================
    -    script    hourlypoints    -1,{
        
    OnPointGet:
        //Check for idle.
        while(checkvending() >= 1 || checkchatting() == 1 || checkidle() >= .idle) {
            if( .@mes$ == "" ) {
                dispbottom set( .@mes$, "The hourly points event stopped because you were vending, chatting, or idle!" );
                set @hourly_points_timer, 0;
            }
            sleep2 .delay;
        }
        
        @consecutive_timer++;
        .@time_string$ = Time2Str( @consecutive_timer * ( .timer / 1000 ) );
        dispbottom "You received "+.points+" Kafrapoint(s) by staying ingame for "+.@time_string$+".";
        #CASHPOINTS = #CASHPOINTS + .points;
        dispbottom "Current Balance = "+#CASHPOINTS+" Kafrapoints";
        @consecutive_bonus++;

        //Check for consecutive timer.
        if(@consecutive_bonus == .cdelay) {
            @consecutive_bonus = 0;
            #CASHPOINTS = #CASHPOINTS + .cpoints;
            dispbottom "You receive a bonus "+.cpoints+" Kafrapoint(s) by playing for "+.@time_string$+" consecutively!!!";
            dispbottom "Current Balance = "+#CASHPOINTS+" Kafrapoint(s)";
        }
        
    OnPCLoginEvent:
        addtimer .timer,"hourlypoints::OnPointGet";
        @hourly_points_timer = gettimetick(2) + ( .timer / 1000 );
        end;
        
    OnCmdHour:
        message strcharinfo(0),@hourly_points_timer ? Time2Str( @hourly_points_timer )+" remaining before you get your Hourly Reward(s).":"Something went wrong or you're considered idle at the moment, try relogging!";
        end;

    OnInit:
        bindatcmd "ctr","hourlypoints::OnCmdHour"; //@ctr to view time till next point.
        .timer   = 1000*60*60; //Timer in milliseconds. ( Default: 1000*60*60 [ = 1 Hour ] )
        .cdelay  = 3;          //Delay before receiving the consecutive bonus. ( Default: 3 [ { ~ 3 Hours } *Using default timer ] )
        .cpoints = 10;         //Points gained for consecutive time online. ( Default: 10 )
        .points  = 1;          //Normal points gained. ( Default: 1 )
        .delay   = 1000;       //Delay for idle re-check check. ( Default: 1000 [ = 1 Second ] )
        .idle    = 60*5;       //Player is idle after not moving for this many seconds. ( Default: 60*5 [ = 5 Minutes ] )
    }

    It loads but when i try using @ctr command to check the time remaining. the "Map Server" is reporting an error:

    image.png.8889a4aee6d7d756d6936c5562058525.png

    [Error]: npc_event: event not found [hourlypoints::OnCmdHour]

    Sorry for the long post.

    Please help and thank you for helping.

  4. Hello everyone,
    i need help with this script. It is written in my Map Server: [Error]: npc_parsefile: Unknown syntax in file 'path file' Line '1' Stopping...

    and btw i am using this script

    -    script    hourly_point_main    -1,{
        
        OnInit:
            .max_hour = 5;
            .duration = 90;
            .npc_name$ = strnpcinfo(3);
            bindatcmd "hourly",    .npc_name$ + "::OnCheck";
            end;
            
        OnClock0000:
            query_sql( "DELETE FROM acc_reg_num` WHERE `key` = '#daily_hour_count' AND `account_id` IN ( SELECT `account_id` FROM `char` WHERE `login` = 0 GROUP BY `account_id` ) " );
            addrid(0);
            #daily_hour_count = -1;
            
        OnUpdate:
            deltimer .npc_name$+"::OnUpdate";
            #daily_hour_count++;
            switch ( #daily_hour_count ) {
                case 1:
                    #CASHPOINT += 1;
                    getitem 512,1;
                    break;
                case 2:
                    #CASHPOINT += 2;
                    getitem 512,2;
                    break;
                case 3:
                    #CASHPOINT += 3;
                    getitem 512,3;
                    break;
                case 4:
                    #CASHPOINT += 4;
                    getitem 512,4;
                    break;
                case 5:
                    #CASHPOINT += 5;
                    getitem 512,6;
                    break;
                default: break;
            }
            
        OnPCLoginEvent:
            if ( #daily_hour_count < .max_hour ) {
                @timer = gettimetick(2) + .duration;
                addtimer ( .duration * 1000 ), .npc_name$+"::OnUpdate";
            }
            if ( #daily_hour_count )    dispbottom "[ Hourly Rewards ] " + #daily_hour_count + "/" + .max_hour + " hour" + ((#daily_hour_count > 1)?"s":"") + " played!",0x9ae2d7;
            end;
            
        OnCheck:
            .@min = (@timer - gettimetick(2))/60;
            .@sec = (@timer - gettimetick(2))%60;
            dispbottom "[ Hourly Rewards ] Your next reward will be achieved in " +
                        ((.@min)?            "[ " + .@min + " ] minute"         + ((.@min > 1)?"s":""):"") +
                        ((.@min && .@sec)?    " and ":"") +
                        ((.@sec)?            "[ " + .@sec + " ] second"    + ((.@sec > 1)?"s":""):"") +
                        "!",0x9ae2d7;
            end;            
    }

    The code souce is from: @Haziel

    i tried to copy and reloadnpc it came out like this

    image.png.dbf7cf6ea8d02dbcb0c718e9eaf2dd32.png

    Really appreciate for the help and sorry for the long post. 

     

     

  5. 37 minutes ago, sader1992 said:

     like this ?

    No. What I mean is how can one make a costume headgear that does not mask the original appearance of a character. For example, if someone has a Poring Hat worn on his normal equipment and this "blank" headgear on the corresponding costume slot, then that someone retains the appearance of his/her Poring Hat even though this "blank" headgear should overwrite that appearance. It's basically a costume not acting like a costume, but occupying the costume slot nonetheless because it may have certain effects to it.

  6. By "blank" costume headgear, I mean a headgear that can be equipped on the costume slot while retaining the original appearance of the character. For example, when a player is wearing both a Poring Hat and this specific costume, the Poring Hat sprite becomes visible instead. Any effects that this costume headgear is intended to have still apply, however.

    Ideally, I am hoping one of its type for each costume slot (except the armor slot, which already works like this). Is it possible to implement a costume headgear that has these specifications? If so, how?

  7. Hello,

    i hope i post in the right section.

    i want to request a Script with a NPC that shows pub and will jump you into certain position

    for example a NPC that with "Mall Warper" pub, and when you click it, the NPC will jump you into that "X , Y" position.

    i tried searching for it, but i can't find those.

    can someone please help me?

    Thank you!

  8. 7 hours ago, Enthr said:

    Hi, i just read the post and see your SS and could help to ask, because i only see just one connection in  hamachi. Its the client side joined to the hamachi server? You need to go to "join to an existing network" in the client side and enter the network name and password. 

    When you see two dots on the network you are going to be able to connect with the other machine

    (well, at least that is how it was before, i didnt used hamachi in some time)

    Yes, the client side is connected. It shows "2/5", so the server and the client are correctly connected through Hamachi. Even then, after following hendra814's post, I still couldn't get it to work with Hamachi. I have tested both LANIP and WANIP on the clientinfo.xml + conf files, but my friend still couldn't connect.

    Does anyone know of any alternatives to getting your server online without VPS hosting (besides Hamachi)? I just want to casually test stuff along with a friend across the Internet, so I would appreciate any suggestions.

  9. Sorry for the duplicate post in the other thread. Here are the screenshots when I used both LAN IP and WAN IP.

    Using LAN IP (in char_athena.conf, map_athena.conf, subnet_athena.conf, clientinfo.xml):

    Spoiler

    Console:

    Capture.thumb.PNG.6e9ca2ecb513569927f15d37fd6d7650.PNG

    SS ingame at server side:
    Capture.thumb.PNG.76d3fd99ac4059dac00a82030a85f642.PNG

    SS ingame at client side:
    unknown.png.4d888d8e2547176c2bed71fd9c08020b.png

    Using WAN IP (in char_athena.conf, map_athena.conf, subnet_athena.conf, clientinfo.xml):

    Spoiler

    Console:
    Capture.thumb.PNG.d908723e5d123cbae4a3c1982960b92d.PNG

    SS ingame at server side:
    Capture.thumb.PNG.8c27c041b80436219eed36b9fb6004b9.PNG

    SS ingame at client side:
    unknown.png.4d888d8e2547176c2bed71fd9c08020b.png

    Hamachi:

    Spoiler

    Untitled.png.18607957b1a7308160d96fc6dab0ed88.png

    I couldn't enter the game in the server side when I used WAN IP for three conf files and clientinfo.xml.
     

    5 hours ago, hendra814 said:

    try explain with SS, here my server network

    2321347_20140910093300.jpg

    char_athena.conf

    2321347_20140910093337.jpg

    map_athena.conf

    2321347_20140910093350.jpg

    subnet_athena.conf

    2321347_20140910093527.jpg

    server clientinfo.xml

    2321347_20140910093954.jpg

    your friend clintinfo.xml

    2321347_20140910094006.jpg

    SS in game at server side

    2321347_20140917091640.jpg

    ss in game client side

    2321347_20140917091810.jpg

    I have problems viewing your screenshots... Can you please re-upload them? Thank you.
    EDIT: Sorry, I managed to get your screenshots to work now. No need to re-upload. Thanks for the screenshots!

  10. I've been trying to use Hamachi so that I could play RO with my friends, but I haven't made much progress. I followed https://rathena.org/board/topic/109823-ragnarok-online-complete-offline-pack-2017-make-your-ro-server-in-less-then-5-minutes/ to get everything set up, and read other threads about Hamachi but still couldn't get it to work. Currently, I have edited the following conf files:


    char_athena:

    // Login Server IP
    // The character server connects to the login server using this IP address.
    // NOTE: This is useful when you are running behind a firewall or are on
    // a machine with multiple interfaces.
    login_ip: LAN

    // The character server listens on the interface with this IP address.
    // NOTE: This allows you to run multiple servers on multiple interfaces
    // while using the same ports for each server.
    //bind_ip: 127.0.0.1

    // Login Server Port
    login_port: 6900

    // Character Server IP
    // The IP address which clients will use to connect.
    // Set this to what your server's public IP address is.
    char_ip: LAN

    // Character Server Port
    char_port: 6121


    map_athena:

    // Character Server IP
    // The map server connects to the character server using this IP address.
    // NOTE: This is useful when you are running behind a firewall or are on
    // a machine with multiple interfaces.
    char_ip: LAN

    // The map server listens on the interface with this IP address.
    // NOTE: This allows you to run multiple servers on multiple interfaces
    // while using the same ports for each server.
    //bind_ip: 127.0.0.1

    // Character Server Port
    char_port: 6121

    // Map Server IP
    // The IP address which clients will use to connect.
    // Set this to what your server's public IP address is.
    map_ip: LAN

    // Map Server Port
    map_port: 5121


    subnet_athena.conf:

    // Subnet support file
    // Format is:
    // subnet: net-submask:char_ip:map_ip
    // you can add more than one subnet (max 16)
    // check is if((net-submask & char_ip ) == (net-submask & servip)) => ok

    subnet: 255.0.0.0:WAN:WAN
    subnet: 255.0.0.0:LAN:LAN


    clientinfo.xml:

    <?xml version="1.0" encoding="euc-kr" ?>
    <clientinfo>
        <desc>Ragnarok Client Information</desc>
        <servicetype>korea</servicetype>
        <servertype>sakray</servertype>
        <hideaccountlist />
        <passwordencrypt />
        <passwordencrypt2 />
        <extendedslot />
        <readfolder />
        <connection>
            <display>SERVER NAME HERE</display>
            <desc>Ragnarok Online</desc>
            <balloon>this is a tool tip</balloon>
            <address>LAN</address>
            <port>6900</port>
            <version>20</version>
            <langtype>1</langtype>
            <yellow>
                <admin>2000001</admin>
                <admin>2000002</admin>
                <admin>2000003</admin>
            </yellow>
            <loading>
                <image>loading00.jpg</image>
                <image>loading01.jpg</image>
                <image>loading02.jpg</image>
                <image>loading03.jpg</image>
                <image>loading04.jpg</image>
                <image>loading05.jpg</image>
                <image>loading06.jpg</image>
                <image>loading07.jpg</image>
                <image>loading08.jpg</image>
                <image>loading09.jpg</image>
                <image>loading10.jpg</image>
            </loading>
        </connection>
    </clientinfo>


    Am I doing it right in using LAN for Hamachi? I had also disabled my firewall and antivirus program temporarily while Hamachi was running, so you could rule out the possibility of those intefering. Any help on getting our server run on Hamachi would be highly appreciated. Thank you.

×
×
  • Create New...