Author Topic: BoS sub help please??  (Read 2079 times)

0 Members and 1 Guest are viewing this topic.

Offline Pop RockTopic starter

  • Jr. Member
  • **
  • Posts: 51
  • Activity:
    0%
  • Reputation Power: 1
  • Pop Rock has no influence.
  • Respect: +12
  • Referrals: 1
    • View Profile
BoS sub help please??
« on: April 09, 2011, 06:59:03 AM »
0
Ok I'm trying to make a BoS sub to to look for the BoS, a certain item, if there is that certain item there, use the BoS on it and then return to the script, so far i have this...

set %bosid CKF

gosub sendkits

sub sendkits
finditem HAG C_ , #backpackid
 if #findkind = -1
 {
  return
 }
 else
  {
   finditem %bosid C_ , #backpackid
   set #lobjectid %bosid
   set #ltargetid HAG
   event macro 17 0
   wait 5s
   event macro 22 0
   return
  }

Am i doing this right?? I looked at TM's sub but that won't work for me becasue I dont need a certain weight to send it... So I decided to make my own and i'm having trouble.. can anyone help me??

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: BoS sub help please??
« Reply #1 on: April 09, 2011, 09:04:05 AM »
0

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: BoS sub help please??
« Reply #2 on: April 09, 2011, 09:12:27 AM »
0
First off, nice job working this out on your own so far!

I would suggest that you make the BOS sub a little more generic so that you can pass it the ID of the item you would like to target, so for example "Gosub BOS %Goldtypes" or "Gosub BOS %KitTypes", etc. That way you can use the same sub in any script you want to put it into :)

That's not what you asked though so as for your question, you'll need to add "set #ltargetkind 1" in there for starters.  Also, HAG is the ItemType, not ItemID. You should set the LtargetID to your #findID.

Just a couple other "constructive" thoughts, 5 seconds is a pretty long timer for that action unless you are playing with extreme lag. You can certainly keep it that long but definitely not necessary. Also, an If statement that has only one line in the action doesn't require {} - again, you can definitely keep them there, some people like doing that just as a standard, but you don't have to. If there's more than one line you need the {}.

Keep working it!

X
« Last Edit: April 09, 2011, 09:20:31 AM by 12TimesOver »
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline Pop RockTopic starter

  • Jr. Member
  • **
  • Posts: 51
  • Activity:
    0%
  • Reputation Power: 1
  • Pop Rock has no influence.
  • Respect: +12
  • Referrals: 1
    • View Profile
Re: BoS sub help please??
« Reply #3 on: April 09, 2011, 01:41:23 PM »
0
Ok, I've talked with one of my scripter friends and this is what I've come up with:

Code: [Select]
set %bosid CKF
set %lootbag MUNJOMD

gosub sendkits

sub sendkits
finditem HAG C_ , %lootbag
set %tool #findid
if #findcnt = 0
return

finditem %bosid C_ , #backpackid
if #findcnt = 0 
{
  Event sysmessage NO BOS!!
  return
}
set #lobjectid %bosid
set #ltargetid %tool
set #ltargetkind 1
event macro 17 0
target event macro 22 0
return
}
But what is happening now is nothing it's like the script can't find anything... and he can't figure it out either :/ Can anyone help?

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: BoS sub help please??
« Reply #4 on: April 10, 2011, 02:19:00 AM »
0
What is the value of %bosid?
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Tags: