Author Topic: System Variable  (Read 2050 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
System Variable
« on: June 27, 2013, 08:25:32 PM »
0
I have run into little problem because I uses the wrong variable sometime.   I'm trying to understand why.  I have read the tutorial and start cleaning and rebuild my old script.


1) finditem %itemA C_ , #BACKPACKID    ( this work every time)

2) finditem %itemA C_ , %BACKPACKID   ( this one to so good)

This work great for casting spell
Code: [Select]
checkHP:
if #hits < 120
{
    wait 20
    event macro 15 28 ; greather heal
    target 3s
    event macro 23 0
    goto checkPH
   }

this doesn't work
Code: [Select]
sub recallhome
    set %runebookID %book     ; book to recall home
    finditem %runebookID C_ , %backpackid
    set #ltargetID %runebookID
    set #ltargetkind 1
    wait 2s
    event macro 15 31  ; Recall Spell
    target 1s
    event macro 22 0  ; Last target
    wait 5s
Return


But if I do this, it work perfectly to recall of a book.   
Code: [Select]
sub recallhome
    set %runebookID %book     ; book to recall home
    finditem %runebookID C_ , %backpackid
    set #ltargetID %runebookID
    set #ltargetkind 1
    wait 2s
    event macro 15 31  ; Recall Spell
    wait 1s
    target
    event macro 22 0  ; Last target
    wait 5s
Return


So what the difference between those target wait.


and is this proper coding
Code: [Select]
sub unloadmainpack
repeat
finditem %leather C_ , #backpackid
    IF #findkind <> -1
       {
        exevent drag #findid #findstack
       exevent dropc %secure
        wait %lwait   ; 1s  wait
        }
     until #findkind = -1
Return

Thx

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: System Variable
« Reply #1 on: June 27, 2013, 08:44:10 PM »
0
#BACKPACKID is a system variable setup from EasyUO, but %BACKPACKID is a user variable that YOU must initialize.  Why are you using #BACKPACKID?
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline dxrom

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: System Variable
« Reply #2 on: June 27, 2013, 10:22:26 PM »
0
Code: [Select]
sub recallhome
    set %runebookID %book     ; book to recall home
    finditem %runebookID C_ , %backpackid ;<<<<<
    set #ltargetID %runebookID ;<<<<<<
    set #ltargetkind 1
    wait 2s
    event macro 15 31  ; Recall Spell
    target 1s
    event macro 22 0  ; Last target
    wait 5s
Return

You are using finditem but not using the info it creates.

Code: [Select]
sub recallhome
    set %runebookID %book     ; book to recall home
    finditem %runebookID C_ , #backpackid
    set #ltargetID #findid
    set #ltargetkind 1
    wait 2s
    event macro 15 31  ; Recall Spell
    target 1s
    event macro 22 0  ; Last target
    wait 5s
Return

Try that instead.




 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline gimlet

  • Very Super Secret
  • Global Moderator
  • *
  • *
  • Posts: 6210
  • Activity:
    3.2%
  • Reputation Power: 71
  • gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!
  • Gender: Male
  • Respect: +274
  • Referrals: 3
    • View Profile
Re: System Variable
« Reply #3 on: June 28, 2013, 05:06:39 AM »
0
target {timeout}

 Description

The target command waits for a target cursor to appear. If no timeout is given, the default timeout is 2 seconds.

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: System Variable
« Reply #4 on: June 28, 2013, 05:54:34 AM »
0
#BACKPACKID is a system variable setup from EasyUO, but %BACKPACKID is a user variable that YOU must initialize.  Why are you using #BACKPACKID?

Every time I  have to search my backpack  I use it. 
i.e. finditem HTD_UDF  C_ , #backpackid  ; Look for SOS   


Tags: