Jasc Posted June 19, 2014 Share Posted June 19, 2014 This is an automatic selling of an item upon finding it. Sort of like @autoloot, instead it auto sells an item which is great for zeny farming purposes. autosell.txt Quote Link to comment Share on other sites More sharing options...
Moriarty Posted June 26, 2014 Share Posted June 26, 2014 (edited) You should check if the player has any skill that make the sell price higher.Beside this, great script Althought, there is a lot of repetead code that you could eliminate using getd and setd. Edited June 26, 2014 by Moriarty Quote Link to comment Share on other sites More sharing options...
Worst Posted July 12, 2014 Share Posted July 12, 2014 (edited) Jasc Hello, I would like some help on the command @ autosellI put the script on my server but how do I work Added the npc and added in scripts_custom.conf I tried using @ autosell, autosellid @, @ autoselling and none worked please help me Edited July 12, 2014 by Worst Quote Link to comment Share on other sites More sharing options...
EL Dragon Posted July 12, 2014 Share Posted July 12, 2014 - script autosellid -1,{ OnInit: bindatcmd "autosellidoff",strnpcinfo(3)+"::Onoff"; bindatcmd "autosellid1",strnpcinfo(3)+"::Onauto1"; bindatcmd "autosellid2",strnpcinfo(3)+"::Onauto2"; bindatcmd "autosellid3",strnpcinfo(3)+"::Onauto3"; bindatcmd "autosellid4",strnpcinfo(3)+"::Onauto4"; bindatcmd "autosellid5",strnpcinfo(3)+"::Onauto5"; end; Onauto1: set autosellid, 1; if(autosellid == 1) {set autosellid,1; dispbottom "Input itemid number."; input [email protected]; set autosellidnum,[email protected]; dispbottom "Now AutoSelling item: "+getitemname([email protected])+" ID: "[email protected]+""; dispbottom "Auto Sell Slot 1"; end; } Onauto2: set autosellid2, 1; if(autosellid2 == 1) {set autosellid2,1; dispbottom "Input itemid number."; input [email protected]; set autosellidnum2,[email protected]; dispbottom "Now AutoSelling item: "+getitemname([email protected])+" ID: "[email protected]+""; dispbottom "Auto Sell Slot 2"; end; } Onauto3: set autosellid3, 1; if(autosellid3 == 1) {set autosellid3,1; dispbottom "Input itemid number."; input [email protected]; set autosellidnum3,[email protected]; dispbottom "Now AutoSelling item: "+getitemname([email protected])+" ID: "[email protected]+""; dispbottom "Auto Sell Slot 3"; end; } Onauto4: set autosellid4, 1; if(autosellid4 == 1) {set autosellid4,1; dispbottom "Input itemid number."; input [email protected]; set autosellidnum4,[email protected]; dispbottom "Now AutoSelling item: "+getitemname([email protected])+" ID: "[email protected]+""; dispbottom "Auto Sell Slot 4"; end; } Onauto5: set autosellid5, 1; if(autosellid5 == 1) {set autosellid5,1; dispbottom "Input itemid number."; input [email protected]; set autosellidnum5,[email protected]; dispbottom "Now AutoSelling item: "+getitemname([email protected])+" ID: "[email protected]+""; dispbottom "Auto Sell Slot 5"; end; } Onoff: set autosellid, 0; set autosellid2, 0; set autosellid3, 0; set autosellid4, 0; set autosellid5, 0; dispbottom "Autosellid is now off for all slots."; end; Onauto6: set autosellr, 0; dispbottom "Autosellrate is now off."; end; } - script autosell1 -1,{ OnNPCKillEvent: if (autosellid != 1 && autosellid2 != 1 && autosellid3 != 1 && autosellid4 != 1 && autosellid5 != 1){end;} getinventorylist; if (autosellid == 1) callfunc "LootIDCheck1"; end; } - script autosell12 -1,{ OnNPCKillEvent: if (autosellid != 1 && autosellid2 != 1 && autosellid3 != 1 && autosellid4 != 1 && autosellid5 != 1){end;} getinventorylist; if (autosellid2 == 1) callfunc "LootIDCheck2"; end; } - script autosell3 -1,{ OnNPCKillEvent: if (autosellid != 1 && autosellid2 != 1 && autosellid3 != 1 && autosellid4 != 1 && autosellid5 != 1){end;} getinventorylist; if (autosellid3 == 1) callfunc "LootIDCheck3"; end; } - script autosell4 -1,{ OnNPCKillEvent: if (autosellid != 1 && autosellid2 != 1 && autosellid3 != 1 && autosellid4 != 1 && autosellid5 != 1){end;} getinventorylist; if (autosellid4 == 1) callfunc "LootIDCheck4"; end; } - script autosell5 -1,{ OnNPCKillEvent: if (autosellid != 1 && autosellid2 != 1 && autosellid3 != 1 && autosellid4 != 1 && autosellid5 != 1){end;} getinventorylist; if (autosellid5 == 1) callfunc "LootIDCheck5"; end; } function script LootIDCheck1 { for(set [email protected],0; [email protected]<@inventorylist_count; set [email protected],[email protected]+1) {if(@inventorylist_id[[email protected]] == autosellidnum && @inventorylist_amount[[email protected]] >= 1) {set [email protected],getiteminfo(autosellidnum,1); set zeny,zeny + [email protected]*@inventorylist_amount[[email protected]]; delitem @inventorylist_id[[email protected]],@inventorylist_amount[[email protected]];}} end; } function script LootIDCheck2 { for(set [email protected],0; .[email protected]<@inventorylist_count; set [email protected],[email protected]+1) {if(@inventorylist_id[[email protected]] == autosellidnum2 && @inventorylist_amount[[email protected]] >= 1) {set [email protected],getiteminfo(autosellidnum2,1); set zeny,zeny + [email protected]*@inventorylist_amount[[email protected]]; delitem @inventorylist_id[[email protected]],@inventorylist_amount[[email protected]];}} end; } function script LootIDCheck3 { for(set [email protected],0; [email protected]<@inventorylist_count; set [email protected],[email protected]+1) {if(@inventorylist_id[[email protected]] == autosellidnum3 && @inventorylist_amount[[email protected]] >= 1) {set [email protected],getiteminfo(autosellidnum3,1); set zeny,zeny + [email protected]*@inventorylist_amount[[email protected]]; delitem @inventorylist_id[[email protected]],@inventorylist_amount[[email protected]];}} end; } function script LootIDCheck4 { for(set [email protected],0; [email protected]<@inventorylist_count; set [email protected],[email protected]+1) {if(@inventorylist_id[[email protected]] == autosellidnum4 && @inventorylist_amount[[email protected]] >= 1) {set [email protected],getiteminfo(autosellidnum4,1); set zeny,zeny + [email protected]*@inventorylist_amount[[email protected]]; delitem @inventorylist_id[[email protected]],@inventorylist_amount[[email protected]];}} end; } function script LootIDCheck5 { for(set [email protected],0; [email protected]<@inventorylist_count; set [email protected],[email protected]+1) {if(@inventorylist_id[[email protected]] == autosellidnum5 && @inventorylist_amount[[email protected]] >= 1) {set [email protected],getiteminfo(autosellidnum5,1); set zeny,zeny + [email protected]*@inventorylist_amount[[email protected]]; delitem @inventorylist_id[[email protected]],@inventorylist_amount[[email protected]];}} end; } Quote Link to comment Share on other sites More sharing options...