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

0 Members and 1 Guest are viewing this topic.

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 #60 on: October 25, 2010, 07:42:14 PM »
0
A big thank you superslayer for teh enourmous feedback you provided.. all issues on that list should now be cleared up.
I will send you a fresh translation.
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 Superslayer

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: ENs - EUO to LUA Converter written in LUA
« Reply #61 on: October 25, 2010, 08:49:01 PM »
0
Your welcome Endless, it's a great way to learn the language a bit better especially when you have the original script to compare with, and understand what it being accomplished.

I got the updated script now and am going through it. There are some hanging issues that I had previously just fixed out myself because I saw a better way to do it in my original script. There shouldn't be any hardcore problems, but maybe just some translations that will actually save time in the conversion. I'll do as before and send them over when I finish with your latest and greatest conversion.

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 #62 on: October 26, 2010, 12:49:36 PM »
0
Discovered new error with set atom... fixed....  fix two break one :)

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 Dixie Wrecked

  • Full Member
  • ***
  • Posts: 124
  • Activity:
    0%
  • Reputation Power: 3
  • Dixie Wrecked has no influence.
  • Gender: Male
  • Respect: +31
  • Referrals: 1
    • View Profile
Re: ENs - EUO to LUA Converter written in LUA
« Reply #63 on: October 26, 2010, 01:03:31 PM »
0
Converted code (needs unreleased library file - not finished)
Code: [Select]

dofile('ENs_EUOCommandLibrary.lua')

EUO_DisplayResult=EUO_Display("ok","please target your source container")
UO.TargCurs=1
while UO.TargCurs== 1 do
  Wait(0 * 50) -- Converted to Milliseconds
  end -- for while
g_source_bag=UO.LTargetID

EUO_DisplayResult=EUO_Display("ok","please target your bag to be karate chopped!")
UO.TargCurs=1
while UO.TargCurs== 1 do
  Wait(0 * 50) -- Converted to Milliseconds
  end -- for while
g_target_bag=UO.LTargetID

g_move='UVF_EWF_FWF_GWF'

EUO_FindItem(g_move,'c_,',g_source_bag)
for EUO_FindIndex=1,EUO_FindCnt do
   UO.Drag(EUO_Find[EUO_FindIndex].ID)
   Wait(10 * 50) -- Converted to Milliseconds
   UO.Dropc(g_target_bag)
   Wait(10 * 50) -- Converted to Milliseconds
   end

EUO_DisplayResult=EUO_Display("ok","DONE!!!")

stop()
 

Thank you so much for the conversion!  Since the Command Library is unfinished, I obviously can't actually test the script, but it does give me an idea of how this will work.  And since it seems like you are probably going to have a lot of functions in your library, given the Wait/wait issue, you might just want to have a function called Wait, which I assume could be as simple as:

Code: [Select]
function Wait(a)
 wait(a)
end

This way, if there is a missed 'Wait' rather than 'wait', or if there is a lot of extra coding necessary to make them all be lower case waits, I would think that it would let you use your time much more constructively? 


Also, after seeing this line:
Code: [Select]
g_move='UVF_EWF_FWF_GWF'and seeing the problems that it initially caused for SuperSlayer, perhaps a conversion from the EUO formatted lists would be beneficial?  I don't know how oEUO handles these lists yet, but I am more than willing to learn (and will be looking this info up shortly tonight), so if I can be of any help in this possibility, please let me know and I will do waht I can to help (I know there are a TON of item id's to find and cross-reference, but it can be a somewhat on-going exercise).
"hmm, theres no examples and directions sticky in new member intros.  you have to admit script library would have been a good place to put it"
- karrde

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 #64 on: October 26, 2010, 01:54:58 PM »
0
In the latest version your code Dixes transaltes as bellow.   As far as i am aware thier is no wait issue (desides an accidental capitalization now fixed)...   your original code has a wait 0  thierfor the transalted code has a wait(0)  actually wait (0*50)=wait(0)

whhy the *50 you say .. becuase EUO waits are by 1/20ths where as OEUO are 1/1000's

anyways your code.. and i know abuot the bad formed finditem command.. ", . "  are probably my next target item...  once dealt with will also fix the display  .. which works but is ugely.

