Author Topic: Arrays?  (Read 6449 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
Arrays?
« on: November 06, 2011, 10:43:20 AM »
0
Is it possible to store data to arrays with EUO? I've always been really shape at arrays in general (have a hard time understanding their logic in recording data). However it is something that I want to add to my LAME script...

Basically what I want to do is this: Advanced mana management for the sampire... basically, do two armor ignores, then a lightning strike, and repeat. If I remember correctly, the lightning strike will reset the double mana requirement for the armor ignores. The only way I can think of doing this, is recording the armor ignores to an array of some sort. Unless there is a variable that records the mana of the next armor ignore. Because there could be issues with such an array, given that it might not be able to calculate misses and would record misses at hits, thus lightning striking at the wrong time. Maybe a journal scanner could be used as a means of recording hits? "Your attack pierces their armor!" or whatever AI says when it hits.



 ​_██​_
(ಠ​_ృ)
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: Arrays?
« Reply #1 on: November 06, 2011, 11:16:17 AM »
0
You could do it with simple counters. Think of each swing as a "tick" and evaluate accordinginly:

tick tick tick tick tick tick
AI+ AI+ LS+ AI+ AI+  LS+

That's a fully successful series. You'd have 2 counters, one AI and one for LS (+ and - indicate success/failure)

Here's the thought process:

On tick #1, AI=0 and LS=0

On tick #2, AI=1 and LS=0
(if you were to fail, AI=0, LS=0 and it's as if you started over)

On tick #3, AI=2 and LS=0
(if you were to fail, AI=0, LS=0 and it's as if you started over)

On tick #4, if AI=2, then you LS, if not, you're back to AI

Think of each "tick" as a time to do an if (or case-style) statement. At each tick stage, decide whether to continue the pattern (due to success) or drop back to the beginning (or perhaps to a specific part in the sequence).

It's a little difficult to explain this on a fourm, but perhaps we could chat in vent or I can sketch up a diagram!
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 Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: Arrays?
« Reply #2 on: November 06, 2011, 11:18:31 AM »
0
yes .. thiers a couple of tutorials on in it in that section if i remeber correctly

standard way is as follows

Code: [Select]
for %x 1 10
  set %Array_ , %x  %x
display ok %Array_1 - %Array_2  - %Array_3 - %Array_10
halt
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

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: Arrays?
« Reply #3 on: November 06, 2011, 11:27:09 AM »
0
You could do it with simple counters. Think of each swing as a "tick" and evaluate accordinginly:

tick tick tick tick tick tick
AI+ AI+ LS+ AI+ AI+  LS+

That's a fully successful series. You'd have 2 counters, one AI and one for LS (+ and - indicate success/failure)

Here's the thought process:

On tick #1, AI=0 and LS=0

On tick #2, AI=1 and LS=0
(if you were to fail, AI=0, LS=0 and it's as if you started over)

On tick #3, AI=2 and LS=0
(if you were to fail, AI=0, LS=0 and it's as if you started over)

On tick #4, if AI=2, then you LS, if not, you're back to AI

Think of each "tick" as a time to do an if (or case-style) statement. At each tick stage, decide whether to continue the pattern (due to success) or drop back to the beginning (or perhaps to a specific part in the sequence).

It's a little difficult to explain this on a fourm, but perhaps we could chat in vent or I can sketch up a diagram!

I think I understand what you're stating. I'm down to listening in vent also, or lookin up a diagram, pop me a PM for either.




 ​_██​_
(ಠ​_ృ)
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: Arrays?
« Reply #4 on: November 06, 2011, 11:27:43 AM »
0
yes .. thiers a couple of tutorials on in it in that section if i remeber correctly

standard way is as follows

Code: [Select]
for %x 1 10
  set %Array_ , %x  %x
display ok %Array_1 - %Array_2  - %Array_3 - %Array_10
halt

I'm gonna go dig around for these tutorials.



 ​_██​_
(ಠ​_ృ)
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: Arrays?
« Reply #5 on: November 06, 2011, 12:04:44 PM »
0
So I'm thinking for counters... I could implement something like

Code: [Select]
set %primCNT 0

repeat
if %primCNT = 2
   gosub execLS
else
    gosub execPRIM
until #CLICNT = 0



sub execLS
    cmppix 1 f
       {
       event macro 15 149
       wait 5
       set %primCNT 0
       }
return

sub execPRIM
    cmppix 2 f
       {
       event macro 35 0
       wait 5
       set %primCNT + 1
       }
return

However I'm still at a loss of determining a missed AI.



 ​_██​_
(ಠ​_ృ)
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: Arrays?
« Reply #6 on: November 06, 2011, 07:56:16 PM »
0
Hrm, I'd definitely like to see some input on how to determine a "miss"

Perhaps you look for the cmppix and also check if mana is lower?
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: Arrays?
« Reply #7 on: November 06, 2011, 09:25:14 PM »
0
Hrm, I'd definitely like to see some input on how to determine a "miss"

Perhaps you look for the cmppix and also check if mana is lower?

See I was thinking that exact same thing, however as a sampire you regain mana by your melee attacks. Thus if you AIed and regained mana, it would count as a miss, and you might get stuck in an endless loop where the counter continuously resets thinking that it is missing, however it would eventually right itself on two consecutive AI's that drained mana. However this I believe would prove highly inefficient.



 ​_██​_
(ಠ​_ృ)
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: Arrays?
« Reply #8 on: November 07, 2011, 06:57:32 AM »
0
I mean, there's the infamous journal scanning, but I don't think that's a good option (cmppix + no message = miss)
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: Arrays?
« Reply #9 on: November 07, 2011, 09:39:32 AM »
0
Yeah, I don't want to deal with journal scanning either... Too easy to abuse.

Damn these misses :(



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

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Arrays?
« Reply #10 on: November 07, 2011, 09:41:57 AM »
0
yes .. thiers a couple of tutorials on in it in that section if i remeber correctly

standard way is as follows

Code: [Select]
for %x 1 10
  set %Array_ , %x  %x
display ok %Array_1 - %Array_2  - %Array_3 - %Array_10
halt
Well that is only a Pseudo Array for Easyuo. a Real array doesnt exist for EUO.
in oEUO you can insert functions in tables (like arrays).
Or does

set %Array_1 Pseudosub

Sub %Array_1
...
return

would work? who knows:)

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: Arrays?
« Reply #11 on: November 07, 2011, 09:59:39 AM »
0
yes .. thiers a couple of tutorials on in it in that section if i remeber correctly

standard way is as follows

Code: [Select]
for %x 1 10
  set %Array_ , %x  %x
display ok %Array_1 - %Array_2  - %Array_3 - %Array_10
halt
Ok, at first I didn't understand how this is an array but am I right to assume that what you are suggesting is that each individual variable represents an element in the array?

When I think of an array, at least a 2-dimensional array, I think of a spreadsheet.

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Arrays?
« Reply #12 on: November 07, 2011, 10:05:35 AM »
0
As i said, its a pseudo Array. EUO dont allow regular arrays so you only could do
set %x1 Hello
set %x2 World
set %x3 !!!!

Display %x1 %x2 %x3

in lua it would be

Text = {"Hello","World","!!!"}
print( text[1].." "..text[2].." "..text[3] )

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Arrays?
« Reply #13 on: November 07, 2011, 10:07:41 AM »
0
yes .. thiers a couple of tutorials on in it in that section if i remeber correctly

standard way is as follows

Code: [Select]
for %x 1 10
  set %Array_ , %x  %x
display ok %Array_1 - %Array_2  - %Array_3 - %Array_10
halt
Ok, at first I didn't understand how this is an array but am I right to assume that what you are suggesting is that each individual variable represents an element in the array?

When I think of an array, at least a 2-dimensional array, I think of a spreadsheet.

X
2 Dimenional Could be mirrored as well when you have a system for it liek
set %x1a Hello
set %x1z World
set %x2a !!!
etc..
you must arrange a own system how toi add more letters on your variable to manage a multiple dimensional array... But in end its only pseudo and that sucks :&

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: Arrays?
« Reply #14 on: November 07, 2011, 10:27:16 AM »
0
What I was looking into, was whether or not an array could store armor ignore hits and misses in order to intelligently handle mana consumption. Two successful armor ignores, then a lightning strike to reset the double mana multiplier. Instead of just having a script that did two armor ignores, then a lightning strike, despite whether or not anything hit or miss.



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

Tags: