Author Topic: Weird issue with simple stealing gold sub?  (Read 1866 times)

0 Members and 1 Guest are viewing this topic.

Offline silentsentinelTopic starter

  • Jr. Member
  • **
  • Posts: 31
  • Activity:
    0%
  • Reputation Power: 0
  • silentsentinel has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Weird issue with simple stealing gold sub?
« on: April 18, 2009, 02:28:15 PM »
0
Hi guys,

The rest of my script is done and works great, (I'll post the finished product when done for everyone to see,) I'm having one problem in the following sub though, with regards to successfully stealing gold from an NPC.

Basically I reach the safe spot to steal just fine, open the paperdoll fine, open the NPC's backpack just fine, initiate the steal skill... but it doesn't actually click the pile of gold.

The targeting cursor seems to disappear but it doesn't actually click the pile of gold or steal it. Nor does it do it on the 2 stealing re-attempts. (The re-attempts are to ensure all gold is stolen over 3 attempts... instead of just half the pile.)

Anyone have any idea what I'm doing wrong? Thanks for any thoughts! The sub in question:

Code: [Select]

sub stealGold
{
gosub useRunebook stealgold 2 %rbMisc dangerYes
wait 20
set #lobjectid %npcID
event macro 17
wait 20
finditem ZJF CA_ , #contid
set #lobjectid #findid
wait 20
event macro 17
wait 40
finditem POF C_ , #contid
set #ltargetid #findid
wait 20
event macro 13 33
wait 20
event macro 22
wait 200
finditem POF C_ , #contid
set #ltargetid #findid
wait 20
event macro 13 33
wait 20
event macro 22
wait 200
finditem POF C_ , #contid
set #ltargetid #findid
wait 20
event macro 13 33
wait 20
event macro 22
wait 200
event macro 13 21
wait 2000
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: Weird issue with simple stealing gold sub?
« Reply #1 on: April 18, 2009, 02:45:19 PM »
0
A couple things come to mind.  First you need to be sure you are setting the #LTARGETKIND to 1 to be sure you aren't trying to accidentally target a tile vs. a world item.

Next, I think you should be using the "target" command.  All this does is wait for a target cursor to pop up.   This helps absorb lag, but might still require a delay. So anytime you do an lastobject, you should follow it by a "target 5s" or whatever timeout you want to give it.

Also why are you using the CA_ in your first finditem?  This will only find hidden items within the container. 

So your event macro 13 33 becomes:

Code: [Select]
set #LTARGETKIND 1
set #LTARGETID #FINDID
event macro 13 33
target 5s
event macro 22
wait 20
« Last Edit: April 18, 2009, 02:47:27 PM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline silentsentinelTopic starter

  • Jr. Member
  • **
  • Posts: 31
  • Activity:
    0%
  • Reputation Power: 0
  • silentsentinel has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Weird issue with simple stealing gold sub?
« Reply #2 on: April 18, 2009, 08:01:12 PM »
0
Thanks! Forgot about finditem type :O

Tags: