Jump to content

DrakeSky

Members
  • Posts

    69
  • Joined

  • Last visited

Posts posted by DrakeSky

  1. Hi! Good day!

    Anyone know how to fix the arrow issue? 

    WEAPONTYPE_CrossBow = 73,
        WEAPONTYPE_Arbalest = 74,
        WEAPONTYPE_Kakkung = 75,
        WEAPONTYPE_Hunter_Bow = 76,
        WEAPONTYPE_Bow_Of_Rudra = 77,

     

    that is the weapontable, the problem is only Gakkung and Hunter Bow shows an arrow when attacking, the rest doesn't show an arrow.

    Please help

  2. On 7/16/2020 at 8:24 PM, Patskie said:

    Try below 

    
    // if you want to use card trader where you can put multiple cards if u have them in inventory then use below
    prontera,150,150,6	script	Sample	100,{
    	getinventorylist;
    	for (.@i = 0; .@i < @inventorylist_count; .@i++) {
    		if (getiteminfo(@inventorylist_id[.@i], 2) == 6) {
    			.@menu$ = .@menu$ + getitemname(@inventorylist_id[.@i]) + ":";
    			.@cards[getarraysize(.@cards)] = @inventorylist_id[.@i];
    			.@qt[getarraysize(.@qt)] = @inventorylist_amount[.@i];
    		}
    	}
    	
    	.@i = 0;
    	
    	mes "Please select 3 cards...";
    	while (.@i < 3) {
    		if (getarraysize(.@c)) {
    			mes "> 1x " + getitemname(.@c[.@j]);
    			.@j++;
    		}
    		.@s = select(.@menu$) - 1;
    		.@c[getarraysize(.@c)] = .@cards[.@s];
    		cleararray .@qt[.@s], (.@qt[.@s] < 1 ? 0 : (.@qt[.@s]-1)), 1;
    		if (!.@qt[.@s])
    			.@menu$ = replacestr(.@menu$, getitemname(.@cards[.@s]), "");
    		.@i++;
    	}
    	
    	.@size = getarraysize(.@c);
    	mes "> 1x " + getitemname(.@c[.@j]);
    	next;
    	mes "Are you sure you want to trade these cards?";
    	
    	if (select("~ Yes:~ No") & 2) end;
    	
    	for (.@i = 0; .@i < .@size; .@i++)
    		delitem .@c[.@i], 1;
    	
    	getitem rand(4001,4699), 1;
    	
    	close;
    }
    
    // if you want to use distinct card trader, means even if u have 2x poring card you can only trade 1 of them use below
    prontera,153,153,6	script	Sample1	100,{
    	getinventorylist;
    	for (.@i = 0; .@i < @inventorylist_count; .@i++) {
    		if (getiteminfo(@inventorylist_id[.@i], 2) == 6) {
    			.@cards[getarraysize(.@cards)] = @inventorylist_id[.@i];
    			.@menu$ = .@menu$ + getitemname(@inventorylist_id[.@i]) + ":";
    		}
    	}
    	
    	.@i = 0;
    	
    	mes "Please select 3 cards...";
    	while (.@i < 3) {
    		if (getarraysize(.@c)) {
    			mes "> 1x " + getitemname(.@c[.@j]);
    			.@j++;
    		}
    		.@s = select(.@menu$) - 1;
    		.@c[getarraysize(.@c)] = .@cards[.@s];
    		.@menu$ = replacestr(.@menu$, getitemname(.@cards[.@s]), "");
    		.@i++;
    	}
    	
    	.@size = getarraysize(.@c);
    	mes "> 1x " + getitemname(.@c[.@j]);
    	next;
    	mes "Are you sure you want to trade these cards?";
    	
    	for (.@i = 0; .@i < .@size; .@i++)
    		mes "> " + getitemname(.@c[.@i]);
    	
    	if (select("~ Yes:~ No") & 2) end;
    	
    	for (.@i = 0; .@i < .@size; .@i++)
    		delitem .@c[.@i], 1;
    	
    	getitem rand(4001,4699), 1;
    	
    	close;
    }

     

    How to put blacklist array on this sir patskie? if i want to blacklist a certain card on the draw.

  3. On 10/15/2020 at 12:50 AM, AnnieRuru said:

    open another topic, you always seems to asking questions on another person's topic and mess up the conversation
    same goes to this -> https://rathena.org/board/topic/126009-deadbloody-branch-timer/?do=findComment&comment=386976
    I'll ignore all your post on this forum from now on if you don't open a new topic, I'm backseat moderating atm
    I don't have moderation power on rathena forum,

     

     

    https://github.com/AnnieRuru/Release/blob/master/scripts/Utility/choose3card_1randomcard/choose3card_1randomcard_0.2r.txt

    By the way, Ms. AnnieRuru, how can I fix this blue message on the box? The blue message on the Please select 3 cards.

    See attached file.

    ct.jpg

  4. On 10/15/2020 at 12:50 AM, AnnieRuru said:

    open another topic, you always seems to asking questions on another person's topic and mess up the conversation
    same goes to this -> https://rathena.org/board/topic/126009-deadbloody-branch-timer/?do=findComment&comment=386976
    I'll ignore all your post on this forum from now on if you don't open a new topic, I'm backseat moderating atm
    I don't have moderation power on rathena forum,

     

     

    https://github.com/AnnieRuru/Release/blob/master/scripts/Utility/choose3card_1randomcard/choose3card_1randomcard_0.2r.txt

    Oh my god! This is so perfect! AnnieRuru, thank you so much for your help. ^_^ 

  5. 20 hours ago, AnnieRuru said:

    wow !! who actually write out this formula, marvelous !!
    me wanna give credits to whoever can write this formula out

    anyways, all you have to do is just add an SQL query for it

    https://gist.github.com/AnnieRuru/d74dc61ff6b44301688f6c6e3e3d861c

     

    EDIT: found out ->

    https://rathena.org/board/topic/124490-3-cards-of-your-choice-1-random-card/?do=findComment&comment=381238

    Thank you for this Ms. AnnieRuru!, if you don't mind me asking, is there a way that I can blacklist a specific card? Like if I want to remove poring card on the list I will put 4001 something like that. 

  6. Hi! Scripters,

    Please help me on this, I want to disable or blacklist the mini boss card and boss card on this card trader script.

    TIA and Keep Safe!

    Script Below:

    prontera,151,163,6    script    Sample    100,{
        getinventorylist;
        for (.@i = 0; .@i < @inventorylist_count; .@i++) {
            if (getiteminfo(@inventorylist_id[.@i], 2) == 6) {
                .@menu$ = .@menu$ + getitemname(@inventorylist_id[.@i]) + ":";
                .@cards[getarraysize(.@cards)] = @inventorylist_id[.@i];
                .@qt[getarraysize(.@qt)] = @inventorylist_amount[.@i];
            }
        }
        
        .@i = 0;
        
        mes "Please select 3 cards...";
        while (.@i < 3) {
            if (getarraysize(.@c)) {
                mes "> 1x " + getitemname(.@c[.@j]);
                .@j++;
            }
            .@s = select(.@menu$) - 1;
            .@c[getarraysize(.@c)] = .@cards[.@s];
            cleararray .@qt[.@s], (.@qt[.@s] < 1 ? 0 : (.@qt[.@s]-1)), 1;
            if (!.@qt[.@s])
                .@menu$ = replacestr(.@menu$, getitemname(.@cards[.@s]), "");
            .@i++;
        }
        
        .@size = getarraysize(.@c);
        mes "> 1x " + getitemname(.@c[.@j]);
        next;
        mes "Are you sure you want to trade these cards?";
        
        if (select("~ Yes:~ No") & 2) end;
        
        for (.@i = 0; .@i < .@size; .@i++)
            delitem .@c[.@i], 1;
        
        getitem rand(4001,4407), 1;
        
        close;
    }

     

  7. Hi! Scripters,

    If I may ask, how to separate CASH POINTS NPC TO KAFRA POINTS NPC.

    Ex:

    I have 5000 Kafra Points (which is free cash, the one we get from hourly) then I have 2000 Cash Points (which is the credit points, the one we get from donations).

    I want an NPC that can use only Cash Points and NPC that can only use Kafra Points.

    Because every time I use cashshop I can use Cash Points and Kafra points.

    Thank you in advance. Keep safe ^_^ 

  8. On 8/19/2020 at 4:42 PM, Start_ said:

    Have you enable bind_ip? if so try disable it.

    Didn't enable bind ip at first then error starts then tried to enable to but still receiving the error. This one happens only on 2012 client don't know why. Never had this issue on 2015 client.

    Do you know how to fix arrow animation on 2015 client? When I use Gakkung there is an arrow coming out when I'm attacking but when I use Arbalest there is no arrow.

  9. 27 minutes ago, Start_ said:

    127.0.0.1 should be fine.

     

    Please have a look at

     

    1.) \conf\char_athena.conf

    Line 24, 37 ( Uncomment these lines ).

    2.) \conf\map_athena.conf

    Line 22, 33 ( Uncomment these lines ).

    It is uncomment already keep on receiving this error I don't know why. This is my clientinfo.xml. I use clientinfo.xml on aRagexe and use sclientinfo.xml on aRagexeRE

    <?xml version="1.0" encoding="euc-kr" ?>
    <clientinfo>
    <servicetype>korea</servicetype>
    <servertype>primary</servertype>
       <connection>
          <display>Ragnarok</display>
          <balloon>the balloon</balloon>
          <desc>description</desc>
          <address>127.0.0.1</address>
          <port>6900</port>
          <version>30</version>
          <langtype>1</langtype>
          <registrationweb>flux.domain.com</registrationweb>
            <aid>
                <admin>2000000</admin>
                <admin>2000001</admin>
                <admin>2000002</admin>
            </aid>
            <loading>
                <image>loadingscreen01.jpg</image>
            </loading>
       </connection>
    </clientinfo>
     

  10. Im receiving this error (check image) and having a hardtime to fix it.

    I'm creating an offline server. Im using latest rAthena and 20120410 client and my OS is Windows 10. Everytime I try to login it will disconnect then that is the error that i received.

    Everything is good in my conf folder. Even the src define_pre.hpp is good. I think the problem is with in my connection.

    Tried using 2015 client everything is ok. But the reason why I want to switch to 2012 client is because there is a problem with the arrow animation on the 2015 client.

    Please help me. TIA

     

    Untitled.jpg

  11. 21 hours ago, Poring King said:

    Pre-renewal 20151104 but now we are adopting 2018 clients and its works fine since this is the new stable client that rAthena Support

    What is the exact 2018 client should I use for Pre-Renewal settings? Where can I download it and the nemo patcher for it?

    Thanks in advance Sir Poring King

  12. On 8/11/2020 at 10:35 PM, Poring King said:
    
    OnCheck:
        message strcharinfo(0),@hourly_points_timer ? Time2Str( @hourly_points_timer )+" Remaining.":"Something went wrong relog!";
        end;

     

    I did put this, even the @hourly_points_time = gettimetick(2) + ( .s_time / 1000 ); on the OnPCLoginEvent, then I was able to check the time remaining however, after getting the points I can't check the time remaining on the next one I need to relogin to see it again.

    Script Below:

    //===== rAthena Script =======================================
    //= saders Hourly Rewards
    //===== By: ==================================================
    //= Sader1992
    //https://rathena.org/board/profile/30766-sader1992/
    //===== Current Version: =====================================
    //= 1.2
    //===== Compatible With: ===================================== 
    //= rAthena Project
    //https://rathena.org/board/files/file/3647-saders-hourly-rewards/
    //https://github.com/sader1992/sader_scripts
    //===== Description: =========================================
    //==== all the configuration are in the last
    //==== support gepard / ip / or without them
    //==== if you use ip/gepard sql will be used for that
    //==== can add minimem level to get the rewards
    //==== can change the time
    //==== can ban the vending from the rewards (it will reset after relogin)
    //==== can add rewards else then variable
    //==== there is a shop npc for the variable
    //==== you can make it only for vip
    //==== can ban idle players for X time from the Hourly Rewards
    //==== player can ban his char from getting the reward by @HourlyBan (it will reset after relogin)
    //============================================================
    //==== please send me a message if you find error
    //==== if you like my work maybe consider support me at paypal
    //==== [email protected]
    //============================================================
    //==== 1.1 FIX Critical issue with gepard/ip and compatibility with my other scripts
    //==== 1.2 FIX GrPard Variable
    //============================================================
    -    script    sader_Hourly_Rewards    -1,{
    
    OnHourlyRewards:
            if(#Hourly_Ban){
                message strcharinfo(0),"[Hourly Rewards]: You did ban this char from the Hourly Rewards , Relogin to change that .";
                addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                end;
            }
            if(.s_idle){
                if(checkidle() > .s_idle_time){
                    message strcharinfo(0),"[Hourly Rewards]: No Hourly Rewards for IDLE Players!.";
                    addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                    end;
                }
            }
            if(.s_vip){
                if(!vip_status(VIP_STATUS_ACTIVE)){
                    message strcharinfo(0),"[Hourly Rewards]: if you are a VIP you will get Hourly Rewards!.";
                    addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                    end;
                }
            }
            if(BaseLevel < .s_hourly_level){
                message strcharinfo(0),"[Hourly Rewards]: if you are level "+.s_hourly_level+" and more you will get Hourly Rewards!.";
                addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                end;
            }
            if(.s_vinding){
                if(checkvending() & .s_vinding){
                    message strcharinfo(0),"[Hourly Rewards]: No Hourly Rewards for Venders , Relogin to change that .";
                    if(.s_GePard_ip){
                    query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'");
                    }
                    #Hourly_Rewads_Check = 0;
                    #Hourly_Ban = 1;
                    addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                    end;
                }
            }
            #Hourly_Rewads_Check += 1;
            if(.s_GePard_ip == 1){
                query_sql("SELECT `last_unique_id` FROM `login` WHERE `account_id` = '"+getcharid(3)+"'", .@s_last_unique_id$);
                query_logsql("SELECT value FROM `sader_variables_log` WHERE unique_id = '"+.@s_last_unique_id$+"' AND `variable` = '#Hourly_Rewads_Check'", .@s_GePard);
                if(.@s_GePard >= #Hourly_Rewads_Check){
                    message strcharinfo(0),"[Hourly Rewards]: You already got the Hourly Rewards from this PC";
                    #Hourly_Rewads_Check -= 1;
                    addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                    end;
                }
                if(.@s_GePard == 0){
                    query_logsql("INSERT INTO `sader_variables_log` (`unique_id`,`ip`,`variable`,`index`,`value`, `account_id`, `char_id`, `char_name`) VALUES ('"+.@s_last_unique_id$+"', '"+getcharip()+"', '#Hourly_Rewads_Check', '0', '"+#Hourly_Rewads_Check+"', '"+getcharid(3)+"', '"+getcharid(0)+"', '"+strcharinfo(0)+"')");
                }
                query_logsql("Update `sader_variables_log` SET `value` = '"+#Hourly_Rewads_Check+"' WHERE `unique_id`= '"+.@s_last_unique_id$+"' AND `variable` = '#Hourly_Rewads_Check'");
            }else if(.s_GePard_ip == 2){
                query_logsql("SELECT value FROM `sader_variables_log` WHERE ip = '"+getcharip()+"' AND `variable` = '#Hourly_Rewads_Check'", .@s_ip);
                if(.@s_ip >= #Hourly_Rewads_Check){
                    message strcharinfo(0),"[Hourly Rewards]: You already got the Hourly Rewards from this IP";
                    #Hourly_Rewads_Check -= 1;
                    addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                    end;
                }
                if(.@s_ip == 0){
                    query_logsql("INSERT INTO `sader_variables_log` (`unique_id`,`ip`,`variable`,`index`,`value`, `account_id`, `char_id`, `char_name`) VALUES ('"+.@s_last_unique_id$+"', '"+getcharip()+"', '#Hourly_Rewads_Check', '0', '"+#Hourly_Rewads_Check+"', '"+getcharid(3)+"', '"+getcharid(0)+"', '"+strcharinfo(0)+"')");
                }
                query_logsql("Update `sader_variables_log` SET `value` = '"+#Hourly_Rewads_Check+"' WHERE `ip`= '"+getcharip()+"' AND `variable` = '#Hourly_Rewads_Check'");
            }        
            message strcharinfo(0),"[Hourly Rewards]: you Gain your Reward.";
            callsub Hourly_Rewads;
            addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
    
    end;
    
    OnHourlyBan:
        if(!#Hourly_Ban){
            message strcharinfo(0),"[Hourly Rewards]: You did ban this char from the Hourly Rewards , Relogin to change that .";
            if(.s_GePard_ip){
            query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'");
            }
            #Hourly_Rewads_Check = 0;
            #Hourly_Ban = 1;
            addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
        }
    end;
    
    OnUnHourlyBan:
        #Hourly_Ban = 0;
    end;
    OnPCLogoutEvent:
        if(.s_GePard_ip){
        query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'");
        }
        if(#Hourly_Ban == 1){
            #Hourly_Ban = 0;
        }
        #Hourly_Rewads_Check = 0;
    end;
    
    OnPCLoginEvent:
        addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
        @htime = gettimetick(2) + ( .s_time / 1000 );
    end;
    
    OnMyHourlyPoints:
        message strcharinfo(0),"[Hourly Rewards]: You have " + #HourlyRewards + " Hourly Points.";
    end;
    
    OnCheck:
        message strcharinfo(0),@htime ? Time2Str( @htime )+" Remaining.":"Something went wrong relog!";
    end;
    
    //message strcharinfo(0),@hourly_points_timer ? Time2Str( @hourly_points_timer )+" Remaining.":"Something went wrong relog!";
    //message strcharinfo(0),"[Hourly Rewards]: You have ? Time2Str( .s_time )+" Remaining.":"Something went wrong relog!";
    //message strcharinfo(0),"[Hourly Rewards]: You have " + #HourlyRewards + " Hourly Points.";
    
    OnInit:
        .s_idle = 0; //    ban hourly rewards from idle players ? 0 no / 1 yes {if player didn't move for x time he wont get hourly reward}  , DEFAULT = 0
        .s_idle_time = 1800; //    this the time for idle in secend  , DEFAULT = 1800 (30 min)
        .s_vip = 0; //    1 = only for VIP / 0 = for everyone  , DEFAULT = 0
        .s_time = 20000; //    1000 = 1 secend | 60000 = 1 min | 3600000 = 1 houre  , DEFAULT = 3600000 (1 hr)
        .s_hourly_level = 0; //    Minimam level to get the Houerly rewards / 0 = no minimem level  , DEFAULT 0
        .s_GePard_ip = 0; //    0 = no Gepard / 1 = Gepard / 2 = IP  , DEFAULT 0
        .s_vinding = 7; //    DEFAULT 7 / 0 = will give the reward even if vending / 1 = no normal vending / 2 = no @autotrade / 4 = no buyingstore | Example: if you want to ban normal vend and buying store you add the numbers 1+4=5
        query_logsql("CREATE TABLE IF NOT EXISTS `sader_variables_log` (`unique_id` INT( 11 ) UNSIGNED NOT NULL DEFAULT  '0',`ip` VARCHAR(100) NOT NULL,`variable` VARCHAR(32) NOT NULL, `index` INT NOT NULL, `value` INT NOT NULL,`account_id` INT NOT NULL,`char_id` INT NOT NULL,`char_name` VARCHAR(30) NOT NULL) ENGINE=MyISAM");
        bindatcmd("UnHourlyBan",strnpcinfo(3)+"::OnUnHourlyBan",99,99);
        bindatcmd("HourlyBan",strnpcinfo(3)+"::OnHourlyBan",0,99);
        bindatcmd("MyHourlyPoints",strnpcinfo(3)+"::OnMyHourlyPoints",0,99);
        bindatcmd("MHP",strnpcinfo(3)+"::OnMyHourlyPoints",0,99);
        bindatcmd "check",strnpcinfo(3)+"::OnCheck";
    end;
    
    Hourly_Rewads:
        //put the Hourly Rewards here
        #HourlyRewards += 1;
        //getitem 905,1; //    if you want to add items as reward you can add them here like that
        //getexp 10000,5000; //    if you wanna add exp as reward add them here like that
        //if(#Hourly_Rewads_Check == 5){getitem 905,1;} //    like this you can add reward for Xhr and this reward will be given for that X in this example 5 mean that the player did pass 5hr
        //if(#Hourly_Rewads_Check >= 5){getitem 905,1;} //    like this you can add reward for Xhr and this reward will be given for that X in this example 5 mean that the player did pass 5hr or more
    return;
    }
    prontera,151,171,5    pointshop    Hourly Rewards Shop    667,#HourlyRewards,901:1,902:10,903:15,904:1,905:200
    //<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>


     

  13. I was able to check the time remaining to get the points, but when I received the points, I can't check the time again. 

    Check the screenshot.

    Here is the script:

    //===== rAthena Script =======================================
    //= saders Hourly Rewards
    //===== By: ==================================================
    //= Sader1992
    //https://rathena.org/board/profile/30766-sader1992/
    //===== Current Version: =====================================
    //= 1.2
    //===== Compatible With: ===================================== 
    //= rAthena Project
    //https://rathena.org/board/files/file/3647-saders-hourly-rewards/
    //https://github.com/sader1992/sader_scripts
    //===== Description: =========================================
    //==== all the configuration are in the last
    //==== support gepard / ip / or without them
    //==== if you use ip/gepard sql will be used for that
    //==== can add minimem level to get the rewards
    //==== can change the time
    //==== can ban the vending from the rewards (it will reset after relogin)
    //==== can add rewards else then variable
    //==== there is a shop npc for the variable
    //==== you can make it only for vip
    //==== can ban idle players for X time from the Hourly Rewards
    //==== player can ban his char from getting the reward by @HourlyBan (it will reset after relogin)
    //============================================================
    //==== please send me a message if you find error
    //==== if you like my work maybe consider support me at paypal
    //==== [email protected]
    //============================================================
    //==== 1.1 FIX Critical issue with gepard/ip and compatibility with my other scripts
    //==== 1.2 FIX GrPard Variable
    //============================================================
    -    script    sader_Hourly_Rewards    -1,{
    
    OnHourlyRewards:
            if(#Hourly_Ban){
                message strcharinfo(0),"[Hourly Rewards]: You did ban this char from the Hourly Rewards , Relogin to change that .";
                addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                end;
            }
            if(.s_idle){
                if(checkidle() > .s_idle_time){
                    message strcharinfo(0),"[Hourly Rewards]: No Hourly Rewards for IDLE Players!.";
                    addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                    end;
                }
            }
            if(.s_vip){
                if(!vip_status(VIP_STATUS_ACTIVE)){
                    message strcharinfo(0),"[Hourly Rewards]: if you are a VIP you will get Hourly Rewards!.";
                    addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                    end;
                }
            }
            if(BaseLevel < .s_hourly_level){
                message strcharinfo(0),"[Hourly Rewards]: if you are level "+.s_hourly_level+" and more you will get Hourly Rewards!.";
                addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                end;
            }
            if(.s_vinding){
                if(checkvending() & .s_vinding){
                    message strcharinfo(0),"[Hourly Rewards]: No Hourly Rewards for Venders , Relogin to change that .";
                    if(.s_GePard_ip){
                    query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'");
                    }
                    #Hourly_Rewads_Check = 0;
                    #Hourly_Ban = 1;
                    addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                    end;
                }
            }
            #Hourly_Rewads_Check += 1;
            if(.s_GePard_ip == 1){
                query_sql("SELECT `last_unique_id` FROM `login` WHERE `account_id` = '"+getcharid(3)+"'", .@s_last_unique_id$);
                query_logsql("SELECT value FROM `sader_variables_log` WHERE unique_id = '"+.@s_last_unique_id$+"' AND `variable` = '#Hourly_Rewads_Check'", .@s_GePard);
                if(.@s_GePard >= #Hourly_Rewads_Check){
                    message strcharinfo(0),"[Hourly Rewards]: You already got the Hourly Rewards from this PC";
                    #Hourly_Rewads_Check -= 1;
                    addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                    end;
                }
                if(.@s_GePard == 0){
                    query_logsql("INSERT INTO `sader_variables_log` (`unique_id`,`ip`,`variable`,`index`,`value`, `account_id`, `char_id`, `char_name`) VALUES ('"+.@s_last_unique_id$+"', '"+getcharip()+"', '#Hourly_Rewads_Check', '0', '"+#Hourly_Rewads_Check+"', '"+getcharid(3)+"', '"+getcharid(0)+"', '"+strcharinfo(0)+"')");
                }
                query_logsql("Update `sader_variables_log` SET `value` = '"+#Hourly_Rewads_Check+"' WHERE `unique_id`= '"+.@s_last_unique_id$+"' AND `variable` = '#Hourly_Rewads_Check'");
            }else if(.s_GePard_ip == 2){
                query_logsql("SELECT value FROM `sader_variables_log` WHERE ip = '"+getcharip()+"' AND `variable` = '#Hourly_Rewads_Check'", .@s_ip);
                if(.@s_ip >= #Hourly_Rewads_Check){
                    message strcharinfo(0),"[Hourly Rewards]: You already got the Hourly Rewards from this IP";
                    #Hourly_Rewads_Check -= 1;
                    addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                    end;
                }
                if(.@s_ip == 0){
                    query_logsql("INSERT INTO `sader_variables_log` (`unique_id`,`ip`,`variable`,`index`,`value`, `account_id`, `char_id`, `char_name`) VALUES ('"+.@s_last_unique_id$+"', '"+getcharip()+"', '#Hourly_Rewads_Check', '0', '"+#Hourly_Rewads_Check+"', '"+getcharid(3)+"', '"+getcharid(0)+"', '"+strcharinfo(0)+"')");
                }
                query_logsql("Update `sader_variables_log` SET `value` = '"+#Hourly_Rewads_Check+"' WHERE `ip`= '"+getcharip()+"' AND `variable` = '#Hourly_Rewads_Check'");
            }        
            message strcharinfo(0),"[Hourly Rewards]: you Gain your Reward.";
            callsub Hourly_Rewads;
            addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
    
    end;
    
    OnHourlyBan:
        if(!#Hourly_Ban){
            message strcharinfo(0),"[Hourly Rewards]: You did ban this char from the Hourly Rewards , Relogin to change that .";
            if(.s_GePard_ip){
            query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'");
            }
            #Hourly_Rewads_Check = 0;
            #Hourly_Ban = 1;
            addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
        }
    end;
    
    OnUnHourlyBan:
        #Hourly_Ban = 0;
    end;
    OnPCLogoutEvent:
        if(.s_GePard_ip){
        query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'");
        }
        if(#Hourly_Ban == 1){
            #Hourly_Ban = 0;
        }
        #Hourly_Rewads_Check = 0;
    end;
    
    OnPCLoginEvent:
        addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
        @htime = gettimetick(2) + ( .s_time / 1000 );
    end;
    
    OnMyHourlyPoints:
        message strcharinfo(0),"[Hourly Rewards]: You have " + #HourlyRewards + " Hourly Points.";
    end;
    
    OnCheck:
        message strcharinfo(0),@htime ? Time2Str( @htime )+" Remaining.":"Something went wrong relog!";
    end;
    
    //message strcharinfo(0),@hourly_points_timer ? Time2Str( @hourly_points_timer )+" Remaining.":"Something went wrong relog!";
    //message strcharinfo(0),"[Hourly Rewards]: You have ? Time2Str( .s_time )+" Remaining.":"Something went wrong relog!";
    //message strcharinfo(0),"[Hourly Rewards]: You have " + #HourlyRewards + " Hourly Points.";
    
    OnInit:
        .s_idle = 0; //    ban hourly rewards from idle players ? 0 no / 1 yes {if player didn't move for x time he wont get hourly reward}  , DEFAULT = 0
        .s_idle_time = 1800; //    this the time for idle in secend  , DEFAULT = 1800 (30 min)
        .s_vip = 0; //    1 = only for VIP / 0 = for everyone  , DEFAULT = 0
        .s_time = 20000; //    1000 = 1 secend | 60000 = 1 min | 3600000 = 1 houre  , DEFAULT = 3600000 (1 hr)
        .s_hourly_level = 0; //    Minimam level to get the Houerly rewards / 0 = no minimem level  , DEFAULT 0
        .s_GePard_ip = 0; //    0 = no Gepard / 1 = Gepard / 2 = IP  , DEFAULT 0
        .s_vinding = 7; //    DEFAULT 7 / 0 = will give the reward even if vending / 1 = no normal vending / 2 = no @autotrade / 4 = no buyingstore | Example: if you want to ban normal vend and buying store you add the numbers 1+4=5
        query_logsql("CREATE TABLE IF NOT EXISTS `sader_variables_log` (`unique_id` INT( 11 ) UNSIGNED NOT NULL DEFAULT  '0',`ip` VARCHAR(100) NOT NULL,`variable` VARCHAR(32) NOT NULL, `index` INT NOT NULL, `value` INT NOT NULL,`account_id` INT NOT NULL,`char_id` INT NOT NULL,`char_name` VARCHAR(30) NOT NULL) ENGINE=MyISAM");
        bindatcmd("UnHourlyBan",strnpcinfo(3)+"::OnUnHourlyBan",99,99);
        bindatcmd("HourlyBan",strnpcinfo(3)+"::OnHourlyBan",0,99);
        bindatcmd("MyHourlyPoints",strnpcinfo(3)+"::OnMyHourlyPoints",0,99);
        bindatcmd("MHP",strnpcinfo(3)+"::OnMyHourlyPoints",0,99);
        bindatcmd "check",strnpcinfo(3)+"::OnCheck";
    end;
    
    Hourly_Rewads:
        //put the Hourly Rewards here
        #HourlyRewards += 1;
        //getitem 905,1; //    if you want to add items as reward you can add them here like that
        //getexp 10000,5000; //    if you wanna add exp as reward add them here like that
        //if(#Hourly_Rewads_Check == 5){getitem 905,1;} //    like this you can add reward for Xhr and this reward will be given for that X in this example 5 mean that the player did pass 5hr
        //if(#Hourly_Rewads_Check >= 5){getitem 905,1;} //    like this you can add reward for Xhr and this reward will be given for that X in this example 5 mean that the player did pass 5hr or more
    return;
    }
    prontera,151,171,5    pointshop    Hourly Rewards Shop    667,#HourlyRewards,901:1,902:10,903:15,904:1,905:200
    //<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>

    timecheck.jpg

    timecheck2.jpg

  14. How to put time check on this script?

    when I type @check it will show a message

    45minutes and 13seconds to get your points

    //===== rAthena Script =======================================
    //= saders Hourly Rewards
    //===== By: ==================================================
    //= Sader1992
    //https://rathena.org/board/profile/30766-sader1992/
    //===== Current Version: =====================================
    //= 1.2
    //===== Compatible With: ===================================== 
    //= rAthena Project
    //https://rathena.org/board/files/file/3647-saders-hourly-rewards/
    //https://github.com/sader1992/sader_scripts
    //===== Description: =========================================
    //==== all the configuration are in the last
    //==== support gepard / ip / or without them
    //==== if you use ip/gepard sql will be used for that
    //==== can add minimem level to get the rewards
    //==== can change the time
    //==== can ban the vending from the rewards (it will reset after relogin)
    //==== can add rewards else then variable
    //==== there is a shop npc for the variable
    //==== you can make it only for vip
    //==== can ban idle players for X time from the Hourly Rewards
    //==== player can ban his char from getting the reward by @HourlyBan (it will reset after relogin)
    //============================================================
    //==== please send me a message if you find error
    //==== if you like my work maybe consider support me at paypal
    //==== [email protected]
    //============================================================
    //==== 1.1 FIX Critical issue with gepard/ip and compatibility with my other scripts
    //==== 1.2 FIX GrPard Variable
    //============================================================
    -    script    sader_Hourly_Rewards    -1,{
    
    OnHourlyRewards:
            if(#Hourly_Ban){
                message strcharinfo(0),"[Hourly Rewards]: You did ban this char from the Hourly Rewards , Relogin to change that .";
                addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                end;
            }
            if(.s_idle){
                if(checkidle() > .s_idle_time){
                    message strcharinfo(0),"[Hourly Rewards]: No Hourly Rewards for IDLE Players!.";
                    addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                    end;
                }
            }
            if(.s_vip){
                if(!vip_status(VIP_STATUS_ACTIVE)){
                    message strcharinfo(0),"[Hourly Rewards]: if you are a VIP you will get Hourly Rewards!.";
                    addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                    end;
                }
            }
            if(BaseLevel < .s_hourly_level){
                message strcharinfo(0),"[Hourly Rewards]: if you are level "+.s_hourly_level+" and more you will get Hourly Rewards!.";
                addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                end;
            }
            if(.s_vinding){
                if(checkvending() & .s_vinding){
                    message strcharinfo(0),"[Hourly Rewards]: No Hourly Rewards for Venders , Relogin to change that .";
                    if(.s_GePard_ip){
                    query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'");
                    }
                    #Hourly_Rewads_Check = 0;
                    #Hourly_Ban = 1;
                    addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                    end;
                }
            }
            #Hourly_Rewads_Check += 1;
            if(.s_GePard_ip == 1){
                query_sql("SELECT `last_unique_id` FROM `login` WHERE `account_id` = '"+getcharid(3)+"'", .@s_last_unique_id$);
                query_logsql("SELECT value FROM `sader_variables_log` WHERE unique_id = '"+.@s_last_unique_id$+"' AND `variable` = '#Hourly_Rewads_Check'", .@s_GePard);
                if(.@s_GePard >= #Hourly_Rewads_Check){
                    message strcharinfo(0),"[Hourly Rewards]: You already got the Hourly Rewards from this PC";
                    #Hourly_Rewads_Check -= 1;
                    addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                    end;
                }
                if(.@s_GePard == 0){
                    query_logsql("INSERT INTO `sader_variables_log` (`unique_id`,`ip`,`variable`,`index`,`value`, `account_id`, `char_id`, `char_name`) VALUES ('"+.@s_last_unique_id$+"', '"+getcharip()+"', '#Hourly_Rewads_Check', '0', '"+#Hourly_Rewads_Check+"', '"+getcharid(3)+"', '"+getcharid(0)+"', '"+strcharinfo(0)+"')");
                }
                query_logsql("Update `sader_variables_log` SET `value` = '"+#Hourly_Rewads_Check+"' WHERE `unique_id`= '"+.@s_last_unique_id$+"' AND `variable` = '#Hourly_Rewads_Check'");
            }else if(.s_GePard_ip == 2){
                query_logsql("SELECT value FROM `sader_variables_log` WHERE ip = '"+getcharip()+"' AND `variable` = '#Hourly_Rewads_Check'", .@s_ip);
                if(.@s_ip >= #Hourly_Rewads_Check){
                    message strcharinfo(0),"[Hourly Rewards]: You already got the Hourly Rewards from this IP";
                    #Hourly_Rewads_Check -= 1;
                    addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                    end;
                }
                if(.@s_ip == 0){
                    query_logsql("INSERT INTO `sader_variables_log` (`unique_id`,`ip`,`variable`,`index`,`value`, `account_id`, `char_id`, `char_name`) VALUES ('"+.@s_last_unique_id$+"', '"+getcharip()+"', '#Hourly_Rewads_Check', '0', '"+#Hourly_Rewads_Check+"', '"+getcharid(3)+"', '"+getcharid(0)+"', '"+strcharinfo(0)+"')");
                }
                query_logsql("Update `sader_variables_log` SET `value` = '"+#Hourly_Rewads_Check+"' WHERE `ip`= '"+getcharip()+"' AND `variable` = '#Hourly_Rewads_Check'");
            }
            message strcharinfo(0),"[Hourly Rewards]: you Gain your Reward.";
            callsub Hourly_Rewads;
            addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
    end;
    
    OnHourlyBan:
        if(!#Hourly_Ban){
            message strcharinfo(0),"[Hourly Rewards]: You did ban this char from the Hourly Rewards , Relogin to change that .";
            if(.s_GePard_ip){
            query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'");
            }
            #Hourly_Rewads_Check = 0;
            #Hourly_Ban = 1;
            addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
        }
    end;
    
    OnUnHourlyBan:
        #Hourly_Ban = 0;
    end;
    OnPCLogoutEvent:
        if(.s_GePard_ip){
        query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'");
        }
        if(#Hourly_Ban == 1){
            #Hourly_Ban = 0;
        }
        #Hourly_Rewads_Check = 0;
    end;
    
    OnPCLoginEvent:
        addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
    end;
    
    OnMyHourlyPoints:
        message strcharinfo(0),"[Hourly Rewards]: You have " + #HourlyRewards + " Hourly Points .";
    end;
    
    OnCheck:
        message strcharinfo(0),"[Hourly Rewards]: You have " + #HourlyRewards + " Hourly Points .";
    end;
    
    OnInit:
        .s_idle = 0; //    ban hourly rewards from idle players ? 0 no / 1 yes {if player didn't move for x time he wont get hourly reward}  , DEFAULT = 0
        .s_idle_time = 1800; //    this the time for idle in secend  , DEFAULT = 1800 (30 min)
        .s_vip = 0; //    1 = only for VIP / 0 = for everyone  , DEFAULT = 0
        .s_time = 3600000; //    1000 = 1 secend | 60000 = 1 min | 3600000 = 1 houre  , DEFAULT = 3600000 (1 hr)
        .s_hourly_level = 0; //    Minimam level to get the Houerly rewards / 0 = no minimem level  , DEFAULT 0
        .s_GePard_ip = 0; //    0 = no Gepard / 1 = Gepard / 2 = IP  , DEFAULT 0
        .s_vinding = 7; //    DEFAULT 7 / 0 = will give the reward even if vending / 1 = no normal vending / 2 = no @autotrade / 4 = no buyingstore | Example: if you want to ban normal vend and buying store you add the numbers 1+4=5
        query_logsql("CREATE TABLE IF NOT EXISTS `sader_variables_log` (`unique_id` INT( 11 ) UNSIGNED NOT NULL DEFAULT  '0',`ip` VARCHAR(100) NOT NULL,`variable` VARCHAR(32) NOT NULL, `index` INT NOT NULL, `value` INT NOT NULL,`account_id` INT NOT NULL,`char_id` INT NOT NULL,`char_name` VARCHAR(30) NOT NULL) ENGINE=MyISAM");
        bindatcmd("UnHourlyBan",strnpcinfo(3)+"::OnUnHourlyBan",99,99);
        bindatcmd("HourlyBan",strnpcinfo(3)+"::OnHourlyBan",0,99);
        bindatcmd("MyHourlyPoints",strnpcinfo(3)+"::OnMyHourlyPoints",0,99);
        bindatcmd("MHP",strnpcinfo(3)+"::OnMyHourlyPoints",0,99);
    end;
    
    Hourly_Rewads:
        //put the Hourly Rewards here
        #HourlyRewards += 1;
        //getitem 905,1; //    if you want to add items as reward you can add them here like that
        //getexp 10000,5000; //    if you wanna add exp as reward add them here like that
        //if(#Hourly_Rewads_Check == 5){getitem 905,1;} //    like this you can add reward for Xhr and this reward will be given for that X in this example 5 mean that the player did pass 5hr
        //if(#Hourly_Rewads_Check >= 5){getitem 905,1;} //    like this you can add reward for Xhr and this reward will be given for that X in this example 5 mean that the player did pass 5hr or more
    return;
    }
    prontera,151,171,5    pointshop    Hourly Rewards Shop    667,#HourlyRewards,901:1,902:10,903:15,904:1,905:200
    //<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>

     

  15. Hi! Scripters, 

    I'm currently using Sader's Hourly Rewards, need help on how to put command that can check the time remaining for the player to get an hourly points?

    Script is below:

    //===== 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*10; //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   = 600000;       //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 ] )
    }

     

  16. 4 hours ago, Poring King said:
    
    sec_in01,170,180,3	script	Soccer Ball	480,{
    	mes "[ Soccerball ]";
    	if (!.Status)
    		mes "There is no event at the moment!";
    	else {
    		mes "There are "+.Spawn+" soccerball left in "+.Map$+"!";
    		mes "Find and kill the soccerball to gain "+getitemname(.Prize)+"!";
    	}
    	if (.Status || getgmlevel() < .GM) close;
    	mes "Start the event?";
    	next;
    	if(select("- No:- Yes") == 1) close;
    	donpcevent strnpcinfo(0)+"::OnClock0100";
    	mes "[ Soccerball ]";
    	mes "Event started!";
    	close;
    
    OnInit:
    	set .Prize,7227;	// Reward item ID
    	set .Amount,1;	// Reward item amount
    	set .GM,99;	// GM level required to access NPC
    	setarray .Maps$[0],"payon"; // Possible maps
    	end;
    
    OnClock0200:
    OnClock0600:
    OnClock1000:
    OnClock1400:
    OnClock1800:
    OnClock2200:
    	if (.Status) end;
    	set .Status,1;
    	set .Spawn,rand(1,3);	// How many soccerball should spawn?
    	set .Map$,.Maps$[rand(getarraysize(.Maps$))];
    	killmonster .Map$,"All";
    	monster .Map$,0,0,"Soccerball!",1792,.Spawn,strnpcinfo(0)+"::OnMobKilled";
    	announce "Soccerball has been summon!",0;
    	sleep 5000;
    	announce "Total of "+.Spawn+" soccerball have been spawned in "+.Map$+"!",0;
    	end;
    
    OnMobKilled:
    	set .Spawn, .Spawn - 1;
    	getitem .Prize, .Amount;
    	if (.Spawn) announce "[ "+strcharinfo(0)+" ] has killed a soccerball. There are now "+.Spawn+" soccerball(s) left.",bc_map;
    	else {
    		announce "The soccerball event has ended. All the soccerball have been killed.",bc_map;
    		set .Status,0;
    	}
    	end;
    }


    On this script when monster will die you will go to OnMobKilled:
     

    Then add this onMobKilled:

    If you want item when the monster killed : getitem .Prize, .Amount;
    If you want player die add : atcommand "@nuke "+strcharinfo(0)+"
    If you want to summon a new monster add  monster .Map$,0,0,"Soccerball!",1792,.Spawn,strnpcinfo(0)+"::OnMobKilled";

    Hi! Sir Poring King, how to make (getitem,@nuke,summon ) these 3 into random? For example 20% chance to get an item 30%chance summon monster 50% chance @nuke?

×
×
  • Create New...