Author Topic: issue setup a runebook via #property  (Read 3021 times)

0 Members and 1 Guest are viewing this topic.

Offline The GhostTopic starter

  • 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
issue setup a runebook via #property
« on: October 01, 2014, 08:53:01 AM »
0

I know that this work if I hard code the book ID

Code: [Select]
set %book XXXXXXXXX   ; runobook to recall home
while #true
{
   onHotKey f alt
gosub recallhome
}

sub recallhome
; set #LPC 1000
     set %runebookID %book     ; book to recall home
     finditem %runebookID C_ , %backpackid
     set #ltargetID %runebookID
     set #ltargetkind 1
     wait 40
     event macro 15 31  ; 31 Recall Spell    210 Sj
     wait 1s
     target
     event macro 22 0  ; Last target
     wait 20
;     set #LPC 10
Return

I'm trying to detect the book so I don't required to change book ID so all my toon can use the same build.
Since it not working, I guest I'm not using the property correctely.

Code: [Select]
finditem ZBN C_ , #backpackid
if #findcnt > 0
wait 10
if home in #property  
set %homebook #findid

while #true
{
   onHotKey f alt
gosub recallhome

}

sub recallhome
set %book %homebook
; set #LPC 1000
     set %runebookID %book     ; book to recall home
     finditem %runebookID C_ , %backpackid
     set #ltargetID %runebookID
     set #ltargetkind 1
     wait 40
     event macro 15 31  ; 31 Recall Spell    210 Sj
     wait 1s
     target
     event macro 22 0  ; Last target
     wait 20
;     set #LPC 10
Return

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: issue setup a runebook via #property
« Reply #1 on: October 01, 2014, 03:31:48 PM »
0
Code: [Select]
Finditem ZBN C_ , #backpackid
if #Findcnt > 0
{
For #Findindex 1 #Findcnt
{
Event Property #Findid
if Home in #property
set %Book #Findid
}
}
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline The GhostTopic starter

  • 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: issue setup a runebook via #property
« Reply #2 on: October 01, 2014, 03:52:12 PM »
0
Got it to work this way too.   Thx MWinc

Code: [Select]
finditem ZBN C_ , #backpackid
for %BookSearch 1 #FindCnt
{
    set #Findindex %BookSearch
    event property #findid
    if Home in #property
    set %homebook #findid
}

Offline The GhostTopic starter

  • 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: issue setup via #property
« Reply #3 on: October 04, 2014, 08:41:08 AM »
0
Back for one ore.
I'm doing the trader quest and trying to make my life easier to read chest. that will be good for any other quest info.  Right now I can target the chest on my own and read info from the side bar.   Using the display give me a box that pause me.  Will like to remove that box at one point.    Right now I'm trying to get the script to find and target the chest in my pack on his own.  I fail that part.  Any info on how to fix it will be nice.


Code: [Select]
sub ReadCreate
; event SysMessage Target your Crate
set #targcurs 1
while #targcurs = 1
wait
set %crate #ltargetid
event property %crate  ; read info hat was targeted
    ; EVENT EXMSG #FINDID 3 33 #property
   ; display #property
   ; event sysmessage #property
    ; wait 2s
return


Here what I have so far.  Still in progress.
Code: [Select]
Set %npc VUQUI
Set %sim VFARH
set %chest UMF_VMF_ABG_WMF_TMF_KIF_HIF_IFF
while #true
{
  onHotKey 2 ctrl
  {
 gosub Trader
 gosub ReadCreate
 }
  onHotKey 3 ctrl
  gosub sim
}

sub Trader
wait 1s
finditem %npc G
exevent Popup #findid
wait 20
click 40 35
wait 1s
    set %clickX #contposx + 25
    set %clickY #contposy + 400
    click %clickX %clickY
return

sub ReadCreate
; event SysMessage Target your Crate
set #targcurs 1
while #targcurs = 1
wait
set %crate #ltargetid
event property %crate  ; read info hat was targeted
    ; EVENT EXMSG #FINDID 3 33 #property
   ; display #property
   ; event sysmessage #property
    ; wait 2s
return

sub sim
finditem %sim G
exevent Popup #findid
wait 20
click 40 35                         ;
wait 1s
finditem %chest C_ , #backpackid
    set #ltargetID #findid
    set #ltargetkind 1  ; 1= Object    2= Ground  3= Resource (tree)
   ; set %chest #findid
    wait 0
    target 3s
    event macro 22 0  ; Last targe
    wait 20
return

 

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: issue setup a runebook via #property
« Reply #4 on: October 04, 2014, 12:46:03 PM »
0
Finditem * C_ , #backpackid
For #Findindex 1 #Findcnt
{
Event Property #Findid
if NO-TRADE in #Property
{
set %Box #Findid
set %Box_Property #Property
Break
}
}



Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Tags: