Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mmoore5325

Pages: [1]
1
Scripting Tutorials / Re: Repeat Until While
« on: October 14, 2014, 10:55:59 PM »
I've seen people put <> in their statements, I was just curious what they do.
When I use #targcurs
set #targcurs = 1
while #targcurs = 1
wait 2
set %bag #lobjectid
set #lobjectid #ltargetid
event macro 17
Thats actually almost all the code I am familiar with
But I was just curious.
Cervesas beer <> 0
and I thought I saw someone put
while #targcurs <> 1 or something close to it
If Cervesas beer < 0, OMG NO!
if it is > 0, GREAT!
But if its <> 0, I take it as maybe I'm drinking, maybe i'm not.  Please help me understand.

2
Scripting Tutorials / Re: Ok, total script noob here
« on: October 14, 2014, 10:20:49 PM »
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.

3
Scripting Tutorials / Re: Ok, total script noob here
« on: October 14, 2014, 11:58:24 AM »
Code: [Select]
sub movedeed
   
    findItem EWH C_, %bag

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

4
Scripting Tutorials / Ok, total script noob here
« on: October 13, 2014, 07:28:13 PM »
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.

5
Crafting / Re: Getting easy All 70's Resists
« on: September 24, 2014, 10:10:58 PM »
Im currently trying to make a metal sampire suit.  This suit is tough to make.  I need energy to be at 45, 40 cold, 40 poison, and physical at 20, with crafting everything but the headpiece.  I am having a real difficult time as cold always wants to stay around 3-5 on all of the pieces, and physical and fire want to jump up there.  I will be imbuing 18 fire on every piece, and do not want to imbue any piece more than once with a resist, so it doesnt really matter what fire is at, since I will be imbuing it anyways.  But in order to do this, the physical resist and fire resist have to be at 4 or 5 each.  If either one of them is at 6 or 7, it will lower the other resists too much.  As a legendary blacksmith making exceptional pieces, I get 35 resist on each piece, so there is little room for failure.  I plan on enhancing all of the pieces at the end with valorite, which will add 5 physical, 4 cold, 4 poison, 4 energy, for a total of 25/20/20/20, combined with a mace and shield reading glasses of 25/10/10/10, so in the end I know I will have, between the mace and shield reading glasses and enhancement, 50/30/30/30.  

Therefore, as a new guy to scripting, I want to know where I should begin with my idea for a script.  I want it to scan the armor I make for certain resists.  Just scan for certain numbers for starts.  As it goes along, I wouldn't mind having it move the armor I don't want into the resource bag or smelting it, eventually it doing everything for me.  But for now, I would just be happy having my script scan for certain numbers.

Anyone have a helping hand on where I should begin?

I'm thinking maybe I should write something to have a cursor ask me to select the bag, then scan the armor in the bag and put it into a text file to start.

Is it possible to make something to make an item, scan the resists, and if the resists aren't the minimum amount, smelt it again?  I know alot of people have it scan the journal for messages, but that wouldn't be able to be used here.  Is it possible to scan resists?

Thanks.

6
New member introductions / Hello good people
« on: September 23, 2014, 11:11:56 PM »
My name is Mike, everyone calls me Mac.  Just back in the game within the last month or so, and havent played since AoS.  My cousin and I had a few drinks one night and started rehashing the good ole days of UO, and it wasn't too long before we came back.  I started reading about all the cool stuff people have done with the game regarding these scripts, and I am finding the fun things you can do with scripts almost as intriguing as the game itself.  I am interested in learning how to program.  I am getting ready to graduate college, and am now wishing I had gone down the software engineer route.  I am wanting to find a way to go back to school because this stuff has always interested me, but would love to know where a good place to start would be when trying to learn the things I need to know to help me get a good start here.  What kind of programming languages would be good to try and learn before I even begin to attempt to make scripts.  I figure it will be a long road but I am eager to learn.

Thanks alot, looking forward to talking to everyone on the forum!

Mac

Post Merge: September 23, 2014, 11:20:23 PM
Oh, and if you want my UO history, I used to play with SoB on Great Lakes back in the Pre-AoS days.  I quit sometime after AoS came around.  We claimed Moonglow as our hometown.  Ill never forget seeing the people name their animals vulgar things and attach our guild initials on to the pets.  "SoBSuxDik."  And when I came back, I went and did a champion spawn with my cousin, a red showed up and killed us.  It felt good to see a red show up and get that, "Oh *bleep*!" feeling again.  Our guild ran all the dungeons, mainly pvp and player killing.  I am playing OSI again, and the game has changed alot.  It seems mostly for the better.  This is one game that will never get old.  I have played other games between now and then, but none have that horizontal gameplay that UO has.  Its not a race from beginning to end with UO.  Once you finish building your character, then you move on to something else, because there is always something that is needing done.  "Ok, get 120 swords, time to check my plants.  Ok, plants are good, time to go get my BODs.  Ok, got BODs..."

But like I said, the scripting aspect of it interests me alot, and all the different things you can do once you learn how to use Object ID's and stuff to your advantage.  And I would like to take what I learn here on to other things.  But right now I need to learn the basics, so help with that would be appreciated, as in a good place to start, and what language that would be.

Thanks again.

Pages: [1]