Code: [Select]
EUO_DisplayResult=EUO_Display("ok","please".."target".."your".."source".."container")
UO.TargCurs=1
while UO.TargCurs == 1 do
  wait(0 * 50) -- Converted to Milliseconds
  end -- for while
g_source_bag=UO.LTargetID

EUO_DisplayResult=EUO_Display("ok","please".."target".."your".."bag".."to".."be".."karate".."chopped!")
UO.TargCurs=1
while UO.TargCurs == 1 do
  wait(0 * 50) -- Converted to Milliseconds
  end -- for while
g_target_bag=UO.LTargetID

g_move="UVF_EWF_FWF_GWF"

EUO_FindItem(g_move,"c_",..,g_source_bag)
for EUO_FindIndex=1,EUO_FindCnt do
   UO.Drag(EUO_Find[EUO_FindIndex].ID)
   wait(10 * 50) -- Converted to Milliseconds
   UO.Dropc(g_target_bag)
   wait(10 * 50) -- Converted to Milliseconds
   end

EUO_DisplayResult=EUO_Display("ok","DONE!!!")

stop()  
« Last Edit: October 26, 2010, 02:06:10 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 TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • 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 #65 on: October 27, 2010, 08:48:31 AM »
0
Might be helpful to recommend that someone run the ScriptUO syntax checker before running the converter.  My guess is that a properly structured script will convert easier.
Please read the ScriptUO site RULES
Come play RIFT with me!

Scrripty

  • Guest
Re: ENs - EUO to LUA Converter written in LUA
« Reply #66 on: October 27, 2010, 08:49:57 AM »
0
Might be helpful to recommend that someone run the ScriptUO syntax checker before running the converter.  My guess is that a properly structured script will convert easier.

*cough* manwinc *cough* :)

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 #67 on: October 28, 2010, 01:05:35 PM »
0
Might be helpful to recommend that someone run the ScriptUO syntax checker before running the converter.  My guess is that a properly structured script will convert easier.

for sure for sure.. the translator script just converts commands from one format to another... if the original script is borked the resulting translation will be equally borked...  I may throw in some free additional borking just as a bonus in the transalted version. :)

Thierfor as TM suggested i highly reckonmend you fix issues found by TMs ScriptUo project in your original script prior to any translations.

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 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 #68 on: October 29, 2010, 08:51:44 PM »
0
UPDATE
Knocked out alot of the unfinished library code.
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 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 #69 on: December 02, 2010, 06:32:03 PM »
0
Doesnt time fly .. over a month since i looked at this... the project might have gotten a bit forgotten but its not dead.

Implemented into Library file  EUO compatible Journal Commands.

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 _C2_

  • AFK FtW
  • Global Moderator
  • *
  • *
  • Posts: 4077
  • Activity:
    0%
  • Reputation Power: 48
  • _C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!
  • RIP Pen Trick
  • Respect: +254
  • Referrals: 4
    • View Profile
Re: ENs - EUO to LUA Converter written in LUA
« Reply #70 on: December 02, 2010, 06:50:39 PM »
0
yay
when they finally get the almost done version.. i want to convert stuff and learn

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 #71 on: December 10, 2010, 01:28:27 PM »
0
yay
when they finally get the almost done version.. i want to convert stuff and learn

err it is almost done.. lol needs some testers to get me kick started again...
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."

Scrripty

  • Guest
Re: ENs - EUO to LUA Converter written in LUA
« Reply #72 on: December 10, 2010, 02:51:30 PM »
0
You post it up and I'll test the hell out of it. :)

Offline _C2_

  • AFK FtW
  • Global Moderator
  • *
  • *
  • Posts: 4077
  • Activity:
    0%
  • Reputation Power: 48
  • _C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!
  • RIP Pen Trick
  • Respect: +254
  • Referrals: 4
    • View Profile
Re: ENs - EUO to LUA Converter written in LUA
« Reply #73 on: December 10, 2010, 04:04:58 PM »
0
same ill test

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 #74 on: December 17, 2010, 05:53:18 AM »
0
Count me in too EN
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

Tags: