Author Topic: My first Script, looking to pick your brains.  (Read 10373 times)

0 Members and 1 Guest are viewing this topic.

Offline seeriuslyTopic starter

  • Full Member
  • ***
  • Posts: 219
  • Activity:
    0%
  • Reputation Power: 6
  • seeriusly has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 0
    • View Profile
My first Script, looking to pick your brains.
« on: August 08, 2009, 05:01:08 PM »
0
  I am currently undergoing my first script ever.  Boy oh boy I don't know what I got myself into...  But I got the idea down and seems like it could be good.  I have been reading EVERYTHING I can that pertains to what I want to do in this script...  Been at it for over 30 hours almost straight... lol   I have used a few peoples subs, and need to get a few more subs in to finish it.  If there is anyone that wants to let me pick their brains, I promise I will figure most of it out, and I am not looking for a handout.  I'd like to msg through pm's if possible, so I can keep my lack of knowledge on the down-low for now. :-X HAHA  Credit will be acknowledged of course.  I am in it for the challenge, and I am pretty smart.  Give me a hollar if you want to help me out, thanks.


Offline Superslayer

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: My first Script, looking to pick your brains.
« Reply #1 on: August 08, 2009, 08:12:52 PM »
0
You can certainly PM me for anything. Namespace is a topic I'm only slightly comfortable with, but most anything else is good with me.

Offline DeadIssue2

  • Sr. Member
  • *
  • Posts: 287
  • Activity:
    0%
  • Reputation Power: 3
  • DeadIssue2 has no influence.
  • Gender: Male
  • Respect: +21
  • Referrals: 1
    • View Profile
Re: My first Script, looking to pick your brains.
« Reply #2 on: August 08, 2009, 09:05:46 PM »
0
Let us know what you are working on and maybe what your stuck on and we can see what we can do to help.

Offline seeriuslyTopic starter

  • Full Member
  • ***
  • Posts: 219
  • Activity:
    0%
  • Reputation Power: 6
  • seeriusly has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 0
    • View Profile
Re: My first Script, looking to pick your brains.
« Reply #3 on: August 15, 2009, 07:06:11 PM »
0
Thankyou guys.  Well for the moment, basically it's a fishing script...  I know, I know... lame, but wait until it's finished before you knock it eh. :)  I will provide more info once I can get the hang of this part of the script.  Right now I need to figure out how I loop a section of it. 

Which means I need a couple things...

I got it to recall off of a certain rune in the book.  (I will have 16 locations to do this from)  What I want to do is have it fish until "the fish don't seem to be biting here".  To do that I will need to use a journal scan, and I have found a couple subs from other people, but don't know how to implement it.

I will then need to let it go to each rune and fish until I am nearly overweight. There again, I seen many subs, and snips of scripts, but am stuck on where and how to put it in play.

Here's some code I am working with:

Code: [Select]
mainloop:
gosub clickRunebookLocation FMALJRD 1 M #TRUE  ;gosub clickRunebookLocation [BookID] [RuneNumber] [RecallMethod] [FailOverride #TRUE/#FALSE]

;find fishing pole
FindItem XHF 1

gosub fish

....

sub fish
set #LObjectID #FindID
set #LTargetKind 2
set #LTargetX -1 + #CharPosX
set #LTargetY 4 + #CharPosY
event macro 17 0
target
event macro 22 0
wait 9s ;maybe 8s ???

;;Fishing Target 2
set #LTargetX -3 + #CharPosX
set #LTargetY 4 + #CharPosY
event macro 17 0
target
event macro 22 0
wait 9s

;;Fishing Target 3
set #LTargetX -4 + #CharPosX
set #LTargetY 2 + #CharPosY
event macro 17 0
target
event macro 22 0
wait 9s
return


gosub clickRunebookLocation FMALJRD 2 M #TRUE
 

So I need it to loop that sub, keeping track of weight, and checking for journal to see when they aren't biting anymore.  Then go to the next rune.
Any hints?

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: +393
  • Referrals: 1
    • View Profile
Re: My first Script, looking to pick your brains.
« Reply #4 on: August 15, 2009, 07:18:44 PM »
0
Code: [Select]
set %MyRunebook FMALJRD

Repeat
  For %Runeon 1 16
     {
      gosub clickRunebookLocation %MyRunebook %Runeon M #TRUE
      FindItem XHF     ; This seems lacking in details where is the rod at your hand backpack floor ?
      gosub Fish  
     }
Until <PLace some condition here
Halt

Put repeat fishing of the same spot (loop) + journal checking and wieght checking inside fish sub
« Last Edit: August 15, 2009, 07:23:02 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 seeriuslyTopic starter

  • Full Member
  • ***
  • Posts: 219
  • Activity:
    0%
  • Reputation Power: 6
  • seeriusly has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 0
    • View Profile
Re: My first Script, looking to pick your brains.
« Reply #5 on: August 15, 2009, 08:07:01 PM »
0
Thankyou so much!!  Well, it arms fishing pole when it's clicked.  I am guessing it clicks it when FINDITEM is used?  It would work just like you wrote I'd imagine, if it did the way I had it?

and like this?

Until (this where i'd put until weight, or until they arent biting?)
Halt

gosub getRIDofFISH

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: +393
  • Referrals: 1
    • View Profile
Re: My first Script, looking to pick your brains.
« Reply #6 on: August 15, 2009, 09:03:10 PM »
0
nope.  It does not click the pole when finditem is used.
If clicks the pole when you do event macro 17 0
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 seeriuslyTopic starter

  • Full Member
  • ***
  • Posts: 219
  • Activity:
    0%
  • Reputation Power: 6
  • seeriusly has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 0
    • View Profile
Re: My first Script, looking to pick your brains.
« Reply #7 on: August 15, 2009, 09:24:09 PM »
0
oh, allright.  event 17 0 is in the fish sub so must be how it's working.

I got the journal script called so it loops the fish sub when it finds "you_pull_out".  Was so stoked when it actually worked! woohoo!!


Scrripty

  • Guest
Re: My first Script, looking to pick your brains.
« Reply #8 on: August 15, 2009, 09:40:17 PM »
0
Good job man. :)  This is a scripting BOARD, so don't be afraid to ask for help... Everyone started somewhere.  My advice is to look at someone else's fishing script.  You'll gain a lot of insight by doing that.

Offline seeriuslyTopic starter

  • Full Member
  • ***
  • Posts: 219
  • Activity:
    0%
  • Reputation Power: 6
  • seeriusly has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 0
    • View Profile
Re: My first Script, looking to pick your brains.
« Reply #9 on: August 15, 2009, 09:51:09 PM »
0
 :) thanks.... I have been looking at AT LEAST 20 different scripts to accomplish the script I want to finish.  I think I have got a good start with the help from a few people here.

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: +393
  • Referrals: 1
    • View Profile
Re: My first Script, looking to pick your brains.
« Reply #10 on: August 16, 2009, 06:31:37 AM »
0
good stuff glad i could help in some way if you get stuck again post in this same thread again :)
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 seeriuslyTopic starter

  • Full Member
  • ***
  • Posts: 219
  • Activity:
    0%
  • Reputation Power: 6
  • seeriusly has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 0
    • View Profile
Re: My first Script, looking to pick your brains.
« Reply #11 on: August 16, 2009, 07:48:28 AM »
0
Thanks, but I am going to plug EVERYTHING I can figure out into it, then I will see what's left to correct.  Appreciate your help.  I have learned ALOT already.

Offline seeriuslyTopic starter

  • Full Member
  • ***
  • Posts: 219
  • Activity:
    0%
  • Reputation Power: 6
  • seeriusly has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 0
    • View Profile
Re: My first Script, looking to pick your brains.
« Reply #12 on: August 16, 2009, 12:29:47 PM »
0
okay, minor bump in the road...  Spent 3 hours trying to figure this layout, and it's come down this...

I got it to go through all locations of my runebook and fish this sub.  checking journal successfully moving when they arent' biting.  I have placed the if #weight > 300 in every possible place, and cant figure it out.  I need to be able move to next sub in the mainloop when weight > 300

Code: [Select]
;==============FISH SUB============
sub fish
baithook:
set #LObjectID #FindID
set #LTargetKind 2
set #LTargetX -1 + #CharPosX
set #LTargetY 3 + #CharPosY
event macro 17 0
target
event macro 22 0
wait 8s




journal1:
call ScanForJournalMsg.txt you_pull_out 1 20
     if #result = #true
{
goto baithook
}
else
{
goto journal2
}

journal2:
call ScanForJournalMsg.txt biting_here 1 20
     if #result = #true

return

Scrripty

  • Guest
Re: My first Script, looking to pick your brains.
« Reply #13 on: August 16, 2009, 12:59:20 PM »
0
okay, minor bump in the road...  Spent 3 hours trying to figure this layout, and it's come down this...

I got it to go through all locations of my runebook and fish this sub.  checking journal successfully moving when they arent' biting.  I have placed the if #weight > 300 in every possible place, and cant figure it out.  I need to be able move to next sub in the mainloop when weight > 300

Code: [Select]
;==============FISH SUB============
sub fish
GOSUB CHECKWEIGHT
baithook:
set #LObjectID #FindID
set #LTargetKind 2
set #LTargetX -1 + #CharPosX
set #LTargetY 3 + #CharPosY
event macro 17 0
target
event macro 22 0
wait 8s

journal1:
call ScanForJournalMsg.txt you_pull_out 1 20
     if #result = #true
{
GOSUB CHECKWEIGHT
goto baithook
}
else
{
GOSUB CHECKEIGHT
goto journal2
}

journal2:
call ScanForJournalMsg.txt biting_here 1 20
     if #result = #true

return
;==================WEIGHT CHECK====================
SUB CHECKWEIGHT

if #weight >= 300
  {DO WHAT YOU NEED TO HERE, GOSUB TO DROP LOOT MAYBE?}
return


Offline seeriuslyTopic starter

  • Full Member
  • ***
  • Posts: 219
  • Activity:
    0%
  • Reputation Power: 6
  • seeriusly has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 0
    • View Profile
Re: My first Script, looking to pick your brains.
« Reply #14 on: August 16, 2009, 01:05:10 PM »
0
Hmmm...  Thankyou, but that didn't seem to work.


I am pretty sure I resolved my weight code problem.  Thanks
« Last Edit: August 16, 2009, 02:05:13 PM by seeriusly »

Tags: