Jump to content

sootil

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by sootil

  1. 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. 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. 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
×
×
  • Create New...