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

Pages: 1 2 [3] 4 5 6
31
Endless Nights' Script Library / Re: ENs - Script Library
« on: October 23, 2016, 01:10:02 PM »
I am attempting to learn how to call your scripts.  IF I wanted to call your ENs-Subs-BodsAndNPCs, I would do the following?

Code: [Select]
  Call #curpath , ENs-Settings.txt 
  Call %EN_SubScriptPath , \ENs-Subs-BodsAndNPCs.txt ENs_sellItem

then to use

Code: [Select]
  Call %ENs-Subs-BodsAndNPCs SellItem abc123 John Talk ENK 5 6 End

I believe the parameters are as follows:

abc123 - vendorid
John - name
ENK - item to sell
5  - Quantity
6 -  minimal price
end - end resume

Is this correct?   :-\


Been a long time.. so did it work ???    It should be extremely simple to get running...

Did not work.  I have your files in the same diretory as Easyuo and used the following code:

Code: [Select]
set #curpath , ENs-Settings.txt
set %EN_SubScriptPath%EN_SubScriptPath , \ENs-Subs-BodsAndNPCs.txt ENs_sellItem

start:
Call %ENs-Subs-BodsAndNPCs SellItem YYJVQ Neztam Talk WZF 10 1 End
halt

Any thoughts?  I tried call & set

32
Script Debug / Re: Sometimes it loots... sometimes it does not....
« on: October 23, 2016, 12:55:54 PM »
You can try this to loot gold
Code: [Select]
sub lootrock
finditem YFM G_2
  if #finditem = -1
    return
 set #lobjectID %lootContainer
 set #lobjectID #findID
 event macro 17
  wait 10
finditem POF C_ , %lootContainer
if #FINDCNT > 0  ; if you find any gold it will loot
{
exevent drag #findid #findstack
wait 15
exevent dropc #BackPackID
wait 15
}
hideitem %lootContainer
wait 10
return
[/quote]

I tweaked to your example.  Still oddly skips looting a corpse now and then... not sure why.  Tried longer waits to see if lag related.

33
Script Debug / Re: Sometimes it loots... sometimes it does not....
« on: October 14, 2016, 09:15:11 AM »
Where would be the best location to adjust the timing if it's not seeing the gold?  Placing a wait after the finditem and before the exevent drag?

34
Endless Nights' Script Library / Re: ENs - Script Library
« on: October 12, 2016, 08:58:09 AM »
I am attempting to learn how to call your scripts.  IF I wanted to call your ENs-Subs-BodsAndNPCs, I would do the following?

Code: [Select]
  Call #curpath , ENs-Settings.txt 
  Call %EN_SubScriptPath , \ENs-Subs-BodsAndNPCs.txt ENs_sellItem

then to use

Code: [Select]
  Call %ENs-Subs-BodsAndNPCs SellItem abc123 John Talk ENK 5 6 End

I believe the parameters are as follows:

abc123 - vendorid
John - name
ENK - item to sell
5  - Quantity
6 -  minimal price
end - end resume

Is this correct?   :-\

35
Script Debug / Sometimes it loots... sometimes it does not....
« on: October 07, 2016, 10:00:46 AM »
Sometimes it loots... sometimes it does not....  What have am I missing? 

Trying to get this sub to work all the time rather than 50/50ish.  Would love any input!

Code: [Select]
sub lootrock
finditem YFM G_2
if #finditem = -1
   return
wait 20
set #lobjectid #findid
wait 20
set %lootContainer #findid
wait 20
event macro 17 0
gosub wfcontainer container_gump 144_212
if ! #result
   {
   ignoreitem %dead
   goto start
   }
wait 10
if #contsize <> 144_212
   {
   ignoreitem %dead
   goto start
   }
wait 60
finditem POF C_ , %lootContainer
exevent drag #findid #findstack
wait 20
exevent DropC #backpackid
wait 12
hideitem %lootContainer
wait 12
return


;===============================
;Waiting for Container to open
;===============================
sub wfcontainer
set %waittime 120
set %wfgump #sCnt2 + %waittime
gosub wfopen contname %1 contsize %2
return #result

sub wfopen
wfo:
if # . %1 = %2 && # . %3 = %4
   return #true
if %wfgump < #scnt2
    return #false
goto wfo


36
General UO Chat / Re: Buying gold?
« on: October 01, 2016, 09:31:43 AM »
I know it's a bit of an older thread but the name Cybernickel... we were semi-competitors selling runebooks on ebay forever ago, he was a good guy then too. I heard his son passed away not too long ago and it's rocked his world though, is he still in UO?

Yes Cyber is still in UO.  Not to the level he was years ago but he still loves the game.

The passing of his son devastated him and I know he is having issues with depression.


37
Is there a way to loot bags within a corpse?  Like when it finds a mages corpse, it loots the regs inside a bag on the corpse?

38
Script Debug / Re: Pixel Count Training
« on: August 25, 2016, 02:23:58 PM »
You can try this one
http://www.scriptuo.com/index.php?topic=188.msg838#msg838


I did but it does all but count pixel count sadly....

39
Script Debug / Pixel Count Training
« on: August 19, 2016, 03:37:59 PM »
How do I go about getting the pixel count of an item, ie ingot or leather etc...

40
Script Debug / Re: Playing with event property but not sending.....
« on: May 30, 2016, 07:33:08 AM »
Thank you!!!!

The timing tweak worked but for some reason it is not sending via the bag of sending.

The findcol is an option that I am starting to explore and learn about.

If I find an item with a specific color, is there a way to the value of the items #lobjecttype into a value like %iditem?

41
Script Debug / Playing with event property but not sending.....
« on: May 27, 2016, 11:26:49 AM »
My attempt at a script to find all Minax arties items in backpack and sent them to the bank...

Code: [Select]
start:
finditem * c_ , #backpackid
if #FINDKIND <> -1
  {
   event Property #findID
   if minax in #property
   {
    set %minaxitem #findid
    gosub dropGoods
    }
  ignoreitem #findid
  }
goto start



 ;=====================================
;          Drop Goods
;=====================================
sub dropGoods
   finditem CKF  c_ , #backpackid
   topBag:
     event property #findid
     if #spc , 0 IN #property
       {
        SET #ltargetid #findid
        SET #ltargetkind 1
        finditem EUO c_ , #backpackid
        if #findid = X
           halt
        SET #lobjectid #findid
        event macro 17 0
        target 3s
        event macro 22 0
        wait 1s
        goto topBag
       }
   SET %bag #findid
   finditem %minaxitem , #backpackid
   SET #ltargetid #findid
   SET #lobjectid %bag
   SET %sendThis #findid
   SET #ltargetkind 1
   event macro 17 0
   target 3s
   event macro 22 0
   wait 1s
return


Any help on what I am missing?

42
Script Debug / Re: Waiting until new target arrive
« on: March 25, 2016, 07:06:45 AM »
Here is what I use.  May not be pretty coding, but it works.

Code: [Select]
;===========================
;   Kill Monsters
;===========================
sub kllmnstr
finditem %mnster G_5
if #findkind = -1
  return
set %mnsterID #findid
finditem %mnsterID
set #ltargetid %mnsterID
set #ltargetkind = 1
event macro 3 0 all kill
target
event macro 22
wait 20
gosub checkifdead
wait 20
return


;===========================
;   Death Check
;===========================
sub checkifdead
set %klltm 1
scan:
finditem %fanID
if #findkind = -1
{
  return
}
set %klltm %klltm + 1
if %klltm > 200
   return
goto scan


43
Script Debug / Re: Ore looter issues
« on: March 22, 2016, 12:53:03 PM »
ok, was looking at this more, and I recommend writing your gem sub without the #findkind return thing, though that IS a very interesting and inventive way to write that. This is not technically any better, but will reduce the *cringe* factor for inspectors of your script.

Code: [Select]
sub gems
finditem %loot C_ , %oreContainer
for #findindex 1 #findcnt
{
       exevent drag #findid #findstack
       wait 20
       exevent DropC #backpackid
       wait 27
}
return

all in all, not a bad job. That first fix will probably work fine without this, but this is much better scripting practice. :)
[/quote]

Quick question to understand, the "for #findindex 1 #findcnt" repeats 1 thru #findcnt correct?  So if #findcnt was 3, it would loop 3 times, then return?

44
Script Debug / Re: Ore looter issues
« on: March 22, 2016, 05:19:15 AM »
Awesome!! Thank you so much!!

45
Script Debug / Ore looter issues
« on: March 21, 2016, 03:29:49 PM »
I have a written a small script that uses Snicker7's s7smeltonbeetle to loot ore off elementals.  The problem is sometimes it opens the corpse and does nothing but hide it.  It doesn't smelt the ore or loot the gems.  And when there is no corpse, it moves my backpack.  Any help would be really appreciated!!

Code: [Select]

set %loot HVF_UVF_FVF_EVF_OVF_VUF_GVF_RVF_BVF_VVF_NVF_ZVF_

event macro 3 0 All follow me

Start:
finditem YFM G_2
if finditem <> -1
{
set #lobjectid #findid
set %oreContainer #findid
event macro 17 0
wait 1s
contpos 100 0
wait 1s
gosub s7SmeltOnBeetle %oreContainer
  wait 1s
gosub gems
  wait 1s
hideitem %oreContainer
}
goto start:


;==============Loot Jewels============
sub gems
Gms:
finditem %loot C_ , %oreContainer
if #findkind = -1
{
return
}
exevent drag #findid #findstack
wait 20
exevent DropC #backpackid
wait 27
goto gms


;==============Smelt Ore============
;----
;* @name s7SmeltOnBeetle
;* @author snicker7
;* @ver 1.1 13Feb05
;* @purpose smelt all ore in specified container
;*      (default: backpack) on a firebeetle within
;*      2 tiles.
;* @params      %1      (optional) the container from
;*                      which to smelt ore. if none is
;*                      specified it defaults to backpack.
;* @returns     #true   if all ore was successfully smelted
;*              #false  fire beetle was not found within 2 tiles.
;* @notes props to Quintok for the specify container idea.
;* @example: gosub s7SmeltOnBeetle %oreContainer
;* @status done
;----
sub s7SmeltOnBeetle
        set #result #backpackid
        if %0 > 0 && %1 <> N/A
                set #result %1
        ignoreitem reset s7IOre
        finditem JJ G_2    ;jj
        if #findkind = -1
                return #false
        set #ltargetid #findid
        set #ltargetkind 1
        s7SmOB:
        finditem DWJ_EWJ_GWJ_TVJ C_ , #result
        if #findkind <> -1
        {
                if ( ( #findtype = TVJ && #findstack >= 2 ) || #findtype <> TVJ )
                {
                        set #lobjectid #findid
                        event macro 17 0
                        target
                        event macro 22 0
                        wait 10
                }
                if #findtype = TVJ && #findstack < 2
                        ignoreitem #findid s7IOre
                goto s7SmOB
        }
return #true



Pages: 1 2 [3] 4 5 6