Author Topic: Help adding in a cut sub to a gather leather script  (Read 3025 times)

0 Members and 1 Guest are viewing this topic.

Offline CrisisTopic starter

  • Global Moderator
  • *
  • *
  • Posts: 3019
  • Activity:
    3.2%
  • Reputation Power: 41
  • 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: +206
  • Referrals: 2
    • View Profile
Help adding in a cut sub to a gather leather script
« on: July 01, 2013, 05:08:39 PM »
0
I am using a leather gatherer script and it loots the leather but does not cut it. I am trying to add a cut leather sub in it but not much luck. What did I do wrong?

SET %LOOT is at the beginning of the script EEG (pile of hides) is listed in the set %LOOT table

SUB GET_LOOT is by the original author, I added in the sub CUT_LOOT

AT the beginning of the script there is a main loop and I added GOSUB CUT_LOOT right after GOSUB GET_LOOT

Code: [Select]
;================================================
SUB GET_LOOT
  GOSUB CHECK_WEIGHT
  FINDITEM %LOOT C_ , %CORPSE_CONTAINER
  IF #FINDCNT > 0
  {
    FOR #FINDINDEX 1 #FINDCNT
    {
      EXEVENT DRAG #FINDID #FINDSTACK
      WAIT 20
      EXEVENT DROPC #BACKPACKID
      WAIT 20
    }
  }
  FINDITEM JJG C_ , #Backpackid
  IF #FINDCNT > 0
  {
    FOR #FINDINDEX 1 #FINDCNT
    {
      Event Property #Findid
      If Spined In #Property && %Bos_Option #False
      {
        EXEVENT DRAG #FINDID #FINDSTACK
        WAIT 20
        EXEVENT DROPC %Corpse_Container
        WAIT 20
      }
    }
  }
  IF #CHARPOSX <> %STARTX
  {
    REPEAT
      EVENT PATHFIND %STARTX %STARTY %STARTZ
      WAIT 40
    UNTIL #CHARPOSX = %STARTX %STARTY %STARTZ
  }
  WAIT 1
  HIDEITEM %NEW_CORPSE
  WAIT 1
RETURN
;================================================
SUB CUT_LOOT
finditem %LOOT C_ , #backpackid
  for #findindex 1 #findcnt
  {
    set #lobjectid %SCISSORS
    event macro 17
    target
    set #ltargetid #findid
    set #ltargetkind 1
    event macro 22
    wait 8
  }
RETURN

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • 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: Help adding in a cut sub to a gather leather script
« Reply #1 on: July 01, 2013, 05:14:37 PM »
0
where is your %scissors initialized?
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline CrisisTopic starter

  • Global Moderator
  • *
  • *
  • Posts: 3019
  • Activity:
    3.2%
  • Reputation Power: 41
  • 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: +206
  • Referrals: 2
    • View Profile
Re: Help adding in a cut sub to a gather leather script
« Reply #2 on: July 01, 2013, 05:17:06 PM »
0
At the beginning of the script where it sets the other things like the corpse, loot and what not.

SET %SCISSORS KAG_JAG

Since it is not my script, I am not sure what parts are best to post without posting the whole thing.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • 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: Help adding in a cut sub to a gather leather script
« Reply #3 on: July 01, 2013, 05:41:16 PM »
0
Ah, that's your problem.  You need to find the actual #FINDID of the scissors.  So you need something like this:

Code: [Select]
SET %SCISSOR_TYPE KAG_JAG
finditem %SCISSOR_TYPE C_ , #BACKPACKID
if #FINDCNT > 0
{
  set %SCISSORS #FINDID
}
else
{
  display ok Cannot locate scissors.  Stopping.
  stop
}
Please read the ScriptUO site RULES
Come play RIFT with me!

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: Help adding in a cut sub to a gather leather script
« Reply #4 on: July 01, 2013, 05:48:42 PM »
0
Crisis, 
             Why do you bother with a knife and scissor when you can use a Butcher's War Cleaver .  It will put the cut leather into ur pack.
Code: [Select]
sub gatherLeather
set %itemtype YFM   ; Corpse

; loop:
finditem %itemtype G_2
if #findkind = -1
{
return hunt
}

finditem KFR_HFR C_ , #backpackid
if #findkind = 1
set #lobjectid HFR
set #lobjectid #findID
event macro 17
wait 10
finditem %itemtype G_2
set #ltargetid #findid
set #ltargetkind 1
event macro 22
ignoreitem #findid
wait 1s
If #weight > %recallweight
{
 display go unload
pause
}
return

Offline CrisisTopic starter

  • Global Moderator
  • *
  • *
  • Posts: 3019
  • Activity:
    3.2%
  • Reputation Power: 41
  • 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: +206
  • Referrals: 2
    • View Profile
Re: Help adding in a cut sub to a gather leather script
« Reply #5 on: July 01, 2013, 06:03:52 PM »
0
Thanks TM, I forgot all about that. :(

I have it cutting with scissors now.

Ghost, I never realized that it did that. I had a dagger so I was using that. I got a butcher's war cleaver and won't need the scissors part now lol.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • 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: Help adding in a cut sub to a gather leather script
« Reply #6 on: July 01, 2013, 06:21:22 PM »
0
Be careful with the Butchers war cleaver if you want to support freeshards.  Some don't have it, and others make it function differently.  Scissors are scissors and operate the same from the 1st UO shard.  Now if you want to add scissor support *AND* war cleaver support - that'd be sexy!
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline CrisisTopic starter

  • Global Moderator
  • *
  • *
  • Posts: 3019
  • Activity:
    3.2%
  • Reputation Power: 41
  • 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: +206
  • Referrals: 2
    • View Profile
Re: Help adding in a cut sub to a gather leather script
« Reply #7 on: July 01, 2013, 07:21:48 PM »
0
Be careful with the Butchers war cleaver if you want to support freeshards.  Some don't have it, and others make it function differently.  Scissors are scissors and operate the same from the 1st UO shard.  Now if you want to add scissor support *AND* war cleaver support - that'd be sexy!

I am all about sexy!!  8)

Tags: