Author Topic: ENs - EUO to LUA Converter written in LUA  (Read 75377 times)

0 Members and 1 Guest are viewing this topic.

Scrripty

  • Guest
Re: ENs - EUO to LUA Converter written in LUA
« Reply #15 on: October 17, 2010, 08:13:03 AM »
+1
You can't use multiple returns in a sub in lua?  I thought this was possible...

Offline Endless NightTopic starter

  • 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: ENs - EUO to LUA Converter written in LUA
« Reply #16 on: October 17, 2010, 08:45:07 AM »
+1
You can't use multiple returns in a sub in lua?  I thought this was possible...

You Can use multi-returns in LUA.... but thier can be only one END to a function.

Its a difference between euo and lua... in lua .. return just defines the result vars that are returned when the function ENDS.   In EUO return is a combo statment in lua = 'return <vars> End'

Thierfor transalating

sub xx
   if x=y return x
   set x  x*100
  if x < y return y
return what
 
function xx()
   if x == y then  return x  end
   x = x*100
   if x<y return y
return what
end

in euo this = 3 possible different return values x y and what
In lua it only = what as thats the last return values set before final end statment.


Thierfore transalting subs with multiple returns will end up with code that doesnt represent the true meaning of the original sub.  as you can only only exit a function at one point where as you can exit a sub form many points .. the 3 big problems break./continue  gotos multi returns. all un auto translatable...


EDIT :  INCORRECT .. multiple returns are allowed in LUA .. i was wrong and my test code had an error in it. so malfunctioned  DURRRR....

Give me another bigger one to translate... one of the biggest things it will acheive is pure time in replacing standard stuff...
« Last Edit: October 23, 2010, 03:29:52 PM by Endless Night »
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 Tidus

  • Lazy
  • Administrator
  • *
  • *
  • Posts: 1291
  • Activity:
    0%
  • Reputation Power: 15
  • Tidus is working their way up.Tidus is working their way up.Tidus is working their way up.
  • Gender: Male
  • Mind Blown
  • Respect: +151
  • Referrals: 2
    • View Profile
    • Ultimate Apparel
Re: ENs - EUO to LUA Converter written in LUA
« Reply #17 on: October 17, 2010, 09:35:58 AM »
+1
YOu can try to translate my Leather Farmer. http://www.scriptuo.com/index.php?topic=280.0
For those who have fought for it, freedom has a taste the protected will never know ~ Anonymous, Vietnam, 1968

Offline NObama

  • Everything I need to know, I learned from Miffy's Item Finder.
  • Elite
  • *
  • *
  • Posts: 3454
  • Activity:
    0%
  • Reputation Power: 43
  • NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.
  • Respect: +161
  • Referrals: 2
    • View Profile
Re: ENs - EUO to LUA Converter written in LUA
« Reply #18 on: October 17, 2010, 09:47:15 AM »
+1
If you want a real challenge, get OMG's permission to convert his AutoTamer.  That script is so useful...

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: ENs - EUO to LUA Converter written in LUA
« Reply #19 on: October 17, 2010, 10:19:18 AM »
+1
If you REALLY want your script to cry for it's Mamma, throw the CLAw at it.  ;)
Please read the ScriptUO site RULES
Come play RIFT with me!

Scrripty

  • Guest
Re: ENs - EUO to LUA Converter written in LUA
« Reply #20 on: October 17, 2010, 10:22:00 AM »
+1
If you REALLY want your script to cry for it's Mamma, throw the CLAw at it.  ;)

No no, EN you have access to my private library... try a version of the plant tender... the menu for it is basically informational only.  Might be a nice one to have a full conversion of. :)  I think I only have one goto in there... not sure.  I'll send you my latest version to try too. heh  Save me a ton of work I've only started on.

Offline Endless NightTopic starter

  • 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: ENs - EUO to LUA Converter written in LUA
« Reply #21 on: October 17, 2010, 06:14:19 PM »
+1
Where should i post your claw conversion TM
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 TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: ENs - EUO to LUA Converter written in LUA
« Reply #22 on: October 17, 2010, 06:34:07 PM »
+1
I got it already, EN.  thanks.  I'll post up a howto so you can convert the namespace stuff to working code.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Endless NightTopic starter

  • 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: ENs - EUO to LUA Converter written in LUA
« Reply #23 on: October 17, 2010, 07:49:48 PM »
+1
I got it already, EN.  thanks.  I'll post up a howto so you can convert the namespace stuff to working code.

I thourhgt i had posted it but then like magic it was gone .. so decided not to do it again... i just finided including in notin target and converting Wait times from EUO to OpenEUO....

Even if i do say so myself .. its getting pretty dam sick and slick....
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 TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: ENs - EUO to LUA Converter written in LUA
« Reply #24 on: October 17, 2010, 07:59:04 PM »
+1
I wasn't sure who had access to your section so I snagged it before anyone else did.

This should make converting things a bit easier.  Still a lot of work, but I can see how it will help.
« Last Edit: October 17, 2010, 08:01:28 PM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Paulonius

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: ENs - EUO to LUA Converter written in LUA
« Reply #25 on: October 18, 2010, 04:46:08 AM »
+1
This is huge EN.  I am going to take some scripts apart sub by sub, re-write them to conform, and then convert them. Should give me a HUGE leaning tool and translate some scripts at the same time.

This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

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: ENs - EUO to LUA Converter written in LUA
« Reply #26 on: October 18, 2010, 05:28:21 AM »
+1
This is truly awesome. I like the fact that we have it here and they don't heh.... Not that I'm like that :P

And since I have long voiced the evils of GOTO's, few of the things I've ever done use them.
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 Endless NightTopic starter

  • 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: ENs - EUO to LUA Converter written in LUA
« Reply #27 on: October 18, 2010, 04:33:30 PM »
+1
This is huge EN.  I am going to take some scripts apart sub by sub, re-write them to conform, and then convert them. Should give me a HUGE leaning tool and translate some scripts at the same time.

want me to hit up the bodrunner ?
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 Paulonius

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: ENs - EUO to LUA Converter written in LUA
« Reply #28 on: October 18, 2010, 05:47:24 PM »
+1
The BOD runner has a huge pile of gotos in it. I was going to use this sub by sub to help me work the translation. If you want to do the whole project it would stunt my growth as a lua programmer.... But then my Mom said something about that with coffe when I was six and I am only three feet tall now...
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline Endless NightTopic starter

  • 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: ENs - EUO to LUA Converter written in LUA
« Reply #29 on: October 19, 2010, 09:44:51 AM »
+1
This Thread has been moved out of the Elite section into public view so if its an elite script conversion required just post the link and ill post the conversion in the link.

Welcome non elites.
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."

Tags: