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 - jwardlaw09

Pages: [1]
1
Scripting Chat / Re: Newb, First Script
« on: March 15, 2010, 07:12:52 PM »
rofl

i used the bandage self when i used UO's hotkeys... forgot all about that
simplified that code and made it look much better... thnx a million petkiller!

2
Scripting Chat / Re: Newb, First Script
« on: March 15, 2010, 12:28:49 PM »
yeah, thanks guys for all your help. Now that my ball is rolling, everything is so much easier to understand. I'm still dabbling with very simple scripts though. Twinkle McNugget, thank you for pointing out the timer issue, I think it might still be messed up but, for now it works right.  :D Now that the healer works, what to do? I was working on modifying a simple gold looter script and decided to combine the two. Now i feel some laughter coming on because i combined them completely on my own even though im sure its a very simple thing to do, it took the better part of an hour to think of the circumstances to run the subs. I'm sure this may look primitive  :P I threw a variable in there to hide my charid at least i think i did it right lol.

Code: [Select]

set %bandie_time #sCnt
set %bandie ( #maxhits - 10 )
set %corpseid YFM_FEX_QEX

SUO:
repeat


if #hits < %bandie && #sCnt >= %bandie_time
  {
    gosub Healme
    set %bandie_time ( #sCnt + 10 )
  }
wait 5

gosub loot

until #CharGhost = YES
while #CharGhost = YES
  wait 0
GoTo SUO

sub Healme
  wait 5
  findItem %1 C_ , #backpackID
  if #findKind = -1
    return
  set #lobjectID #findID
   set #ltargetKind 1
  event macro 17 0
  target 3s
  event macro 23 0
  wait 3
return


sub loot
finditem %corpseid G_2
set %corpse #findid
set #lobjectid %corpse
event macro 17 0
wait 20
set %corpseContID #contid
finditem POF C_ , %corpseContID
set %gold #findid
     wait 10
     exevent drag %gold #findstack
     wait 10
     exevent dropc #backpackid
ignoreitem %corpseCondID
ignoreitem %corpse
wait 10
return


Script works but still is a little bugged. specifically in the targeting of bandies i think i need to adjust some pause times. Thanks for everyone help on this thing.. I of course take no claim to anything im just learning :D Without your guys words of encouragement i probably would have bombed out by now. I have much respect for what you do.

*one day i'll be worthy of SUO guild*





3
Script Debug / Re: basic tutorial modification help
« on: March 13, 2010, 03:01:32 AM »
sorry to do this to you cerveza but could you elaborate? i know your referring to..

Code: [Select]
  findItem #charID C_ , #backpackID


i realize what charID is but what is the difference between hard coded and system charID?

sorry just sounds important and i wanna make sure i understand.

4
Script Debug / Re: basic tutorial modification help
« on: March 13, 2010, 02:39:52 AM »
WOOT! The script was a horrible failure lol... i couldnt figure out why it kept looping when it got to targeting me. I almost posted for help but know i have to do my own research... so i did and it dawned on me i had nothing there for targeting myself after selecting the bandies lol... so fixed it up with a target self event macro and it works great. Only problem is a delay between targeting and applying the first bandie... odd this only affects the first. Anyways i couldnt have made this work without the help of all of you...  (the reason i start applying bandies at maxhits - 5 is because of the delay. after the first aid is applied this goes away)

Code: [Select]

set %bandie_time #sCnt
set %bandie ( #maxhits - 5 )

SUO:
repeat


if #hits < %bandie && #sCnt > %bandie_time
  {
    gosub Healme
    set %bandie_time ( #sCnt + 10 )
  }
wait 3

until #CharGhost = YES
while #CharGhost = YES
  wait 0
GoTo SUO

sub Healme
  wait 3
  findItem #charID C_ , #backpackID
  if #findKind = -1
    return
  set #lobjectID #findID
   set #ltargetKind 1
  event macro 17 0
  target 2
  event macro 23 0
  wait 2
return





5
Script Debug / Re: basic tutorial modification help
« on: March 12, 2010, 11:27:50 PM »
awesome thanks guys, i just got home from work so i will make the changes and let you know how it goes. kudos on the tutorial cerveza... easy to understand.

6
Script Debug / basic tutorial modification help
« on: March 12, 2010, 06:18:28 PM »
hi guys, sorry have to make this quick i am on my way our the door... basic problem i think.
I'm trying to take cervezas healpot tutorial and make it work for me, same concept just bandaids. here is what i have, i think the problem is in the healme sub. let me know what you come up with thanks :D Looking at it again i bet im messing up the finditem command in that sub.... when i run the script nothing really happens :(

Code: [Select]


set %bandie ( #maxhits - 20 )

SUO


if #hits < %bandie && #sCnt > %bandie_time
  {
    gosub Healme
    set %bandie_time ( #sCnt + 10 )
  }
wait 5

until #CharGhost = YES
while #CharGhost = YES
  wait 0
GoTo SUO

sub Healme
  wait 3
  findItem WLOYFRD C_, #backpackID
  if #findKind = -1
    return
  set #lobjectID #findID
   set #ltargetKind 1
  event macro 17 0
return






7
Scripting Chat / Re: Newb, First Script
« on: March 12, 2010, 09:08:38 AM »
*bows down* lol ill be back in an hour or so with either more questions or the next chunk of code  ;D

thanks guys!

--- hours later

lol i fell asleep at the keyboard  >:(. good news is i can understand a majority of that little code. Thnx for all the references to wiki and euo docs. I looked over those pages before speaking with you guys and i just couldn't completely comprehend it all on my own. annyyyyways I will be trying to add a weight check and transfer gold to beetle ability. i know its been done many times but its never as glorifying as when you do it yourself. Thanks for all your help everyone. Ill keep you posted....

8
Scripting Chat / Re: Newb, First Script
« on: March 12, 2010, 08:39:11 AM »
mwahahaha you have made me so happy, at least im getting somewhere.... that command alone could prove useful in many situations...... anyways moving onward....

sub loot
finditem %corpseid G_2  ;look on ground for a corpse within 2 tiles

this here starts the sub called loot?
 then it says keep an eye out for any YFM corpses within 2 tiles

if #findid = X
      return

If you cant find any corpses within the 2 tiles then return. (return to where? is it the top of script by default?)

set %corpse #findid
set #lobjectid %corpse
event macro 17 0;

ok starting to get a little lost. i dont even know what to ask... crap... brick wall.....

Anyways sorry if im getting tooo basic for you guys. just wanna make sure i have a concrete understanding of things and THANK YOU. you guy are so descriptive and helpful.

9
New member introductions / Re: Greetings
« on: March 12, 2010, 08:12:18 AM »

Thank You... hehe. I'm so amped up i've been in love with robotics and automation for awhile but haven't had the resources or community support that I find myself with here. I learn fast but its going to take alot of funny questions to which you guys might just have to laugh... I've even been inspired to the point of taking some programming and logic classes or something... gotta brush up on my math...
Thank you all and maybe one day ill be able to figure out how to turn this damn program on.. lol jk

Well met...

10
Scripting Chat / Re: Newb, First Script
« on: March 12, 2010, 08:06:22 AM »
thank you very much for the words of wisdom, I used to use razor all the time, i made my own little macros but eventually built several that i was impressed with. I had a mining macro that would mine an entire cave and leave all the ore on the ground so i could just come pick it up... or a magery macro that would cast spells on myself while running an if loop to check my health and cast g-heal if needed. it also meditated if mana got too low. small pickles for you guys but I was so damned proud. lol.
The day came when my ideas for macros became limited by what razor could do. (or what i could do with razor). then POW i find you guys, and all those ideas i had just became possible. Unfortunately its a litttttle more complicated than razor, Which is also why I am enjoying this so much. I love a great challenge.

Back to my problem at hand.... Im trying to understand the looter that was so kindly posted by petkiller

I understand bits and peices but im going to start at the top and work my way down.

set %corpseid YFM_FEX_QEX

is %corpseid acting as a variable that we are defining? I checked the ID of an ettin corpse and it was YFM.  so I understand why the YFM but whats the FEX and OEX for? maybe different types of monsters have different corpse codes? Sorry if this doesnt make too much sense.

Thanks for everything guys...

11
Scripting Chat / Re: Newb, First Script
« on: March 12, 2010, 04:22:56 AM »
Awesome!! I was looking for something similiar but every looter seemed to be extremely overcomplicated for my use or comprehension. I did read up on some docs and found a way to get ID's for everything. You certainly have put me on the right path, i will fiddle around and keep you posted THanks!

12
Scripting Chat / Newb, First Script
« on: March 12, 2010, 03:02:43 AM »
Bear with me guys I have VERY little programming experience but understand logic. This really sparks my creativity because its something i love (computer science) with something i love more (UO) So im learning but, Glad to be here.very newbish though. Hope i dont make you guys mad, I figure to start i will write a simple script that opens new corpses takes the gold and puts it in my pack. sounded easy... But for some reason i feel like I have writers block, I have idea where to begin. I have done quite bit of reading and I think that it should look like this...

Command to open new corpses within 2 tiles
FindID = Whatever gold may be and a drag command
move cursor to coordinates of my bag on paperdoll and drop

LOL so sorry I really am not sure of the right syntax for anything. I just dont know if I am on the right path or if something has gone horribly wrong.. hehe

So, If i have the concept but need the language now what? how would i go about finding the ItemID of things, only way i thought of was to start runuo and use the [props command ingame. There must be a better way to identify itemID's.

How would i get the script to open new corpses... I have a warrior and plan on standing in one spot so range wont be a problem everything tends to die at my feet hehe... but i have no idea how i would get the script to open these corpses....

Other than that if this is way more complicated than that or if i should do even more studying before making a newbish post let me know :(  Thanks for all your help!!!

13
New member introductions / Greetings
« on: March 12, 2010, 02:24:43 AM »
Hello, new here at ScriptUO. Been playing for ages without this  Cry. I have played on OSI and freeshards, I also had a runuo server. Times get old in UO and every adventurer needs a new challenge. I can no longer find mine within the game alone but, this has put a whole new spin on things and opened many doors for me. Looking forward to the new experience and cant wait to start downloading. Looking forward to writing as well. Thanks for having me


                                                           Jwardlaw09
(accidentally posted my intro in general chat DOH!)
 

Pages: [1]