Fields of Valor.

Post Reply
Gratis
Posts: 55
Joined: Wed Jun 26, 2013 11:26 pm

Fields of Valor.

Post by Gratis » Tue Jan 28, 2014 11:36 am

My server has level cap of 99 and one of our devs tweaked some books to allow them to count even if no exp was received from mobs.

Well we updated recently and that was one of the things we lost, (amongst other things like our devs) so I am trying to piece everything back together. Combing through the forums I came across this link viewtopic.php?f=14&t=481&start=10 but the info in there is either outdated and no longer works, or the more likely reason is that I am as dense as a door knob and just not doing it right.

This is what my lua file looks like now and it is not working... Any advice would be much appreciated! I removed local difference and changed <=15 to 0.

if(killer:getVar("fov_regimeid") == rid) then --player is doing this regime
-- Need to add difference because a lvl1 can xp with a level 75 at ro'maeve
--local difference = math.abs(mob:getMainLvl() - killer:getMainLvl());

if(partyType < 2 and mob:checkBaseExp() and killer:checkDistance(mob) < 100 and difference <= 0) then
--get the number of mobs needed/killed
local needed = killer:getVar("fov_numneeded"..index);
local killed = killer:getVar("fov_numkilled"..index);

if(killed < needed) then --increment killed number and save.
killed = killed+1;
killer:messageBasic(FOV_MSG_KILLED_TARGET,killed,needed);
killer:setVar("fov_numkilled"..index,killed);

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Fields of Valor.

Post by kjLotus » Tue Jan 28, 2014 1:40 pm

don't checkBaseExp

Gratis
Posts: 55
Joined: Wed Jun 26, 2013 11:26 pm

Re: Fields of Valor.

Post by Gratis » Tue Jan 28, 2014 2:59 pm

Sorry my coding skills are noob at best...

You want me to comment out checkBaseexp and revert everything back to original? Or leave as is and just comment out checkBaseExp?

Thank you again!

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Fields of Valor.

Post by kjLotus » Tue Jan 28, 2014 4:21 pm

if you want to get credit on mobs regardless of whether they give exp or not, you should remove "checkBaseExp" from that if statement - if it returns 0 (ie. no exp for your level) then the statement evaluates to false (and you don't get credit


note that you can't comment out difference and then compare it, because it doesn't exist anymore (since you commented it out), so i advise you to get rid of "difference" from the if statement as well, leaving it just checking party type and checkDistance (unless you want credit from anywhere in zone)

Gratis
Posts: 55
Joined: Wed Jun 26, 2013 11:26 pm

Re: Fields of Valor.

Post by Gratis » Tue Jan 28, 2014 4:30 pm

if(killer:getVar("fov_regimeid") == rid) then --player is doing this regime
-- Need to add difference because a lvl1 can xp with a level 75 at ro'maeve
--local difference = math.abs(mob:getMainLvl() - killer:getMainLvl());

if(partyType < 2) then
--if(partyType < 2 and mob:checkBaseExp() and killer:checkDistance(mob) < 100 and difference <= 0) then
--get the number of mobs needed/killed
local needed = killer:getVar("fov_numneeded"..index);
local killed = killer:getVar("fov_numkilled"..index);

So this that I posted will achieve my goal? I made a copy of the code commented it out then removed the checks from partyType. >.< Sorry to be such a bother!

Gratis
Posts: 55
Joined: Wed Jun 26, 2013 11:26 pm

Re: Fields of Valor.

Post by Gratis » Tue Jan 28, 2014 4:31 pm

Also will this require a reboot of the server or can be edited on the fly?

Gratis
Posts: 55
Joined: Wed Jun 26, 2013 11:26 pm

Re: Fields of Valor.

Post by Gratis » Tue Jan 28, 2014 5:14 pm

IT WORKED! A million kisses and hugs from my entire server!

Post Reply