Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NPC check
#1
I am trying to make a script that when I get close to an NPC it does a Fullcheck if the NPC is on the screen if the NPC is not it returns some points before in a Label, but when arriving at FullCheck instead of returning to the previous label or forward it back to the beginning of the script

the script is like this

BBOT
Cavebot.Waypoint=@M:422127801433691033291358253292
Point (32681 31692 7)
Point (32677 31692 7)
Point (32673 31692 7)
Point (32668 31693 7)
Point (32665 31696 7)
Point (32661 31698 7)
Point (32656 31699 7)
Point (32651 31699 7)
Point (32647 31701 7)
Point (32644 31704 7)
Point (32642 31707 7)
Point (32642 31712 7)
Point (32640 31716 7)
Point (32635 31717 7)
Point (32630 31718 7)
Point (32629 31723 7)
Label (32629 31723 7:Alce)
Point (32627 31727 7)
Point (32624 31729 7)
Point (32622 31733 7)
Point (32621 31737 7)
FullCheck (32619 31738 7:Code @Alkestios<=6 Else Alce)
Label (32619 31738 7:Run1)
Point (32619 31738 7)
Fixed (32615 31735 7)
NPCSay (32615 31735 7:hi)
NPCSay (32615 31735 7:mission)
NPCSay (32615 31735 7:yes)
Point (32626 31737 7)
Point (32630 31739 7)
Point (32635 31739 7)



how do I if the NPC is on the screen the script proceeds to the label Run1 ?
Reply
#2
Like this:
Code:
FullCheck (32619 31738 7:Full Run1 Else Alce Code @Alkestios<=6)
Reply
#3
thank for your help @erleo


I'm having problem now in a part that works like this, the script usually occurs more when arriving in the part of the fullcheck, even with the NPC on the screen the bot ends up returning in the label "WOLF" more in case I would like it to proceed until the next label which would be "Run2" it stays in that eternal loop and does not advance until the label "Run2"

Would you help me ?
script below:

Point (33308 32044 7)
Point (33311 32047 7)
Point (33314 32048 7)
Point (33319 32048 7)
Label (33325 32049 7:wolf)
Fixed (33328 32052 7)
Point (33324 32049 7)
Point (33328 32051 7)
Point (33333 32052 7)
FullCheck (33335 32052 7:FullCheck (32619 31738 7:Full Run2 Else wolf Code @Ghostly Wolf<=6))
Label (33338 32053 7:Run2)
Fixed (33338 32053 7)
Macro (33339 32053 7:use FUR NA MASK)
Fixed (33335 32052 7)
NPCSay (33335 32052 7:hi)
NPCSay (33335 32052 7:mission)
NPCSay (33335 32052 7:whelp)


in case that npc @Ghostly Wolf appears at specific time in tibia and then disappears, it appears in the part of the night and disappears during the day
Reply
#4
Look more closer the fullcheck.
FullCheck (33335 32052 7:FullCheck (32619 31738 7:Full Run2 Else wolf Code @Ghostly Wolf<=6))

You added 1 ")" extra in the end.

Before:
Code:
FullCheck (33335 32052 7:FullCheck (32619 31738 7:Full Run2 Else wolf Code @Ghostly Wolf<=6))

After:
Code:
FullCheck (33335 32052 7:FullCheck (32619 31738 7:Full Run2 Else wolf Code @Ghostly Wolf<=6)
Reply
#5
then would that be correct?

FullCheck (33335 32052 7:FullCheck (32619 31738 7:Full Run2 Else wolf Code @Ghostly Wolf<=6)
Reply
#6
(03-01-2019, 11:43 PM)micheel15 Wrote: then would that be correct?

FullCheck (33335 32052 7:FullCheck (32619 31738 7:Full Run2 Else wolf Code @Ghostly Wolf<=6)

No, look:
You copy bad the code.
FullCheck (33335 32052 7:FullCheck (32619 31738 7:Full Run2 Else wolf Code @Ghostly Wolf<=6)

Idk what waypoint its the right:
Code:
FullCheck (32619 31738 7:Full Run2 Else wolf Code @Ghostly Wolf<=6)

Code:
FullCheck (33335 32052 7:Full Run2 Else wolf Code @Ghostly Wolf<=6)
Reply
#7
Work !

Sometimes I get undone more thank you very much for calling my attention, I will consider it as a way of thanking
Reply
#8
I had only one problem, when the @Ghostly Wolf NPC is not on the screen the bot still does end up going to the label "Run2" and in case it was to go back to the label "wolf" can you tell me why this?
Reply
#9
Bot detect this npc it's not in range and back to the wolf label.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)