Author Topic: First script - Simple item mover  (Read 32386 times)

0 Members and 1 Guest are viewing this topic.

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: +100
  • Referrals: 0
    • View Profile
Re: First script - Simple item mover
« Reply #30 on: October 14, 2010, 03:03:04 PM »
+1
Wow Endless thanks, that cleared up a bunch for me! The library thing I had assumptions about it's purpose, but I clearly see it's use now. So in essence, everyone could have there own library to call functions from and run oeuo code. Without a library, these functions would have to be hard coded into the script.

By the way, what's with all the lowercase 'n' 's in the script such as "nSourceBag" and "nContID". Is that some kind of namespace/atom thing?

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: +786
  • Referrals: 1
    • View Profile
Re: First script - Simple item mover
« Reply #31 on: October 14, 2010, 03:05:21 PM »
+1
Wow Endless thanks, that cleared up a bunch for me! The library thing I had assumptions about it's purpose, but I clearly see it's use now. So in essence, everyone could have there own library to call functions from and run oeuo code. Without a library, these functions would have to be hard coded into the script.

By the way, what's with all the lowercase 'n' 's in the script such as "nSourceBag" and "nContID". Is that some kind of namespace/atom thing?

good dam question... its varialbe type nameing so i can easily see what the var holds. Lua unlike EASYUO is specific about what typ eof data a var holds

for me
n = numberic data
s = sring data
b = logical boolean data
t = table
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 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: +786
  • Referrals: 1
    • View Profile
Re: First script - Simple item mover
« Reply #32 on: October 14, 2010, 03:41:21 PM »
+1
Ok script contained a capitilazation typo .. that stopped it from working... Lua is every sensitive about that.
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: +100
  • Referrals: 0
    • View Profile
Re: First script - Simple item mover
« Reply #33 on: October 14, 2010, 04:17:49 PM »
+1
Picky about the operation case, yes? I saw somewhere that using the command 'lower' and 'upper' in string searching, you can ignore the case. I think it went something like:

local.lower

or

local.upper

maybe parentheses in it or bracket, ...so much to RE-learn!

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: +786
  • Referrals: 1
    • View Profile
Re: First script - Simple item mover
« Reply #34 on: October 14, 2010, 04:36:01 PM »
+1
Picky about the operation case, yes? I saw somewhere that using the command 'lower' and 'upper' in string searching, you can ignore the case. I think it went something like:

local.lower

or

local.upper

maybe parentheses in it or bracket, ...so much to RE-learn!



But that doesnt help you when you make a Captilization typo in a varname... i had nContid instead of nContID   I editied the final posting to be correct.
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 CervezaTopic starter

  • 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: +861
  • Referrals: 11
    • View Profile
Re: First script - Simple item mover
« Reply #35 on: October 14, 2010, 05:36:06 PM »
+1
Is this dependent on anything else? Like some other file needed to make it work??

It pops up a target cursor, doesn't say anything anywhere... I target my source, another target cursor pops, I target my dest, again there's absolutely no interaction. Then I target one of the items in the source and everything is moved.

Not exactly what I was looking for.
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 CervezaTopic starter

  • 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: +861
  • Referrals: 11
    • View Profile
Re: First script - Simple item mover
« Reply #36 on: October 14, 2010, 05:44:51 PM »
+1
I got it. Had to rip Traegon's work because the simple task of

display ok Target this thing

Is too complicated to reproduce in OEUO. Now it's working.
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 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: +786
  • Referrals: 1
    • View Profile
Re: First script - Simple item mover
« Reply #37 on: October 14, 2010, 06:38:20 PM »
+1
lol arr yes .. good you got it .. he has given me permission to use his sub .. ill update that now so thiers less confusion.

Well i hope it helped you and others in some manner..
« Last Edit: October 14, 2010, 06:42:04 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 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: +600
  • Referrals: 2
    • View Profile
Re: First script - Simple item mover
« Reply #38 on: October 19, 2010, 07:52:19 AM »
+1
EN, great discussion. This kind of stuff helps me a lot and your write-up was easy to follow for me.

I'm finding a lot of structure similarities with vbscript so it's becoming less intimidating. Will start jumping in tonight I think and converting some of my standard subs.

Thanks!

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 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: +786
  • Referrals: 1
    • View Profile
Re: First script - Simple item mover
« Reply #39 on: October 19, 2010, 09:15:34 AM »
+1
EN, great discussion. This kind of stuff helps me a lot and your write-up was easy to follow for me.

I'm finding a lot of structure similarities with vbscript so it's becoming less intimidating. Will start jumping in tonight I think and converting some of my standard subs.

Thanks!

X

I can auto convert a script for you wont be 100% ...but you might learn even more from that as you will know what all the vars mean already and can focus on pure sysntax / structure
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 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: +600
  • Referrals: 2
    • View Profile
Re: First script - Simple item mover
« Reply #40 on: October 19, 2010, 09:25:16 AM »
+1
That could be interesting. How about "SuperStuff" from my Beta section? That is just a short series of random functions. Then maybe one of my trainers, say Cartography trainer?

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

Tags: