Author Topic: Command help  (Read 8124 times)

0 Members and 1 Guest are viewing this topic.

Offline insandTopic starter

  • Jr. Member
  • **
  • Posts: 15
  • Activity:
    0%
  • Reputation Power: 1
  • insand has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Command help
« Reply #15 on: December 09, 2011, 06:04:54 PM »
0
That solved the runebook named n/a problem. Glad to see that gone  ;D

Now my issue as gotten further down the script, always good news.

It sticks around the the following area for several seconds then returns back to beginning, which repeats.

Code: [Select]
 locatenamedrunebook:
    finditem ZBN C_ , #BACKPACKID
    if #FINDKIND <> -1
    {
      event property #FINDID
      if !runbook_name in #PROPERTY
      {
        gosub TM_TravelFromRunebook !method !start_index !end_index #FINDID ; recall to location
      }
      else
      {
        ignoreitem #FINDID rbook
        goto locatenamedrunebook
      }
    }
    else
    {
      display ok Cannot locate specified runebook named , #SPC , !runbook_name
      stop
    }
  ignoreitem reset rbook
  namespace pop
return


My guess is that it's having difficulties with #FINDID variable?


p.s. How do you place code in a fancy gray box?
« Last Edit: December 11, 2011, 01:34:18 PM by Endless Night »

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +786
  • Referrals: 1
    • View Profile
Re: Command help
« Reply #16 on: December 10, 2011, 07:38:24 AM »
0
TMs Runebook subs are a single package you need all elements/subs to make it function correctly

You have not included all of tms work inside your script ... you need to add all the code in tms file to your script. Do not pick and choose which subs as all subs are required.  The subs call each other.  This is why it is not working

Its plainly obvious that its failing on  gosub TM_TravelFromRunebook as that sub does not exist and so the line is ignored.  Don't just add this sub add all subs.. as they gosub each other.
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline insandTopic starter

  • Jr. Member
  • **
  • Posts: 15
  • Activity:
    0%
  • Reputation Power: 1
  • insand has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Command help
« Reply #17 on: December 10, 2011, 03:55:07 PM »
0
I was not aware of that. I did not know that the all the subs were related.
I used "everything" this time and it worked. Minor tweaks required then it's ready and i can move on to the other dozen things want to do  ;D

Thanks a lot, we're getting somewhere now.

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +786
  • Referrals: 1
    • View Profile
Re: Command help
« Reply #18 on: December 11, 2011, 01:33:17 PM »
0
I was not aware of that. I did not know that the all the subs were related.
I used "everything" this time and it worked. Minor tweaks required then it's ready and i can move on to the other dozen things want to do  ;D

Thanks a lot, we're getting somewhere now.

Cool,  As you write more complex scripts people tend to take a generic function and make a sub out of it and then use "gosub" to that sub from many places and different functions... this is why TMs runebook work is not a single encapsulated Sub.

Once you get your head around the way things work you will be flying..



To insert code in the fancy code tags...   [ code ]  ... [ /code ]  <--remove the spaces  thiers a button for in on the toolbar insert code
« Last Edit: December 11, 2011, 01:44:57 PM by Endless Night »
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline insandTopic starter

  • Jr. Member
  • **
  • Posts: 15
  • Activity:
    0%
  • Reputation Power: 1
  • insand has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Command help
« Reply #19 on: January 02, 2012, 10:48:00 AM »
0
Hello i have a question regarding: EN'S GENERIC MOVE ITEM/S TO CONTAINER snippet, found at http://www.scriptuo.com/index.php?topic=2454.15

I was wondering if it was possible to reverse this operation?
I now need this script to take an item from a secured container and place it in my backpack.

Also on a side note, the last step that i need for my script's completion is finding a script or snippet that macro's to create a blacksmith item. (Example: Tools, shovels, etc )

Offline insandTopic starter

  • Jr. Member
  • **
  • Posts: 15
  • Activity:
    0%
  • Reputation Power: 1
  • insand has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Command help
« Reply #20 on: January 02, 2012, 08:02:48 PM »
0
I actually figured out how to reverse this operation with just a few modifications to the script. Now my only issue is having this secured container open, but i believe i found something for that as well..

As for creating the items i wanted, i also found a way to do that :D

So far all is going well

It is now time to piece all my subs into one, and see how they work together

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +786
  • Referrals: 1
    • View Profile
Re: Command help
« Reply #21 on: January 03, 2012, 06:13:12 AM »
0
I actually figured out how to reverse this operation with just a few modifications to the script. Now my only issue is having this secured container open, but i believe i found something for that as well..

As for creating the items i wanted, i also found a way to do that :D

So far all is going well

It is now time to piece all my subs into one, and see how they work together


Cool sounds like you are making some serious progress.
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline insandTopic starter

  • Jr. Member
  • **
  • Posts: 15
  • Activity:
    0%
  • Reputation Power: 1
  • insand has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Command help
« Reply #22 on: January 03, 2012, 06:08:59 PM »
0
Alright, I have one little question.

I haven't been able to figured this out yet.

I've decided to use the following snippet twice in my script: ( Provided by EN )

Code: [Select]
Sub ENs_MoveToContainor ; 3/31/08 - %1 Item %2 Containor %3 stack (Optional) %4 Wait (optional)
  set !DragDropWait %4
  if %0 < 4
    set !DragDropWait 15
  wait !DragDropWait
  ExEvent drag %1 %3
  ExEvent DropC %2
  wait !DragDropWait
Return

Everything works fine, even during the reversed operation i ended up figuring out.

Here comes the problem area.

I use this snippet twice in my script to perform different tasks.

The issue is that the scripts cannot determine which set variables to use. Therefore i get items and quantities in areas they shouldn't be.

I tried adding the set variables within the sub, and that definitely didn't solve the problem.

The only other idea i have is to use the "Call" command and just have the second snippet saved in a separate file.

I'm not exactly sure on how to use the call command correctly within a script. I have read somewhere that "call" commands work similar to "gosub" commands.

Now i'm not sure how to set the variable.

How do i tell the "call" command to get the file from C:\windows\blahblah
« Last Edit: January 03, 2012, 06:16:55 PM by insand »

Offline insandTopic starter

  • Jr. Member
  • **
  • Posts: 15
  • Activity:
    0%
  • Reputation Power: 1
  • insand has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Command help
« Reply #23 on: January 03, 2012, 08:16:15 PM »
0
Okay so turns out I should probably research a little more before posting, but these ideas come to me while i'm posting.

By placing all my script files inside my euox folder the program would auto detect the call locations.

I am still having the same issue, regardless how many times i split my subs up into call files.

Thought i should mention that i use the following code:

Code: [Select]
finditem  %MyITemType  C_ , #Backpackid
if #Findcnt > 0
   set %ItemId #findid

In order to use the Item mover snippet the way i need.

Also, both my item mover snippets contain this code.

So it seems that which ever snippet i run first, the main script seems to be stuck with the #itemid of the first snippet ran.

Therefore, when calling the second snippet, it will automatically use the #itemid of the first.

And of course, both snippets work perfectly while on their own.

Any ideas?

Offline insandTopic starter

  • Jr. Member
  • **
  • Posts: 15
  • Activity:
    0%
  • Reputation Power: 1
  • insand has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Command help
« Reply #24 on: January 05, 2012, 09:00:28 PM »
0
Well I have managed to get around this problem. All I had to do was add numbers at the end of the variables, and the ones inside the finditem snippet.

So far i've gotten half of my script working at the moment because of this recent discovery.

Now my problem is with a snippet i've saved in (working condition) and now it is not...Fun, fun fun.

I don't have much to say about this yet, still in the works.

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +786
  • Referrals: 1
    • View Profile
Re: Command help
« Reply #25 on: January 17, 2012, 04:22:07 PM »
0
You only need to include my sub once within your code file and can then gosub it as many times as you need.
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Tags: