sk0tto Beginner
Joined: 19 Dec 2002 Posts: 14 Location: USA
|
Posted: Mon Jan 20, 2003 10:25 pm
Auto Sell Bot 2.0 |
I was looking through these scripts, and I decided to try out Darmir's autoeat script. After using it for a while, I realized that I could create a script that will go through your inventory and containers to sell all the eq that you want to get rid of. After some modifications (and quite a few headaches), I belive that it is ready to be posted.
I have include a button to toggle between three different types of eq: weapons, armor, and miscellaneous. You can use the aliases to add or delete items from the selected list.
Just as a warning, this script will sacrifice any equipment that it is unable to sell. I will highlight this section of code, and you can delete it so you don't accidentally sacrifice the wrong eq.
For help on this script, type eqhelp.
#CLASS {autosell}
#VAR eqcontainertypes {tent|bag}
#VAR haha {} {}
#VAR income {} {}
#VAR sold {} {}
#VAR loopcount {} {}
#VAR eqcontainercount {} {}
#VAR haveeq {}
#VAR yesno {Do you want to delete %item(@haveeq,1) from the master list?}
#VAR totalincome {643475}
#VAR Weap {flamberge|club|halberd|claw|whip|hammer|star|knife|pan|axe|pot|bayonet|hatchet|blade|sword|mace}
#VAR Arm {scapular|rope|robe|cape|crown|visor|beard|loincloth|armguard|belt|trousers|chest|leggings|habit}
#VAR msc {grog|sceptre|wand}
#VAR eqtypes {} {}
#VAR selltypes {} {}
#VAR closed {1}
#TRIGGER {HAHA .. it's not worth the air that surrounds it!} {#var haha 1}
#TRIGGER {I'm not interrested in clanned objects.} {#var haha 2}
#TRIGGER {The shop is shut, opening hours are 8:00am to 10:00pm} {#VAR closed 1}
#TRIGGER {You can't find it.} {#var sold 1}
#TRIGGER {You can't sell what you don't have} {#var sold 1}
#TRIGGER {You sell (*) for (%d) gold pieces.} {#add income %2}
#TRIGGER {You do not have that item.} {#var sold 1}
#CLASS 0
#CLASS {autosell|Aliases}
#ALIAS eqcondel {#delitem eqcontainertypes {%-1}}
#ALIAS eqhelp {%cr;#SHOW {<@bGreen>AutoSell 2.0 Help};#SHOW {<@bYellow>---------------------------------------------------------------------------};#SHOW {<@bGreen>This script will make selling your eq easier!};#SHOW {<@bGreen>eqadd <@bYellow>----------- <@bRed>add eq to the currently selected list};#SHOW {<@bGreen>eqdel <@bYellow>----------- <@bRed>delete eq from the currently selected list};#SHOW {<@bGreen>eqconadd <@bYellow>-------- <@bRed>add container to the container list};#SHOW {<@bGreen>eqcondel <@bYellow>-------- <@bRed>delete container from the container list};#SHOW {<@bGreen>eqshow <@bYellow>---------- <@bRed>shows the currently selected eq list and containers};#SHOW {<@bGreen>autosell <@bYellow>-------- <@bRed>use this to sell eq of the selected type}}
#ALIAS eqdel {#DELITEM @eqtypes {%-1}}
#ALIAS eqadd {#ADDITEM @eqtypes {%-1}}
#ALIAS eqconadd {#additem eqcontainertypes {%-1}}
#ALIAS eqshow {#SHOW {%crlf<@bGreen>@selltypes List};#SHOW {<@bGreen>-------------------};#LOOP 1,%numitems( @{@eqtypes}) {#SHOW {@bGreen%i~. <@bRed>%item( @{@eqtypes}, %i)}};#SHOW {%crlf<@bGreen>Container List};#SHOW {<@bGreen>-------------------};#LOOP 1,%numitems( @eqcontainertypes) {#SHOW {@bGreen%i~. <@bRed>%item( @eqcontainertypes, %i)}};%crlf}
#ALIAS equnload {#ECHO %crlf Everything has been sold. I have made @income coins!;#ADD totalincome @income;#ECHO So far, you have made @totalincome coins in total with this script.;#VARIABLE income {};#VARIABLE haveeq {};#VARIABLE haveeqcontainer {};#VARIABLE eqcontainercount {};#VARIABLE loopcount {};#VARIABLE sold {};#VARIABLE closed {}}
#ALIAS eqload {#VARIABLE haveeq {};#VARIABLE haveeqcontainer {};#VARIABLE haha 0;#VARIABLE income 0;#VARIABLE sold 0;#VARIABLE closed 0;#T+ eqcontainercheck;#T+ eqcheck;in;#WAIT 3000;#T- eqcontainercheck;#T- eqcheck;#VARIABLE haveeq %lower( @haveeq);#VARIABLE haveeq %dups( @haveeq)}
#ALIAS autosell {eqload;#VARIABLE loopcount 0;#VARIABLE income 0;#IF (%numitems( @haveeq)>0) { #UNTIL (%numitems( @haveeq)=0) { selleq}};#VARIABLE haveeq %delitem( %item( @haveeq, 1), @haveeq);#IF (@sold=1) {#ECHO i have no more eq on me.;#VARIABLE sold 0} { #ECHO i have no eq on me.};#IF (%numitems( @haveeqcontainer)>0) {#ECHO looking in containers...;#VARIABLE eqcontainercount %numitems( @haveeqcontainer);eqcheckcontainers} { #ECHO @bcyan i have no containers!}}
#ALIAS eqcheckcontainers {#VARIABLE sold 0;#VARIABLE haha 0;#ADD loopcount 1;#T+ eqcheck;#ECHO Now looking in %item( @haveeqcontainer, @loopcount).;look in %item( @haveeqcontainer, @loopcount);#WAIT 3000;#T- eqcheck;#VARIABLE haveeq %lower( @haveeq);#VARIABLE haveeq %dups( @haveeq);#IF (%numitems( @haveeq)>0) { #UNTIL (%numitems( @haveeq)=0) {get all.%item( @haveeq, 1) %item( @haveeqcontainer, @loopcount);selleq}};#IF (@loopcount<@eqcontainercount) {#ECHO i have no eq in %item( @haveeqcontainer, @loopcount).;eqcheckcontainers} {equnload}}
#ALIAS junkeq {#IF (@haha=1) {#ECHO Item is worthless...} {#ECHO Item is clanned...};#YESNO @yesno {#VARIABLE @eqtypes %delitem( %item( @haveeq, 1), @{@eqtypes})};drop all.%item( @haveeq, 1);#UNTIL (@sold=1) {sac %item( @haveeq, 1);#WAIT 1000}}
#ALIAS selleq {#VARIABLE sold 0;#UNTIL (@sold=1) {sell %item( @haveeq, 1);#WAIT 1000;#IF (@sold=1) {#VARIABLE haveeq {%delitem( %item( @haveeq, 1), @haveeq)}};#IF (@closed=1) {#ECHO store is closed...;equnload;#ABORT 1};#IF (@haha>0) {junkeq;#VARIABLE haveeq {%delitem( %item( @haveeq, 1), @haveeq)}};#VARIABLE haha 0}}
#CLASS 0
#CLASS {autosell|eqcontainercheck}
#TRIGGER {({@eqcontainertypes})} {#VAR haveeqcontainer %addItem( %1, @haveeqcontainer)}
#CLASS 0
#CLASS {autosell|eqcheck}
#TRIGGER {({@{@eqtypes}})} {#VARIABLE haveeq %additem( %1, @haveeq)}
#CLASS 0
#CLASS {autosell|Buttons}
#BUTTON 8 {Autosell @selltypes} {} {Weapons|Armor|Misc} {#VAR selltypes {Weapons} {} {autosell};#VAR eqtypes {weap} {} {autosell}|#VAR selltypes {Armor} {} {autosell};#VAR eqtypes {arm} {} {autosell}|#VAR selltypes {Misc} {} {autosell};#VAR eqtypes {msc} {} {autosell}} {} {} {} {Size} {115} {23} {} {} {} {10} {12|12|11} {} {} "" {Inset} {} {9} {2}
#CLASS 0 |
|