Author Topic: Gating Script  (Read 2077 times)

0 Members and 1 Guest are viewing this topic.

Offline Citrus82Topic starter

  • Jr. Member
  • **
  • Posts: 12
  • Activity:
    0%
  • Reputation Power: 1
  • Citrus82 has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Gating Script
« on: July 30, 2014, 11:05:23 AM »
0
A while ago i made a gating script, the purpose of the script is to constantly keep a moongate open to my vendor house. The script works as intended flawlessly, but sometimes it will move some of my things around like my backpack or my health bar. Sometimes i will find them off in the bottom corner or elsewhere on the screen, i think the part of the script that opens the runebook and opens a gate does it.

Can someone take a look at it and let me know if there is anything i can do to stop it from moving my backpack or health bar?

 
Code: [Select]
;==================================================
;Slackers Gating Script.
;Setup: Have a runebook with two runes marked to your vendor house.
;The runes must be in the first two runebok spots.
;Name your runebook Gatebook, otherwise it will ask you to target the book.
;Unlikely, but be sure no other books are named Gatebook.
;==================================================
set %current_rune 1
set %moon OTF_KEF
gosub book_director
;==================================================
main:
gosub open_book
gosub open_gate
gosub gate_check
goto main
;==================================================
sub open_book
finditem %gate_book C_ , #BACKPACKID
Set #LOBJECTID #FINDID
event macro 17 0
wait 10
set %xclick #contposx + 136
set %yclick #contposy + 194
click %xclick %yclick
return
;==================================================
sub open_gate
if %current_rune = 1
{
set %xclick #contposx + 137
set %yclick #contposy + 162
click %xclick %yclick
set %current_rune 2
return
}
set %xclick #contposx + 296
set %yclick #contposy + 162
click %xclick %yclick
set %current_rune 1
return
;==================================================
sub gate_check
wait 3s
finditem %moon G_1
if #FINDCNT < 1
{
return
}
wait 29s
return
;==================================================
sub gate_book
display Please target the gate book.
set #lTargetID X
set #targCurs 1
wait 2
Wait_for_book:
if #lTargetID = X
{
goto Wait_for_book
}
set %gate_book #ltargetid
}
return
;==================================================
sub book_detector
repeat
{
finditem %runebook C_ , #BACKPACKID
event property #findid
if Gatebook in #PROPERTY
{
set %gate_book #FINDID
return
}
ignoreitem #FINDID
}
until #FINDCNT = 0
return
;==================================================
sub book_director
set %runebook ZBN
set %gate_book n/a
gosub book_detector
if %gate_book = n/a
{
gosub gate_book
}
return
;==================================================
« Last Edit: July 30, 2014, 11:44:08 AM by Citrus82 »

Offline Masscre

  • Gran Master Jester !!
  • Scripthack
  • *
  • Posts: 4615
  • Activity:
    0%
  • Reputation Power: 55
  • Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!
  • Gender: Male
  • Air Guitar Commander !!
  • Respect: +144
  • Referrals: 1
    • View Profile
Re: Gating Script
« Reply #1 on: July 30, 2014, 04:25:35 PM »
0
Looking at the script a little. It appears to be a timing issue you are running into. You might slow down some of the actions of click here and there and then see if everything works fine after that.

Tags: