Author Topic: Ultra fast bolt basher!  (Read 3606 times)

0 Members and 1 Guest are viewing this topic.

Offline MindozaTopic starter

  • Newbie
  • *
  • Posts: 5
  • Activity:
    0%
  • Reputation Power: 0
  • Mindoza has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Ultra fast bolt basher!
« on: May 02, 2010, 04:59:43 AM »
0
Hiya, ive finally started hardcore research on scripting, mainly due to having no girlfriend to occupy my time and nag me, and also im currently unemployed hah.

Recently ive been running a razor macro with 4 separate macro's set to hotkeys and hitting them manually.

They are in essense:

Double click NPC.
Accept Quest.
Toggle Quest Item.
Receive Reward.

Now youre probably wondering what does this have to do with scripting? Well this process involves me spamming the npc until i get the lethal darts quest, then hitting the 3 keys afterward when i get the correct type.

Id like to make a simple script to basically do this job for me, to double click until it hits lethal darts. Then activate the other 3 macros. Like a razor/script hybrid.

If i could be pointed in the right direction towards a possible resource specifically describing how i can integrate key strokes in a script to manipulate razor macro's it would be much appreciated! Also, how exactly i would go about defining a rule to stop on a specific quest?

Offline UOMaddog

  • Maddog
  • Elite
  • *
  • *
  • Posts: 1625
  • Activity:
    0%
  • Reputation Power: 22
  • UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...
  • Gender: Male
  • Biggest B@D@$$ of the Universe
  • Respect: +287
  • Referrals: 8
    • View Profile
    • Insane UO
Re: Ultra fast bolt basher!
« Reply #1 on: May 04, 2010, 10:25:44 PM »
0
The only really difficult part of that is the first step: Spamming until you get the correct quest. Unforunately it has to be done with an OCR-type script (Optical Character Recognition). The best one that most people use is KalOCR. If you use that, then the rest is easy!
There are 10 kinds of people in this world: those that understand binary and those that don't!

Windows:  A 64-bit tweak of a 32-bit extension to a 16-bit user interface for an 8-bit operating system based on a 4-bit architecture from a 2-bit company that can't stand 1 bit of competition!

Offline MindozaTopic starter

  • Newbie
  • *
  • Posts: 5
  • Activity:
    0%
  • Reputation Power: 0
  • Mindoza has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Ultra fast bolt basher!
« Reply #2 on: May 06, 2010, 10:53:38 AM »
0
Think im a little over my head! Ive figured out how to set keys, and have written a dodgy first script to try and create rules on accepting certain quests and disregarding others but i think i need to read up more! hah.

This is the script, you will probably look at it and think, oh my! hah. It doesnt work. First attempt though. Will read up and undoubtedly realise mistakes.

F5 = Double Click NPC
F6 = Accept Quest
F7 = Toggle Quest Status
F8 = Receive Reward
Code: [Select]
set #lpc 1000
set %kalocr #curpath , kalocr.txt

Sub CheckQuest
wait 5
call %kalocr GetMLQInfo QuestOffer #contposx #contposy
If %1 = A , #spc , Simple , #spc , Bow
Key F5
If %1 = Lethal , #spc , Darts
Gosub Quest
If %1 = Ingenious , #spc , Archery, , #spc , Part , #spc , I
Key F5
If %1 = Ingenious , #spc , Archery, , #spc , Part , #spc , II
Key F5
If %1 = Ingenious , #spc , Archery, , #spc , Part , #spc , III
Key F5
If %1 = Stop , #spc , Harping, , #spc , On , #spc , Me
Key F5
Gosub Checkquest

Sub Quest

Key F6
}
Wait 1

Key F7
}
Wait 1

Key F8
}
Wait 1

Gosub Checkquest
« Last Edit: May 06, 2010, 10:55:09 AM by Mindoza »

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13306
  • Activity:
    0.6%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +2965
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Ultra fast bolt basher!
« Reply #3 on: May 06, 2010, 10:55:51 AM »
0
Has kalocr been updated since they changed the quest info from the last patch?
Please read the ScriptUO site RULES
Come play RIFT with me!

Scrripty

  • Guest
Re: Ultra fast bolt basher!
« Reply #4 on: May 06, 2010, 10:57:09 AM »
0
You could always use my poor mans ocr and look for specific points on the menu with it to define your "search."  And when it comes back #true, you found it. :)  It's in my sig named PM OCR.

Tags: