Jump to content

New, Please help! - (Locked)


Unk
 Share

Recommended Posts

I am trying to write a simple script to shovel dirt into a cart exactly 14 times and stop the script until I begin it again. I have never done any coding and have spent a good majority of the day figuring out all the jargon. I am currently stuck, I am sure I'm doing something wrong lol.

 

Here it is:

Local $Putincart= 0
Local $Startdig= 0
Do
    $Startdig= $Startdig+1
    $Putincart= $Putincart+1
Until $Putincart = 14 And $Startdig = 1

func Startdig()
WinActivate("Life is Feudal: MMO @ Godenland (Standard ruleset World)")
MouseClick("left") ;begin digging
EndFunc

Func Putincart()
Sleep(30000) ;wait 30s
Send("{TAB}")  ;tab out
Sleep(100)
MouseMove(2097,988,10) ;hover organize dirt
MouseClick("left") ;click organize dirt
Sleep(100)
Send("{ALTDOWN}") ;hold alt (combine dirt)
Sleep(100)
MouseMove(2131,611,10) ;hover over dirt
MouseClick("Left") ;click dirt
Sleep(100)
Send("{ALTUP}") ;let go of alt (combine dirt)
Sleep(100)
Send("{CTRLDOWN}") ;hold control (transfer dirt)
Sleep(100)
MouseMove(2131,611,10) ;hover dirt
MouseClick("Left") ;click dirt
Sleep(100)
Send("{CTRLUP}") ;let go of control (transfer dirt)
EndFunc

func stop()
exit
EndFunc
 

Link to comment
Share on other sites

Huh I see your point. I am trying to get the first function to run once and the second to run 14 times after the first. So I could just call the startdig function and then do until for only putincart?

Link to comment
Share on other sites

10 minutes ago, badcoder123 said:
Local $Putincart= 0
Local $Startdig= 0
Do
    $Startdig= $Startdig+1
    $Putincart= $Putincart+1
Until $Putincart = 14 And $Startdig = 1

how does $Startdig ever = 1 and $Putincart = 14 at the same time?

Call("Startdig")
Next
Local $Putincart= 0
Do
    $Putincart= $Putincart+1
Until $Putincart = 14
Call("stop")
 

How about this?

Link to comment
Share on other sites

@Unk, you'd better read the forum rules!

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

  • Developers

Welcome to the AutoIt forum.

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.

See you soon with a legitimate question I hope.

The Moderation team

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...