R> Map|Mob of the Week Event

mybitch

New member
Messages
291
Points
0
Location
Prontera
Mmm, can I request a script that will choose every weekend map of the week or mob of the week? wherein the map/mob that will be chosen will give double exp from friday evening till sunday..

Ty!

 
Could you give us a bit of more information? Like if you want a random monster or map among all the entire database, or some special mobs or maps you want to use?

I'd suggest a whitelist of selected mobs or maps because the random map/monster picking may be impossible to use that week.

 
Could you give us a bit of more information? Like if you want a random monster or map among all the entire database, or some special mobs or maps you want to use?

I'd suggest a whitelist of selected mobs or maps because the random map/monster picking may be impossible to use that week.
Sorry if the information was incomplete. So the Map|Mob of the week goes like this..

  • Choose any field/dungeon maps every weekend or weekdays or any day.
  • If it has already chosen a map, the exp gain for that map will be doubled.

And for the Mob:

  • Same as the map. By chance a random one. Hehehe! Except for the maps|mobs having boss or mini boss.

 
After some hours of work I finally have it, but it's still untested. This should work provided you correctly set the maps and mobs on it. Since the concept of evening is relar¡tive to the country you're in, I've made this to work from Friday at 00:00 to Monday at 00:00.
 
Here's the script:

Code removed. See edit reasons for explanations.
 
I'd be glad if you made the list of suitable maps and mobs: I didn't do it because it was too much work after making the script.
 
If it doesn't work please tell me!

Edit: This code had a serious issue. I've posted a revised script later on this topic.

 
Last edited by a moderator:
@jabote:

How about if the script will automatically choose the maps set on maps_athena.conf so that there will be no array thing?

 
It's not possible as far as I know. And if it was possible it wouldn't tell apart the interesting maps to the ones that don't have absolutely nothing.

 
setarray .maps_1$[0],"mymap1","mymap2","mymap3";setarray .maps_2$[0],"mymap129","mymap130";// Other settings for mapsset .num_map_arrays, 2; // Set this to the number of arrays you have for maps.
Code:
set .@randarray, rand(1, .num_map_arrays);
this method break the equiprobability i.e. user put 100 maps in array 1 and only 1 in array 2 but 50% to select map on array 2

// Maths for avoiding using quest_exp_rate but base_exp_rate. We substract 100 because the first 100% is given by the mob. set .@bonusbexprate, (.mob_base_exp_multiplier - 100) * getbattleflag("base_exp_rate") / getbattleflag("quest_exp_rate"); set .@bonusjexprate, (.mob_job_exp_multiplier - 100) * getbattleflag("base_exp_rate") / getbattleflag("quest_exp_rate");
I don't get why you use quest_exp_rate, do you mind to explain me ?

 
Tried to quite you Capuche, but quitted because IP.Board doesn't want to quote you today. Sorry.

Didn't think about that equiprobability issue (thanks!), but that part OK as it's now because you can give the maps a some preference among others. Equiprobability will be assured as long as the arrays are evenly filled, and when you have an amount of maps the change of probability from one array to another is almost negligible.

The reason I use base_exp_rate and quest_exp_rate (and should have used job_exp_rate for job exp calculation, I forgot to do that, sorry) is simple:

Whenever you get exp from an NPC via getexp it'll get multiplied by quest_exp_rate and the result of that operation will be the exp the client will get. Since this behavior isn't desirable in this case (we want to give the user the exp of the mob multiplied by a factor, without quest_exp_rate messing around there) that's why I divide by it. This way, at getexp, user would get:

exp*quest_exp_rate*base_exp_rate/quest_exp_rate
Which cancels quest_exp_rates and so it leaves the exp*base_exp_rate.

What I don't know is if getmonsterinfo($@specialmob,3) returns an exp value already modified by the rates of server. In that case my exp calculation is wrong as it'd be multiplied twice by base_exp_rate. Right now it's seeming wrong for me, even though I considered it right, before posting the script. I'll just have to test this calculation whenever I have time (or would be very grateful if someone checks this for me).

 
Last edited by a moderator:
Yeah, the rates were multiplied: if you were in a 10x server the extra exp would be as in a 100x server. This is why I always ask you to test in your side. I've already fixed this: you get your bonus exp with a 1% relative error at most now, given by not having more than two decimals provided by the server.

More info:

  • This script will NOT work properly in Renewal. It works indeed, but extra exp will be calculated on the 100% exp given by the mob.
  • I'll re-release this when I fix the equiprobability issue.
  • What I've tested is only the extra experience given by a mob, not anything else. So testing on your home server is still a must do on your behalf.

___________________________________________________

I've finished my script again. As always this hasn't been tested but I've fully reviewed the code and don't find any flaws on it, so I highly reccomend to test it before using in production server.

This time I won't provide the source in a code box since it destroys my indentation and that makes me angry, so here you go:

Sadly, it has some mistakes, download next version in my next post please.
mapmobtest.txt

And please, share it back when you're done if you plan to add mobs and maps. This way I can release it.
Thanks!

 

Attachments

Last edited by a moderator:
Whenever you get exp from an NPC via getexp it'll get multiplied by quest_exp_rate
Yeah it makes sense, feel so noob now xD

set .@draw, .@draw - .@size; // This way we approach our goal
I believe it should be .@size[.@i]

 
Dammit! I had to make a mistake in some place
default_sad.png


Re-corrected version /sob:

mapmobtest.txt

Hope I'm not mistaken again or I'll cry TT_TT
default_wink.png
.

 

Attachments

Just comment them (place a // before them) so they won't have any effect.

Sent from smartphone.

 
Back
Top