Author Topic: Hiding and closing corpses  (Read 6458 times)

0 Members and 1 Guest are viewing this topic.

Offline KetchupTopic starter

  • Full Member
  • ***
  • Posts: 138
  • Activity:
    0%
  • Reputation Power: 3
  • Ketchup has no influence.
  • Respect: +18
  • Referrals: 0
    • View Profile
Hiding and closing corpses
« on: November 07, 2015, 08:43:01 AM »
0
I have these two subs but I'm not sure how to go about closing and hiding the corpse after I've finished looting, if anyone could add it in and show me how it's done I would be grateful!
Thanks!
Code: [Select]
;--------------------------------------------------------------
;--------------------------------------------------------------
sub loot
  finditem YFM G_2
  if #findkind <> -1
  {
    set %mobs_killed %mobs_killed + 1
    set %corpse #findid
    if %skin = #true  && %training_mode = #false
    {
      if %use_war_cleaver = #true
        set %skin_tool %cleaverid
      set #lobjectid %skin_tool
      event macro 17 0
      target
      set #ltargetid %corpse
      event macro 22 0
      wait 17
    }
    if %loot_gold = #false && %loot = N/A
    {
      ignoreitem %corpse
      return
    }
    set #lobjectid %corpse
    event macro 17 0
    wait 5
    gosub wait_gump container_gump 144_212 3
    if #result = #false
      return
    wait 5
    set %loot_container #contid
    wait 13
    ignoreitem %corpse
  }
  if #findkind = -1
    return
  gosub grab_items
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub grab_items
  if %loot_gold = #true
  {
    wait 4
    finditem POF C_ , %loot_container
    if #findkind <> -1
    {
      exevent drag #findid #findstack
      wait 13
      exevent dropc #backpackid
      wait 13
    }
  }
  finditem * C_ , %loot_container
  for %i 1 #findcnt
  {
    finditem %loot C_ , %loot_container
    if #findkind <> -1
    {
      exevent drag #findid #findstack
      wait 13
      exevent dropc #backpackid
      wait 13
    }
    finditem %stackables C_ , %loot_container
    if #findkind <> -1
    {
      exevent drag #findid #findstack
      wait 13
      exevent dropc #backpackid
      wait 13
    }
  }
  if %skin = #true  && %use_war_cleaver <> #true
  {
lloop:
    gosub weight_check
    wait 2
    while #true
    {
      finditem EEG C_ , %loot_container
      if #findkind <> -1
      {
        set #lid #findcnt
        if #weight > %weight_before_split
        {
          set %damount #findstack / 2
          if #findstack <= 15
            set %damount #findstack
        }
        else
          set %damount #findstack
        exevent drag #findid %damount
        wait 14
        exevent dropc #backpackid
        wait 15
      }
      if #findkind = -1
        break
      wait 5
      finditem kag C_ , #backpackid
      set #lobjectid #findid
      event macro 17 0
      target   2s
      finditem eeg C_ , #backpackid
      set #ltargetid #findid
      event macro 22 0
      wait 5
      wait 10
    }
  }
return
;--------------------------------------------------------------
;--------------------------------------------------------------

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: Hiding and closing corpses
« Reply #1 on: November 07, 2015, 12:49:32 PM »
0
Here one of my first draft looter . Maybe that will give you idea

Code: [Select]
set %open 20
set %loot 15
set %corpseID YFM
set %itemtype xxx_yyy

loop:
finditem %corpseID G_2
if #findkind = 1
goto lootcoarpse

if #findkind = -1
goto loop

lootcoarpse:
set #lobjectid #findid
event macro 17 0
ignoreitem #findid
set #nextCPosX 600
set #nextCPosY 305
wait %open
goto loot

loot:
IF #CONTTYPE = YFM
set %corpse #contid
FINDITEM %itemtype C_ , %corpse

If #findkind = -1
  {
   wait %loot
   goto loop
  }
  wait %loot
{
 exevent drag #findid #findstack
   exevent dropc  #backpackid
   wait 20
   goto loot
}


Offline KetchupTopic starter

  • Full Member
  • ***
  • Posts: 138
  • Activity:
    0%
  • Reputation Power: 3
  • Ketchup has no influence.
  • Respect: +18
  • Referrals: 0
    • View Profile
Re: Hiding and closing corpses
« Reply #2 on: November 17, 2015, 06:17:09 AM »
0
I've messed around with it a bit but currently everything I have tried doesn't work

Offline Tidus

  • Lazy
  • Administrator
  • *
  • *
  • Posts: 1291
  • Activity:
    0%
  • Reputation Power: 15
  • Tidus is working their way up.Tidus is working their way up.Tidus is working their way up.
  • Gender: Male
  • Mind Blown
  • Respect: +151
  • Referrals: 2
    • View Profile
    • Ultimate Apparel
Re: Hiding and closing corpses
« Reply #3 on: November 17, 2015, 03:49:02 PM »
0

Closing a gump: http://wiki.easyuo.com/index.php?title=Click

set %gumpX #contposx + 5
set %gumpY #contposy + 5
click %gumpX %gumpY r ; Right clicks on the gump

Hiding a corpse: http://wiki.easyuo.com/index.php?title=HideItem

set %corpse YFM_FEX_QEX
findItem %corpse G_12
hideItem #findId
ignoreItem #findid 1 ; ignoreItem http://wiki.easyuo.com/index.php?title=IgnoreItem

then later
ignoreitem reset 1
For those who have fought for it, freedom has a taste the protected will never know ~ Anonymous, Vietnam, 1968

Offline KetchupTopic starter

  • Full Member
  • ***
  • Posts: 138
  • Activity:
    0%
  • Reputation Power: 3
  • Ketchup has no influence.
  • Respect: +18
  • Referrals: 0
    • View Profile
Re: Hiding and closing corpses
« Reply #4 on: November 18, 2015, 06:21:09 AM »
0
could you add that into my first post in the script and submit it here please?

Offline Tidus

  • Lazy
  • Administrator
  • *
  • *
  • Posts: 1291
  • Activity:
    0%
  • Reputation Power: 15
  • Tidus is working their way up.Tidus is working their way up.Tidus is working their way up.
  • Gender: Male
  • Mind Blown
  • Respect: +151
  • Referrals: 2
    • View Profile
    • Ultimate Apparel
Re: Hiding and closing corpses
« Reply #5 on: November 18, 2015, 07:11:38 AM »
0
could you add that into my first post in the script and submit it here please?

That one i will leave up to you.  That is how you learn.
For those who have fought for it, freedom has a taste the protected will never know ~ Anonymous, Vietnam, 1968

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: Hiding and closing corpses
« Reply #6 on: November 18, 2015, 08:43:04 AM »
0
could you add that into my first post in the script and submit it here please?

That one i will leave up to you.  That is how you learn.

Tidus, you give a man a script he is demanding again in an hour. If you teach him to build a script you do him a good turn.

Offline KetchupTopic starter

  • Full Member
  • ***
  • Posts: 138
  • Activity:
    0%
  • Reputation Power: 3
  • Ketchup has no influence.
  • Respect: +18
  • Referrals: 0
    • View Profile
Re: Hiding and closing corpses
« Reply #7 on: November 27, 2015, 05:15:34 PM »
0
after so much testing and messing around with this I finally got it working today and I feel so good about something so easy, thanks for your help guys.

Offline Tidus

  • Lazy
  • Administrator
  • *
  • *
  • Posts: 1291
  • Activity:
    0%
  • Reputation Power: 15
  • Tidus is working their way up.Tidus is working their way up.Tidus is working their way up.
  • Gender: Male
  • Mind Blown
  • Respect: +151
  • Referrals: 2
    • View Profile
    • Ultimate Apparel
Re: Hiding and closing corpses
« Reply #8 on: November 30, 2015, 11:19:46 AM »
0
after so much testing and messing around with this I finally got it working today and I feel so good about something so easy, thanks for your help guys.

See, we knew you could do it!
For those who have fought for it, freedom has a taste the protected will never know ~ Anonymous, Vietnam, 1968

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: Hiding and closing corpses
« Reply #9 on: November 30, 2015, 11:48:26 AM »
0
Glad you figure it our.
Now that you  earn how, are you going to post your result.

Offline KetchupTopic starter

  • Full Member
  • ***
  • Posts: 138
  • Activity:
    0%
  • Reputation Power: 3
  • Ketchup has no influence.
  • Respect: +18
  • Referrals: 0
    • View Profile
Re: Hiding and closing corpses
« Reply #10 on: November 30, 2015, 12:33:43 PM »
0
Yeah, I'm all up for sharing, not sure if this was the best way to do it but I tested a few and this worked so I'll stick with it. From modifying this I actually learn a lot and it helped me add everything I wanted to my script, thanks so much guys! My advice to anyone is try to do it yourself, it's much more rewarding!
Code: [Select]
;--------------------------------------------------------------
;--------------------------------------------------------------
sub loot
  finditem YFM G_2
  if #findkind <> -1
  {
    set %mobs_killed %mobs_killed + 1
    set %corpse #findid
    if %skin = #true  && %training_mode = #false
    {
      if %use_war_cleaver = #true
        set %skin_tool %cleaverid
      set #lobjectid %skin_tool
      event macro 17 0
      target
      set #ltargetid %corpse
      event macro 22 0
      wait 17
    }
    if %loot_gold = #false && %loot = N/A
    {
      ignoreitem %corpse
      return
    }
    set #lobjectid %corpse
    event macro 17 0
    wait 5
    gosub wait_gump container_gump 144_212 3
    if #result = #false
      return
    wait 5
    set %loot_container #contid
    wait 13
    ignoreitem %corpse
  }
  if #findkind = -1
    return
  gosub grab_items
  hideitem %corpse
return

Tags: