Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Guadah

Pages: [1] 2
1
Scripting Chat / Looks like EasyUO is down
« on: October 15, 2011, 07:53:25 AM »
This is a first for me, I've never seen their site go down, however when I visit them now I get this message:

Quote
phpBB : Critical Error

Could not connect to the database

2
Television/Movies / Captain America: The First Avenger 2011
« on: October 14, 2011, 03:54:37 AM »
I just finished watching it.  Didn't catch it in the theaters, but wish I would have now.  Good movie, exciting and a good bit of humor.  Worth the time to watch it IMO

Enjoy!



Description:
After being deemed unfit for military service, Steve Rogers volunteers for a top secret research project that turns him into Captain America, a superhero dedicated to defending America's ideals.

Hosted on Megavideo, but you can view it via Icefilms.info:
http://www.icefilms.info/ip.php?v=143868&

3
Scripting Chat / Checking for Bankbox (Sub)
« on: September 14, 2011, 05:04:41 AM »
Code: [Select]
; ###########################################
; ###       CHECKING FOR BANKBOX          ###
; ###########################################
sub check_for_bank
menu set status Checking for your Bankbox
event macro 3 0 bank
 wait 10
gosub TM_AdvJournalScan bank VALID_ADVANCE Bank_container
if #result = #true
   {
   menu set status Looks like you're at the bank.
    wait 10
   return
   }
gosub TM_TravelFromRunebook RE %bank_rune %bank_rune %bank_book
gosub reopen_bags
return

Problem:  If you are not at the bank, it spams the whisper 'Bank' over and over.   Stuck.

What it's suppose to do:
Whisper 'Bank' then if you see in the Journal that the bank opened ("Bank_container") Then it returns, opening bags preset in the menu.
If it does not open (by not seeing "Bank_container" in the journal, it is 'supposed' to move onto the Sub to Travel, then Reopen_bags... however it never gets there.

I've followed the script by manually moving it along.  It whispers 'Bank' then moves into TM's Journal Handler, then returns to the whisper 'Bank'.  NO IDEA why it's doing that.

4
Scripting Chat / Find Bag , C_ -> Return Result
« on: September 13, 2011, 04:56:19 AM »
So I have a script that saves the id's of bags selected and opens them upon start up, so you don't have to select the bags each time you start to run the script.  However, if you are not near the bag, it errors...  So I'm trying to figure out a way to write

find %resource_bag C_
if %resource_bag (not found)
 gosub set_resource_bag

My problem is I'm not sure what to code for the (not found) part.  Suggestions?

(I'm going to blame this on lack of sleep...)

5
Scripting Chat / LF - Stable Runebook Copier
« on: August 30, 2011, 08:16:54 PM »
I've been looking for a stable runebook copier script, but those that I've found have some, if not a lot, of issues.  Does anybody have a stable working one they can direct me to?

6
Script Debug / 'menu get' issue
« on: August 28, 2011, 09:24:38 AM »
I vaguely remember running into a similar problem years ago when I did the multi-skill trainer, however I can not find the error.  I've even looked back through the multi-trainer and have re-written the menu for this script, but it is still just cycling through each of the 5 option as if they are selected in the pull down.  The way I read it when I look at it is it will only cycle through the option if the Pull Down is selected to (lets use option 2) Blacksmithy AND the !old_menures is NOT #menuRes, which I have set previously in the code.

This is the area I believe my error is in:
Code: [Select]

menu combo create skill 85 40 120
menu combo add skill Alchemy
menu combo add skill Blacksmithy
menu combo add skill Carpentry
menu combo add skill Tailoring
menu combo add skill Tinkering

set !old_menures #menuRes

repeat
menu get skill
  if #menuRes = 1 && !old_menures <> #menuRes
     {
     set !old_menures #menuRes
     set %skill alch
     set %skill_name Alchemy:
     gosub main_menu
     )
  if #menuRes = 2 && !old_menures <> #menuRes
     {
     set !old_menures #menuRes
     set %skill blac
     set %skill_name Blacksmithy:
     gosub main_menu
     )
  if #menuRes = 3 && !old_menures <> #menuRes
     {
     set !old_menures #menuRes
     set %skill carp
     set %skill_name Carpentry:
     gosub main_menu
     )
  if #menuRes = 4 && !old_menures <> #menuRes
     {
     set !old_menures #menuRes
     set %skill tail
     set %skill_name Tailoring:
     gosub main_menu
     )
  if #menuRes = 5 && !old_menures <> #menuRes
     {
     set !old_menures #menuRes
     set %skill tink
     set %skill_name Tinkering:
     gosub main_menu
     )
until #false

sub main_menu
set %size1 105
set %size1 ( %size1 + 100 )
menu window size 290 %size1
menu shape status_bg 5 105 280 95 3 7 1 Black 7 Gray
menu font align right
menu font color black
menu font size 10
menu text titles 85 115 %skill_name
menu text titles 85 135 Attempts:
menu text titles 85 155 Time:
menu text titles 85 175 Last Gain:
return

And here is the entire script that I've written so far.  I am only on the menu, the actual script to perform (blacksmithing training only at this point) works fine.

Code: [Select]
set %sewing_kit HAG
set %ingot_type ENK
set %cloth_type CUI
set %oil_cloth RTI
set %size1 105
set %timeout #scnt + 5
gosub TM_AddUnderscore #CHARNAME
      set %charname #RESULT
 
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; XXXXXXXXXXXXXXX MENU DESIGN XXXXXXXXXXXXXXX
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
;menu hideeuo
menu window title Guadah's Crafters Trainer
menu window color silver
menu window size 290 %size1
menu font bgcolor gray
menu shape potionbg 5 5 280 65 3 7 1 Black 7 Gray
menu font align right
menu text title 80 12 Resources:
menu text title 80 44 Train Skill:
menu font align left
menu font bgcolor silver
menu font size 10
menu button target_resource_bag 175 10 30 24 Set
menu edit resource_bag 85 10 85 %resource_bag
menu button start 230 10 50 25 Start
menu button quit 230 40 50 25 Quit
; pull down skill selection box
menu combo create skill 85 40 120
menu combo add skill Alchemy
menu combo add skill Blacksmithy
menu combo add skill Carpentry
menu combo add skill Tailoring
menu combo add skill Tinkering
; Status Box
menu shape status_bg 5 75 280 25 3 7 1 Black 7 Gray
menu font bgcolor gray
menu text status_title 10 80 Status:
menu font color maroon
menu font size 9
menu text status 60 80 Please wait, Initializing Script...
menu show

gosub TM_GetPersistantVariable resource_bag
menu set resource_bag #result
menu get resource_bag
if #menures = N/A
   {
   menu set status Please set your Resource Chest
   }
if #menures <> N/A
   {
   set %resource_bag #menures
   set #lobjectid %resource_bag
   event macro 17 0
    wait 10
   contpos 575 400
    wait 10
   }

set !old_menures #menuRes
repeat
if #menuButton = target_resource_bag
   {
   menu set status Please set your Resource Chest
   set #targCurs 1
set_resource_bag:
    if #targCurs = 1
     goto set_resource_bag
   Set %resource_bag #ltargetid
   Set #lobjectid %resource_bag
   Event Macro 17 0
    wait 10
   contpos 610 440
    wait 10
   menu font size 10
   menu set resource_bag %resource_bag
   gosub TM_SetPersistantVariable resource_bag %resource_bag
   set #menubutton N/A
   }
menu set status Please select your skill to train.
if #menubutton = Start
   {
   set #menubutton N/A
   menu delete Start
   menu font bgcolor silver
   menu font size 10
   menu font color black
   menu button Pause 230 10 50 25 Pause
   gosub training
   }
if #menubutton = Quit
   {
   set #menubutton N/A
   display ok Thank you for using my script.$
           +$
           +Script is Halting$
   menu hide
   halt
   }
menu get skill
  if #menuRes = 1 && !old_menures <> #menuRes
     {
     set !old_menures #menuRes
     set %skill alch
     set %skill_name Alchemy:
     gosub main_menu
     )
  if #menuRes = 2 && !old_menures <> #menuRes
     {
     set !old_menures #menuRes
     set %skill blac
     set %skill_name Blacksmithy:
     gosub main_menu
     )
  if #menuRes = 3 && !old_menures <> #menuRes
     {
     set !old_menures #menuRes
     set %skill carp
     set %skill_name Carpentry:
     gosub main_menu
     )
  if #menuRes = 4 && !old_menures <> #menuRes
     {
     set !old_menures #menuRes
     set %skill tail
     set %skill_name Tailoring:
     gosub main_menu
     )
  if #menuRes = 5 && !old_menures <> #menuRes
     {
     set !old_menures #menuRes
     set %skill tink
     set %skill_name Tinkering:
     gosub main_menu
     )
until #false

sub main_menu
set %size1 105
set %size1 ( %size1 + 100 )
menu window size 290 %size1
menu shape status_bg 5 105 280 95 3 7 1 Black 7 Gray
menu font align right
menu font color black
menu font size 10
menu text titles 85 115 %skill_name
menu text titles 85 135 Attempts:
menu text titles 85 155 Time:
menu text titles 85 175 Last Gain:
return

; #################################################
; ########            PAUSE SUB            ########
; #################################################
Sub CheckPause
if #menubutton = pause
   {
   set #menubutton N/A
   menu delete pause
   menu font color maroon
   menu font bgcolor silver
   menu button resume 230 10 50 25 Resume
   menu set status Paused!  Click "Resume" when ready.
   gosub PauseLoop
   }
if #menubutton = quit
   {
   display ok Thank you for using Guadah's Alchemist Assistant.$
          +$
          +Script is Halting$
   menu hide
   halt
   }
return

Sub PauseLoop
Pause_Loop:
If #menubutton = resume
   {
   set #menubutton N/A
   Menu Delete Resume
   Menu Font Color Black
   menu font bgcolor silver
   Menu Button Pause 230 10 50 25 Pause
   Return
   }
if #menuButton = quit
   {
   Display ok Thank you for using Guadah's Alchemist Assistant.$
            +$
            +Script is Halting$
   Menu Hide
   Halt
   }
Goto Pause_Loop
Return
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; XXX TRAILMYX'S PERSISTANT VARIABLE SUBS XXX
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
sub TM_GetPersistantVariable
  set #RESULT %1 , _ , #CHARID
  set #RESULT * . #RESULT
return #RESULT
sub TM_SetPersistantVariable
  set #RESULT %1 , _ , #CHARID
  set * . #RESULT %2
return

I've left out the crafting & training subs, since the script doesn't even get to that part... there was no need to bog down extra code.

If any of you see what I've missed, I'd love a pointer on what I did wrong.  I've tried to walk away and come back with fresh eyes, but still don't see the issue.

7
Crafting / Guadah's Alchimests Assistant
« on: August 16, 2011, 02:14:04 PM »
Code: [Select]
;  #############################################
; Script Name:  Guadah's Alchemist Assistant
; Author: Guadah
; Version: 1.2.0
; Client Tested with: EA 7.0.16.3 (Patch 53)
; EUO version tested with: 1.5 Version 199
; Shard OSI / FS:  OSI
; Revision Date: 8-22-2011
; Public Release: 7-11-2008
; Purpose: To Craft Alchemy Items
; Special Thanks:
;  * Trailmyx Persistant Variable Sub, advice & support
; ############################################

Title: Guadah's Alchemists Assistant

Current Version(s): v1.2.0
Beta Version: None

Special Thanks:
* TrailMyx Persistant Variable Sub, advice & support

Purpose: To Craft Potions

Set-up Difficulty:  Minimal

Comments:
This script is designed to craft potions.  I have created this script to make multiple potions in one sitting, or you can just make one.  In the future I will add the ability to make empty potion kegs, and fill kegs as well as just potions, however with stack-able potions that option may never hit the market unless it is highly requested.

The Menu is designed to be interactive for the user.  It starts small, but if you want to make more then just one type of pot in one sitting, it will expand by clicking on the + to add more chores for the script.  If you click on it too many times, you can click on the - and remove an option or two.

Makes:
 
  • Greater Agility
  • Black Powder *
  • Greater Conflagration
  • Greater Confusion Blast
  • Greater Cure
  • Darkglow
  • Greater Explosion
  • Fuse Cord *
  • Greater Heal
  • Invisibility
  • Match Cord *
  • Night Sight
  • Parasitic
  • Normal Poison
  • Greater Poison
  • Deadly Poison
  • Potash *
  • Total Refreshment
  • Scouring Toxin
  • Greater Strength


Script supports Non-Tinkering crafters.  If you have under 50.0 Tinkering, the script will NOT attempt at making mortar's and pestle's, but instead will pull them out of our resources bag.  If you have over 50.0 Tinkering it will automatically craft the tools.

* Requires High Sea's Booster pack

1.2.0
Items Added:
  • Potion counter, counting up to your requested value.
  • Endless Water Item
  • Normal Poison
  • General Updates to the overall code, increasing speed and flow.
Items to add to next patch:
* Security check for when users do not enter an amount, or if they enter other then numbers in the box.
* Keg Making (input data from the Keg Maker Script and update to work with the current menu)

8
Scripting Chat / In Need of 3 ID's (High Sea's required)
« on: August 16, 2011, 10:26:32 AM »
I need to get a hold of 3 ID's:  Potash, Charcoal & Black Powder.  I don't have the High Sea's booster applied to my account, and have been unable to find any of the items to just scan them.

I have the damn code for the booster pack also, but can't apply it due to the backass way they did the account merging.

If anybody could supply me with those ID's I would be your friend, at least for a little while.

9
Script Debug / Searching in a Vendor Bag
« on: August 16, 2011, 06:28:57 AM »
So I'm attempting to buy an Invisibility Recipe from a player's vendor in Luna... The only issue is this jackwagon has just randomly tossed in a butt-ton of recipes and I'm unable to find the one I desire so greatly.  They are stacked upon each other (I'm assuming because they are most likely using the enhanced client).

My goal here is to work out this snippet to buy the recipe I want... but in my attempts I've purchased 3 recipes I've no need for.  So in essence, thus far I have failed!

Here's what I'm working with:
Code: [Select]
finditem PIP C_ , DJVOSND
if [invisibility] in #property
   set %item #findid
finditem %item C_ , DJVOSND
 set #ltargetid #findid
event macro 1 0 vendor buy
 wait 10
event macro 22 0

PIP is the ID of the Recipes
DJVOSND is the ID of the bag the recipes are located in

Idea's?

10
Television/Movies / Iceflims
« on: August 15, 2011, 10:05:01 AM »


What is Icefilms?
www.icefilms.info It's a website that hosts links to TV Shows and Movies for Streaming and Download.  All shows are watched ON Iceflims, so you never have to visit another website to watch what you are looking for.

How do I use Icefilms?
You have to download the DivX Player and Audio Codex.  If I'm not mistaken you'll need GreaseMonkey (Firefox addon) to install the codex.  After you have both, just go to Icefilms.info and look for the TV Show or Movie you want to watch.  Click on a Source, then click Play.

I don't want to go to Prison and be treated like a sex slave, Is this illegal?
Downloading a movie is illegal if you have never purchased the movie.  However if you have purchased the movie, even if on VHS, you have rights to watch that movie, no matter how you wish.  So you can download a movie you have purchased, without fear of becoming Bubba's boy-toy.  Streaming movies is a grey area.  As far as I know, there is no hard record of your IP Address when you stream a movie, so it is a matter of personal opinion.

I hate bootleg.  What kind of quality does this website have?
95% of the shows you'll find are CD Quality. 4.99% are High Def and .01% are R5 (or similar quality to a Screener).  There are no Boot-leg copies of any TV Shows or Movies.

Virus's, Trojans and other Malware
I have been using Icefilms for around 3 years and have never received a virus that I am aware of.  I rarely download a movie, but streaming does not protect you fully either.

11
Character skill advancement / Guadah's Cartography Trainer
« on: August 14, 2011, 01:15:00 AM »
Code: [Select]
; #########################################################
; Script Name: Guadah's Cartography Trainer
; Author: Guadah
; Version: 1.0 (Added Cartography)
; Client Tested with: EA 7.0.16.1 (Patch 53)
; EUO version tested with: 1.5 Version 198
; Shard OSI / FS: OSI Servers
; Revision Date: N/A
; Public Release: 08-10-2011
; Global Variables Used:
; Purpose: To Train Cartography from 0 to 99.5
; #########################################################

Title: Guadah's Cartography Trainer

Current Version(s): v1.0

Purpose: To train Cartography

Set-up Difficulty: Minimal

Comments:
This script is designed to train Cartography from 0 to 99.5 crafting Maps out of blank scrolls.

The Menu is designed to be interactive for the user.   It will show you your current skill, how many gains, time spent, time since last gain, what the script is currently doing and the ID's of your Secure, Tool Bag and Trash Barrel.

Script is designed around players not having Tinkering.  So you MUST have a bag inside of your secure chest that is designated for just Mapmaker's Pens.  You will need approx 80-100 Exceptional Pens and around 10000-20000 Blank Scrolls.  Once you reach 99.5 you will need to decipher Treasure Maps for the last 5 gains.  I completed my training from 25.0 to 99.5 with under 20k Blank Scrolls in roughly 10 hours.

Happy Treasure Hunting!

12
Character skill advancement / Guadah's Multiskill Trainer
« on: August 12, 2011, 07:51:00 PM »
Code: [Select]
; #########################################################
; Script Name: Guadah's Multi-Skill Trainer (Super Bob!)
; Author: Guadah
; Version: 3.2.5 (Fixed Poisoning Sub)
; Client Tested with: EA 7.0.16.3 (Patch 53)
; EUO version tested with: 1.5 Version 199
; Shard OSI / FS: OSI Servers
; Revision Date: 08-25-2011
; Public Release: 10-12-2007
; Global Variables Used:
; Purpose: To Train a Varity of Skills from 25.0 to 120.0
;          w/ Smart Casting Adjuster & Tracking Menu
; #########################################################

Title: Guadah's Multi-skill Trainer aka Super Bob!

Current Version(s): Approved: v3.2.5
Beta: None at this time

Special Thanks:
* TrailMyx Advanced Journal Scan, Advice & Support
* Nilmer Everything Sub
* Snicker Skill Tracking (base codework)

Purpose: Skill Training

Skill(s) Trained:
  • Anatomy
  • Animal Lore
  • Arms Lore
  • Bushido
  • Camping
  • Cartography
  • Chivalry
  • Detect Hidden
  • Discordance
  • Evaluating Intelligence
  • Healing
  • Herding
  • Hiding
  • Magery
  • Meditation
  • Musicianship
  • Necromancy
  • Ninjitsu
  • Peacemaking
  • Poisoning
  • Provocation
  • Spirit Speak
  • Stealth
  • Tracking

Set-up Difficulty: None - Minimal

Comments:
This script is designed to work up a variety of skills, with one easy to run script. I have gone to great efforts to make this a click'n'play script, as I do with all my scripts. As you select a skill from the pull down menu, you will get a display screen in the menu that gives you a detailed report on what will be needed for each skill prior to clicking play.

I have placed a ton of fail-safe's into this Script. If your skill is pointed down, it will ask if you want it turned up, and do it for you.  In many cases if you do not have at least 25.0, it will ask you to head to an NPC and train at least 25.0 skill, also will save time training. I have gone to the extreme on each skill, to ensure that you are performing at the maximum ability training, within reason. During this Multi-skill trainer, I will RARELY update with bugs that come and go, so this script will be stable and steady. You will see standalone trainers that will use the flirty bugs for speedy training. Bob will display a ton of information for you to view while your training, eye candy as I call it just for viewing pleasure. Generally I display Starting Skill, Current Skill, # of Gains, Last Gain Time, Training Time, Cost of Training and a live updating Script Status. Depending on the skill training I may or may not display more or less.

This script displays the Skill Images on each menu. This is NOT required, but does give the script a nice display for cosmetic reasons only. To display the images, download skill_images.zip. Unzip the folder and drop it into your EasyUO Folder. SuperBob (Multi-skill Trainer) MUST be in your upper most EasyUO folder as well.

EasyUO/Guadahs Multi-skill Trainer.euo
EasyUO/skill_images/

13
Script Debug / Search, Ignore, Reset, Search again
« on: July 13, 2008, 05:06:59 AM »
Well, I really wasn't sure what to title this post, but I'm working on a Ore Smelting script.  I'm able to get it working overall, but I am fine tuning some parts, and have hit a wall.

In my sub, where I identify the ore to be smelted, I am using a #findindex to search the bag, and I ignore all the ore that is not what I need (i.e. searching for iron).  Then do a search in the bag for #findcnt and if no ore is left in the bag, uncheck the checkbox, reset the ignoreitem and begin the next search.

Why do I ignore it? 
Well I'm using a Check Box in my menu that lets people select what type of ore they want to smelt at that time.  I know it seems silly, but even I have only wanted to smelt some Verite when I need some, and have a bag full of ore.

Now I have just figured out that #findindex is a great way to search through the bag, and I'm attempting to condense my scripts and simplify them without using #finditem over and over and over as I have done in the past.

Here is what I have written to accomplish my task.  However it always skips over the #findcnt section, so it never resets the ignoreitem, and does not uncheck the checkbox pertaining to that type of ore.

menu get iron pertains to the checkbox that is for Iron Ore.
%ore_type is the 4 types of ore that can be found (small broken, small, medium and large)
%resource_bag is obviously the bag full of ore
smelt_iron is the number of ore they are smelting at one time
%iron_color is 0, I have designated the color of each ore to identify them by, it works.

Code: [Select]
finditem %ore_type C_ , %resource_bag
menu get iron
if #menures = #true
   {
   for #findindex 1 #findcnt
       {
       if #findcol = %iron_color
          {
          set %ore #findid
          set %smelt smelt_iron
          }
       if #findcol <> %iron_col
          ignoreitem #findid 1
       if #findcnt < 1
          {
          menu set iron #false
          ignoreitem reset 1
          gosub select_ore
          }
       }
   return
   }

It repeats the #findindex  the number of times that I have ore in the pack, but once it goes through the last loop, it does not go through the if #findcnt < 1 section.

I know it may seem silly to you TM, but It looks correct to me.  Why isn't it working?

14
Script Debug / Advanced Journal Scan
« on: July 11, 2008, 01:23:38 PM »
Hey TM.

I have your Advanced Journal Scan placed in the Spring Cleaner script, and now since there are so many items, I want to be able to ignore a 'wrong' item that is in the bag.  If you drop an item on the NPC that he does not want he says "I'm not looking for one of those at the moment, sorry."

So here's a snippet I'm trying to put in using the Advanced Journal Scan Subs:
Code: [Select]
gosub TM_AdvJournalSync turnin 100
repeat
finditem * C_ , %bag
exevent drag #findid
 wait 10
exevent dropc %NPC
 wait 10
gosub TM_AdvJournalScan turnin VALID I'm_not_looking_for_one_of
if #RESULT = #TRUE
{
   ignoreitem #findid
   }
until #findcnt = 0

However, it is not ignoring the item, it just keeps attempting to drag the same item over and over.  Did I code this wrong?

Yes I have the Subs in the script.

15
Script Debug / Alchemy Assistant
« on: July 08, 2008, 04:10:29 AM »
Aloha!

Last night I woke up, and believe it or not, I was actually dreaming about scripting.  So as I attempted to go back to sleep, I had this code running through my head, and really wanted to get it down.  So I came downstairs at 3:45 am, and wrote out an Alchemy Assistant.  A Potion Crafter I suppose you can call it.

The menu I am quite proud of, its better then any I've done in the past, and am using your (TM) Persistant Variable Subs in it as well.  I attempted to test this out this morning (4 hours of writing), but it does not pull any reagents out of the resource chest.

I went over it a few times, but do not see the error, and I was wondering if you, or anybody could give it a eye-over, and if you could run that nice little Syntax Error finder thing, to bring up the error's in code that I tend to have.

I must say, this is the best script I've written to date, and I'm pretty happy with how the flow works.  Give me some harsh feedback please, its the way I learn best.

Code: [Select]
set %alch_tool RQF
set %alch_tools_needed 5
set %tink_tool GTL_KTL_JTL
set %tink_tools_needed 2
set %bottle WUF
set %ingot_type ENK
set %board TLK
set %size1 130
set %size2 100
set %pot_to_make 100
set %amount_to_make 200
set %resources AVF_WUF_UUF_ZUF_XWS_YWS_YUF_OUF_XUF_TUF_YZF_NUF_KZF_KUF_RZF_MZF_JUF_WZF_SZF_JZF_ENK_TZF_YZF
set %catposx 30
set %selposx 230
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; XXXXXXXXXXXXXXX MENU DESIGN XXXXXXXXXXXXXXX
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
menu window title menu test
menu window color silver
menu window size 290 %size1
menu font bgcolor gray
menu shape potionbg 5 5 280 65 3 7 1 Black 7 Gray
menu font align right
menu text title 130 12 Resource Container:
menu text title 130 42 Potion Container:
menu font bgcolor silver
menu font align left
menu button target_resource_bag 230 10 30 24 Set
menu button target_dump_bag 230 40 30 24 Set
menu edit resource_bag 135 10 85 %resource_bag
menu edit dump_bag 135 40 85 %dump_bag
menu button start 170 75 55 25 Start
menu button quit 230 75 55 25 Quit
menu font size 9
menu font color marron
menu text titles 20 80 Select Type
menu text titles 115 80 Amount
menu button add_more 175 105 20 20 +
menu button remove 200 105 20 20 -
menu font size 8
menu font color black
menu combo create %pot_to_make 5 %size2 100
menu combo add %pot_to_make Total Refreshment
menu combo add %pot_to_make Greater Agility
menu combo add %pot_to_make Night Sight
menu combo add %pot_to_make Greater Heal
menu combo add %pot_to_make Greater Strength
menu combo add %pot_to_make Poison
menu combo add %pot_to_make Greater Poison
menu combo add %pot_to_make Deadly Poison
menu combo add %pot_to_make Greater Cure
menu combo add %pot_to_make Greater Explosion
menu combo add %pot_to_make Greater Conflagration
menu combo add %pot_to_make Greater Confusion Blast
menu combo add %pot_to_make Invisibility
menu combo add %pot_to_make Parasitic
menu combo add %pot_to_make Darkglow
menu edit %amount_to_make 110 %size2 50 0
menu show
gosub TM_GetPersistantVariable resource_bag
menu set resource_bag #result
menu get resource_bag
set %ResourceChest #menures
set #lobjectid %ResourceChest
event macro 17 0
 wait 10
contpos 610 440
 wait 10
gosub TM_GetPersistantVariable dump_bag
menu set dump_bag #result
menu get dump_bag
menuloop:
if #menuButton = target_resource_bag
   {
   set #targCurs 1
set_resource_bag:
    if #targCurs = 1
     goto set_resource_bag
   Set %resource_bag #ltargetid
   Set #lobjectid %resource_bag
   Event Macro 17 0
    wait 10
   contpos 610 440
    wait 10
   menu font size 10
   menu set resource_bag %resource_bag
   gosub TM_SetPersistantVariable resource_bag %resource_bag
   set #menubutton N/A
   }
if #menuButton = target_dump_bag
   {
   set #targCurs 1
set_dump_bag:
    if #targCurs = 1
     goto set_dump_bag
   Set %dump_bag #ltargetid
   menu font size 10
   menu set dump_bag %dump_bag
   gosub TM_SetPersistantVariable dump_bag %dump_bag
   set #menubutton N/A
   }
if #menubutton = add_more
   {
   gosub add_more
   set #menubutton N/A
   }
if #menubutton = remove
   {
   gosub remove
   set #menubutton N/A
   }
if #menubutton = Start
   {
   set #menubutton N/A
   set %size2 30
   set %pot_to_make 100
   set %amount_to_make 200
   gosub loop
   }
if #menubutton = Quit
   {
   set #menubutton N/A
   display ok Thank you for using my script.$
           +$
           +Script is Halting$
   menu hide
   halt
   }
goto menuloop
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; XXXXXXXX SUB TO ADD ANOTHER OPTION XXXXXXXX
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
sub add_more
set %size1 ( %size1 + 25 )
set %size2 ( %size2 + 25 )
set %pot_to_make ( %pot_to_make + 1 )
set %amount_to_make ( %amount_to_make + 1 )
menu window size 290 %size1
menu font size 8
menu font color black
menu combo create %pot_to_make 5 %size2 100
menu combo add %pot_to_make Total Refreshment
menu combo add %pot_to_make Greater Agility
menu combo add %pot_to_make Night Sight
menu combo add %pot_to_make Greater Heal
menu combo add %pot_to_make Greater Strength
menu combo add %pot_to_make Poison
menu combo add %pot_to_make Greater Poison
menu combo add %pot_to_make Deadly Poison
menu combo add %pot_to_make Greater Cure
menu combo add %pot_to_make Greater Explosion
menu combo add %pot_to_make Greater Conflagration
menu combo add %pot_to_make Greater Confusion Blast
menu combo add %pot_to_make Invisibility
menu combo add %pot_to_make Parasitic
menu combo add %pot_to_make Darkglow
menu edit %amount_to_make 110 %size2 50 0
return
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; XXXXXXXXX SUB TO REMOVE AN OPTION XXXXXXXXX
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
sub remove
if %pot_to_make = 100
   return
set %size1 ( %size1 - 25 )
set %size2 ( %size2 - 25 )
menu window size 290 %size1
menu delete %pot_to_make
menu delete %amount_to_make
set %pot_to_make ( %pot_to_make - 1 )
set %amount_to_make ( %amount_to_make - 1 )
return
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; XXXXXXXXXXX MAIN LOOP FOR SCRIPT XXXXXXXXXX
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
sub loop
crafting_loop:
gosub clear_pack
gosub check_tool %alch_tool %alch_tools_needed %catposx 110 %selposx 90
gosub check_tool %tink_tool %tink_tools_needed %catposx 110 %selposx 130
gosub potion_init
gosub grab_resources %bottle %reagent1 %reagent2
gosub craft_potion %alch_tool %alch_tools_needed %catposx %catposy %selposx %selposy
goto crafting_loop
return
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; XXXX SUB TO FIND AND RETURN RESOURCES XXXXX
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
sub clear_pack
finditem %resources C_ , #backpackid
for %i 1 #findcnt
    {
    finditem %resources C_ , #backpackid
    exevent drag #findid #findstack
     wait 10
    exevent dropc %resource_bag
     wait 15
    }
return
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; XXXXXX SUB TO CHECK AND CRAFT TOOLS XXXXXXX
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
sub check_tool
finditem %1 C_ , #backpackid
if #findcnt >= %2
   return
set %to_make ( %2 - #findcnt ) ; Sets a number of tools to make
set #lobjectid #findid
; --------------------------------
; This section looks for ingots, then pulls 100
finditem %ingot_type C_ , %resource_bag
for #findindex 1 #findcnt
    {
    event property #findid
    if copper || shadow || bronze || agapite || gold || verite || valorite in #property
     ignoreitem #findid
    if ingots in #property && shadow notin #property
    set %ingots #findid    ; Finds only Iron Ingots
    }
finditem %ingots C_ , %resource_bag
if #findcnt < 20
   {
   display ok You are out of ingots.$
           +Please get more and resetart script.
   gosub return_resources
   halt
   }
finditem %ingots C_ , %resource_bag
exevent drag #findid 100
 wait 10
exevent dropc #backpackid
 wait 15
; --------------------------------
; Makes tool required, and loops %to_make (number of tools needed) times
event macro 22 0
  gosub gumpwait
 set %x #contposx + %3
 set %y #contposy + %4
 click %x %y ; Selects Category
  gosub gumpwait
for %i 1 %to_make
 {
 set %x #contposx + %5
 set %y #contposy + %6
 click %x %y ; Selects Tool
  gosub gumpwait
 }
gosub clear_pack
finditem %1 C_ , #backpackid
if #findcnt < %2
   gosub check_tool
return
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; XXXX SETS ITEMS NEEDED FOR EACH POTION XXXX
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
sub potion_init
menu get %pot_to_make
if #menuRes = 1 ; Total Refreshment
   {
   set %reagent1 KUF ; Black Pearl
   set %reagent2 N/A ; N/A
   set %required_reagent1 5
   set %required_reagent2 N/A
   set %catposy 90
   set %selposy 90
   menu getnum %amount_to_make
   if #menures = 0
      {
      menu delete %amount_to_make
      menu font color red
      menu text done 120 %size2 Done!
      set %size2 ( %size2 + 25 )
      set %pot_to_make ( %pot_to_make + 1 )
      set %amount_to_make ( %amount_to_make + 1 )
      return
      }
   set %amount #menures
   }
if #menuRes = 2 ; Greater Agility
   {
   set %reagent1 JUF ; Bloodmoss
   set %reagent2 N/A ; N/A
   set %required_reagent1 3
   set %required_reagent2 N/A
   set %catposy 110
   set %selposy 90
   menu getnum %amount_to_make
   if #menures = 0
      {
      menu delete %amount_to_make
      menu font color red
      menu text done 120 %size2 Done!
      set %size2 ( %size2 + 25 )
      set %pot_to_make ( %pot_to_make + 1 )
      set %amount_to_make ( %amount_to_make + 1 )
      return
      }
   set %amount #menures
   }
if #menuRes = 3 ; Night Sight
   {
   set %reagent1 RZF ; Spider's Silk
   set %reagent2 N/A ; N/A
   set %required_reagent1 1
   set %required_reagent2 N/A
   set %catposy 130
   set %selposy 70
   menu getnum %amount_to_make
   if #menures = 0
      {
      menu delete %amount_to_make
      menu font color red
      menu text done 120 %size2 Done!
      set %size2 ( %size2 + 25 )
      set %pot_to_make ( %pot_to_make + 1 )
      set %amount_to_make ( %amount_to_make + 1 )
      return
      }
   set %amount #menures
   }
if #menuRes = 4 ; Greater Heal
   {
   set %reagent1 JZF ; Ginseng
   set %reagent2 N/A ; N/A
   set %required_reagent1 7
   set %required_reagent2 N/A
   set %catposy 150
   set %selposy 110
   menu getnum %amount_to_make
   if #menures = 0
      {
      menu delete %amount_to_make
      menu font color red
      menu text done 120 %size2 Done!
      set %size2 ( %size2 + 25 )
      set %pot_to_make ( %pot_to_make + 1 )
      set %amount_to_make ( %amount_to_make + 1 )
      return
      }
   set %amount #menures
   }
if #menuRes = 5 ; Greater Strength
   {
   set %reagent1 MZF ; Mandrake Root
   set %reagent2 N/A ; N/A
   set %required_reagent1 5
   set %required_reagent2 N/A
   set %catposy 170
   set %selposy 90
   menu getnum %amount_to_make
   if #menures = 0
      {
      menu delete %amount_to_make
      menu font color red
      menu text done 120 %size2 Done!
      set %size2 ( %size2 + 25 )
      set %pot_to_make ( %pot_to_make + 1 )
      set %amount_to_make ( %amount_to_make + 1 )
      return
      }
   set %amount #menures
   }
if #menuRes = 6 ; Poison
   {
   set %reagent1 WZF ; Nightshade
   set %reagent2 N/A ; N/A
   set %required_reagent1 2
   set %required_reagent2 N/A
   set %catposy 190
   set %selposy 90
   menu getnum %amount_to_make
   if #menures = 0
      {
      menu delete %amount_to_make
      menu font color red
      menu text done 120 %size2 Done!
      set %size2 ( %size2 + 25 )
      set %pot_to_make ( %pot_to_make + 1 )
      set %amount_to_make ( %amount_to_make + 1 )
      return
      }
   set %amount #menures
   }
if #menuRes = 7 ; Greater Poison
   {
   set %reagent1 WZF ; Nightshade
   set %reagent2 N/A ; N/A
   set %required_reagent1 4
   set %required_reagent2 N/A
   set %catposy 190
   set %selposy 110
   menu getnum %amount_to_make
   if #menures = 0
      {
      menu delete %amount_to_make
      menu font color red
      menu text done 120 %size2 Done!
      set %size2 ( %size2 + 25 )
      set %pot_to_make ( %pot_to_make + 1 )
      set %amount_to_make ( %amount_to_make + 1 )
      return
      }
   set %amount #menures
   }
if #menuRes = 8 ; Deadly Poison
   {
   set %reagent1 WZF ; Nightshade
   set %reagent2 N/A ; N/A
   set %required_reagent1 8
   set %required_reagent2 N/A
   set %catposy 190
   set %selposy 130
   menu getnum %amount_to_make
   if #menures = 0
      {
      menu delete %amount_to_make
      menu font color red
      menu text done 120 %size2 Done!
      set %size2 ( %size2 + 25 )
      set %pot_to_make ( %pot_to_make + 1 )
      set %amount_to_make ( %amount_to_make + 1 )
      return
      }
   set %amount #menures
   }
if #menuRes = 9 ; Greater Cure
   {
   set %reagent1 KZF ; Garlic
   set %reagent2 N/A ; N/A
   set %required_reagent1 6
   set %required_reagent2 N/A
   set %catposy 210
   set %selposy 110
   menu getnum %amount_to_make
   if #menures = 0
      {
      menu delete %amount_to_make
      menu font color red
      menu text done 120 %size2 Done!
      set %size2 ( %size2 + 25 )
      set %pot_to_make ( %pot_to_make + 1 )
      set %amount_to_make ( %amount_to_make + 1 )
      return
      }
   set %amount #menures
   }
if #menuRes = 10 ; Greater Explosion
   {
   set %reagent1 WZF ; Nightshade
   set %reagent2 N/A ; N/A
   set %required_reagent1 10
   set %required_reagent2 N/A
   set %catposy 230
   set %selposy 110
   menu getnum %amount_to_make
   if #menures = 0
      {
      menu delete %amount_to_make
      menu font color red
      menu text done 120 %size2 Done!
      set %size2 ( %size2 + 25 )
      set %pot_to_make ( %pot_to_make + 1 )
      set %amount_to_make ( %amount_to_make + 1 )
      return
      }
   set %amount #menures
   }
if #menuRes = 11 ; Greater Conflagration
   {
   set %reagent1 TZF ; Grave Dust
   set %reagent2 N/A ; N/A
   set %required_reagent1 10
   set %required_reagent2 N/A
   set %catposy 250
   set %selposy 90
   menu getnum %amount_to_make
   if #menures = 0
      {
      menu delete %amount_to_make
      menu font color red
      menu text done 120 %size2 Done!
      set %size2 ( %size2 + 25 )
      set %pot_to_make ( %pot_to_make + 1 )
      set %amount_to_make ( %amount_to_make + 1 )
      return
      }
   set %amount #menures
   }
if #menuRes = 12 ; Greater Confusion Blast
   {
   set %reagent1 YZF ; Pig Iron
   set %reagent2 N/A ; N/A
   set %required_reagent1 10
   set %required_reagent2 N/A
   set %catposy 250
   set %selposy 130
   menu getnum %amount_to_make
   if #menures = 0
      {
      menu delete %amount_to_make
      menu font color red
      menu text done 120 %size2 Done!
      set %size2 ( %size2 + 25 )
      set %pot_to_make ( %pot_to_make + 1 )
      set %amount_to_make ( %amount_to_make + 1 )
      return
      }
   set %amount #menures
   }
if #menuRes = 13 ; Invisibility
   {
   set %reagent1 JUF ; Bloodmoss
   set %reagent2 WZF ; Nightshade
   set %required_reagent1 4
   set %required_reagent2 3
   set %catposy 270
   set %selposy 70
   menu getnum %amount_to_make
   if #menures = 0
      {
      menu delete %amount_to_make
      menu font color red
      menu text done 120 %size2 Done!
      set %size2 ( %size2 + 25 )
      set %pot_to_make ( %pot_to_make + 1 )
      set %amount_to_make ( %amount_to_make + 1 )
      return
      }
   set %amount #menures
   }
if #menuRes = 14 ; Parasitic
   {
   set %reagent1 YWS ; Parasitic Plant
   set %reagent2 N/A ; N/A
   set %required_reagent1 5
   set %required_reagent2 N/A
   set %catposy 270
   set %selposy 90
   menu getnum %amount_to_make
   if #menures = 0
      {
      menu delete %amount_to_make
      menu font color red
      menu text done 120 %size2 Done!
      set %size2 ( %size2 + 25 )
      set %pot_to_make ( %pot_to_make + 1 )
      set %amount_to_make ( %amount_to_make + 1 )
      return
      }
   set %amount #menures
   }
if #menuRes = 15 ; Darkglow
   {
   set %reagent1 XWS ; Luminescent Fungi
   set %reagent2 N/A ; N/A
   set %required_reagent1 5
   set %required_reagent2 N/A
   set %catposy 270
   set %selposy 110
   menu getnum %amount_to_make
   if #menures = 0
      {
      menu delete %amount_to_make
      menu font color red
      menu text done 120 %size2 Done!
      set %size2 ( %size2 + 25 )
      set %pot_to_make ( %pot_to_make + 1 )
      set %amount_to_make ( %amount_to_make + 1 )
      return
      }
   set %amount #menures
   }
return
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; XXXXX SUB TO FIND AND GRAB RESOURCES XXXXXX
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
sub grab_resources
if %amount >= 100
   set %grab 100
if %amount < 100
   set %grab %amount
; Finds and grabs Bottles
finditem %bottle C_ , %resource_bag
exevent drag #findid %grab
 wait 10
exevent dropc #backpackid
 wait 15
; Finds and grabs Reagent #1
finditem %1 C_ , %resource_bag
exevent drag #findid 1000
 wait 10
exevent dropc #backpackid
 wait 15
; Finds and grabs Reagent #2
finditem %2 C_ , %resource_bag
exevent drag #findid 1000
 wait 10
exevent dropc #backpackid
 wait 15
return
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; XXXXXXXX SUB FOR MAKING THE POTIONS XXXXXXX
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
sub craft_potion
repeat
finditem %reagent1 C_ , #backpackid
if #findcnt < %required_reagent
   gosub grab_more_resources %reagent1
finditem %1 C_ , #backpackid
if #findcnt < %2
   gosub check_tool %alch_tool %alch_tools_needed %catposx 110 %selposx 90
event macro 22 0
  gosub gumpwait
 set %x #contposx + %3
 set %y #contposy + %4
 click %x %y ; Category
  gosub gumpwait
 set %x #contposx + %5
 set %y #contposy + %6
 click %x %y ; Selection (Potion)
  gosub gumpwait
finditem %bottle C_ , #backpackid
until #findcnt = 0
gosub clear_pack
set %amount ( %amount - %grab )
if %amount = 0
   {
   menu delete %amount_to_make
   menu font color red
   menu text done 120 %size2 Done!
   set %size2 ( %size2 + 25 )
   set %pot_to_make ( %pot_to_make + 1 )
   set %amount_to_make ( %amount_to_make + 1 )
   return
   }
return
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; XXXX GUMP WAIT SUB, ENSURES GUMP IS UP XXXX
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
sub gumpwait
set %timer #SCNT + 5
 repeat
  until #CONTNAME = generic_gump || #SCNT > %timer
if #contname <> generic_gump
   {
   event macro 17 0
   }
Return
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; XXX TRAILMYX'S PERSISTANT VARIABLE SUBS XXX
; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
sub TM_GetPersistantVariable
  set #RESULT %1 , _ , #CHARID
  set #RESULT * . #RESULT
return #RESULT
sub TM_SetPersistantVariable
  set #RESULT %1 , _ , #CHARID
  set * . #RESULT %2
return











Pages: [1] 2