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.


Messages - Neo

Pages: 1 ... 43 44 [45] 46 47
661
Crafting / Re: frneo's Weapon Crafter v2.1b out 08/11/11
« on: August 11, 2011, 08:06:28 AM »
Version 2.1b
Removed all goto's as a birthday gift for Cerveza! :)

Also removed previous versions.... This should be working fine...

I haven't tested 2.1b myself yet, so, if there are any problems, please tell me about it!

Cheers!

662
Script Debug / Re: Help with script, am I heading int he right direction
« on: August 11, 2011, 07:06:57 AM »
One thing is that goto's aren't supported in OEUO, so transitioning scripts that have goto in them over won't work until something is put in place to rewrite them in a script.

Another thing is that they can confuse beginner scripters and cause headaches to advanced scripters.

Post
Post

There's really no reason to ever use a goto in a script.



Well, thanks for this!

Didn't know there was such prejudice against goto's in general!

From now on, I'm gonna try to write my stuff without using goto's! Even if it's just for the fun of it!

EDIT: Changed the tutorial script using repeat, and also updated my weapon crafter removing gotos ! :)


663
Script Debug / Re: Help with script, am I heading int he right direction
« on: August 11, 2011, 06:51:34 AM »
Thanks frneo, Cerveza & camotbik :)
I'm going to go over it today and spend some time on the tutorials also. I guess i was trying to run before I could walk.
Thanks for taking the time frneo for explaining how each part works it helped  alot im adding other items to the script and ill post up the finished script.

You're welcome! :)
I'm glad I could help!

If you have any questions on this new version of yours, feel free to ask!


664
Script Debug / Re: Help with script, am I heading int he right direction
« on: August 11, 2011, 06:23:36 AM »
ewwww... just noticed that frneo uses a goto loop... icky dude!

replace

loop:
with
repeat

and replace

goto loop
with
until #false
:(

I remember reading this on another post of yours, lol...

That you're totally against using goto...

Does goto really influence how the script works in a bad way?

Or is it just plain aesthetics?

Thank you for the input Cerveza! :)

Cheers!

665
Script Debug / Re: Help with script, am I heading int he right direction
« on: August 10, 2011, 08:24:13 PM »
Hi Blacklisted! I wrote the script down for you, to do the stuff you wanted it to do, with comments, in the form of a tutorial. This script should be fully functional, and also, it's an easy to read tutorial so that you can understand everything that each line of code does. I hope you can find this useful to help give you a push in the right direction to start learning how to script.

So, here it is:
Code: [Select]
;----------------------------------------------------
; First off, we should start the script by setting the
; variables we're going to use. As you know, standard
; variables always start with '%'. So let's set the ones
; we're going to use!
;----------------------------------------------------
set %gems HVF_UVF_FVF_EVF_OVF_VUF_GVF_RVF_BVF_VVF_NVF_ZVF_
set %reagents KUF_JUF_KZF_JZF_MZF_WZF_RZF_SZF_DUF_TZF_UZF_YZF_IUF_
;-------------------------------------------------------------
; I just copied the gems and reagents types from the code you
; posted on SUO. Saved me some time! :)
; Now, even though we're going to use the menu to define
; the bags' id's, we should start the script off by setting
; the vars we're going to use to N/A. This has two basic
; purposes:
; First one is so that the user sees the bags N/A in the menu,
; making it easier for him to realize he has to set the bags.
; You should always think on ways to make the script more
; intuitive for people who will be using it.
; Remember, not every person who is going to use your script
; is gonna be a rocket scientist! :))
; Second purpose is so that we can put a check to see if the bag
; has been set or not in the menu, before the script starts
; doing it's job of moving items.
; So let's get those N/A's going!
; (actually, if you don't specify the vars, they will be 'set'
; automatically to N/A, but I've wrote it like this
; to ilustrate better what I'm trying to show you!) :)
;-------------------------------------------------------------
set %lootbag N/A
set %gemsbag N/A
set %regsbag N/A

;--------------------------------------------------
; Next, the most basic yet very important thing you should
; know is how subs work. You always use 'gosub subname'
; to go to a sub, however, you should only get out
; of a sub using 'return'. This will take you
; back to where the sub was called in the
; first place (the gosub line).
;
; The example we're gonna see now shows this
; clearly. We're gonna generate the menu for the
; user. We'll use a sub for that!
; So first things first.
;-----------------------------------------------------
gosub menu ; This line here will take you to the sub called
; 'menu'. If you scroll down you can find this sub, and
; you'll notice the last line of it being 'return'.
; So that return will take us back exactly here, where
; we used the 'gosub' command.
;----------------------------------------------------
; Ok, so now our pretty little menu should be built, and the
; user should be seeing it right now! YAY! \0/
; Now, we have to make the script wait here until the
; user clicks something to do whatever the hell he wants
; to have the script do for him. We're going to write
; a little loop to do this. Read this loop carefully
; to see how it works.
;----------------------------------------------------

repeat
if #menubutton = setloot_button
   {
   gosub setloot
   set #menubutton N/A
   }
if #menubutton = setgems_button
   {
   gosub setgems
   set #menubutton N/A
   }
if #menubutton = setregs_button
   {
   gosub setregs
   set #menubutton N/A
   }
if #menubutton = moveregs_button
   {
   if %regsbag <> N/A && %lootbag <> N/A
      {
      gosub moveregs
      set #menubutton N/A
      }
   else
      {
      Display You must set up each bag first
      set #menubutton N/A
      }
   }
if #menubutton = movegems_button
   {
   if %gemsbag <> N/A && %lootbag <> N/A
      {
      gosub movegems
      set #menubutton N/A
      }
   else
      {
      Display You must set up each bag first
      set #menubutton N/A
      }
   }
until #false ; thank you cerveza! :)

;--------------------------------------------------
; Ok, our main loop is done. When the user clicks
; a button, we can see that in the #menubutton
; var. Things you should notice here:
; 1) If a button is pressed, you will go to a sub
;    which will perform what the button suggests.
;    Also, you will set the #menubutton var back to
;    N/A so that you don't keep looping like crazy
;    the same sub over and over.
; 2) If the person tries to use the move subs
;    without having set the ID's of the bags first,
;    the script will warn them about it, and go back
;    to the loop to wait for the bag id's to be set.
;----------------------------------------------------
; I guess now that this is done, we can start building the
; rest of our subs! Let's start with the sub to set
; our loot bag!
;------------------------------------------------------

;======= Set Loot Bag Sub =======
sub setloot
event SysMessage Target your loot bag ; event SysMessage will display a msg inside you client for you
      set #targcurs 1 ;sets the little target cursor on
      while #targcurs = 1 ; while #targcurs = 1, so while the target cursor is on, it will wait
      wait
      set %lootbag #ltargetid ; once the bag is clicked, we will set it's id
      set #lobjectid #ltargetid ; here we will set the last object to the id of the last target, in this case, our loot bag
      event macro 17 ; event macro 17 is 'Use Last Object', so this will open our loot bag
      menu Edit EUOEdit1 84 44 57 %lootbag
      wait 20
return
;======= End Sub =======

;--------------------------------------------------------
; Noticed the line 'menu Edit EUOEdit1 84 44 57 %lootbag' there?
; This will update the Edit Box for the lootbag in the menu,
; which will now show the id of our dear lootbag!
; Great stuff! Now we're gonna do almost the same thing for
; our other two bags. The difference is, we're not gonna want to open them.
; Why, do you ask? Simply because it would make this more complicated.
; So it's best to leave bags we're going to put stuff IN closed, while
; the bags we're going to get stuff FROM should remain open.
; So, let's do this now!
;---------------------------------------------------------

;======= Set Gems Bag Sub =======
sub setgems
event SysMessage Target your gems bag
      set #targcurs 1
      while #targcurs = 1
      wait
      set %gemsbag #ltargetid
      set #lobjectid #ltargetid
      menu Edit EUOEdit2 84 72 57 %gemsbag
return
;======= End Sub =======

;======= Set Regs Bag Sub =======
sub setregs
event SysMessage Target your regs bag
      set #targcurs 1
      while #targcurs = 1
      wait
      set %regsbag #ltargetid
      set #lobjectid #ltargetid
      menu Edit EUOEdit3 84 104 57 %regsbag
return
;======= End Sub =======

;--------------------------------------
; Piece of cake right? Now, we should write up
; the move subs. So lets get it done!
;----------------------------------------

;======= Move Regs Sub =======
sub moveregs
repeat ; it will repeat whatever is written here, until the condition on the 'until' line is met
finditem %reagents C_ , %lootbag ; this will look for the reagents inside you're lootbag
exevent drag #findid #findstack ; #findstack will hold the amount of reagents in each stack
wait 10
exevent dropc %regsbag ; this line will drop the regs inside your regs bag
wait 10
until #findcnt < 1 ; if you can't find any more items, it will stop repeating!
Display All Done!
return
;======= End Sub =======

;======= Move Gems Sub =======
sub movegems
repeat
finditem %gems C_ , %lootbag
exevent drag #findid #findstack
wait 10
exevent dropc %gemsbag
wait 10
until #findcnt < 1
Display All Done!
return
;======= End Sub =======

;--------------------------------------
; Ok, we should be set now! If no mistake was
; made while writing, this little script
; should do what we expect from it!
; Let's hit play and find out! :))
;--------------------------------------
; Below you can check out the menu sub.
;--------------------------------------


;======= Menu Sub =======
sub menu
menu Clear
menu Window Title Blacklisted's MoveLoot
menu Window Color BtnFace
menu Window Size 221 225
menu Font Transparent #true
menu Font Align Right
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Font Transparent #false
menu Font Align Left
menu Text EUOLabel1 12 44 Loot Bag ID:
menu Text EUOLabel2 12 72 Gems Bag ID:
menu Text EUOLabel3 12 104 Regs Bag ID:
menu Text EUOLabel4 12 144 Move regs to bag:
menu Text EUOLabel5 12 172 Move gems to bag:
menu Button setloot_button 148 44 43 25 Set
menu Font BGColor Window
menu Edit EUOEdit1 84 44 57 %lootbag
menu Font BGColor BtnFace
menu Button setgems_button 148 72 43 25 Set
menu Font BGColor Window
menu Edit EUOEdit2 84 72 57 %gemsbag
menu Font BGColor BtnFace
menu Button setregs_button 148 104 43 25 Set
menu Font BGColor Window
menu Edit EUOEdit3 84 104 57 %regsbag
menu Font BGColor BtnFace
menu Button moveregs_button 124 144 43 25 Go
menu Button movegems_button 124 172 43 25 Go
menu Show 421 270
return
;======= End Sub =======

;----------------------------------------------
; Well, I hope this could point you in the right
; direction to start writing your own scripts!
; I know we can get overwhelmed sometimes, when
; we try to read huge pages of things we
; still don't understand very well. So I hope
; this has made things a little simpler for you!
; Cheers,
;
; frneo
;------------------------------------------------
; End Script
;------------------------------------------------
Just copy this to your EUO. You will find detailed explanations on (almost) everything the code is meant for, and I tried to keep it as simple as possible.

I gave you a few explanations on the use of the menu too.



If you have any questions, just ask and I'll get back to you as soon as possible.

Hope this helps! :)

Cheers!

666
Crafting / Re: frneo's Weapon Crafter v2.1a out 08/09/11
« on: August 09, 2011, 08:00:02 PM »
Version 2.1a uploaded:

I was reading through the code and noticed an issue that would prevent Elemental Slayers with Fire or Poison Damage to be saved.

Should be fixed now!

667
Crafting / Re: frneo's Weapon Crafter v2.1 out 08/09/11
« on: August 09, 2011, 06:51:08 PM »
No reason to thank me...you're the one making my sampire's life all that much easier. :D

2.1 downloaded and running now.  Only about 5 hammers in so far, but yes, it is MUCH faster.  I know what I'll be doing the rest of the night!

(For those that want to craft more than 6 items, the new line to change is 904)  if %trashcnt >=6  Sneaky of you to change the var :P

As for me, I'm not seeing where to change the amount of ingots it grabs. Can you point me in the right direction?  I usually keep my pack almost empty, so crafting 30-40 items at a time is pretty easy.

Thanks again for the phenomenal tool frneo!
I had to change the var to %trashcnt because the check I was using in version 2.0 wouldn't work with this new code.

Also, the amount of ingots it grabs is 7 times the amount necessary to make your weapon. So, if the weapon you're making uses 8 ingots, it will grab 56 ingots from the secure, as soon as you have less than 8 ingots in your backpack.

You can find this on line 229
Code: [Select]
set %amount %minimum * 7So, if you increase this number here, it will increase the amount of ingots to grab from the secure, according to the amount necessary to make your weapon...

Hope this helps...

Cheers

668
Crafting / Re: frneo's Weapon Crafter v2.0 out 08/07/11
« on: August 09, 2011, 04:48:39 PM »
Ok guys, version 2.1 uploaded!

Some feedback is appreciated as always.

2.1 should be a lot faster than 2.0

Hope you enjoy! :)

I'm glad to see people getting some use out of this!

Cheers

669
Crafting / Re: frneo's Weapon Crafter v2.0 out 08/07/11
« on: August 09, 2011, 03:40:58 PM »
Hey there frneo,

I know myself and many others have been hoping to find something like this for quite some time now, so thank you.

I just gave it a run with 20 DC hammers, and it works flawlessly.  Fantastic job.

One thing that I noticed as I was watching it for a while. (And I'm not really sure if this is really an option, but just a suggestion if nothing more.)  I believe that you could almost double the speed of the script if you were to craft the weapons directly into your unravel bag.  Drop your ingots into that bag and crafting there would cut out the need to drag and drop every item made into that container.  Then after crafting 6, or however many, scan the bag and pull any that qualify into your keepers container.

I've always liked crafting directly into my unravel/recycle bags just so I don't have to move things around. 

Regardless, your script is fantastic and I thank you for taking the time to put it together.  I have thousands of low end hammers that I've been wanting to burn, but doing them while sitting here was awful boring.

Thank you.
You're welcome! Thank you for the kind words! :)

And I gotta say, I love the idea of crafting the weapons directly in the unravel bag... I'm definitely gonna look into that! Thank you for the suggestion!

Cheers!

670
Misc. Scripts / Re: Cerv's Tracking List
« on: August 09, 2011, 10:04:58 AM »
Hi Cerveza, first of all, great script...

I was thinking about what you said of adding the names on top of the list, and this is what I came up with:

Code: [Select]
set #lpc 4000
set %listcnt 1  ;listcnt is what's going to keep track of created "lists"
gosub showmenu

repeat
gosub doit
wait 3s ; 7 second timout in gumpwait
until #false

sub doit
event macro 13 38 ; use skill tracking
gosub TM_GumpWait generic_gump
gosub offsetclick 337 123 l
gosub TM_GumpWait generic_gump
if #result = #FALSE
  return
call kalocr.txt getTrackingInfo #contposX #contposY #contsize
for %i 1 !tgi_cnt
  {
  set %name !tgi_name . %i ; note the "dot"
  set %list . %listcnt %name
  set %listcnt %listcnt + 1 ; lists will be named %list1, %list2 , ... , %listn
  }
menu delete list
menu List Create list 0 0 199 353
for %n %listcnt 1 ; so the previous list will be deleted, and a new one will be created
  {               ; in this order: %listn, %listn-1 , ... , %list1
  if %list . %n <> N/A ;a safety check to avoid N/A's in your list
  menu list add list %list . %n ;lists every list backwards
  }
gosub offsetclick 1 1 r
wait 7s
return

;-------------------------------------------------------------------------------
sub OffsetClick
  set %tempx %1 + #CONTPOSX
  set %tempy %2 + #CONTPOSY
  click %tempx %tempy %3
return

;-------------------------------------------------------------------------------
; %1 = Gumpname 1
; %2 = Gumpname 2
; #TRUE gump occured before timeout
sub TM_GumpWait
  namespace push
  namespace local GW
  wait 10
  set !timedelay #SCNT
  while #SCNT <= !timedelay + 7
  {
    if #CONTNAME = %1 || #CONTNAME = %2
    {
      namespace pop
      return #TRUE
    }
  }
  namespace pop
return #FALSE

sub showmenu
menu Clear
menu Window Title Cerv's Tracker List
menu Window Color BtnFace
menu Window Size 200 387
menu Font Transparent #true
menu Font Align Right
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Font Align Left
menu Font Name Courier New
menu Font Size 10
menu Font Color Black
menu Font BGColor Window
menu List Create list 0 0 199 353
menu Show 421 270
return
I've added comments on the lines I changed... Hope this is what you meant, and if it is, hope you find this useful! :)

Cheers!

EDIT: found a minor issue, should be fixed now

671
UO-Related Tutorials / Re: Stygian Dragon - A throwing tutorial
« on: August 08, 2011, 12:35:51 PM »
Never had a problem with mana...it's dead quite fast and I always seem to have the mana for another AI from leeching
Thanks, that's what I wanted to know...

Cheers!

672
UO-Related Tutorials / Re: Stygian Dragon - A throwing tutorial
« on: August 08, 2011, 08:14:08 AM »
sorry..forgot to mention I am in wraith form
You mentioned wraith form... I was wondering if you wouldn't stop leeching mana in wraith form, once the dragon ran out of mana....

Cheers

673
UO-Related Tutorials / Re: Stygian Dragon - A throwing tutorial
« on: August 07, 2011, 09:17:50 PM »
I use a wraith form thrower myself so weapon make up is life / stam / ssi / damage / dragon slayer.

120 bush / healing type template.

Can curse weapon if you ever get too low.

Honor him and come down off the stairs, turn left and just start going clockwise.

Never turn in towards him or you get frozen.

Just keep going in a circle clockwise and AI.

Takes about 5-7 minutes to kill and never die.

Who needs teleporters!!
If you don't have mana leech on your weapon, won't you stop leeching mana through wraith form once the dragon is out of mana?

674
Crafting / Re: frneo's Weapon Crafter v2.0 out 08/07/11
« on: August 07, 2011, 07:44:43 PM »
I place a forge beside my crafting area and have raised imbuing to 50 on my smithy.  I use to just smelt all the stuff when I did this by hand but I have access to unlimited ingots so it makes little difference really.  Do you have a weight check that I have missed?  For some reason I craft 6 weapons and then it goes to the  imbue sub, I haven't really looked into the code due to everything else being fine and this is minor at best.

Does smelting reveal you like the imbue?  I'll have to check that out.

I didn't add a weight check, I just set a check that will unravel when the unravel bag gets 6 weapons... This can be changed to the amount you want... This allows for easier customization by users... I left this at 6 because I found it's a safe value to use for most people... And it's still pretty fast I guess...

The code I'm talking about is on line 872
Code: [Select]
if #findcnt > 5So, when there are 6 weapons inside your unraveling bag, you will unravel... Just change this number according to your likings...

I just used weight to check for some other stuff in the code...

About the hiding, I can't say, I never cared much about being hidden or not while doing stuff...

Cheers...

675
Crafting / Re: frneo's Weapon Crafter v2.0 out 08/07/11
« on: August 07, 2011, 06:50:27 PM »
You could have it smelt.
Yes, that's a good idea...

However, if it's possible to unravel with 0 skill in imbuing, I think it would be more profitable to unravel still...

Can anyone confirm this? If it's confirmed that one can't unravel with 0 skill, I would definitely add an option to smelt the weapons in the next release...


Cheers!

EDIT: Just confirmed it... With 0 skill in imbuing you're still able to unravel... You will get only Magical Residue though... However, it still outweighs the benefits of smelting....
The only downside would be if you don't have access to a Soulforge near your secures I guess...

Pages: 1 ... 43 44 [45] 46 47