Jump to content

Katazui

Members
  • Posts

    167
  • Joined

  • Days Won

    6

Posts posted by Katazui

  1. Simple Client-Side Generator [itemInfo/accName/accessoryID]


    Hello rAthena! I have been struggling with adding large amounts of custom items into my client-side, so I made a little tool that would help with just that, and I'd like to share the tool with the community!

    I will continue to update this project over time; adding a user interface & specific parameter options.

    Important Reminders:
    - You need the latest Java Verison to run this program. Download: JDK 15 Download
    - Both input_sprite.txt & input_display.txt must have the same number of lines.
    - input_sprite.txt MUST have a underscore (_) for white spaces.
    - If there is one-character-value or less in the input_sprite.txt & input_display.txt files, that line will be omitted with a empty line.

    - Once Java has been installed, you must use the run.bat file to open the program.

    Helpful Articles:
    - How to Open Jar | Reference: https://www.wikihow.com/Run-a-.Jar-Java-File
    - Java SE Downloads | Link: https://www.oracle.com/java/technologies/javase-downloads.html

    Click for Demo Video

    Untitled.png


    • Submitter
    • Submitted
      11/18/2020
    • Category
    • Video
      https://www.youtube.com/watch?v=_8egrn397-M
    • Content Author
      Katazui

     

    • Upvote 4
    • MVP 4
  2. On 8/22/2020 at 12:34 PM, mrepic said:

    hello tried this but it seems that the mobs are not "STUNNING" the players. they are just being tagged.. if they are hit.

     

    what am i misisng?

     

    Hey MrEpic! If you would like the players to be tagged each time they are touched. Change this setting to 100.

    On 7/6/2020 at 2:50 PM, Katazui said:

    - Players have a 60% of getting tagged, (adjustable).

    Configuration:

    
      // X% of getting tagged
      set $@TagVarChance, 60; 

     

     

  3. Tag Event [Automated/Manual]


    Hello rAthena! I'd like to share one of my events from my server for the community.

     

    Tag Event

    Description:

    - Run across Turbo Track without getting tagged.

    - Taggers increase every round!

    - Players have a 60% of getting tagged, (adjustable).

    - Prize is based on amount of players joined in the event, (adjustable).

    - Event runs every four hours, (adjustable).

    - Use @TagEvent to start event!

     

    Configuration:

      // X% of getting tagged
      set $@TagVarChance, 60; 
      //Prize for Winner
      getitem 969, $@TagPrizeActual;
      //Prize for one participant
      getitem 969, 100;
      // X Gold per Player in Event for the winner
      set $@TagPrizeVar, 100;
    	OnClock0300:
    	OnClock0700:
    	OnClock1100:
    	OnClock1500:
    	OnClock1900:
    	OnClock2300:

     

    Install:

    Replace contents in turbo_track.txt with given turbo_track.txt, (removes Solo Turbo Track to make space for the Tag Event)

    server\npc\other\turbo_track.txt

    File attached below

     

    Add to scripts_custom.conf

    npc: npc/custom/TagEvent.txt

     

    Terms:

    • You are not allowed to redistribute this script in any way, shape, or form.
    • Chargeback scams are not tolerated and will get you punished on rAthena.
    • I still retain all rights to this script.
    • You can modify this script as you like, but to receive support you must tell me what you changed.
    • No Renewal, free updates.

     

    turbo_track.txt


     

  4. 14 hours ago, JagLers said:

    Sir Mabuhay,

    What i mean is the Shop to show the Cash Point Cost, instead of Zeny cost in NPC.

    image.png.641a25ef64b86edc33b35cbedf0ca38c.png
     

    <map name>,<x>,<y>,<facing>	pointshop	<NPC Name>	<sprite id>,<costvariable>{:<discount>},<itemid>:<price>{,<itemid>:<price>...}
    
    prontera,150,150,1	pointshop	Cash Point Shop	50,CASHPOINTS,501:10:1599:50
      

    You could use the pointshop function if you are planning to only use Cash Points.

  5. 8 hours ago, Boneash said:

    hello sir can you add this?

    can you arrange this to me sir?

     

    
    // Test NPC by Alex
    // Scripted by myself
    //
    // Learning scripting by myself
    // ==============================================
    prontera,139,211,5	script	Hat Maker#h1-1::Hat Maker	930,{
    npctalk "Hello"+strcharinfo(0)+"my name CrazyMan";
    next;
    mes "The purpose of this NPC is to";
    mes "provide you the quest of the latest";
    mes "headgears here in TESTRO!";
    mes "Would you like to brows on the new headgear?";
    H_top:
    menu "0-2",H_01,"Cancel",H_cancel;
    end;
    
    //__________Hat List__________//
    
    H_01:
    menu
    
    "Alice Doll",I_alice,
    "Hockey Mask",I_hockey,
    "Return to Menu",H_top;
    
    //____________Item requirements____________//
    
    
    //__________Model___________//
    //I_;
    //        next;
    //        mes "";
    // menu "Make",M_,"Return To Menu",H_top;
    
    I_alice:
    next;
    mes "5x Marionett Dolls";
    mes "100x Alice's Apron";
    mes "5x Soft Apron";
    menu "Make",M_alice,"Return to Menu",H_top;
    
    I_hockey:
    next;
    mes "200x Suspicious Hat";
    mes "2x Blank Eyes";
    mes "10x Gold";
    mes "10x TCG Card";
    menu "Make",M_hockey,"Return to Menu",H_top;
    
    
    //____________model______________//
    //M_:
    //      if(countitem()< || countitem()< || Zeny < )
    //      goto M_insufficient;
    //      delitem ,;
    //      delitem ,;
    //      set zeny,zeny-;
    //      getitem ,;
    //      close;
    
    M_alice:
    if(countitem(5141)<5 || countitem(7047)<100 || countitem(661)<5)
    goto M_insufficient;
    delitem 5141,5;
    delitem 7047,100;
    delitem 661,5;
    getitem 5137,1;
    close;
    
    M_hockey:
    if(countitem(7567)<200 || countitem(5102)<2 || countitem(969)<10 || countitem(7227)<10)
    goto M_insufficient;
    delitem 7567,200;
    delitem 5102,2;
    delitem 969,10;
    delitem 7227,10;
    getitem 5314,1;
    close;
    
    //________not enough or not the correct items________
    
    M_insufficient:
    next;
    mes "CrazyMan I am sorry";
    mes "You don't have the required materials.";
    mes "Please come back when you do...";
    close;
    
    OnEnable:
    waitingroom "Expires: "+getAutoNPCActiveExpiration(strnpcinfo(3)),0;
    end;
    OnDisable:
    delwaitingroom;
    end;
    OnInit:
    //start on june 1 and finish on june 30
    registerAutoNPC "6","1","30",strnpcinfo(3),"Soul Quest Special Event limited quest (prontera 143,211)";
    end;
    }

     

     

    Hey @Boneash. Sorry I gave you a script with errors in them. I did not thoroughly check. However, you can easily debug the errors since most of your errors contain mostly grammatical issues. I added some documents below that could help!

    https://raw.githubusercontent.com/rathena/rathena/master/doc/script_commands.txt

    https://github.com/rathena/rathena/tree/master/doc/sample

     

  6. 2 hours ago, Boneash said:

    can you help me with my custom script? its working a bit then i add next line

    its not showing up anymore. can you help me what missing in line? thanks!

    here my sample test custom scripts

    
    //Test Alex HAT MAKER
    // Scripted by Alex
    //
    // Test Tutorial by Alex
    // ==============================================
    prontera,140,209,3	script	Hat Maker#h1-1::Hat Maker	930,{
        npctalk "Hello "+strcharinfo(0)+"my name CrazyMan";
        next;
        mes"The purpose of this NPC is to";
        mes"provide you the quest of the latest";
        mes"headgears here in TESTRO!";
        mes"Would you  like to brows on the new headgears?
        goto H_top;  
    
     H_top:
     menu "0-2",H_01,"Cancel",H_cancel;
    
    //__________Hat List__________//
    
     H_01:
     menu
    
     "Alice Doll",I_alice,
     "Hockey Mask",I_hockey,
     "Return to Menu",H_top;
    
    //_____________Item requirements_______________//
    
    
    //________model___________//
    //I_:
    //      next;
    //      mes "";
    //      menu "Make",M_,"Return to Menu",H_top;
    
     I_alice:
         next;
         mes "5x Marionett Dolls";
         mes "100x Alice's Apron";
         mes "5x Soft Apron";
         menu "Make",M_alice,"Return to Menu",H_top;
    
     I_hockey:
         next;
         mes "200x Suspicious Hat";
         mes "2x Blank Eyes";
         mes "10x Gold";
         mes "10x TCG Card";
         menu "Make",M_hockey,"Return to Menu",H_top;
    
    
    //____________model______________//
    //M_:
    //      if(countitem()< || countitem()< || Zeny < )
    //      goto M_insufficient;
    //      delitem ,;
    //      delitem ,;
    //      set zeny,zeny-;
    //      getitem ,;
    //      close;
    
     M_alice:
         if(countitem(5141)<5 || countitem(7047)<100 || countitem(661)<5)
         goto M_insufficient;
         delitem 5141,5;
         delitem 7047,100;
         delitem 661,5;
         getitem 5137,1;
         close;
    
     M_hockey:
         if(countitem(7567)<200 || countitem(5102)<2 || countitem(969)<10 || countitem(7227)<10)
         goto M_insufficient;
         delitem 7567,200;
         delitem 5102,2;
         delitem 969,10;
         delitem 7227,10;
         getitem 5314,1;
         close;
    
    //________not enough or not the correct items________
    
     M_insufficient:
         next;
         mes "CrazyMan I am sorry";
         mes "You don't have the required materials.";
         mes "Please come back when you do...";
         close;
    
     H_cancel:
    
     close;
    
     OnInit:
    
     waitingroom "Limited QUEST EVENT",0;
    
     end;
    }

     

     

     

    //Test Alex HAT MAKER
    // Scripted by Alex
    //
    // Test Tutorial by Alex
    //
    // Adjusted by Katazui.com
    // ==============================================
    prontera,140,209,3	script	Hat Maker#h1-1::Hat Maker	930,{
        npctalk "Hello "+strcharinfo(0)+"my name CrazyMan";
        next;
        mes"The purpose of this NPC is to";
        mes"provide you the quest of the latest";
        mes"headgears here in TESTRO!";
        mes"Would you  like to brows on the new headgears?
    	H_top:
    	menu "0-2",H_01,"Cancel",H_cancel;
    	end;
    
    //__________Hat List__________//
    
     H_01:
     menu "Alice Doll",I_alice,"Hockey Mask",I_hockey,"Return to Menu",H_top;
    
    //_____________Item requirements_______________//
    
    
    //________model___________//
    //I_:
    //      next;
    //      mes "";
    //      menu "Make",M_,"Return to Menu",H_top;
    
     I_alice:
         next;
         mes "5x Marionett Dolls";
         mes "100x Alice's Apron";
         mes "5x Soft Apron";
         menu "Make",M_alice,"Return to Menu",H_top;
    
     I_hockey:
         next;
         mes "200x Suspicious Hat";
         mes "2x Blank Eyes";
         mes "10x Gold";
         mes "10x TCG Card";
         menu "Make",M_hockey,"Return to Menu",H_top;
    
    
    //____________model______________//
    //M_:
    //      if(countitem()< || countitem()< || Zeny < ){ goto M_insufficient; }
    //      delitem ,;
    //      delitem ,;
    //      set zeny,zeny-;
    //      getitem ,;
    //      close;
    
     M_alice:
         if(countitem(5141)<5 || countitem(7047)<100 || countitem(661)<5) { goto M_insufficient; }
         delitem 5141,5;
         delitem 7047,100;
         delitem 661,5;
         getitem 5137,1;
         close;
    
     M_hockey:
         if(countitem(7567)<200 || countitem(5102)<2 || countitem(969)<10 || countitem(7227)<10) { goto M_insufficient; }
         delitem 7567,200;
         delitem 5102,2;
         delitem 969,10;
         delitem 7227,10;
         getitem 5314,1;
         close;
    
    //________not enough or not the correct items________
    
     M_insufficient:
         next;
         mes "CrazyMan I am sorry";
         mes "You don't have the required materials.";
         mes "Please come back when you do...";
         close;
    
     H_cancel:
    	close;
    
     OnInit:
    	waitingroom "Limited QUEST EVENT",0;
    	end;
    }

     

     

  7. 4 hours ago, Mael said:

    Are you looking for recolors?

     

    Yes thank you! I was also able to find the other recolors from intense searching on DuckDuckGo! Unfortunately, there was no credit attached to this and three of the collection .bmp is empty. I uploaded a .zip~

    Untitled.png.ded2a235248ce5d379fd417e2b339234.png

    data valk.rar

    • Upvote 2
  8. 18 minutes ago, DrakeSky said:

    Where should I put the Waiting room here?

     

    
    /===== 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;
    
    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);
    
    end;
    
    Hourly_Rewads:
        //put the Hourly Rewards here
        #HourlyShop += 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,144,126,6    pointshop    Hourly Point Shop    667,#HourlyShop,13534:5,13810:5,12913:5,12914:5,13718:5,12909:5,12922:5
    //<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>

     

     

    //===== 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;
    
    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);
    
    end;
    
    Hourly_Rewads:
       //put the Hourly Rewards here
       #HourlyShop += 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,144,126,6    pointshop    Hourly Point Shop    667,#HourlyShop,13534:5,13810:5,12913:5,12914:5,13718:5,12909:5,12922:5
    //<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE> 
    
    -	pointshop	Hourly Point Shop	667,#HourlyShop,13534:5,13810:5,12913:5,12914:5,13718:5,12909:5,12922:5
    
    prontera,144,126,6	script	Hourly Point Shop#NPC	667,{
    callshop "Hourly Point Shop",0;
    end;
    
    OnInit:
    delwaitingroom;
    waitingroom "--- Hourly Point Shop ---",0;
    end;
    
    }

     

    • MVP 1
  9. 32 minutes ago, DrakeSky said:

    Hi!

    I'm having a hard time on this Cash Shop or Kafra Shop, what I want is a Cash Shop or Kafra Shop that used Cash Points that has a Waiting Room on it.

    Every time I reload my script the name of the NPC will become Kafra Shop but when I log out then log back in it will become Cash Shop.

    Need help on this script. Thanks.

     

    Here's my script:


    prontera,140,126,6    cashshop    Kafra Shop    116,13534:5,13810:5,12913:5,12914:5,13718:5,12909:5,12922:5

    prontera,140,126,6    script    Cash Shop    116,{

    callshop "Kafra Shop",116;

    OnInit:
    delwaitingroom;
    waitingroom "--- Cash Shop ---",0;
    end;

    close;
    }

    *callshop "<name>",<option>;
    
    These are a series of commands used to create dynamic shops.
    The 'callshop' function calls an invisible shop (view -1) as if the player clicked on it.
    
    The options are:
    	0 = The normal window (buy, sell and cancel)
    	1 = The buy window
    	2 = The sell window
    
    Note: The <option> parameter only works on the 'shop' type NPC.
    
    A shop called with this command will trigger the labels "OnBuyItem" and "OnSellItem"
    (as long as an npcshop* command is executed from that NPC, see note below). These
    labels, if used, will replace how the shop handles the buying and selling of items,
    allowing for the creation of dynamic shops.
    
    The label "OnBuyItem" sets the following arrays:
    	@bought_nameid   - item ID bought
    	@bought_quantity - amount bought
    
    The label "OnSellItem" sets the following arrays:
    	@sold_nameid        - item ID sold
    	@sold_quantity      - amount sold
    	@sold_refine        - refine count
    	@sold_attribute     - if the item is broken (1) or not (0)
    	@sold_identify      - if the item is identified (1) or not (0)
    	@sold_card1         - card slot 1
    	@sold_card2         - card slot 2
    	@sold_card3         - card slot 3
    	@sold_card4         - card slot 4
    	@sold_option_id1    - random option ID 1
    	@sold_option_val1   - random option value 1
    	@sold_option_param1 - random option param 1
    	@sold_option_id2    - random option ID 2
    	@sold_option_val2   - random option value 2
    	@sold_option_param2 - random option param 2
    	@sold_option_id3    - random option ID 3
    	@sold_option_val3   - random option value 3
    	@sold_option_param3 - random option param 3
    	@sold_option_id4    - random option ID 4
    	@sold_option_val4   - random option value 4
    	@sold_option_param4 - random option param 4
    	@sold_option_id5    - random option ID 5
    	@sold_option_val5   - random option value 5
    	@sold_option_param5 - random option param 5
    
    Note: These labels will only be triggered if an npcshop* command is executed because these
    commands set a special data on the shop NPC, named master_nd in the source. The above labels
    are triggered in the NPC whose master_nd is given in the shop.
    
    A full example of a dynamic shop can be found in doc/sample/npc_dynamic_shop.txt.

     

    prontera,140,126,6    cashshop    Kafra Shop    116,13534:5,13810:5,12913:5,12914:5,13718:5,12909:5,12922:5
    
    prontera,140,126,6    script    Cash Shop    116,{
    callshop "Kafra Shop",0;
    end;
    
    OnInit:
    delwaitingroom;
    waitingroom "--- Cash Shop ---",0;
    end;
    
    }

     

  10. 6 hours ago, DrakeSky said:

    Thank you so much Sir! you're the best.

    Is it okay if you can put a time on it so it wont be spammable?  Like, you can only use this every 30 seconds? then if you try to use again there is a message that will say you can only use this every 30 secconds

     

    Haven't tested this, but I think this should work. @DrakeSky

    -	script	SellCommand	-1,{
    OnInit:
        set .sell_delay, 30; // Seconds
        bindatcmd "sell",strnpcinfo(3) + "::OnSellCommand";
        end;
    	
    OnSellCommand:
        set .@gettimetick, gettimetick(2);
        set .@sell_num, ( sell_cooldown - gettimetick(2) );
        if( sell_cooldown > .@gettimetick ) {
          dispbottom "You have to wait "+.@sell_num+" seconds before using @sell again.";
          end;
        }
        .@s$ = .@atcmd_parameters$[0];
        announce strcharinfo(0) + ": " + .@s$,bc_all,0x2fe24a;
        set sell_cooldown, ( .@gettimetick + ( .sell_delay ));
        end;
    }

     

  11. OnKill:    
            if ( .rate < rand( 100 ) ) {
                .@point = rand( .gold_amount[0],.gold_amount[1] );
                #GOLDPOINTS += .@point;
                dispbottom "Gained "+.@point+" Point. You got "+F_InsertComma( #GOLDPOINTS )+" Points now.";
            }
    	end;

    to

    OnKill:    
    
    		.@point = rand( .gold_amount[0],.gold_amount[1] );
    		#GOLDPOINTS += .@point;
    		dispbottom "Gained "+.@point+" Point. You got "+F_InsertComma( #GOLDPOINTS )+" Points now.";\
    		end;

     

  12. Hey guys, players are able to bypass the hourly idle check by constantly attacking the Punching Bag Script, I was wondering if there's a way to ensure the idle check when attacking the Punching Bag.

    My current solution was to create the Punching Bag with OnTouch: which will cancel the effect, however, long-ranged classes are able to bypass the OnTouch from distance. I was wondering if there's a way to prevent this little bug through this script?

  13. I have a question, can you produce the same result by just adjusting conf/battle/exp.conf?

    // Setting this can cap the max experience one can get per kill specified as a
    // % of the current exp bar. (Every 10 = 1.0%)
    // For example, set it to 500 and no matter how much exp the mob gives,
    // it can never give you above half of your current exp bar.
    max_exp_gain_rate: 10000 //Between Level 0 - 10.

     

  14. 1 hour ago, Start_ said:

    Do you use this in special events? If so just made npc that use mob sprites and made it movable, Then when players tap it call function to kill player.

    Otherwise I think rAthena had some special skill that one hit kill (I can't remember the name).

     

    Good Idea! Ah! Sometimes I need to think outside the box!

×
×
  • Create New...