Jump to content
  • 0

Q>Floating Rates


dhaisuke

Question


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  76
  • Reputation:   2
  • Joined:  06/07/12
  • Last Seen:  

Hi Guys, 

can anyone help me to add npc that players can view the next floating rate time?.

i'm using nanakiwurtz floating rates and it's working fine.

 

-    script    FloatingRates    -1,{
OnInit:
set $floatingrate, rand(0,23);
set $defaultbrate,5000;//my server rate is 5000
set $defaultjrate,5000;//my server rate is 5000
set $defaultdrate,10000;//my server common item drop rate is 10000
set $defaultccdrate,100000;//my server common card drop rate is 100000
set $defaultcbdrate,30000;//my server card boss rate is 30000
end;
 
OnMinute00:
if (gettime(3)!=$floatingrate) end;
set $floatingrate, rand(0,23);
set $@brate,rand(7500,10000);//i want it raise by 50% - 100% from default
set $@jrate,rand(7500,10000);//i want it raise by 50% - 100% from default
set $@drate,rand(15000,20000);//i want it raise by 50% - 100% from default
set $@ccdrate,rand(150000,200000);//i want it raise by 50% - 100% from default
set $@cbdrate,rand(37500,45000);//i want it raise by 25% - 50% from default
//Base exp
setbattleflag("base_exp_rate",$@brate);
//Job exp
setbattleflag("job_exp_rate",$@jrate);
//Drops
setbattleflag("item_rate_common",$@drate);
setbattleflag("item_rate_heal",$@drate);
setbattleflag("item_rate_use",$@drate);
setbattleflag("item_rate_equip",$@drate);
setbattleflag("item_rate_card",$@ccdrate);
setbattleflag("item_rate_card_boss",$@cbdrate);
announce "ADMINS PROUDLY PRESENTS!",bc_all;
sleep 3000;
announce "Super Rates Event Time!!!",bc_all;
sleep 3000;
announce "LOOK! THE RATES CHANGED!: Base:"+($@brate/100)+"x Job:"+($@jrate/100)+"x Drop:"+($@drate/100)+"x",bc_all;
sleep 3000;
announce "Run!'cause this will last 1 hour only!!!",bc_all;
initnpctimer;
set .Event,1;
atcommand "@reloadmobdb";

end;
}

OnTimer3600000: // After 1 hour
set .Event,0;
setbattleflag "base_exp_rate",$defaultbrate;
setbattleflag "job_exp_rate",$defaultjrate;
setbattleflag("item_rate_common",$defaultdrate);
setbattleflag("item_rate_heal",$defaultdrate);
setbattleflag("item_rate_use",$defaultdrate);
setbattleflag("item_rate_equip",$defaultdrate);
setbattleflag("item_rate_card",$defaultccdrate);
setbattleflag("item_rate_card_boss",$defaultcbdrate);
atcommand "@reloadmobdb";
announce "Rates Changed Back to normal!",bc_all;
end;

OnPcLoginEvent:
if (.Event == 1) dispbottom "Super rates Event currently active!";
end;
}

Thank you in advance.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

mes "Next Hour " + $floatingrate;

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  76
  • Reputation:   2
  • Joined:  06/07/12
  • Last Seen:  

Thank you Sir. i'll try this one

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  3
  • Reputation:   1
  • Joined:  04/15/20
  • Last Seen:  

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;
}


 

Edited by Emistry
codebox
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.01
  • Content Count:  52
  • Reputation:   0
  • Joined:  07/14/17
  • Last Seen:  

On 6/4/2020 at 2:01 PM, sootil said:

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;
}


 

I tried this script and it worked fine on whole number increase, the script doesn't seem to read 1.5 increase, or maybe I edited it wrong, may I know where to edit it please?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...