Author Topic: Can someone take a look at this for me?  (Read 23260 times)

0 Members and 1 Guest are viewing this topic.

Offline El_RemoTopic starter

  • Jr. Member
  • **
  • Posts: 97
  • Activity:
    0%
  • Reputation Power: 2
  • El_Remo has no influence.
  • Gender: Male
  • Respect: +49
  • Referrals: 0
    • View Profile
Can someone take a look at this for me?
« on: March 27, 2024, 04:00:40 PM »
+2
Trying to get a fishing script up and running over here on UO Forever. The thing is fishing just fine but once it runs out and the "fish dont seem to be biting", it just sits there and does not move the boat as advertised. Anyway i thought id throw it out there for someone that might be bored lol.  Thanks all.

@clearlist 'mobsound'
@createlist 'mobsound'
@clearlist 'attack'
@createlist 'attack'
@clearlist 'scan'
@createlist 'scan'
@clearlist 'skin'
@createlist 'skin'
@clearlist 'drive'
@createlist 'drive'
//* SETUP **
pushlist 'mobsound' 'yes' // yes for mob sound, no for no sound.
pushlist 'attack' 'yes' // yes to attack, no for no attack
pushlist 'scan' 'yes' // yes to scan the horizons
pushlist 'skin' 'yes' // Will skin & re-open nearby corpses
pushlist 'drive' 'yes' // yes to drive boat
//**
if not timerexists 'Sound Timer'
  createtimer 'Sound Timer'
  settimer 'Sound Timer' 15000
endif
if not timerexists 'Bandage Timer'
  createtimer 'Bandage Timer'
  settimer 'Bandage Timer' 10250
endif
// If we are poisoned or don't have full health
while poisoned 'self'
  autotargetself
  cast 'Cure'
  pause 2000
endwhile
while diffhits > 30 and not dead
  autotargetself
  bigheal
  pause 1500
  if not @findobject 'lefthand'
    equipitem 'bow' 2
  endif
endwhile
if not @listexists 'xaxis'
  @createlist 'xaxis'
  @pushlist 'xaxis' 3
  @pushlist 'xaxis' -3
endif
if not @listexists 'yaxis'
  @createlist 'yaxis'
  @pushlist 'yaxis' 3
  @pushlist 'yaxis' -3
endif
if not listexists 'fish'
  createlist 'fish'
  @pushlist 'fish' '0x9ce'
  @pushlist 'fish'' 0x9cf'
  @pushlist 'fish' '0x9cc'
  @pushlist 'fish' '0x9cd'
endif
if dead
  stop
endif
if not @findobject 'bow'
  promptalias 'bow'
endif
if not @findobject 'pole'
  if @findtype '0xdbf' 'any' 'backpack' 'any' '3'
    setalias 'pole' 'found'
    pause 600
  else
    msg 'No Poles'
    playsound 'error.wav'
    pause 10000
  endif
endif
for 0 to 'xaxis'
  for 0 to 'yaxis'
    while not @injournal 'biting' 'system'
      // If we are poisoned or don't have full health
      while poisoned 'self'
        autotargetself
        cast 'Cure'
        pause 2000
      endwhile
      while diffhits > 30 and not dead
        autotargetself
        bigheal
        pause 1500
        if not @findobject 'lefthand'
          equipitem 'bow' 2
        endif
      endwhile
      // Skin serps
      if @inlist 'skin' 'Yes' or @inlist 'skin' 'yes'
        if @findtype 0x2006 'any' 'ground' 'any' 2
          usetype 0xf52
          waitfortarget 3500
          target! 'found'
          pause 600
          useobject 'found'
          ignoreobject 'found'
          unsetalias 'found'
          pause 600
        endif
      endif
// Scan the Horizons
      if @inlist 'scan' 'Yes' or @inlist 'scan' 'yes'
        msg 'scan the horizons'
      endif
      if not @findobject 'lefthand'
        equipitem 'bow' 2
      endif
      // Reset pole
      if not @findobject 'pole'
        if @findtype '0xdbf' 'any' 'backpack' 'any' '3'
          setalias 'pole' 'found'
          pause 600
        else
          msg 'No Poles'
          playsound 'error.wav'
          pause 10000
        endif
      endif
      @canceltarget
      @useobject 'pole'
      waitfortarget 2000
      targettileoffset! 'xaxis[]' 'yaxis[]' 0
      pause 500
      if not @injournal 'biting' 'system'
        pause 7750
      endif
      //Cheer
      if @injournal 'pull a bottle' 'system'
        clearjournal
        headmsg 'GOT ONE'
        if @inlist 'mobsound' 'Yes' or @inlist 'mobsound' 'yes'
          playsound 'cheer.wav'
        endif
      endif
      if @injournal 'mess' 'system'
        clearjournal
        @usetype! 0xdd6
        pause 1000
        @usetype! 0xdd6
        pause 1000
      endif
      if @injournal 'closer' 'system'
        clearjournal
        resync
      endif
      //fishing cleanup
      if weight >= maxweight
        for 0 to 'fish'
          while @findtype fish[] 'any' 'backpack'
            usetype! 0xf52
            waitfortarget 1000
            target! 'found'
            pause 600
          endwhile
        endfor
