Jump to content

sootil

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by sootil

  1. On 4/15/2015 at 2:08 AM, Kurofly said:

    I think he wanted his script to be able to give mutliple rewards since the total of chances for the 3 items are 120%

     

    If it's the case try this:

    
    prontera,137,201,4	script	Random Girl	725,{
    
    	.@npcName$ = "[" + strnpcinfo(1) + "]";
    	
    	mes .@npcName$;
    	mes "Hello, for 100,000,000 zeny, you have a chance to obtain one of these items :";
    	for (.@i = 0; .@i < getarraysize(.items); .@i++) {
    		mes "^008000~ " + getitemname(.items[.@i]) + "^000000";
    	}
    	next;
    	
    	switch(select("Gamble!:Leave")) {
    		case 1:
    			if (Zeny < 100000000) {
    				mes .@npcName$;
    				mes "I'm afraid you don't have enough to gamble.";
    				close;
    			}
    			
    			Zeny -= 100000000;
    			.@rand = rand(1,100);
    			for (.@i = 0 ; .@i < getarraysize(.items) ; .@i++) {
    				if (.@rand <= .percents[.@i]) { getitem .items[.@i],1 ; dispbottom "Congrats! You won 1 "+getitemname(.items[.@i])+" !"  ; .@won = 1; }
    			}
    			if (!.@won) dispbottom "You lost !";
    			mes .@npcName$;
    			mes "There you go!";
    			break;
    		case 2:
    			break;
    	}
    	
    	close;
    OnInit:
    	setarray .items,671,676,673;
    	setarray .percents,10,40,70;
    	end;
    }

    If you have errors post a screen of your mapserv plz

    HI there. The script works fine except that if you win the 10% chance instead of getting 1pc 671 you will get all the items in the setarray. So if you won the 10% item you will also get the 40% and 70% items. Same with winning 40% you will also get the 70% item.
    If im not mistaken you should only 1 item. If you won the 10% item, thats the only thing youll get. 
    I hope someone would help me fix this. Thank you!

    PS. This is my edited script.
     

    amatsu,198,109,4    script    Random Girl    725,{

        .@npcName$ = "[" + strnpcinfo(1) + "]";
        
        mes .@npcName$;
        mes "Hello, for 1,000,000 zeny you have a chance to obtain one of these items :";
        for (.@i = 0; .@i < getarraysize(.items); .@i++) {
            mes "^008000~ " + getitemname(.items[.@i]) + "^000000";
        }
        next;
        
        switch(select("Gamble!:Leave")) {
            case 1:
                if (Zeny < 1000000) {
                    mes .@npcName$;
                    mes "I'm afraid you don't have enough to gamble.";
                    close;
                }
                
                Zeny -= 1000000;
                .@rand = rand(1,100);
                for (.@i = 0 ; .@i < getarraysize(.items) ; .@i++) {
                    if (.@rand <= .percents[.@i]) { getitem .items[.@i],1 ; dispbottom "Congrats! You won 1 "+getitemname(.items[.@i])+" !"  ; .@won = 1; }
                }
                if (!.@won) dispbottom "You lost !";
                mes .@npcName$;
                mes "There you go!";
                break;
            case 2:
                break;
        }
        
        close;
    OnInit:
        setarray .items,14296,20764,20285,31178,14003,671;
        setarray .percents,1,2,3,4,30,60;
        end;
    }

  2. On 1/17/2017 at 2:54 PM, Emistry said:
    
    mes "Next Hour " + $floatingrate;

     

    Hello sir! I have a question. I am using this script it's working fine when i got 5x basic exp drop rate it multiplies by 2. But when I changed my basic rates to x10 it's still x10 exp when its triggered and not x20. Thank you in advance.

    -    script    HappyHour    -1,{
    OnInit:
        atcommand ("@reloadbattleconf");
        atcommand ("@reloadmobdb");
    
        bindatcmd("starthappyhour", strnpcinfo(0) +"::OnHappyHour2", 93, 99);
        bindatcmd("endhappyhour", strnpcinfo(0) +"::OnEndHappyHour", 93, 99);
     
        .base_exp_rate = getbattleflag("base_exp_rate");
        .job_exp_rate = getbattleflag("job_exp_rate");
        .item_rate_common = getbattleflag("item_rate_common");
        .item_rate_heal = getbattleflag("item_rate_heal");
        .item_rate_use = getbattleflag("item_rate_use");
        .item_rate_equip = getbattleflag("item_rate_equip");
    
        end;
        
    OnHappyHour2:
    //add any other HOURS
    OnClock2100:
    OnClock0400:
    OnClock0900:
    OnClock1600:
    atcommand ("@reloadbattleconf");
    atcommand ("@reloadmobdb");
        announce("-- Happy Hour has started! --", bc_yellow|bc_all);    // Announce Happy Hour
    $@dispbottom = 2;
    callsub(server_rate,2);
    end;
    
    
    OnEndHappyHour:
    OnClock2200:
    OnClock0500:
    OnClock1000:
    OnClock1700:
    atcommand ("@reloadbattleconf");
    atcommand ("@reloadmobdb");
        announce("-- Happy Hour has ended! --", bc_yellow|bc_all);    // Announce Happy Hour
    $@dispbottom = 1;
    callsub(server_rate,1);
    end;
    
    //-------------------
    server_rate:
        //set $@brate,2;
        //set $@jrate,2;
        //set $@drate,2;
        $@rate = getarg(0,2);
        //Base exp
        setbattleflag("base_exp_rate",$@rate * .base_exp_rate);
        //Job exp
        setbattleflag("job_exp_rate",$@rate * .job_exp_rate);
        //Drops
        setbattleflag("item_rate_common",$@rate * .item_rate_common);
        setbattleflag("item_rate_heal",$@rate * .item_rate_heal);
        setbattleflag("item_rate_use",$@rate * .item_rate_use);
        setbattleflag("item_rate_equip",$@rate * .item_rate_equip); // Apply new rates to configs set above
        //we don't change card drops rate, because these values won't change them anyway
        
        announce "Current Server rates are: "+($@rate * .base_exp_rate /100)+"x "+($@rate * .job_exp_rate /100)+"x "+($@rate * .item_rate_heal /100)+"x",bc_all;
        end;
    }


     

  3. On 4/6/2017 at 10:10 PM, Leeg said:

    Tic Tac Toe Minigame Script and Map


     O  Tic·Tac·Toe miniGAME O 

     

     

    Features:

    · 2 player based minigame
    · Fully automated
    · Free map included! (tictactoe.rsw)
    · Detects tied game
    · 1st turn selection is randomised
    · Very easy to install: Just copy the map files to your GRF and the script files to your custom NPC folder.
    · Lots of fun for your players!

    Buy once and have access to future updates!
     

    [ ! ] If you have any questions or you need to contact me for support, you can reach me at @Leeg or you can post a comment here and I will receive a notification. 
    You can also send me an email at:

      Reveal hidden contents

     

    By buying this script, you agree to these 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 (Leeg) still retain all rights to this script.
        - Terms above may be changed or adjusted without prior notification.


     

    We are having a problem with the  script.

    We are using the latest rathena

     

    Npc_Event System#main not found! (source: atcmd_tictactoe)


    and changed variables from
    from: variable = #; to set variable, #; and set variable, variable + #;

     

    but the script cant detect
    system#main::Onstarttimer

    @leeg

    • Upvote 1
×
×
  • Create New...