Ron Posted July 19, 2012 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 62 Reputation: 0 Joined: 07/13/12 Last Seen: August 26, 2013 Share Posted July 19, 2012 I tried working on this on my own, but I cant seem to configure it.. Basically; A Floating Rates script that activates when there is say... 50+ players, and it deactivates when there is < 35 players. It would also randomize the rates between 5x ~ 10x Any ideas? Any help would be appreciated. Quote Link to comment Share on other sites More sharing options...
QQfoolsorellina Posted July 20, 2012 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 587 Reputation: 105 Joined: 11/19/11 Last Seen: July 7, 2019 Share Posted July 20, 2012 Do you mean exp rate? Quote Link to comment Share on other sites More sharing options...
PokemonRO Posted July 20, 2012 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 63 Reputation: 3 Joined: 07/12/12 Last Seen: December 30, 2013 Share Posted July 20, 2012 I have never made a script like this before, but I think I know how you can do it. 1. You have the floating script and it works right? 2. You could make an NPC that is like onhour or onclock that it checks sql on how many players are online, so like you said if it was 50+ it would use enablenpc on floating rates or disable it if its less than 35. This is an interesting script, hope my advice helps. Quote Link to comment Share on other sites More sharing options...
Euphy Posted July 20, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted July 20, 2012 @PokemonRO: You're right about event labels, but that wouldn't quite be accurate enough. o: @Ron: I'm sure you've seen Lupus' script already (I hope you have, at least), so you should know that rate manipulation involves setting battleflags and reloading the mob database afterward. That part's easy. So all that's really left is to track player count - which can be done either when a player logs in or out. Create an OnPCLoginEvent label and another for OnPCLogoutEvent, followed by: getusers(1) // for login getusers(1) - 1 // for logout Do some conditionals, and you should know where to go from there. Quote Link to comment Share on other sites More sharing options...
Ron Posted July 20, 2012 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 62 Reputation: 0 Joined: 07/13/12 Last Seen: August 26, 2013 Author Share Posted July 20, 2012 Yes, Heres the script I currently use; - script FloatingRates -1,{ OnPCLoginEvent: OnPCLogoutEvent: if (getusers(1) >= 2) { if (getbattleflag("base_exp_rate")==7000 && getbattleflag("job_exp_rate")==7000) { set $@brate,rand(7000,10000); set $@jrate,rand(7000,10000); setbattleflag "base_exp_rate", $@brate; setbattleflag "job_exp_rate", $@jrate; announce "Rates have changed due to player peak! Current Rates: "+($@brate/100)+"x"+($@jrate/100)+"x"+($@drate/100)+"x",bc_blue|bc_all; } } else if (getusers(1) < 1) { if (getbattleflag("base_exp_rate")>70000 || getbattleflag("job_exp_rate")>70000) { set $@brate,7000; set $@jrate,7000; setbattleflag "base_exp_rate", $@brate; setbattleflag "job_exp_rate", $@jrate; announce "Rates have returned to normal! Current Rates: "+($@brate/100)+"x"+($@jrate/100)+"x"+($@drate/100)+"x",bc_blue|bc_all; } } end; } Basically for some reason it just does not work! Like... When 2 players are online.. Sometimes it shows the floating rates, then other times it'll show it has ended! When 1 player is online, it gives either or message also. t And when I tried to switch them around, it would give the either or same message regardless. Quote Link to comment Share on other sites More sharing options...
Euphy Posted July 20, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted July 20, 2012 You have to separate the event labels, for the reason I posted. o_o When you calculate "getusers(1)" when a player logs out, that still includes the attached player, so you need to subtract one from that value. Quote Link to comment Share on other sites More sharing options...
Ron Posted July 20, 2012 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 62 Reputation: 0 Joined: 07/13/12 Last Seen: August 26, 2013 Author Share Posted July 20, 2012 I do not understand, Can you dumb it down a bit? Quote Link to comment Share on other sites More sharing options...
Question
Ron
I tried working on this on my own, but I cant seem to configure it..
Basically; A Floating Rates script that activates when there is say... 50+ players, and it deactivates when there is < 35 players.
It would also randomize the rates between 5x ~ 10x
Any ideas? Any help would be appreciated.
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.