// adds to fishsteak pile on floor
        if @findtype 0x97a 'any' 'ground' 'any' 2
          movetype 0x97a 'backpack' 'found'
          pause 600
        else
          //starts fishsteak pile on floor if doesnt exist
          movetypeoffset 0x97a 'backpack'  'ground'
          pause 600
        endif
      endif
      //end fishing cleanup
      if not @findobject 'lefthand'
        equipitem 'bow' 2
      endif
      //attack sea serp
      getenemy 'enemy' 'criminal' 'gray' 'closest'
      while @inrange 'enemy' 10
        if @inlist 'mobsound' 'Yes' or @inlist 'mobsound' 'yes'
          if timer 'Sound Timer' > 10000
            playsound 'bell.wav'
            settimer 'Sound Timer' 0
          endif
        endif
        // Attack!
        if @inlist 'attack' 'Yes' or @inlist 'attack' 'yes'
          attack! 'enemy'
        endif
        while poisoned 'self'
          autotargetself
          cast 'Cure'
          pause 2000
        endwhile
        while diffhits > 30 and not dead
          autotargetself
          bigheal
          pause 1500
          if not @findobject 'lefthand'
            equipitem 'bow' 2
          endif
        endwhile
      endwhile
    endwhile
    clearjournal
  endfor
endfor
if @inlist 'drive' 'Yes' or @inlist 'drive' 'yes'
  msg '[e whistle'
  pause 350
  for 0 to '3'
    msg 'Back One'
    Pause 350
  endfor
  for 0 to '6'
    msg 'Forward One'
    Pause 350
  endfor
  for 0 to '3'
    msg 'Left One'
    Pause 350
  endfor
  for 0 to '6'
    msg 'Right One'
    Pause 350
  endfor
  msg 'Forward'
  pause 4500
  msg 'stop'
  playsound 'pssst.wav'
endif

Offline Anvil

  • Jr. Member
  • **
  • Posts: 36
  • Activity:
    0.2%
  • Reputation Power: 1
  • Anvil has no influence.
  • Gender: Male
  • Patience is a virtue.
  • Respect: +14
  • Referrals: 0
    • View Profile
Re: Can someone take a look at this for me?
« Reply #1 on: March 29, 2024, 07:58:07 AM »
+1
Looks like hotkeys are being called for sailing, maybe start by checking macro setup.

Klingon:
'ach qorDu'wIj vIsaHbe' jIH'e'.

Offline El_RemoTopic starter

  • Jr. Member
  • **
  • Posts: 97
  • Activity:
    0%
  • Reputation Power: 2
  • El_Remo has no influence.
  • Gender: Male
  • Respect: +49
  • Referrals: 0
    • View Profile
Re: Can someone take a look at this for me?
« Reply #2 on: March 29, 2024, 09:44:48 AM »
+1
Looks like hotkeys are being called for sailing, maybe start by checking macro setup.
Thanks. I have a friend who says its working fine for him. Looking at this, i feel the same as you. Seems something is just missing on my end. Ill check in to where i sourced this and see if i can find any documentation.   

Offline El_RemoTopic starter

  • Jr. Member
  • **
  • Posts: 97
  • Activity:
    0%
  • Reputation Power: 2
  • El_Remo has no influence.
  • Gender: Male
  • Respect: +49
  • Referrals: 0
    • View Profile
Re: Can someone take a look at this for me?
« Reply #3 on: April 02, 2024, 04:17:21 AM »
+1
I was able to get a temporary macro working so im semi up and running. Id still be very interested in something like this if someone can ever help me tackle it lol.  Thanks gang

Offline Crisis

  • Global Moderator
  • *
  • *
  • Posts: 3084
  • Activity:
    2.6%
  • Reputation Power: 42
  • Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.
  • Gender: Male
  • Scripting well enough to break things!
  • Respect: +566
  • Referrals: 2
    • View Profile
Re: Can someone take a look at this for me?
« Reply #4 on: April 02, 2024, 02:13:56 PM »
+1
I am not very familiar with Steam Macros but I do not see anywhere that calls for it to "drive" when it gets the journal message with "biting". I may be very wrong but I was looking for an instance with a journal entry with biting and then it calling for it to "drive" for the part with the 4500s. It seems like maybe that part is missing?

Offline El_RemoTopic starter

  • Jr. Member
  • **
  • Posts: 97
  • Activity:
    0%
  • Reputation Power: 2
  • El_Remo has no influence.
  • Gender: Male
  • Respect: +49
  • Referrals: 0
    • View Profile
Re: Can someone take a look at this for me?
« Reply #5 on: April 02, 2024, 02:39:27 PM »
+1
Yeah thats what Im wondering as well. Im pretty sure he did a python version..  Ill find it and post so we can compare..
  He did have this seperate. Would this be pasted at a particular spot, or called upon during the script?\

https://github.com/matsamilla/UO-Steam/blob/master/Sailing/Profile%20Macro%20List
« Last Edit: April 02, 2024, 02:42:25 PM by El_Remo »

Offline Crisis

  • Global Moderator
  • *
  • *
  • Posts: 3084
  • Activity:
    2.6%
  • Reputation Power: 42
  • Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.
  • Gender: Male
  • Scripting well enough to break things!
  • Respect: +566
  • Referrals: 2
    • View Profile
Re: Can someone take a look at this for me?
« Reply #6 on: April 02, 2024, 06:05:17 PM »
+1
It already has the commands to move the boat, it is missing the call to action for it. It needs something to call for when there are no fish biting after it fishes all around the boat to then go forward 4500 seconds, stop, and resume fishing. I have never written a script for this so I do not have the capabilities to know how to add it.

Tags: