Author Topic: Findmod issues  (Read 6537 times)

0 Members and 1 Guest are viewing this topic.

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Findmod issues
« on: March 26, 2009, 05:31:59 AM »
0
A part of my script currently removes the users headwear and puts a Mask of Orcish Kin on for a little while. After such time has passed, the Mask is removed and the headpiece originally on is placed back on. This very last part is giving me problems. Here's a snippet:

Code: [Select]
set %headwear YVI_GZH_HZH_NJL_BWI_KWI_IWI_EWI_QJL_JWI_XVI_CZH_HWI_JJN_NZH_BZH_TDI_OZH_VSH_WVI
+_VVI_QSH_KZH_PZH_DZH_MIN_DSH_ASH_TSH_ESH_YPH_GSH_OSH_ZPH_ZRH_IWL_CSH_BSH_FSH_DPH_LKO_NWL_MKH
event macro 8 1
wait 20
set %pdollcontid #contid
finditem %headwear C_ , %pdollcontid
if #findkind = 0
{
 set %currheadwearid #findid
 exevent drag %currheadwearid
 wait 20
 exevent dropc #backpackid
 wait 20
}
finditem VSH C_ , #backpackid ; Orc mask
if #findkind = 0
{
 set %orcmask #findid
 set #findmod 17_10   ;(x_y)
 click #findx #findy g
 wait 20
 click 915 120 mc
 wait 20
 set #findmod 0_0
 }
finditem %orcmask C_ , %pdollcontid
if #findkind = 0
{
 exevent drag %orcmask
 wait 20
 exevent dropc #backpackid
 wait 20
 ;set #findmod 100_190
 exevent drag %currheadwearid
 wait 15
 click 915 120 mc d
}

The trick is, I have no idea what the user may be wearing, therefor, know what the findmod could possibly be. Additionally, the script as is won't put first hat back on. everything else works good. I'd like this to be able to pick up the headwear no matter the type without altering the findmod, or ask for user input about it.

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Findmod issues
« Reply #1 on: March 26, 2009, 05:52:26 AM »
0
Start by changing this:

if #findkind = 0

to this:

if #findCnt > 0

As referenced at EUO
Quote
#Findkind is not the preferred method to check whether an item was found or not because it is harder for humans to debug. Please use #FINDCNT instead, whenever possible.

Is there some reason your not using "exevent droppd" ?
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: Findmod issues
« Reply #2 on: March 26, 2009, 05:58:38 AM »
0
Thanks, I'll give that a try. From all I've read, recently even, droppd apparently is broken in some way and has been for a long while with no eta

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Findmod issues
« Reply #3 on: March 26, 2009, 06:27:21 AM »
0
I thought that had been resolved, guess not then.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: Findmod issues
« Reply #4 on: March 26, 2009, 06:29:28 AM »
0
well, changing to findcnt didn't change anything for the better, the piece was still found and lifted, but still didnt' drop it on the paperdoll equipping it. Orngrimm has a small script that I'm trying out, but I'm modding it a little with no luck. Here's his script in full and a link

Code: [Select]
;==================================
; Script Name: Findmod-o-matic
; Author: Orngrimm (Parts of the .js are from Spewy)
; Version: 2.0
; Client Tested with: 4.0.1a
; EasyUO version tested with: 1.40 B:005C
; Shard OSI / FS: OSI
; Revision Date: 17.10.2003
; Public Release: 17.10.2003
; Purpose: Gets the findmod with the help of the user (Delta of Find-coords and Clickable-Coords)
;
; Disclaimer:   Dont change this script and release it under own name.
;            Let this header intact and dont distribute without it!
;            DONT distribute without my permission!! (PM Orngrimm @ easyuo.com)
; Copyright: by Orngrimm
;==================================
 
 
initevents 
 
 
; --------------------- MAINSCRIPT ---------------------
start: 
set #TargCurs 1 
display yes Klick the item (Have to be in a container) 
 
wait: 
set #LtargetID null
wait 1 ; Dops CPU-Load
if  #LtargetID = null
   goto wait 
 
set %orig_x #CursorX 
set %orig_y #CursorY 
 
set #FindMod  0_0 ; To get the exact position
Finditem #LtargetID C
set %xmod %orig_x - #FindX
set %ymod %orig_y - #FindY
set #FindMod %Xmod , _ , %ymod ;  Now i should have the correc Findmod to target the stack...
 
; display yes FindMod for type #FindType is #FindMod
 
; Uncomment if you want to check (Inactive "dont move cursor" is a good idea...)
; click #FindX #FindY n ; Now you should be ofer the item and able to click it
; pause
 
; Uncomment if you want to use a filewriter (Creation of a Database)
event property #FindID
gosub write
 
 
goto start

I've excluded the .js for obvious reasons and am trying to set it so no user interaction occurs. I'm attempting to have the cursor move to and target the headpiece. From there the script should equip it, but as I stated, having a little trouble.

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Findmod issues
« Reply #5 on: March 26, 2009, 06:37:08 AM »
0
Code: [Select]
event macro 8 1
wait 5

set %xpos #contposx + 100
set %ypos #contposy + 50
         
wait 1s
exevent drag %currheadwearid
wait 10
click %xpos %ypos mc
wait 10

Waits are a little long to ensure it works the first time. That *should* work.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: Findmod issues
« Reply #6 on: March 26, 2009, 06:54:17 AM »
0
Unfortunately, that didn't too anything any different from what I have setup atm. It was lifted and moved, but not dropped.

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Findmod issues
« Reply #7 on: March 26, 2009, 07:28:12 AM »
0
It's actually moving the item, but not releasing it? Can you manually click the mouse after it's been moved and drop the item onto the char?

Maybe just add in another left click after?
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: Findmod issues
« Reply #8 on: March 26, 2009, 07:40:05 AM »
0
ya, it is lifting the item. Because I'm using exevent drag and not click xxx yyy d mc, the  item 'disappears'. I have tried the multiple clicks after lifting and stopping the script, but it didn't do anything. It's strange that when equipping the orc mask, there are no problems, given I have the #findmod for it, but when the item is unknown, I have no way to get the findmod. Otherwise, the script can be just as simple for equipping the orc mask as it should be to re-equip the previous headgear. Yet, such is not the case, silly EUO not having the droppd fixed for this long already :P

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Findmod issues
« Reply #9 on: March 26, 2009, 08:06:30 AM »
0
If you use

exevent dropc %pdollcontid

Does it go back into your backpack? This sucks not being able to try stuff out... they need to make a UO simulator for running scripts LOL.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: Findmod issues
« Reply #10 on: March 26, 2009, 08:50:40 AM »
0
yup, right into my backpack

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: Findmod issues
« Reply #11 on: March 26, 2009, 08:57:26 AM »
0
This has been broken on OSI for a LONG LONG LONG time now.  However, it works perfectly on RunUO.....

@Cerveza....  You should really think about installing a RunUO shard on your workstation.. ;)
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Findmod issues
« Reply #12 on: March 26, 2009, 09:29:13 AM »
0
Can I install one on a Thumb Drive?  ;D
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

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: Findmod issues
« Reply #13 on: March 26, 2009, 09:31:20 AM »
0
Can I install one on a Thumb Drive?  ;D

I'll bet you can!!

The install directory is only 40.0MB
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: Findmod issues
« Reply #14 on: March 26, 2009, 05:51:52 PM »
0
Ok, I have something that may actually work. Aside from the script not setting my paperdoll in a specific place, this seems to pick up, and place on the paperdoll.

Please try this with as much headwear as you can all find. I've only done this with a bandana so far, but I'll continue. here's the code, sloppy as it is.

Code: [Select]
set %headwear YVI_GZH_HZH_NJL_BWI_KWI_IWI_EWI_QJL_JWI_XVI_CZH_HWI_JJN_NZH_BZH_TDI_OZH_VSH_WVI
+_VVI_QSH_KZH_PZH_DZH_MIN_DSH_ASH_TSH_ESH_YPH_GSH_OSH_ZPH_ZRH_IWL_CSH_BSH_FSH_DPH_LKO_NWL_MKH
exevent dropc
event macro 8 1
set %pdollcontid #contid
set #findmod 0_0
finditem %headwear C_ , %pdollcontid
if #findkind = 0
{
 set %currheadwearid #findid
 exevent drag %currheadwearid
 wait 20
 exevent dropc #backpackid
 wait 20
 set #targcurs 1
  finditem %currheadwearid c_ , #backpackid
    click #findx #findy mc n
   set %orig_x #cursorX
 set %orig_y #cursorY
  set #FindMod 0_0
  set #lobjectid %currheadwearid
 event macro 22
Finditem #LtargetID C
 set %xmod %orig_x - #FindX
 set %ymod %orig_y - #FindY
 set #FindMod %xmod , _ , %ymod
 Click #findx #findy g mc
 wait 15
 Click 915 120 mc
}
stop
« Last Edit: March 26, 2009, 06:02:13 PM by Superslayer »

Tags: