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

Pages: 1 ... 5 6 [7] 8
91
Script Debug / Help adding in a cut sub to a gather leather script
« on: July 01, 2013, 05:08:39 PM »
I am using a leather gatherer script and it loots the leather but does not cut it. I am trying to add a cut leather sub in it but not much luck. What did I do wrong?

SET %LOOT is at the beginning of the script EEG (pile of hides) is listed in the set %LOOT table

SUB GET_LOOT is by the original author, I added in the sub CUT_LOOT

AT the beginning of the script there is a main loop and I added GOSUB CUT_LOOT right after GOSUB GET_LOOT

Code: [Select]
;================================================
SUB GET_LOOT
  GOSUB CHECK_WEIGHT
  FINDITEM %LOOT C_ , %CORPSE_CONTAINER
  IF #FINDCNT > 0
  {
    FOR #FINDINDEX 1 #FINDCNT
    {
      EXEVENT DRAG #FINDID #FINDSTACK
      WAIT 20
      EXEVENT DROPC #BACKPACKID
      WAIT 20
    }
  }
  FINDITEM JJG C_ , #Backpackid
  IF #FINDCNT > 0
  {
    FOR #FINDINDEX 1 #FINDCNT
    {
      Event Property #Findid
      If Spined In #Property && %Bos_Option #False
      {
        EXEVENT DRAG #FINDID #FINDSTACK
        WAIT 20
        EXEVENT DROPC %Corpse_Container
        WAIT 20
      }
    }
  }
  IF #CHARPOSX <> %STARTX
  {
    REPEAT
      EVENT PATHFIND %STARTX %STARTY %STARTZ
      WAIT 40
    UNTIL #CHARPOSX = %STARTX %STARTY %STARTZ
  }
  WAIT 1
  HIDEITEM %NEW_CORPSE
  WAIT 1
RETURN
;================================================
SUB CUT_LOOT
finditem %LOOT C_ , #backpackid
  for #findindex 1 #findcnt
  {
    set #lobjectid %SCISSORS
    event macro 17
    target
    set #ltargetid #findid
    set #ltargetkind 1
    event macro 22
    wait 8
  }
RETURN

92
Code: [Select]
;===================================================================
;===================================================================
; Script Name: Crisis Inscription Trainer (Will become Crisis INscription Master after future updates.)
; Author: Crisis
; Version: 2.1
; Client Tested with: 7.0.31.0
; EUO version tested with: 1.5 (version 242)
; Shard OSI / FS: OSI
; Release Date: 06/27/2013
; Revision Date: N/A
; Purpose:
;     .Train Inscription 0-100
;
; Revisions:
;     . N/A
;
; Requirements:
;     . You need to have a resouce bag and a storage bag secured in your house or in a bank box.
;     . You must have all regs, blank scrolls, and iron ingots in your resource secure bag.
;     . You must have a completed scrolls bag secured in your house or in a bank box.
;     . You must have at least one tinker tool in your backpack.
;     . You must have enough tinkering to craft tinker tool kits and scribe pens.
;     . If you are using your bank box, you must must be at the bank say "bank" before starting the script.
;     . Choose EA or RUNUO hard coded at the beginning of the script.
;
; Future Updates:
;     . Craft individual scrolls in quantity (Magery, Necromancy, Mysticism)
;     . Craft Spellbooks and Runebooks
;     . Fill Spellbooks
;
; Special Thanks:
;     . Ximan for helping me immensly with setting this up and testing it.
;     . You taught me so much!
;
; Copyright: 2013 Crisis
;===================================================================
;===================================================================

I have a lot of plans for this script but started with just the trainer to begin with. Eventually it will be a one stop inscription script to include making individual scrolls in quantity, making spellbooks and runebooks, and of course filling the spellbooks.

Requirements:
1.  Resource bag (all magery regs, blank scrolls, and iron ingots) secured in your house or in your bank box
2.  Finished item bag secured in your house or in your bank box.
3.  Tinkering, need enough to craft tinker tool kits and scribe pens. (Will add on to make it look for tools in resource bag in the near future)
4.  You must have at least 1 tinker tool kit in your backpack.
5.  If you are using the bank, you must be at the bank and say "bank" before starting the script. (I will add this in for future release)

You can hard code the findid for your resource and finished item secures if you like.

I have tested this and it is working fine for me. I would love feedback and suggestions!!

UPDATE 07/01/2013
Added RUNUO Capability

UPDATE 01/01/2014
Added Hiding Capability

93
General UO Chat / Can Clean-up reward armor be enhanced?
« on: June 25, 2013, 10:16:02 AM »
I know it can be imbued, can it be enhanced as well? I am specifically referring to the fisherman's armor set right now which appears to be leather armor not including the hat but am curious about the other sets as well. I would love to add the extra resists from the horned and barbed leather, using the origin tool that guarantees success of course.

I wonder if it can be reforged? Probably not but I might get a cheap piece and give it a shot.

94
Off Topic / Losing my man card
« on: June 18, 2013, 06:24:48 AM »
I have 3 dogs, a 5 year old female Siberian Husky, a 6 month old female Siberian Husky, and a 5 month old  male German Sheppard. We will be taking the German Sheppard in to get him neutered next month. I can picture it now on the ride over to the vet.

German Sheppard: Dude!
Me: I am Sorry!!!  :(

German Sheppard: How could you?
Me: No choice. :(

German Sheppard:But I am living with a MILF and a hottie!!
Me: I am very very sorry!! :(

German Sheppard: What would you do in my situation?
Me: Stop trying to hump everything in front of my wife! :(

German Sheppard: Turn in your man card!
Me: I am so sorry! :(  *hands over card*


We are going to breed the females and they are AKC registered so his balls have to go. :(
Me: Dude, I am sorry!!

95
Script Debug / start/pause buttons for menus
« on: March 02, 2013, 10:01:51 AM »
I have the start working, Press the start button and it starts fishing and changes the start button to a pause button. When pressing the pause button,  I thought it would pause and change the pause button to a start button and wait for start to be pressed again. Where did I go wrong?

Code: [Select]
;Setup
set %fishingpole XHF_KDF
set %bones BJK_EJK_DJK_YIK_XIK_AJK_ZJK_KJK_FJK_ZIK
set %scissors KAG_JAG
gosub Menu
;===================================================================
sub Menu
menu Clear
menu Window Title Crisis SOS Fisher 2.0
menu Window Color Black
menu Window Size 186 57
menu Font Transparent #true
menu Font Align Right
menu Font Name MS Sans Serif
menu Font Size 10
menu Font Style
menu Font Color WindowText
menu Font BGColor Lime
menu Button Start_Button 44 12 95 33 Start Fishing
menu Show 421 270

if #menubutton <> N/A
     gosub menubuttons
or
if #menubutton = pause
     gosub pause
return
;===================================================================
sub menubuttons
menu HideEUO
  set #menubutton N/A
  repeat
  until #menubutton <> N/A
  menu delete start
    menu Font Color WindowText
     menu Font Size 10
    menu Font BGColor Red
    menu Button pause 44 12 95 33 Pause ; creates new button
 set #menubutton  N/A
 menu delete start
 gosub Fishing
repeat
until #menubutton = start
if #menubutton = start
 
;===================================================================
sub pause
set #menubutton N/A
  repeat
  until #menubutton <> N/A
  menu delete pause
    menu Font Color WindowText
     menu Font Size 10
    menu Font BGColor Green
    menu Button Start 44 12 95 33 Start ; creates new button
 set #menubutton  N/A
 menu delete pause
 gosub menubuttons
repeat
until #menubutton = pause
if #menubutton = pause

96
Scripting Chat / Borrowing menu design
« on: February 26, 2013, 11:46:39 AM »
What is the thought on borrowing someone's menu design and giving them credit for your own script? I contacted the author by pm on here in which the author has not logged in months and easyuo in which they were logged in at the beginning of the month. I am not sure if the author will see the pm's or respond. I do not want to do anything that would put me on the wrong path with the community, I just do not understand the menus very well. I know it is different then when people post subs for others to use. Thoughts and suggestions?

97
Script Debug / Moving Resources: Moving one item instead of stack
« on: February 26, 2013, 07:43:15 AM »
I am using Polonius's Move Resource Sub. I have looked this over a ton of times but best as I can tell the checkpotash sub is showing to check for a stack >=500 and then to move that 500. It is moving 1 piece of potash to the resource container but leaving the stack >=500. What am I missing?

Code: [Select]
;=========================================
Start:
Gosub Setup

;===================Sub Setup============================
Sub Setup
set %TinkerTools JTL_GTL_KTL
Set %Tongs OBG
Set %Boards TLK
Set %MortarPestle RQF
Set %EmptyPitcher WYF
Set %FullPitcher VBM
Set %Potash AFZ
Set %SaveList NWH_RCG_FCG_FKF
Set %DumpList
set %Ingots ENK
set %cwin 530_497            ; Crafting window size
set %gumpwait 1 ; Increase number to slow down clicks on menus.  20 = 1 second.
set %targetcursorwait 1 ; Increase number as above

Display Ok Select the container with your resources in it.
  set #targcurs 1
      while #targcurs = 1
         wait 1
      set %ResourceSecure #ltargetID
      set #lobjectID #ltargetID
      set #nextcposx 400
      set #nextcposy 0
      event macro 17
      wait 20
      {
      gosub mainmenu
      }
return

;===================Sub Main Menu======================
sub MainMenu
menu Clear
menu Window Title Crisis High Seas Munitions Factory
menu Window Color $FFFFFFFF
menu Window Size 190 130
menu Font Transparent #true
menu Font Align Right
menu Font Name Comic Sans MS
menu Font Size 8
menu Font Style b
menu Font Color Lime
menu Font Transparent #false
menu Font Align Left
menu Font BGColor $FFFFFFFF
menu Text EUOLabel1 63 0 Select One:
menu Font Name MS Sans Serif
menu Font Style
menu Font Color WindowText
menu Font BGColor Window
menu Font BGColor Lime
menu Button begin  64 62 55 25 Start
menu Font Name Comic Sans MS
menu Font Style b
menu Font Color Lime
menu Font BGColor $FFFFFFFF
menu Font Name MS Sans Serif
menu Font Style
menu Font Color WindowText
menu Font BGColor Window
menu Combo Create list 20 16 150
  menu Combo Add list Potash
menu Combo Add list Black Powder
menu Combo Add list Light Powder Charge
menu Combo Add list Heavy Powder Charge
menu Combo Add list Light Grapeshot
menu Combo Add list Light Cannonball
menu Combo Add list Heavy Grapeshot
menu Combo Add list Heavy Cannonball
menu Combo Add list Fuse Cord
menu Combo Add list Match Cord
menu Combo Add list Match
menu Combo Add list Swab
menu Combo Add list Ramrod
menu Show 421 270
  set #menubutton N/A
  repeat
  until #menubutton <> N/A
  menu delete begin
  menu hide
  menu get list
if #menures = 1
   set %craftable Potash
if #menures = 2
   set %craftable BlkPwdr
if #menures = 3
   set %craftable LtPwdrChg
if #menures = 4
   set %craftable HvyPwdrChg
if #menures = 5
   set %craftable LtGrpSht
if #menures = 6
   set %craftable LtCanBall
if #menures = 7
   set %craftable HvyGrpSht
if #menures = 8
   set %craftable HvyCanBall
;choosesitem %craftable

if %craftable = Potash
      {
      Display You must be next to a water trough and have a water pitcher in your backpack.
      gosub MakePotash
      }
if %craftable = BlkPwdr
      {
      gosub MakeBlackPowder
      }
if %craftable = LtPwdrChg
      {
      gosub LightPowderCharge
      }
if %craftable = HvyPwdrChg
      {
      gosub HeavyPowderCharge
      }
if %craftable = LtGrpSht
      {
      gosub LightGrapeShot
      }
if %craftable = LtCanBall
      {
      gosub LightCannonBall
      }
if %craftable = HvyGrpSht
      {
      gosub HeavyGrapeShot
      }
if %craftable = HvyCanBall
      {
      gosub HeavyCannonBall
      }
until #charghost = yes
return

;===================Sub Make Potash===========================
Sub MakePotash
    MakePotashLoop:
    finditem %Boards C_ , #backpackid
         if #findstack < 10
         {
         set %quantityinpack 100 - #findstack
         Gosub Move_Resource_To_Container %Boards 0 %ResourceSecure #BackpackID %quantityinpack
         If ! #Result
            {
            display You need to place more boards in your Resource Secure and hit play.
            pause
            GoTo MakePotashLoop
            }
         }
         {
         finditem %EmptyPitcher C_ , #backpackid
         gosub ENs_FillPitchersFromWaterTrough
         }
         {
         finditem %MortarPestle C_ , #backpackid
         set #lobjectid #findid
         If #findcnt < 2
         gosub MakeMortarPestle
         }
         event macro 17
              gosub waitforgump %cwin
              if ! #result
              {
              Display Dbl Click a mortar and pestle in your backpack and hit play
              Pause
              }
              gosub OffsetClick 25 190
              gosub waitforgump %cwin
              if ! #result
              {
              GoTo MakePotashLoop
              }
              Gosub OffSetClick 230 210 f
              gosub waitforgump %cwin
              if ! #result
              {
              GoTo MakePotashLoop
              }
              Gosub OffSetClick 281 452 f
              gosub waitforgump %cwin
              if ! #result
              {
              GoTo MakePotashLoop
              }
              gosub CheckPotash
              return
;================Sub Move Resource==========================
Sub CheckPotash
finditem %Potash C_ , #backpackid
              if #findstack >= 500
              {
              set %quantityinpack 500 - #findstack
              gosub Move_Resource_To_Container %Potash 1102 #BackpackID %ResourceSecure %quantityinpack
              }
              goto MakePotashLoop
              return
;================Sub Move Resource==========================
Sub Move_Resource_To_Container
; Sub moves a stackable resource from one container to another
; Checks Item Color to insure proper identification (Required)
; Will return #False if there are not enough of the resource
; #True with a successful move
;----------------------------------------------------------
; SAMPLE CALL Line
; Gosub Move_Resource_To_Container ItemType ItemColor ContainerIDSource ContainerIDDestination AmountToMve
;----------------------------------------------------------
namespace push
namespace local NCS
Set !ResourceItemType %1
Set !ResourceColor %2
Set !ResourceSource %3
Set !ResourceDestination %4
Set !ResourceCountToMove %5
Set !ResourceCountToMoveCheck %5
Finditem !ResourceItemType C_ , !ResourceSource
Set #findindex 0
Set #FindCol N/A
Set !ResourceLocated No
while #findindex < #findcnt && No in !ResourceLocated
      {
      set #findindex #findindex + 1
      If #FindCol = !ResourceColor && #FindStack < !ResourceCountToMove && #FindCnt > #findindex
         {
         exevent drag #FindID #FindStack
         Wait 15
         exevent dropc !ResourceDestination
         Wait 15
         Set !ResourceCountToMove !ResourceCountToMove - #FindStack
         Set #findindex 0
         Finditem !ResourceItemType C_ , !ResourceSource
         }
      If #FindCol = !ResourceColor && #FindStack >= !ResourceCountToMove
         {
         exevent drag #FindID !ResourceCountToMove
         Wait 15
         exevent dropc !ResourceDestination
         Wait 15
         Set !ResourceLocated Yes
         }
      }
If #FindIndex = 0 || No in !ResourceLocated
   {
   IgnoreItem Reset
   Namespace pop
   Return #False
   }
Finditem !ResourceItemType C_ , !ResourceDestination
Set #findindex 0
Set #FindCol N/A
Set !ResourceLocated No
while #findindex < #findcnt && No in !ResourceLocated
      {
      set #findindex #findindex + 1
      If #FindCol = !ResourceColor && #FindStack >= !ResourceCountToMoveCheck
         {
         Namespace pop
         IgnoreItem Reset
         Return #True
         }
      }
Namespace pop
Return #False

;=================sub ENs_FillPitchers======================
sub ENs_FillPitchersFromWaterTrough  ; %1= troughrange , defaults to 12 if nothing passed
 If %waterTroughTypes = N/A
  set %waterTroughTypes TEE_WEE_QEE_VEE
 IF  %emptypitcherTypes = N/A
    set %emptypitcher  WYF
 If %0 <> 1
   set %waterTroughRange 12
 finditem %waterTroughTypes G_ , %waterTroughRange
 If #Findcnt = 0
     event exmsg #charid 3 0 ERROR No Water Trough Found
 IF #findcnt > 0
   {
   set %WaterTroughId #findid
   finditem %emptypitcher C_ , #backpackid
   if #findcnt > 0
     {
     For #findindex 1 #findcnt
       {
       set #lobjectid #findid
       event exmsg #charid 3 0 Empty pitchers found, filling! #findindex of #findcnt
       event macro 17
       target 5s
       set #Ltargetkind 1
       set #ltargetid %WaterTroughID
       event macro 22
       wait 20
       }
     }
   }
return

;==================Sub Wait for Gump=========================
sub waitforgump
set %timeout #scnt + 10
while #contsize <> %1
      {
      wait 1
      if #scnt > %timeout
         {
          return #false
         }
      }
wait %gumpwait
return #true
;==================Sub Wait for Target Cursor================
sub WaitForTargetCursor
set %timeout #scnt + 4
Repeat
      wait %targetcursorwait
      if #scnt > %timeout
         return #false
Until #TARGCURS = 1
return #true



;=================Sub Offset Click===========================
sub OffsetClick
  set %tempx %1 + #CONTPOSX
  set %tempy %2 + #CONTPOSY
  click %tempx %tempy f
return


98
Script Debug / Error with Menu
« on: February 22, 2013, 05:19:07 PM »
Before I added the menu, the sub MakePotash looped perfectly and kept making potash until the resource bag ran out of boards. After adding the menu, when you choose potash, it goes through the loop once and sits idle. What did I do wrong? I am stumped on this. The other crafting subs have not been added yet, working on one sub at a time.

Code: [Select]
;=========================================
Start:
Gosub Setup
;=========================================
;--------- EasyUO Menu Designer Code Begin ---------
sub MainMenu
menu Clear
menu Window Title Crisis High Seas Munitions Factory
menu Window Color $FFFFFFFF
menu Window Size 190 130
menu Font Transparent #true
menu Font Align Right
menu Font Name Comic Sans MS
menu Font Size 8
menu Font Style b
menu Font Color Lime
menu Font Transparent #false
menu Font Align Left
menu Font BGColor $FFFFFFFF
menu Text EUOLabel1 63 0 Select One:
menu Font Name MS Sans Serif
menu Font Style
menu Font Color WindowText
menu Font BGColor Window
menu Font BGColor Lime
menu Button begin  64 62 55 25 Start
menu Font Name Comic Sans MS
menu Font Style b
menu Font Color Lime
menu Font BGColor $FFFFFFFF
menu Font Name MS Sans Serif
menu Font Style
menu Font Color WindowText
menu Font BGColor Window
menu Combo Create list 20 16 150
  menu Combo Add list Potash
menu Combo Add list Black Powder
menu Combo Add list Light Powder Charge
menu Combo Add list Heavy Powder Charge
menu Combo Add list Light Grapeshot
menu Combo Add list Light Cannonball
menu Combo Add list Heavy Grapeshot
menu Combo Add list Heavy Cannonball
menu Combo Add list Fuse Cord
menu Combo Add list Match Cord
menu Combo Add list Match
menu Combo Add list Swab
menu Combo Add list Ramrod
menu Show 421 270
  set #menubutton N/A
  repeat
  until #menubutton <> N/A
  menu delete begin
  menu hide
  menu get list
if #menures = 1
   set %item Potash
if #menures = 2
   set %item BlkPwdr
if #menures = 3
   set %item LtPwdrChg
if #menures = 4
   set %item HvyPwdrChg
if #menures = 5
   set %item LtGrpSht
if #menures = 6
   set %item LtCanBall
if #menures = 7
   set %item HvyGrpSht
if #menures = 8
   set %item HvyCanBall
choosesitem %item
return
if %item = Potash
      {
      gosub MakePotash
      }
   if %Item = BlkPwdr
      {
      gosub MakeBlackPowder
      }
if %item = LtPwdrChg
      {
      gosub LightPowderCharge
      }
if %item = HvyPwdrChg
      {
      gosub HeavyPowderCharge
      }
if %Item = LtGrpSht
      {
      gosub LightGrapeShot
      }
if %Item = LtCanBall
      {
      gosub LightCannonBall
      }
if %Item = HvyGrpSht
      {
      gosub HeavyGrapeShot
      }
if %Item = HvyCanBall
      {
      gosub HeavyCannonBall
      }
until #charghost = yes
while #charGhost = YES
  wait 0
  return

;===================Sub Setup============================
Sub Setup
set %TinkerTools JTL_GTL_KTL
Set %Tongs OBG
Set %Boards TLK
Set %MortarPestle RQF
Set %EmptyPitcher WYF
Set %FullPitcher VBM
Set %SaveList NWH_RCG_FCG_FKF
Set %DumpList
set %Ingots ENK
set %cwin 530_497            ; Crafting window size
set %gumpwait 1 ; Increase number to slow down clicks on menus.  20 = 1 second.
set %targetcursorwait 1 ; Increase number as above

Display Ok Select the container with your resources in it.
  set #targcurs 1
      while #targcurs = 1
         wait 1
      set %ResourceSecure #ltargetID
      set #lobjectID #ltargetID
      set #nextcposx 400
      set #nextcposy 0
      event macro 17
      wait 20
      {
      gosub mainmenu
      }
return

;===================Sub Make Potash===========================
Sub MakePotash
    Display You must be next to a water trough and have a water pitcher in your backpack.
    MakePotashLoop:
    finditem %Boards C_ , #backpackid
         if #findstack < 10
         {
         set %quantityinpack 100 - #findstack
         Gosub Move_Resource_To_Container %Boards 0 %ResourceSecure #BackpackID %quantityinpack
         If ! #Result
            {
            display You need to place more boards in your Resource Secure and hit play.
            pause
            GoTo MakePotashLoop
            }
         }
         finditem %EmptyPitcher C_ , #backpackid
         {
         gosub ENs_FillPitchersFromWaterTrough
         }
         finditem %MortarPestle C_ , #backpackid
         set #lobjectid #findid
         If #findcnt < 2
         gosub MakeMortarPestle
         event macro 17
              gosub waitforgump %cwin
              if ! #result
              {
              Display Dbl Click a mortar and pestle in your backpack and hit play
              Pause
              }
              gosub OffsetClick 25 190
              gosub waitforgump %cwin
              if ! #result
              {
              GoTo MakePotashLoop
              }
              Gosub OffSetClick 230 210 f
              gosub waitforgump %cwin
              if ! #result
              {
              GoTo MakePotashLoop
              }
              Gosub OffSetClick 281 452 f
              gosub waitforgump %cwin
              if ! #result
              {
              GoTo MakePotashLoop
              }
              return

;========================Sub Make TinkerKit==================
Sub MakeTinkerKit
    MakeKitLoop:
    finditem %Ingots C_ , #backpackid
         if #findstack < 10
         {
         set %quantityinpack 10 - #findstack
         Gosub Move_Resource_To_Container %Ingots 0 %ResourceSecure #BackpackID %quantityinpack
         If ! #Result
            {
            display You need to place more ingots in your Resource Secure and hit play.
            pause
            GoTo MakeKitLoop
            }
         }
         finditem %TinkerTools C_ , #backpackid
         set #lobjectid #findid
         event macro 17
              gosub waitforgump %cwin
              if ! #result
              {
              Display Dbl Click a tinker kit in your backpack and hit play
              Pause
              }
              Gosub OffSetClick 30 130
              gosub waitforgump %cwin
              if ! #result
              {
              GoTo MakeKitLoop
              }
              Gosub OffSetClick 230 130 f
              gosub waitforgump %cwin
              if ! #result
              {
              GoTo MakeKitLoop
              }
              Gosub OffSetClick 230 130 f
              gosub waitforgump %cwin
              if ! #result
              {
              GoTo MakeKitLoop
              }
         Return
         
;======================Sub Make MortarPestle======================
Sub MakeMortarPestle
    MakeMortarPestleLoop:
    finditem %Ingots C_ , #backpackid
         if #findstack < 10
         {
         set %quantityinpack 10 - #findstack
         Gosub Move_Resource_To_Container %Ingots 0 %ResourceSecure #BackpackID %quantityinpack
         If ! #Result
            {
            display You need to place more ingots in your Resource Secure and hit play.
            pause
            GoTo MakeMortarPestleLoop
            }
         }
         finditem %TinkerTools C_ , #backpackid
         set #lobjectid #findid
         If #findcnt < 2
         gosub MakeTinkerKit
         event macro 17
              gosub waitforgump %cwin
              if ! #result
              {
              Display Dbl Click a tinker tool in your backpack and hit play
              Pause
              }
              gosub OffsetClick 27 129
              gosub waitforgump %cwin
              if ! #result
              {
              GoTo MakeKitLoop
              }
              Gosub OffSetClick 232 89 f
              gosub waitforgump %cwin
              if ! #result
              {
              GoTo MakeKitLoop
              }
              Gosub OffSetClick 281 451 f
              gosub waitforgump %cwin
              if ! #result
              {
              GoTo MakeKitLoop
              }
              Gosub OffSetClick 281 451 f
              gosub waitforgump %cwin
              if ! #result
              {
              GoTo MakeKitLoop
              }
         Return
         
;================== Wait for gump ======================
sub waitforgump
set %timeout #scnt + 10
while #contsize <> %1
      {
      wait 1
      if #scnt > %timeout
         {
          return #false
         }
      }
wait %gumpwait
return #true
;================== Wait for Target Cursor ================
sub WaitForTargetCursor
set %timeout #scnt + 4
Repeat
      wait %targetcursorwait
      if #scnt > %timeout
         return #false
Until #TARGCURS = 1
return #true

;==========================================================
Sub Move_Resource_To_Container
; Sub moves a stackable resource from one container to another
; Checks Item Color to insure proper identification (Required)
; Will return #False if there are not enough of the resource
; #True with a successful move
;----------------------------------------------------------
; SAMPLE CALL Line
; Gosub Move_Resource_To_Container ItemType ItemColor ContainerIDSource ContainerIDDestination AmountToMve
;----------------------------------------------------------
namespace push
namespace local NCS
Set !ResourceItemType %1
Set !ResourceColor %2
Set !ResourceSource %3
Set !ResourceDestination %4
Set !ResourceCountToMove %5
Set !ResourceCountToMoveCheck %5
Finditem !ResourceItemType C_ , !ResourceSource
Set #findindex 0
Set #FindCol N/A
Set !ResourceLocated No
while #findindex < #findcnt && No in !ResourceLocated
      {
      set #findindex #findindex + 1
      If #FindCol = !ResourceColor && #FindStack < !ResourceCountToMove && #FindCnt > #findindex
         {
         exevent drag #FindID #FindStack
         Wait 15
         exevent dropc !ResourceDestination
         Wait 15
         Set !ResourceCountToMove !ResourceCountToMove - #FindStack
         Set #findindex 0
         Finditem !ResourceItemType C_ , !ResourceSource
         }
      If #FindCol = !ResourceColor && #FindStack >= !ResourceCountToMove
         {
         exevent drag #FindID !ResourceCountToMove
         Wait 15
         exevent dropc !ResourceDestination
         Wait 15
         Set !ResourceLocated Yes
         }
      }
If #FindIndex = 0 || No in !ResourceLocated
   {
   IgnoreItem Reset
   Namespace pop
   Return #False
   }
Finditem !ResourceItemType C_ , !ResourceDestination
Set #findindex 0
Set #FindCol N/A
Set !ResourceLocated No
while #findindex < #findcnt && No in !ResourceLocated
      {
      set #findindex #findindex + 1
      If #FindCol = !ResourceColor && #FindStack >= !ResourceCountToMoveCheck
         {
         Namespace pop
         IgnoreItem Reset
         Return #True
         }
      }
Namespace pop
Return #False

;============================================
sub OffsetClick
  set %tempx %1 + #CONTPOSX
  set %tempy %2 + #CONTPOSY
  click %tempx %tempy f
return

;============================================
sub ENs_FillPitchersFromWaterTrough  ; %1= troughrange , defaults to 12 if nothing passed
 If %waterTroughTypes = N/A
  set %waterTroughTypes TEE_WEE_QEE_VEE
 IF  %emptypitcherTypes = N/A
    set %emptypitcher  WYF
 If %0 <> 1
   set %waterTroughRange 12
 finditem %waterTroughTypes G_ , %waterTroughRange
 If #Findcnt = 0
     event exmsg #charid 3 0 ERROR No Water Trough Found
 IF #findcnt > 0
   {
   set %WaterTroughId #findid
   finditem %emptypitcher C_ , #backpackid
   if #findcnt > 0
     {
     For #findindex 1 #findcnt
       {
       set #lobjectid #findid
       event exmsg #charid 3 0 Empty pitchers found, filling! #findindex of #findcnt
       event macro 17
       target 5s
       set #Ltargetkind 1
       set #ltargetid %WaterTroughID
       event macro 22
       wait 20
       }
     }
   }
return

99
I have just about finished with my first crafting script but have a couple of questions.

1. I found a sub to take items from a secure to a backpack but not sure about reversing that. I want it to move it to the secure once it hits a stack of 100. I tried this command
Code: [Select]
         finditem %Potash C_ , #backpackid
         If #findcnt > 100
         {
         set %quantityinresourcesecure 100 - #findstack
         Gosub Move_Resource_To_Secure %Potash 0 #BackpackID %ResourceSecure %quantityinpack
         }

I am using Polinius' Move Resources Sub

2. I am also wanting to set the script to stop making them at a desired number that the user enters. Right now, the script will run until the user runs out of resources.

Any help would be greatly appreciated and keep in mind I am a complete noob but I am trying!

100
Scripting Chat / Crafting Script Question
« on: February 18, 2013, 05:51:13 PM »
Ok I am trying to learn more about scripting and I am more of a hands on person. I have read the tutorials which were very helpful but I didn't see one that addressed crafting. I am dissecting Paulonius' Blacksmith Script and can not figure out how or where he gets the numbers to tell the mouse where to click. (Well if I am understanding this sub correctly anyways)

Code: [Select]
;======================================================================
sub InitTinkerGump    ; Makes sure you have two kits and sets it to use iron
    finditem %Tinkertools C_ , #backpackid
      if #findcnt < 1
         {
          display Get a tinker tool in your backpack and restart the script.
          halt
         }
      if #findcnt < 2
      {
       gosub MakeTinkerKit
      }
      TinkerSetLoop:
      finditem %Tinkertools C_ , #backpackid
      set #lobjectid #findid
         event macro 17
               gosub waitforgump %cwin
              if ! #result
              {
              Goto TinkerSetLoop
              }
         Gosub OffSetClick 30 370
               gosub waitforgump %cwin
              if ! #result
              {
              Goto TinkerSetLoop
              }
         Gosub OffSetClick 230 70
               gosub waitforgump %cwin
               if ! #result
               {
              Goto TinkerSetLoop
               }
         Gosub OffSetClick 30 450
         wait 5
Return


If I am understanding it correctly, the numbers in this tell the mouse where to click?
Code: [Select]
Gosub OffSetClick 30 450
If so, how did he get those numbers to tell what location to click in?

101
Scripting Chat / Easyuo script programming language?
« on: February 09, 2013, 01:17:00 AM »
I was wondering if easyuo scripts are based off of a specific programming language? I would like to understand more of what I kind of guess my way through.

102
Jokes! / Breasts
« on: May 26, 2012, 05:39:06 AM »
One day an at home wife is alone and the doorbell rings.

She opens it to a guy, "Hi, is Tony home?"

The wife replies, "No, he went to the store, but you can wait here if you want."

So they sit down and after a while of silence the friend says "You know Sara, you have the greatest breasts I have ever seen. I'd give you a hundred bucks just to see one."

Sara thinks about it for a second and figures, what the hell - a hundred bucks! She opens her robe and shows one to him for a few seconds. He promptly thanks her and throws a hundred bucks on the table. They sit there a while longer and guy then says "That was so amazing I've got to see both of them. I'll give you another 100 dollars if I could just see the both of them together."

Sara amazed by the offer sits and thinks a bit about it and thinks, heck, why not? So she opens her robe and gives Chris a nice long chance to cop a look.

A while later Tony arrives back home from the store. The wife goes up to him, "You know, your friend Chris came over."

Tony thinks about it for a second and says, "Well did he drop off the 200 bucks he owes me?"

103
Jokes! / Sandals
« on: May 21, 2012, 03:25:01 PM »
A married couple was on holiday in Pakistan. They were touring around the marketplace looking at the goods and such, when they passed a small sandal shop. From inside they heard a gentleman with a Pakistani accent say, "You foreigners! Come in. Come into my humble shop."

So the couple walked in and the shopkeeper says to them, "I have some special sandals I think you would be interested in. They have special power. Dey make you wild at sex like a great desert camel." Well, the wife was really interested in buying the sandals after what the shopkeeper claimed, but her husband felt he really didn't need them, being the sex God he was.

The husband asked the man, "How could sandals improve my abilities?" The Pakistani man replied, "Just try dem on, Saiheeb. The sandals will prove it to you." Well, the husband, after much badgering from his wife, finally conceded to try them on. As soon as he slipped them onto his feet, he got this wild look in his eyes; something his wife hadn't seen in many years: raw sexual power!

In a blink of an eye, the husband grabbed the Pakistani man, bent him violently over a table, yanked down the man's pants and his own, and grabbed firm hold of the Pakistani's thighs. The Pakistani then began screaming, "YOU HAVE DEM ON DE WRONG FEET!"

104
Jokes! / rowboat
« on: May 17, 2012, 02:23:14 PM »
Once there were twin brothers by the name of Jones. John Jones was married, and Joe Jones was single. The single brother Joe was the proud owner of a dilapidated row boat. It happened that John Jone's wife died the same day that Joe's rowboat filled with water and sank.

A few days later, a kindly old lady met Joe and mistaken him for John said; "Oh Mr. Jones, I am sorry to hear of your great loss, you must feel terrible".

Joe smiled and said, "Well I am not a bit sorry, she was rather old from the start. Her bottom was all chewed up and she smelled of dead fish. Even the first time I got into her, she made water faster than anything I ever saw. She had a bad crack and a pretty big hole in her front, and that hole got bigger every time I used her. It got so I could barely handle her, but if anyone else used her she leaked like anything. The thing that finished her was four guys from the other side of town. They came down looking for a good time and asked if I could lend her to them. I warned them she wasn't so hot, but they could take a crack at her if they liked. Well, the result was the crazy fools tried to get inside her all at once and it was too much for her. She cracked right up the middle".

Before he could finish the old lady fainted!

105
Jokes! / Liar
« on: May 15, 2012, 12:49:48 PM »
A man tells his wife that he's going out to buy cigarettes. When he gets to the store he finds out it's closed. So the guy ends up going to the bar to use the vending machine. While there, he has a few beers and begins talking to this beautiful girl. He has a few more beer and the next thing he knows he's in this girl's apartment and having quite a pleasurable time. The next thing he know it was 3:00 AM.

"Oh my, god, my wife is going to kill me!" he exclaimed. "Quick give me some talcum powder!"

She gets him some and he rubs it all over his hands. When he got home his wife is up waiting for him and she's furious. "Where the hell have you been!"

He says, "Well to tell you the truth, I went into a bar, had a few drinks, went home with this blonde and I slept with her." "Let me see your hands!" she demands. He shows his wife his powdery hands.

"Damn liar, you were out bowling again!"  8)

Pages: 1 ... 5 6 [7] 8