Author Topic: Dynamic Mount Duration  (Read 5594 times)

Middleclaw

  • Guest
Dynamic Mount Duration
« on: July 16, 2008, 06:27:28 pm »
I tried setting a mount duration on a fixed number plus a fraction of their current level. I used this formula 60+Ceil(<level>/10) which at level 15 shows 62 rounds as was intended. Yet after a few forest fights, it still displays 62 rounds, even after a full day of fights (44 in this case).

Buggy code or not anticipated?

Nightborn

  • Administrator
  • Sr. Member
  • *****
  • Posts: 318
  • Karma: +20/-0
    • View Profile
    • Shinobilegends
Re: Dynamic Mount Duration
« Reply #1 on: July 16, 2008, 07:23:51 pm »
if you put a variable into it, then the code will never go down.

the mount rounds evaluate with -1 each round  they are used.

but each round you tell him "set the mount round to 60+ceil(Level/10)" ... that would be my guess.

You should go for companions if you want better flexibility. A companion can give a buff, no big deal.
and  these buffs you can store in scripts, hence making them flexible.

For dynamic mount buffs, I recommend you to do:

1. make the mount with a base mount of rounds
2. make a module, hook into "newday"
3. modify the $session['bufflist']['mount']['rounds'] variable directly ONE time =)

that works to my knowledge.
It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro

Middleclaw

  • Guest
Re: Dynamic Mount Duration
« Reply #2 on: July 16, 2008, 08:48:18 pm »
Thanks. I'll look into it though I think a if $session['user']['hashorse'] parameter would be required else ALL mounts types would be affected instead of a specific mount.

Nightborn

  • Administrator
  • Sr. Member
  • *****
  • Posts: 318
  • Karma: +20/-0
    • View Profile
    • Shinobilegends
Re: Dynamic Mount Duration
« Reply #3 on: July 17, 2008, 10:19:04 am »
 ;) of course.

I did not mention it as I only tried to show the outline.

Which mount, and so forth, is up to you.

It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro