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 - Cstalker

Pages: 1 ... 10 11 [12]
166
New member introductions / Re: Happy to meet everyone :)
« on: August 29, 2008, 03:16:55 AM »
Well met BlondeM!! Welcome to the site.

167
Scripting Chat / Re: Moving items
« on: August 25, 2008, 08:12:06 PM »
The main question is are you playing on the pay shards or a runuo shard? I have heard that EA has added in event delays and that may be a problem. This is my typcial code for loot searching

Code: [Select]
;---------------------------------
; %1 pack to search
; %2 pack to move to
;---------------------------------
sub search_bag
  Finditem * C_ , %1
  If #findkind = 0
  {
    For %moveloop 1 #findcnt
    {
      Finditem %loot C_ , %1
      If #findkind = 0
      {
        exevent drag #findid #findstack
        exevent dropc %2
        WAIT %MSwait
        set %attempt %attempt + 1
        If %attempt > 3
        {
          for %S 1 10
          {
            Sound
            Event sysmessage The packie is full
          }
        }
      }
    }
  }
  set %attempt 0
return

On runuo there is no delay when picking up an item and droping it. There is a delay after words and normaly i can get away with a wait 9. When i do scripts for guildies i have to up that to 12 to 15 most of the time. Guess i am just blessed with a good connection. :)

I gave up on EA for all their anti scripting attempts. Its nice being to script with full support of the staff :)


168
Script Debug / Re: Heal & Warn
« on: August 24, 2008, 07:57:30 PM »
Ok i am kinda confused. What are you wanting to do exatly? Are you wanting to recall to the bank, unload your stuff, restock you if needed and continue on your way? You ask for code on how to bring up a target cursor and then use it to pick a bag. I was assumeing that you wanted that as part of your setup section of your script.

I just wrote my first fully auto leather gathering script and this is the basic jest of it

Code: [Select]
;-----------------------------------------------------------------------
; stuff you need to set to make script work RIGHT
;-----------------------------------------------------------------------
Set %beatle MAGK                       ; Id of your beetle
set %beatlepack UTFSZMD               ; pack inside of beetle
set %lootbag RHIJJND                   ; bag inside your backpack for loot
set %resourcebox CZANLMD               ; ID of secure within reach of homerune

set %heavyshit JJG_sto_pof_guf         ; items you want moved to the beetle
set %dropspot_runebookid ZFUEBRD       ; default runebook for drop location
set %hunted_runebookid BYLKBRD         ; default runebook for dungeon
set %magery false                      ; true = recall  false = sacred journey
set %healspell 202                     ; 28 = greater heal, 3 = Heal, 202 = Close Wounds

set %loot JJG_OZF_DEG_rwf_guf_sto_pof_TTO_GMF_OKF ; stuff you want to loot
set %the_hunted ih_FE_AE_uf_QE_AF_ye_XE_DF_CD_RGB_PGB_SGB_JD_gb   ; critters to kill
set %Evade_Critters ye_XE_DF_CD

;--------------------------------------------------------------------
set %knives CNF_GMH      ; tools use to cut corpses dagger_skinning knife_
set %VSwait 5            ; very short wait
set %MSwait 10           ; medium wait
set %LSwait 15           ; long wait
gosub setup
gosub Define_rail
gosub steed setup
;------------------------------
;Main loop
;------------------------------
start:
 gosub weightcheck
 gosub recall_to_spot %dropspot_runebookid
 gosub positionpacks
 gosub unloadall
 gosub recall_to_spot %hunted_runebookid
 gosub positionpacks
 gosub enter_level_1
  if %menu_check = start
   {
    for %i 1 %endspot
    {
     gosub remount
     gosub check_health
     gosub menu_check
     set %oldcharposx #charposx
     set %oldcharposy #charposy
     set %oldcharposz #charposz
     set %x %x . %i
     set %y %y . %i
     set %z %z . %i
     gosub Weightcheck
     gosub moveto_spot %x %y %z %oldcharposx %oldcharposy
     set %enemyfound false
     repeat
     {
      gosub kill
     }
     until %enemyfound = false
     set %corpsefound false
     repeat
     {
      gosub findcorpse
      gosub moveto_spot %x %y %z %oldcharposx %oldcharposy
      gosub check_health
      gosub kill
     }
     until %corpsefound = false
    }
 gosub leave_level_1
goto start

that is just the main loop, I have 21 other subs that handle the auto killing, moving, checking health, weight, mana, when to recall to unload, when to restock..... The list goes on.

this is the restock sub

Code: [Select]
Sub Supply_check
Finditem RWF C_ , #backpackid ; this is arrows
if #FINDSTACK < 100
 {
  set %tograb 300 - #FINDSTACK
  set #lobjectid %resourcebox
  wait %vSwait
  event macro 17 0
  wait %vSwait
  contpos 0 0
  wait %vSwait
  Finditem RWF C_ , %resourcebox
   IF #FINDSTACK >= %tograb
    {
     exevent drag #findid %tograb
     exevent dropc #backpackid
     wait %MSwait
    }
   Else
    {
     event exmsg #charid 3 70 Out of arrows
     halt
    }
 }
finditem ZLF C_ , #backpackid ; this is bandaids
if #findstack < 25
{
  set %tograb 100 - #FINDSTACK
  set #lobjectid %resourcebox
  wait %vSwait
  event macro 17 0
  wait %vSwait
  contpos 0 0
  wait %vSwait
  Finditem ZLF C_ , %resourcebox
   IF #FINDSTACK >= %tograb
    {
     exevent drag #findid %tograb
     exevent dropc #backpackid
     wait %MSwait
    }
   Else
    {
     event exmsg #charid 3 70 Out of arrows
     halt
    }
 }
return

As you can see in that sub, i search my pack for arrows and then if the amount of arrows are lower than 100 it will restock me back to 300 arrows. The same goes with the bandaids. You just need to make sure you have enough on you to make a complete round between what you are doing and your recalling to the bank.

The restocking code above is about the best I have come up with so it should give you a good start on how its done.

169
New member introductions / Re: hi
« on: August 24, 2008, 07:41:15 PM »
Hi and welcome to the forums. :)

170
Scripting Chat / Re: Moving items
« on: August 24, 2008, 04:58:31 PM »
I havent seen ghosting in a long time. I use to get it when I put the wait between the exevent drag and evevent dropc command. I talk with Snicker7 a lot and it was him that got me off of useing that exta wait. Ever since then all has been ok. I run at a avarage 90 ping and do bods non stop and run a leather farming script at the same time and dont have any ghosting issues.

171
Script Debug / Re: Heal & Warn
« on: August 24, 2008, 04:49:27 PM »
easy

Code: [Select]
event macro 1 0 Bank
wait 15
set #TARGCURS 1
event exmsg #charid 3 0 Target your bag now
repeat
  {
  wait 1
  }
until #TARGCURS = 0
Set %WhatBagYouWant #ltargetid

172
Resource Farming / Re: Snow's Spined Leather Farmer
« on: August 24, 2008, 04:44:10 PM »
you don't need the { around it as long as it tabbed and between the repeat and until.  i looked through some of TM's and they don't have{} around them. and i'll check out the rest of the codes :) and i'll check the syntax.

Wow I learn something new every day.

173
New member introductions / Hello
« on: August 23, 2008, 03:42:55 AM »
Hi all, I am Cstalker, short for Computer Stalker. (yeah its lame :P) I have been playing UO since it was released on ea for 10 years and have now moved to Alexandria, the official EUO shard. I enjoy scripting so much that i have ran out stuff on the EUO forums that I have to branch out and share my wisdom :)
You should start seeing me around more. Thanks to Guadah I learned of Scriptuo and really looking forward to its expansion to actualy hook into UO.
Cant think of anything else. So
BYE

174
Resource Farming / Re: Snow's Spined Leather Farmer
« on: August 23, 2008, 01:55:50 AM »
Found a small bug in your target loop, you didnt put the {} around the repeat, until loop.

Code: [Select]
sub target
findItem %monster G_5
if #findKind = -1
      return
set %target #findID
set #ltargetID #findID
set #ltargetKind 1
set %flagwait ( #sCnt + 50 )
repeat
      event macro 27 0
      gosub checkheal
      if #result = #true
         gosub heal
until %flagwait < #sCnt || #enemyid = n/a
wait 10
return

should be

Code: [Select]
sub target
findItem %monster G_5
if #findKind = -1
      return
set %target #findID
set #ltargetID #findID
set #ltargetKind 1
set %flagwait ( #sCnt + 50 )
repeat
      {
      event macro 27 0
      gosub checkheal
      if #result = #true
         gosub heal
      }
until %flagwait < #sCnt || #enemyid = n/a
wait 10
return

also ran it thru the SUO error check and got this
Code: [Select]
Method count: 55
Command count: 55
*** Pass 1 - Label accounting:
*** Warning - Tag _opensecure: - Line 679 already exists.  First occurance: 641
*** Error - Line 700 Close brace has no opening brace.
*** Warning - SUBROUTINE tm_travelfromnamedrunebook - Line 380 unused
*** Warning - SUBROUTINE tm_randomrunebooktravel - Line 426 unused
*** Warning - SUBROUTINE tm_travelfromobject - Line 451 unused
*** Warning - SUBROUTINE adjmaxweight - Line 708 unused
*** Warning - SUBROUTINE healtest - Line 778 unused
*** Warning - GOTO _opensecure: - Line 647 has no matching tag
*** Warning - GOTO _opensecure: - Line 684 has no matching tag
Subroutine labels = 22
Tag labels = 16
66 Code block(s).
8 Warnings(s) encountered.
*** Pass 2 - Execution [SYNTAXCHECK]
1 Error(s) encountered.

Man i love this program, hope it will be able to run them soon, i hate coping back and forth to euo :)

175
Script Debug / Re: Heal & Warn
« on: August 22, 2008, 11:33:55 PM »
Restocking is easy. It depends on where you have your bandaids at
this is one of the subs i use for restocking,

Code: [Select]
;----------------------------------
;%1 Type or ID of the item to restock
;%2 the amount to grab
;%3 the container to grab from
;%4 the container to drop to
Sub Restock
Finditem %1 C_ , %3
if #findkind = 0 && #findstack >= %2
 {
  exevent drag #findid %2
  exevent dropc %4
  wait 10
  return true
 }
event exmsg #charid 3 0 You do not have enough of that item.
return false

then you just use

gosub restock XX XXX XXXXXX XXXXXX
where the xs are %1 thru %4 that are in the sub.

As far as adding chiv, you use use the event macros where you need them

176
Script Debug / Re: Heal & Warn
« on: August 21, 2008, 05:30:16 AM »
One thing to remember when useing #finditem is to always check the #findkind. The way you are useing it it will find your aids in packs first and then on the ground. The problem is that if somone was to drop aids on the ground out of your reach it will mess the script up.

I would write the counter sub like this
Code: [Select]

sub counter
  finditem ZLF C_ , #backpackid
   if #findkind = 0 && #findstack <= 20
     EVENT ExMsg #charID 3 33 You are Low on bandaids!
  if #findkind = -1
     event exmsg #charid 3 33 You are out of bandaids!
return

At this point you could add in a bandaid restocking.

The same with the actual heal sub

Code: [Select]
;-------Heal-(hopefully)-----------------
  sub heal
  if #result #true
  finditem ZLF c_ , #backpackid
  {
   if #findkind = 0  ; -1 not found, 0 in a container, 1 on the ground
  {
   set #lobjectId #findId
    event macro 17
    target 5s
    event macro 23
    repeat
    {
    wait 0
    }
    until %fullheal in #sysmsg || %lilheal in #sysmsg || %retry in #sysmsg || %tryagain in #sysmsg || %wait in #sysMsg
   }
  return

Hope this helps you in your quest to become a master scripter.

Pages: 1 ... 10 11 [12]