Author Topic: stuck in loop  (Read 2709 times)

0 Members and 1 Guest are viewing this topic.

Offline Man7dowNTopic starter

  • Jr. Member
  • **
  • Posts: 31
  • Activity:
    0%
  • Reputation Power: 0
  • Man7dowN has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
stuck in loop
« on: February 25, 2019, 09:57:58 AM »
0
been using this site for years and other ppls scripts, so i decided  to try and make my own from scratch. i went threw cervezas  tutorials on this site which was fun.

current issue i am having is im stuck in a loop where it just wants to organize bag positions , i have made a sub to move containers to position and open them all, this works fine, i also made a sub to drop gold from a loot bag into a bank bag, this works fine, problem is when i combine them  i get stuck only moving containers around and not advancing to dropoff sub.
any help appreciated

Code: [Select]
SET %weight 200
SET %restockbag FTQDSPD
SET %lootbag ZRBNPMD
SET %dropbag RPYCWND
SET %dropoff pof_ZLF_

loop:
if #weight > %weight
    gosub opencontainers
    gosub bankdrop

   
GoTo loop


;;;;;;;;;;;;;;;;;;;;;
sub bankdrop

findItem %dropoff C_ , %lootbag
 wait 8
  if #findkind = -1
   halt
   if #findkind = 1
   {
   wait 10
   exevent drag #findid #findstack
   wait 10
   exevent dropc %dropbag
   }
   return


;;;;;;;;;;;;;;;;;;;;;;
sub opencontainers


event macro 8 1  ; paperdoll
wait 10
Contpos 1450 40
wait 10
event macro 8 7   ;backpack
wait 10
contpos 1050 200
wait 10
msg bank $       ;open bank
wait 10
contpos 850 200
wait 10
set #LObjectID %lootbag  ;lootbag
    event macro 17 0
    wait 10
Contpos 1450 400
wait 10
set #LObjectID %restockbag  ;lootbag
    event macro 17 0
    wait 10
Contpos 1050 400
return

Offline Man7dowNTopic starter

  • Jr. Member
  • **
  • Posts: 31
  • Activity:
    0%
  • Reputation Power: 0
  • Man7dowN has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: stuck in loop
« Reply #1 on: February 25, 2019, 10:55:23 AM »
0
got it all fixed, had an extra bracket screwing it up, added sub loop for item drop

HAPPY DAYS!!!!

Code: [Select]
SET %weight 200
SET %restockbag FTQDSPD
SET %lootbag ZRBNPMD
SET %dropbag RPYCWND
SET %dropoff pof_ZLF_

loop:
if #weight > %weight
    gosub opencontainers
    gosub bankdrop

   
GoTo loop


;;;;;;;;;;;;;;;;;;;;;
sub bankdrop
loop1:
findItem %dropoff C_ , %lootbag
 wait 8
  if #findkind = -1
   halt
   if #findkind = 1
   {
   wait 10
   exevent drag #findid #findstack
   wait 10
   exevent dropc %dropbag
   goto loop1
   return


;;;;;;;;;;;;;;;;;;;;;;
sub opencontainers


event macro 8 1  ; paperdoll
wait 10
Contpos 1450 40
wait 10
event macro 8 7   ;backpack
wait 10
contpos 1050 200
wait 10
msg bank $       ;open bank
wait 10
contpos 850 200
wait 10
set #LObjectID %lootbag  ;lootbag
    event macro 17 0
    wait 10
Contpos 1450 400
wait 10
set #LObjectID %restockbag  ;regs,aids
    event macro 17 0
    wait 10
Contpos 1050 400
return

Tags: