Author Topic: cheesy example of replacing an item where you found it  (Read 3090 times)

0 Members and 1 Guest are viewing this topic.

Offline KilroyIsDeadTopic starter

  • Full Member
  • ***
  • Posts: 155
  • Activity:
    0%
  • Reputation Power: 2
  • KilroyIsDead has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
cheesy example of replacing an item where you found it
« on: June 16, 2009, 03:35:43 PM »
0
Pick something in your back pack and set the !Item variable.

*Note you may see ghosting here, because it happens fairly quickly
Code: [Select]
set !Item BHHWFRD ; This can be anything in your pack

;Open the pack to get the coords of teh pack
event macro 8 7
set !ContX #ContPosX
set !ContY #ContPosY

finditem !Item C_ , #BackPackID
if #FindCNT > 0
{
  set !origX #FindX - #ContPosX ;The find x is a screen coord the subtraction is to account for teh container offset
  set !origY #FindY - #ContPosY

Exevent Drag #findid
wait 10
Exevent Dropc #backpackid  ;drops in a random location in backpack or stacks with existing
wait 10

  event macro 2 0 that thing could be anywhere

Exevent Drag #findid
wait 10
event macro 2 0 !origX !origY
Exevent Dropc #backpackid !origX !origY
wait 10

  event macro 2 0 that thing could be anywhere

}
else
{
  display ok Pick something IN your pack
}


halt
Give a man a fire, he'll be warm the rest of the night;
Set a man afire, he'll be warm the rest of his life.

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: cheesy example of replacing an item where you found it
« Reply #1 on: June 18, 2009, 06:02:25 PM »
0
oh cool man.. I was looking for this exact script.. I'll keep it handy..

Offline KilroyIsDeadTopic starter

  • Full Member
  • ***
  • Posts: 155
  • Activity:
    0%
  • Reputation Power: 2
  • KilroyIsDead has no influence.
  • Respect: +13
  • Referrals: 0
    • View Profile
Re: cheesy example of replacing an item where you found it
« Reply #2 on: June 18, 2009, 06:12:42 PM »
0
I wrote it after you posted in shout a couple days ago
Give a man a fire, he'll be warm the rest of the night;
Set a man afire, he'll be warm the rest of his life.

Tags: