Author Topic: Ok, total script noob here  (Read 10426 times)

0 Members and 1 Guest are viewing this topic.

Offline mmoore5325Topic starter

  • Newbie
  • *
  • Posts: 6
  • Activity:
    0%
  • Reputation Power: 1
  • mmoore5325 has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Ok, total script noob here
« on: October 13, 2014, 07:28:13 PM »
0
I am trying to make a basic script.  Something simple that will learn me some basics but also do something functional.  I am trying to make a script that will organize gold checks/commodity deeds in that nice little fashion where they overlap each other and line up perfectly in a row.  This is my very first script.  I would appreciate any help someone could give me.
Here is what I have, and please, don't laugh.

gosub selectbag
gosub selectbag2
gosub movedeed

sub selectbag
    display ok Click ok and select bag
    set #targcurs 1
    while #targcurs = 1
          wait 2
    set %bag #ltargetid
    set #ltargetid %bag
    event macro 17
   
Return

sub selectbag2
   
 display ok Click ok and select bag to you want to put deeds in
    set #targcurs 1
    while #targcurs = 1
          wait 2
    set %bag2 #lobjectid
    set #ltargetid %bag2
    event macro 17

Return

sub movedeed
   
    findItem EWH C_, %bag

And thats all I got.  I know event macro 17 is last object.  I do not know how to make it open the bag that is targeted.  If someone could let me know how, after they select the bag, to have the bag open, I would appreciate it.  Then if someone could refer to me an example of a click and drag to x,y after I have opened the targeted bag, I would appreciate it.  I think contpos puts the gump in a spot of my choosing, then I could click and drag the deeds to the first coordinate, then coordinate +1, or something.  Am I on the right tracK?  Anything helps.  I'm totally new at this but really want to start making my own super secret 1337 scripts that I can brag about and release versions that are just a tease of what my full version,  But for now I will be happy organizing checks.

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Ok, total script noob here
« Reply #1 on: October 13, 2014, 08:34:30 PM »
0
Here a sub that double click an item is you pack.

Code: [Select]
set %item XXX : insert ID of what you want to open or use.
sub DC_Item
   finditem %item C_ , #backpackid
    if #findcnt > 0
  {
    set #lobjectid #findid
    event macro 17
 }
 return

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: Ok, total script noob here
« Reply #2 on: October 14, 2014, 07:00:43 AM »
0
you are welcome to use any of my code snippets in this thread http://www.scriptuo.com/index.php?topic=2454.0

Of use to you might be: ENs MoveToContainor: http://www.scriptuo.com/index.php?topic=2454.msg71092#msg71092
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 mmoore5325Topic starter

  • Newbie
  • *
  • Posts: 6
  • Activity:
    0%
  • Reputation Power: 1
  • mmoore5325 has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Ok, total script noob here
« Reply #3 on: October 14, 2014, 11:58:24 AM »
0
Code: [Select]
sub movedeed
   
    findItem EWH C_, %bag

Would that work to find the check deed in the %bag that I set?

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Ok, total script noob here
« Reply #4 on: October 14, 2014, 05:42:34 PM »
0
You forget a space after
yes should work.

Code: [Select]
sub movedeed
    findItem EWH C_ , %bag

You can event do that.  Will look into a bag and move amount into another bag.
Code: [Select]
sub Getboard
set %packy %box
finditem TLK C_ , %packy
exevent drag #findid  150
exevent dropc %turnbag
wait 30
return

Offline mmoore5325Topic starter

  • Newbie
  • *
  • Posts: 6
  • Activity:
    0%
  • Reputation Power: 1
  • mmoore5325 has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Ok, total script noob here
« Reply #5 on: October 14, 2014, 10:20:49 PM »
0
Ok, I couldnt get this to work, maybe someone can tell me where I am going wrong.
Code: [Select]
set %bag
set %bag2
set %deed EHW


gosub selectbag
gosub selectbag2
gosub movedeed

sub selectbag
    display ok Click ok and select bag
    set #targcurs 1
    while #targcurs = 1
          wait 2
    set %bag #ltargetid
    set #ltargetid #lobjectid
    event macro 17

Return

sub selectbag2

 display ok Click ok and select bag to you want to put deeds in
    set #targcurs 1
    while #targcurs = 1
          wait 2
    set %bag2 #lobjectid
    set #ltargetid #lobjectid
    event macro 17

Return

sub movedeed

    findItem %deed C_ , %bag
    if #findcnt > 0
    {
    exevent drag #findid 1
    exevent dropc %bag2
    wait 30
    gosub movedeed
    }
    if #findcnt = -1
    display ok no deeds stopping
    halt

    return
Any help is greatly appreciated

Post Merge: October 14, 2014, 10:38:16 PM
i kind of understand your code
Code: [Select]
sub Getboard
set %packy %box
finditem TLK C_ , %packy
exevent drag #findid  150
exevent dropc %turnbag
wait 30
return
set %packy is my %bag
so

Code: [Select]
display ok click source bag
 #targcurs = 1
 while #targcurs = 1
 wait 2
 set %bag #ltargetid
 set #ltargetid #lobjectid
 event macro 17

display ok click destination bag
 set #targcurs = 1
 while #targcurs = 1
     wait 2
 set %bag2 #ltargetid
 set #ltargetid #lobjectid
 event macro 17

Those 2 pieces right there would be your %packy and %box
Code: [Select]
gosub movedeed
set %bag %bag2
what does that do?
Code: [Select]
finditem %deed _C , %bag

or i could use

finditem EHW _C , %bag
exevent drag #findid
(I'm lost right here too, you put 150, i am trying to move checks, I assume the 150 means 150 boards?)
exevent dropc %turnbag
(I don't know where this came from.  I am only trying to use 2 bags.  I am sure you just meant it as an example but I'm kind of lost.  I understand %packy and %box but not this.)
wait 30
(Then if I wanted to go back again to move another deed, and another, til there were no more deeds, i would...)
gosub movedeed

But is there a way to
if #findcnt > 0
 {gosub movedeed}
if #findcnt = -1
 {display ok no deeds.  stopping}

I can't get it to do that.  Once again, any help is appreciated trying to help me get my feet off of the ground.
« Last Edit: October 14, 2014, 10:38:16 PM by mmoore5325 »

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: Ok, total script noob here
« Reply #6 on: October 15, 2014, 03:54:09 AM »
0
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: