Author Topic: algorithms  (Read 3743 times)

0 Members and 1 Guest are viewing this topic.

Offline dxromTopic starter

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
algorithms
« on: July 05, 2011, 10:53:25 AM »
0
So I want this script to use divine fury when my stamina is less then 40%...

Code: [Select]
set stamPercMod 40
set stamPerc ( ( #MAXSTAM / 100 ) * %stamPercMod )

if #STAMINA < %stamPerc
   gosub dFury

sub dFury
   event macro 15 205
   wait 5
return

I have 153 stamina, and following that algorithm, %stamPerc should be set to 61.2, so it should use divine fury at around 61 stamina, however instead it does it at 40 stamina. Is this an integer issue?



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: algorithms
« Reply #1 on: July 05, 2011, 11:14:22 AM »
0
EUO doesn't play with decimals very nicely. Better to just adjust everything up a couple of places.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline dxromTopic starter

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: algorithms
« Reply #2 on: July 05, 2011, 11:19:23 AM »
0
Is there any way I can have the output read as REAL, so it reads the number without the decimal?

I mean, I could adjust it to work with my stats and come out without a decimal, but then I would have to do that with every chr I play on that I use this with, and anyone who uses it would have to do the same thing.



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: algorithms
« Reply #3 on: July 05, 2011, 11:24:10 AM »
0
Wouldn't you want to do it this way?

( #maxStam * %stamPercMod ) / 100

153 * 40 = 6120 / 100 = 61.2
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline dxromTopic starter

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: algorithms
« Reply #4 on: July 05, 2011, 11:27:18 AM »
0
Wouldn't you want to do it this way?

( #maxStam * %stamPercMod ) / 100

153 * 40 = 6120 / 100 = 61.2

It comes out the same though.

153 / 100 = 1.53 * 40 = 61.2



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline dxromTopic starter

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: algorithms
« Reply #5 on: July 05, 2011, 11:31:10 AM »
0
Your solution worked, Cerveza!
...but why? -.-
Thank you :)



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: algorithms
« Reply #6 on: July 05, 2011, 11:39:39 AM »
0
The .2 is probably being ignored, and your not calculating in decimals doing it this way. EUO doesn't work well with decimals, oh I mentioned that :P
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline dxromTopic starter

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: algorithms
« Reply #7 on: July 05, 2011, 11:44:36 AM »
0
BUT! ...but!
Same exact output regardless of the algorithm used, however for mine it... i don't understand... -.-
euo is stupid somtimes.



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline UOMaddog

  • Maddog
  • Elite
  • *
  • *
  • Posts: 1625
  • Activity:
    0%
  • Reputation Power: 22
  • UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...
  • Gender: Male
  • Biggest B@D@$$ of the Universe
  • Respect: +165
  • Referrals: 8
    • View Profile
    • Insane UO
Re: algorithms
« Reply #8 on: July 05, 2011, 12:10:28 PM »
0
Here's what happened:

In your method you do:
153/100 = 1.53
Since EUO doesn't like decimals, it sees 1

You then do:
1* 40 = 40

TADA! You have your result (As EUO sees it)


In Cerv's method, you do:
153*40 = 6120 (No decimals, so EUO likes it and sees 6120)

You then do:
6120/100=61.2 (EUO doesn't like decimals so it sees 61)

TADA! You have your result! (As EUO sees it)



Order of Operations is merely a vaguely followed idea that is not well manifested in EUO! LOL!
« Last Edit: July 05, 2011, 12:12:21 PM by UOMaddog »
There are 10 kinds of people in this world: those that understand binary and those that don't!

Windows:  A 64-bit tweak of a 32-bit extension to a 16-bit user interface for an 8-bit operating system based on a 4-bit architecture from a 2-bit company that can't stand 1 bit of competition!

Offline dxromTopic starter

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: algorithms
« Reply #9 on: July 05, 2011, 12:21:39 PM »
0
This makes sense...

w00t, thank you guys!

This was something I was workin on for my sampire assistant script (LAME). I figured that instead of having it dfury at a static amount of stamina, percent base would be better.



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline Thimotty

  • Jr. Member
  • **
  • Posts: 61
  • Activity:
    0%
  • Reputation Power: 0
  • Thimotty has no influence.
  • Respect: +7
  • Referrals: 0
    • View Profile
Re: algorithms
« Reply #10 on: July 05, 2011, 01:58:42 PM »
0
Since swing is calculated at exact stamina values (30,60,90....) static value is better

Tags: