Author Topic: a long time silent scripter, new to SUO  (Read 4117 times)

0 Members and 1 Guest are viewing this topic.

Offline xapcxTopic starter

  • Jr. Member
  • **
  • Posts: 30
  • Activity:
    0%
  • Reputation Power: 0
  • xapcx has no influence.
  • Respect: +2
  • Referrals: 0
    • View Profile
a long time silent scripter, new to SUO
« on: September 01, 2009, 08:34:27 PM »
0
Hello all,

I am a UO adict with 3 128 month old accounts.  I took a two year break from UO and was lucky enough to find my accounts still alive.  Since my return, I have spent the past three years hard at work creating EASYUO scripts to make my video life much more enjoyable.  I have found that I actually spend more time and have more fun writing scripts than I spend "playing" the game.  I have become a scripting adict.  I go to bed dreaming of what I can make my characters do next.  I just stumbled on to this site and recognized a few names from years ago on the EasyUO boards.  I am looking forward to tinkering with your interface!

xApCx

Post Merge: September 02, 2009, 12:42:30 AM
Here is an tidbit of one of my favorite scripts.  Its very generic, but came in real handy durring the TOT drop period.  

Code: [Select]
set %timeWait ( #SCNT - 16 )
set %findtype UE_TC_TH_PI_DH_FD_ME_HI ;FanDancer
;set %findtype WD_R_EB ; lich lichlord
set %lastMon 00000
set %disMon 00000
set %corpse YFM
set %Gold POF
set %keys LZF
set %loot POF_LZF_ZFM_MIG_QIP
set %prize SWO
set %BOS 00000000
set %findPet 00000000
set %instmnt RGP_LQF ;PGP

gosub setPet

gosub setBOS
gosub setLLLt
gosub setURLt



top:
gosub playMusic
wait 1
gosub findMonster
wait 1
gosub allAttack
wait 1
gosub healthcheck
wait 1
gosub findCorpse
wait 1
gosub useBag
wait 1
gosub findPet
wait 1
gosub deathcheck
;gosub mempoCheck
goto top

sub deathcheck
if #charGhost = YES
{
wait 2s
click 845 66
wait 2s
click 542 393
wait 5s
stop
}
return

sub allAttack
finditem %findtype G_6
;if %timeWait < ( #SCNT - 10 )
   ;{
   ;set %lastMon 000000
   ;}
     if #findkind <> -1 && #findid <> %lastMon
     {
      wait 5
      set #ltargetid #findid
      set #ltargetkind 1
      msg all kill$
      target 2s
      event macro 22 0
      wait 2
      set %lastMon #ltargetid
      wait 10
     }
return

sub playMusic
    finditem %instmnt C_ , #BACKPACKID
     set #LOBJECTID #FINDID
     wait 5
     event macro 17 0
     wait 5
return


sub findMonster
   if %timeWait < ( #SCNT - 10 )
   {
    if #targcurs = 0
    {
     set #findkind 0
     set #findid 0
     set #ltargetid X
     finditem %findtype G_10
     if #findkind <> -1 && #findid <> %disMon
     {
      set #ltargetid #findid
      set #ltargetkind 1
      event macro 13 15 ;this part uses skill discord
      target 2s
      event macro 22 0
      wait 5
      if %message2 in #sysmsg || %message3 in #sysmsg
      {
       set %disMon #ltargetid
      }
      if %message5 in #sysmsg
      {
         ignoreitem #ltargetid
         return
      }
      set %timeWait #SCNT
      set %waitCount 0
     }
    }
   }
return

sub findPet
    finditem %findPet G_25
    if #FINDDIST > 4 && #FINDX < %LLLX || #FINDX > %URLX || #FINDY < %URLY || #FINDY > %LLLY )
    {
     msg all follow me$
     wait 60
     finditem %lastMon G_6
     if #findkind <> -1
{
     set #ltargetid %lastMon
     set #ltargetkind 1
     msg all kill$ ;this part tells your animal to kill
     target 2s
     event macro 22 0
     wait 5
}
    }
return

sub healthcheck
    if #CHARSTATUS = C
    {
     gosub cureMe
    }
    if #CHARSTATUS = CA
    {
     gosub cureMe
    }
    if #CHARSTATUS = CB
    {
     gosub cureMe
    }
    if #CHARSTATUS = GC
    {
     gosub cureMe
    }
    if #HITS < 85
    {
     gosub invisMe
     wait 5
     gosub healMe
    }
return

sub cureMe
    if #MANA > 15
    {
     event sysmessage curing
     event macro 15 24 ; cast arch cure
     target 100
     event macro 23 ; target me
     wait 20
    }
return

sub healMe
    if #MANA > 15
    {
     set #ltargetid #ENEMYID
   set #ltargetkind 1
   msg all kill$ ;this part tells your animal to kill
   target 2s
   event macro 22 0
   wait 5
     event macro 15 28 ; cast greater heal
     target 100
     event macro 23 ; target me
     wait 20
    }
return

sub invisMe
if #CHARSTATUS <> HB
       {
       set #ltargetid #ENEMYID
     set #ltargetkind 1
     msg all kill$ ;this part tells your animal to kill
     target 2s
     event macro 22 0
     wait 5
       event macro 15 43
       target 10s
       event macro 23 0
       wait 2s
       }
return

sub findCorpse
fc:
if #WEIGHT <= 440
{
    finditem %corpse G_10
    if #findkind <> -1
    {
    event sysmessage #findx #findy
    event sysmessage %LLLX %URLX %LLLY %URLY
    ;wait 2s
    if #FINDX < %LLLX || #FINDX > %URLX || #FINDY < %URLY || #FINDY > %LLLY )
    {
    ignoreitem #findid 1
    goto fc
    }
     set %corpseID #FINDID
     set #lobjectid %corpseID
     set %movex #findx
     set %movey #findy
     gosub moveNow
     wait 5
     gosub openIT
     wait 5
     ignoreitem #lobjectid 1
    }
}
return

sub openIt
    wait 10
    event macro 17
    OI:
    wait 1s
    finditem %loot C_ , #CONTID ;gold
    if #findkind <> -1
    {
     wait 5
     GOSUB moveItem #FINDID #FINDBAGID #BACKPACKID
     wait 5
     ignoreitem #findid 2
     goto OI
    }
return

Sub moveNow
  set %x %movex
  set %y %movey
  set %z %movez
  movingB:
  event pathfind %x %y
  if #finddist > 1
  {
   wait 10
   goto movingB
  }
Return

Sub useBag
    if #WEIGHT >= 440
    {
    ignoreitem reset
    ignoreitem reset 1
    ignoreitem reset 2
     finditem %BOS C_ , #BACKPACKID
     set #LOBJECTID #FINDID
     wait 5
     event macro 17 0
     target 1s
     finditem %Gold C_ , #BACKPACKID ;gold
     finditem #findid
     set #LTARGETID #FINDID
     event macro 22 0
     wait 10
    }
return

Sub mempoCheck
     finditem %prize C_ , #BACKPACKID
     if #findkind <> -1
     {
     finditem %BOS C_ , #BACKPACKID
     set #LOBJECTID #FINDID
     wait 5
     event macro 17 0
     target 1s
     finditem %prize C_ , #BACKPACKID
     set #LTARGETID #FINDID
     event macro 22 0
     wait 10
    }
return

sub setPet
    display ok please target your pet.
    set #targcurs 1
    target 5s
    watPetLup:
    if #targcurs = 1
    {
    goto watPetLup
    wait 5
    }
    finditem #ltargetid
    set %findPet #ltargetid
return

sub setBOS
    display ok please target your BOS.
    set #targcurs 1
    target 5s
    watBOSLup:
    if #targcurs = 1
    {
    goto watBOSLup
    wait 5
    }
    finditem #ltargetid
    set %BOS #ltargetid
return

sub setLLLt
    display ok please target your Lower Left Loot.
    set #targcurs 1
    target 5s
    watLLLtLup:
    if #targcurs = 1
    {
    goto watLLLtLup
    wait 5
    }

    set %LLLX #charposx
    set %LLLY #charposy
    event sysmessage %LLLX
    event sysmessage %LLLY
return


sub setURLt
    display ok please target your Upper Right Loot.
    set #targcurs 1
    target 5s
    watURLtLup:
    if #targcurs = 1
    {
    goto watURLtLup
    wait 5
    }

    set %URLX #charposx
    set %URLY #charposy
    event sysmessage %URLX
    event sysmessage %URLY
return
« Last Edit: September 01, 2009, 10:21:12 PM by TrailMyx »

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13305
  • Activity:
    0.8%
  • 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: a long time silent scripter, new to SUO
« Reply #1 on: September 01, 2009, 10:22:19 PM »
0
Welcome to the site!
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Noobie

  • Sr. Member
  • *
  • Posts: 262
  • Activity:
    0%
  • Reputation Power: 1
  • Noobie has no influence.
  • Gender: Male
  • Respect: +13
  • Referrals: 1
    • View Profile
Re: a long time silent scripter, new to SUO
« Reply #2 on: September 01, 2009, 10:39:03 PM »
0
Welcome to the site. It looks as you will be able to join in on the development of some good stuff. I think that there are like 5 projects going on now!!

Offline Cerveza

  • 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: +403
  • Referrals: 11
    • View Profile
Re: a long time silent scripter, new to SUO
« Reply #3 on: September 02, 2009, 04:07:43 AM »
0
Welcome aboard... you've got a good start in scripting. There is a huge wealth of information here that will help you along.

Code: [Select]
sub setPet
    display ok please target your pet.
    set #targcurs 1
    target 5s
    watPetLup:
    if #targcurs = 1
    {
    goto watPetLup
    wait 5
    }
    finditem #ltargetid
    set %findPet #ltargetid
return
*could* be done more simply with
Code: [Select]
sub setPet
    display ok please target your pet.
    set #targcurs 1
    while #targcurs = 1
      wait 0
    set %findPet #ltargetid
    return

Condensed code and removes one of the evil goto's.
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: +393
  • Referrals: 1
    • View Profile
Re: a long time silent scripter, new to SUO
« Reply #4 on: September 02, 2009, 04:27:03 AM »
0
Welcome and let me chuck in my 2 cents on something that jumped out at me on your code.  Look up the Logical Operator 'IN' and 'NOTIN' quiet helpful

Code: [Select]
sub healthcheck
    if #CHARSTATUS = C
    {
     gosub cureMe
    }
    if #CHARSTATUS = CA
    {
     gosub cureMe
    }
    if #CHARSTATUS = CB
    {
     gosub cureMe
    }
    if #CHARSTATUS = GC
    {
     gosub cureMe
    }
    if #HITS < 85
    {
     gosub invisMe
     wait 5
     gosub healMe
    }
return

Can be Reduced to

Code: [Select]
sub healthcheck
    if C IN #CHARSTATUS
       gosub cureMe
    if #HITS < 85
      {
      gosub invisMe
      wait 5
      gosub healMe
      }
return
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 Toptwo

  • SunTigress's Hero!
  • Global Moderator
  • *
  • *
  • Posts: 2087
  • Activity:
    0%
  • Reputation Power: 21
  • Toptwo might someday be someone...Toptwo might someday be someone...Toptwo might someday be someone...Toptwo might someday be someone...
  • Gender: Male
  • Respect: +131
  • Referrals: 1
    • View Profile
Re: a long time silent scripter, new to SUO
« Reply #5 on: September 02, 2009, 04:33:27 AM »
0
Hi! Welcome to SUO! I WONT be one of the ppl looking and streamlining your code as I dont have a clue what I am looking at! I have a hard enough time just making some of the scripts work for myself LOL.

But as you can see we have some top-notch coders here, so welcome to the site and the and the huge amount of info and help that there is here!
The final weapon is the brain. All else is supplemental.....  If you find yourself in a fair fight, your tactics suck.

Offline Xclio

  • Officially "The MAN"
  • Elite
  • *
  • *
  • Posts: 981
  • Activity:
    0%
  • Reputation Power: 9
  • Xclio has no influence.
  • Gender: Male
  • Respect: +56
  • Referrals: 1
    • View Profile
Re: a long time silent scripter, new to SUO
« Reply #6 on: September 02, 2009, 12:35:22 PM »
0
Welcome to the site!  You won't ever want to write code again without SUO!

Offline SunTigress

  • TopTwo's Woman
  • Elite
  • *
  • *
  • Posts: 900
  • Activity:
    0%
  • Reputation Power: 9
  • SunTigress has no influence.
  • Gender: Female
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: a long time silent scripter, new to SUO
« Reply #7 on: September 02, 2009, 01:32:04 PM »
0
Welcome to SUO!
If at first you don't succeed, try try again. Then give up. There is no use in making a fool of yourself.

Offline xapcxTopic starter

  • Jr. Member
  • **
  • Posts: 30
  • Activity:
    0%
  • Reputation Power: 0
  • xapcx has no influence.
  • Respect: +2
  • Referrals: 0
    • View Profile
Re: a long time silent scripter, new to SUO
« Reply #8 on: September 02, 2009, 04:31:15 PM »
0
wow guys, thanks for the help.  Honestly i have been scripting on my own for a few years.  this was the first time i have posted one of mine and you guys jumped right in with some awsome suggestions...  THANKS!!!!  i like it here already

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13305
  • Activity:
    0.8%
  • 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: a long time silent scripter, new to SUO
« Reply #9 on: September 02, 2009, 05:23:06 PM »
0
Really, it's communities like this one that have helped me become a better scripter.  There's lots of brilliant scripters out there, and many of them program for a living in real life.  I even learn new things from time to time by watching the community interaction.  So you're never too good or advanced to learn a new thing or two.

But glad to hear that you are enjoying yourself so far.
Please read the ScriptUO site RULES
Come play RIFT with me!

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: a long time silent scripter, new to SUO
« Reply #10 on: September 02, 2009, 07:36:28 PM »
0
Welcome to the site...  there are so many helpful eyes here at the site you end up with a bunch of point of views helping you round out your flow/ thought process.  Enjoy your time here!

Offline welgill

  • Don't mess with TM!
  • Jr. Member
  • **
  • Posts: 92
  • Activity:
    0%
  • Reputation Power: 0
  • welgill has no influence.
  • Gender: Male
  • Respect: +9
  • Referrals: 1
    • View Profile
Re: a long time silent scripter, new to SUO
« Reply #11 on: September 02, 2009, 09:36:57 PM »
0
Damn good communiy here no bull 8)

Tags: