Author Topic: Issue with a sub of mine  (Read 8493 times)

0 Members and 1 Guest are viewing this topic.

Offline KetchupTopic starter

  • Full Member
  • ***
  • Posts: 138
  • Activity:
    0%
  • Reputation Power: 3
  • Ketchup has no influence.
  • Respect: +18
  • Referrals: 0
    • View Profile
Issue with a sub of mine
« on: September 20, 2015, 07:32:00 AM »
0
I'm having an issue when calling this sub for the 2nd time in my script, firstly it runs to my first rail great, runs to bank, deposits and then upon calling the rail sub for the second time it does nothing, anyone have an idea why?
without adding my whole script this is what it looks like

This is my little call for subs in my checkweight sub, why would the 2nd call not work? any help appreciated!

 gosub runrail RailOne
        wait 2s
        gosub recall_to_bank
        wait 1s
        gosub deposit_items
        wait 1s
        gosub recall_to_dungeon
        wait 1s
        gosub runrail RailTwo

Code: [Select]



;--------------------------------------------------------------
;--------------------------------------------------------------
sub runrail
msg Dungeon Despise$
wait 2s
     namespace push
     namespace local MR , #systime

     set !Cnt %1 , Cnt
     set !Cnt % . !Cnt
     set !SX %1 , X
     set !SY %1 , Y

     for !i 1 !Cnt
     {
         set !nX !SX , !i
         set !nY !SY , !i
         set !nX % . !nX
         set !nY % . !nY

         move !nX !nY 0 5s   ;you might have to adjust timeout depending on move length
     }

     namespace clear
     namespace pop
return
« Last Edit: September 20, 2015, 10:40:39 AM by Ketchup »

Offline The Ghost

  • 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 with a sub of mine
« Reply #1 on: September 20, 2015, 08:55:03 AM »
0
First, does the sub work on his own.  If yes,  then you can try adjusting the wait time.   

I use this to quickly change them.
set %swait  20  <--- increase the number as u see fit.

Offline KetchupTopic starter

  • Full Member
  • ***
  • Posts: 138
  • Activity:
    0%
  • Reputation Power: 3
  • Ketchup has no influence.
  • Respect: +18
  • Referrals: 0
    • View Profile
Re: Issue with a sub of mine
« Reply #2 on: September 20, 2015, 10:45:10 AM »
0
the sub works on it's own yes, when I call gosub runrail RailOne, it works fine but upon the call of the gosub runrail RailTwo it says the dungeon part but then doesn't move, I cannot work out why

Offline The Ghost

  • 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 with a sub of mine
« Reply #3 on: September 20, 2015, 12:56:42 PM »
0
Not sure but maybe it miss a 1

Code: [Select]
namespace push
     namespace local MR , #systime

     set !Cnt %1 , Cnt
     set !Cnt %[font=Verdana]1[/font] . !Cnt      < ------  should be a 1 there by any chance
     set !SX %1 , X
     set !SY %1 , Y

     for !i 1 !Cnt

Offline KetchupTopic starter

  • Full Member
  • ***
  • Posts: 138
  • Activity:
    0%
  • Reputation Power: 3
  • Ketchup has no influence.
  • Respect: +18
  • Referrals: 0
    • View Profile
Re: Issue with a sub of mine
« Reply #4 on: September 20, 2015, 01:48:55 PM »
0
thanks for your replies ghost I'll give that a try and see if it makes a difference and let you know

Offline KetchupTopic starter

  • Full Member
  • ***
  • Posts: 138
  • Activity:
    0%
  • Reputation Power: 3
  • Ketchup has no influence.
  • Respect: +18
  • Referrals: 0
    • View Profile
Re: Issue with a sub of mine
« Reply #5 on: September 20, 2015, 01:57:05 PM »
0
Adding the number 1 made the first run rail not even attempt to move, so I feel it's not because of that

Offline KaliOfLS

  • That's "Dr." Kali to you!
  • Sr. Member
  • *
  • Posts: 406
  • Activity:
    0%
  • Reputation Power: 6
  • KaliOfLS has no influence.
  • Gender: Male
  • Respect: +33
  • Referrals: 2
    • View Profile
Re: Issue with a sub of mine
« Reply #6 on: September 22, 2015, 11:08:56 AM »
0
My move sub!  I would make sure you've named the rail properly.  Like makes ure it is %RailTwoX1 and %RailTwoX2  not like %RailtwoX1 or something, caps matter.
Otherwise add
display ok !nX , #spc !nY

right before the move line, and see if those are coming up correctly. 

R~~~~ B~~~~~~~~ 
^ real life signature for sure

Offline The Ghost

  • 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 with a sub of mine
« Reply #7 on: September 22, 2015, 12:50:33 PM »
0
I rename the railTwo and got it to work. I PM him the right systax

Offline KetchupTopic starter

  • Full Member
  • ***
  • Posts: 138
  • Activity:
    0%
  • Reputation Power: 3
  • Ketchup has no influence.
  • Respect: +18
  • Referrals: 0
    • View Profile
Re: Issue with a sub of mine
« Reply #8 on: September 27, 2015, 02:40:19 AM »
0
Ghost, thanks for your reply but it didn't work, anyway, Kali, I tried it and when it gets to rail two it says RailTwoX N/A RailTwoY N/A

Offline The Ghost

  • 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 with a sub of mine
« Reply #9 on: September 27, 2015, 04:30:01 AM »
0
in the PM with both rail that have the same location.  In that PM just copy and paste that railtwo into your build. 

Offline KaliOfLS

  • That's "Dr." Kali to you!
  • Sr. Member
  • *
  • Posts: 406
  • Activity:
    0%
  • Reputation Power: 6
  • KaliOfLS has no influence.
  • Gender: Male
  • Respect: +33
  • Referrals: 2
    • View Profile
Re: Issue with a sub of mine
« Reply #10 on: September 28, 2015, 10:45:04 AM »
0
The N/A means that the locations aren't set.  Which either means you forgot to initialize the variable values, or the name is incorrect.  Since ghost is saying that he fixed it by adjusting the rail name, I think it is the latter.
R~~~~ B~~~~~~~~ 
^ real life signature for sure

Offline KetchupTopic starter

  • Full Member
  • ***
  • Posts: 138
  • Activity:
    0%
  • Reputation Power: 3
  • Ketchup has no influence.
  • Respect: +18
  • Referrals: 0
    • View Profile
Re: Issue with a sub of mine
« Reply #11 on: October 07, 2015, 09:20:14 AM »
0
Ghosts fix does not work for me

Offline The Ghost

  • 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 with a sub of mine
« Reply #12 on: October 07, 2015, 11:28:38 AM »
0
Let try this again.     after you use the command Dungeon XXXXXXX , you have issue with running rail two to get to your destination.  Correct

Offline KetchupTopic starter

  • Full Member
  • ***
  • Posts: 138
  • Activity:
    0%
  • Reputation Power: 3
  • Ketchup has no influence.
  • Respect: +18
  • Referrals: 0
    • View Profile
Re: Issue with a sub of mine
« Reply #13 on: October 08, 2015, 01:13:21 AM »
0
okay, rail 2 gets me out of the dungeon before recalling to the bank, rail 1 takes me into the dungeon before killing

Offline KaliOfLS

  • That's "Dr." Kali to you!
  • Sr. Member
  • *
  • Posts: 406
  • Activity:
    0%
  • Reputation Power: 6
  • KaliOfLS has no influence.
  • Gender: Male
  • Respect: +33
  • Referrals: 2
    • View Profile
Re: Issue with a sub of mine
« Reply #14 on: October 18, 2015, 01:24:09 PM »
0
Okay, there can be a problem.  If it is running to the door and then doing funny things, that is because the inside of the dungeon and the outside of the dungeon are non-contiguous in the UO world coordinate system.  Look at automap or something.  What happens in X,Y cooridnates is this:

Code: [Select]
X: 100 Y: 100
X: 104 Y: 100
X: 108 Y: 100  ;Last outside tile
X: 504 Y: 200  ;First inside tile
X: 508 Y: 200

So your character hits that last tile that you marked outside and b-lines right for the other tile in some strange direction and not into the dungeon.  You have to insert an x,y value that is like 1 tile into the 'black area' of the dungeon tile or something.
R~~~~ B~~~~~~~~ 
^ real life signature for sure

Tags: