Author Topic: Scripting help please?  (Read 3412 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
Scripting help please?
« on: January 02, 2011, 06:24:14 PM »
0
Ok I am new to writing scripts, so I don't know all the stuff about it but I have been reading all the tutorials I can get my hands on. So I have a question: How do you drag 80 cloth from a giant beetle and put it in your backpack? And can you explain how this works if its not to much to ask? I know you use the event drag but I can't figure out how to specify that I only want 80 cloth.... This is what I have so far:
sub %get_cloth
 findItem CUI
 event drag
Now how do I specify how many cloth and specify to put it in my pack?
Thank you in advance to whoever helps me out!

Offline Dixie Wrecked

  • Full Member
  • ***
  • Posts: 124
  • Activity:
    0%
  • Reputation Power: 3
  • Dixie Wrecked has no influence.
  • Gender: Male
  • Respect: +31
  • Referrals: 1
    • View Profile
Re: Scripting help please?
« Reply #1 on: January 02, 2011, 06:56:01 PM »
0
OK, I am going to assume you're correct on CUI being the right ID for cloth, but here is one way to do it:

Code: [Select]
sub get_cloth ; note no % in the sub name
finditem CUI c_ , %beetlebackpack ; assumes you have the ID for the beetle's backpack set to the variable %beetlebackpack, since you said you wanted to find it in the beetlepack; also assumes the beetle's pack is opened already as well
if #findcnt > 0
  {
  exevent drag #findid 80 ; the 80 tells it to drag 80; using #findstack would drag the entire stack
  wait 10
  exevent dropc #backpackid ; drops into your char's backpack
  wait 10
  }
return ; this will exit the sub, but the script won't know if it moved anything; using return #FALSE would be a way to say it failed, but "return #TRUE" should be inserted between "wait 10" and "}" above if you want to let the script know if the move was successful

Also, the "wait 10"s may not be needed, but I usually leave them in when I know I may experience lag.
"hmm, theres no examples and directions sticky in new member intros.  you have to admit script library would have been a good place to put it"
- karrde

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: Scripting help please?
« Reply #2 on: January 03, 2011, 07:24:55 AM »
0
Thank you soooo much that makes more sense now. :)

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: Scripting help please?
« Reply #3 on: January 08, 2011, 08:18:50 AM »
0
Ok new question: How do I use the buttons on a sewing kit menu? I already figured out how to find and use the sewing kit, but everytime it opens, wherever my cursor is, the middle of the menu is there (does that make any sense?) so that makes it to if i use the click command in a certain x and y axis on easy uo program, and the button isnt there, then it won't work. So I was wondering if anyone could help me out with using the buttons on the menu...

Post Merge: January 08, 2011, 04:20:37 PM
Is it even possible to use easyuo to craft stuff using buttons not clicking?

Post Merge: January 09, 2011, 01:09:34 PM
Ok Dixie Wrecked I put in your what you said about draging the cloth... but it won't work. Did I do it wrong? This is what it looks like:
sub restock
 finditem %cloth c_ , %beetlepackid
 if #findcnt > 0
  {
  exevent drag %cloth 80
  wait 10
  exevent dropc #backpackid
  wait 10
  }
return
« Last Edit: January 09, 2011, 01:09:34 PM by Pop Rock »

Scrripty

  • Guest
Re: Scripting help please?
« Reply #4 on: January 16, 2011, 11:23:33 AM »
0
You should really make that bottom wait 10 a wait 20 on OSI shards. :)  You can also take that middle wait 10 out completely with a decent connection.

Offline dxrom

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: Scripting help please?
« Reply #5 on: January 16, 2011, 11:49:28 AM »
0
Is the beetle's bag open? You may need to write a script that opens the bag before you can pull cloth out.



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline Dixie Wrecked

  • Full Member
  • ***
  • Posts: 124
  • Activity:
    0%
  • Reputation Power: 3
  • Dixie Wrecked has no influence.
  • Gender: Male
  • Respect: +31
  • Referrals: 1
    • View Profile
Re: Scripting help please?
« Reply #6 on: January 16, 2011, 02:52:08 PM »
0

Post Merge: January 09, 2011, 01:09:34 PM
Ok Dixie Wrecked I put in your what you said about draging the cloth... but it won't work. Did I do it wrong? This is what it looks like:
sub restock
 finditem %cloth c_ , %beetlepackid
 if #findcnt > 0
  {
  exevent drag %cloth 80
  wait 10
  exevent dropc #backpackid
  wait 10
  }
return

Without seeing all of the code, there might be other problems, but a few things to make sure of:
1) you have set %cloth XXX somewhere above this (where XXX is the ID for cloth)
2) it should be exevent drag #findid 80, not exevent drag %cloth 80 (compare it to my original post and you'll see it also said #findid)
3) make sure the beetle's backpack is open; if not, then it can't find anything to drag
4) As Twinkle McNugget said, the waits may need to be changed/deleted, although I find that I need them sometimes, so I just let them stay (you'll have to test it yoursself, as everyone's connection is different)
"hmm, theres no examples and directions sticky in new member intros.  you have to admit script library would have been a good place to put it"
- karrde

Scrripty

  • Guest
Re: Scripting help please?
« Reply #7 on: January 16, 2011, 03:24:14 PM »
0
After an exevent drop of any type you really should have a wait 20.  Not a wait 10. ;)

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: Scripting help please?
« Reply #8 on: January 20, 2011, 04:05:28 PM »
0
Haha that worked thanks guys :)

Tags: