Jasc Posted June 19, 2014 Group: Members Topic Count: 29 Topics Per Day: 0.01 Content Count: 270 Reputation: 20 Joined: 12/10/11 Last Seen: June 28, 2022 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 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 135 Reputation: 13 Joined: 06/20/12 Last Seen: April 14, 2018 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 Group: Members Topic Count: 32 Topics Per Day: 0.01 Content Count: 57 Reputation: 1 Joined: 12/07/13 Last Seen: December 15, 2024 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 Group: Members Topic Count: 86 Topics Per Day: 0.02 Content Count: 591 Reputation: 146 Joined: 06/19/12 Last Seen: December 10, 2016 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 .@itemid; set autosellidnum,.@itemid; dispbottom "Now AutoSelling item: "+getitemname(.@itemid)+" ID: "+.@itemid+""; dispbottom "Auto Sell Slot 1"; end; } Onauto2: set autosellid2, 1; if(autosellid2 == 1) {set autosellid2,1; dispbottom "Input itemid number."; input .@itemid; set autosellidnum2,.@itemid; dispbottom "Now AutoSelling item: "+getitemname(.@itemid)+" ID: "+.@itemid+""; dispbottom "Auto Sell Slot 2"; end; } Onauto3: set autosellid3, 1; if(autosellid3 == 1) {set autosellid3,1; dispbottom "Input itemid number."; input .@itemid; set autosellidnum3,.@itemid; dispbottom "Now AutoSelling item: "+getitemname(.@itemid)+" ID: "+.@itemid+""; dispbottom "Auto Sell Slot 3"; end; } Onauto4: set autosellid4, 1; if(autosellid4 == 1) {set autosellid4,1; dispbottom "Input itemid number."; input .@itemid; set autosellidnum4,.@itemid; dispbottom "Now AutoSelling item: "+getitemname(.@itemid)+" ID: "+.@itemid+""; dispbottom "Auto Sell Slot 4"; end; } Onauto5: set autosellid5, 1; if(autosellid5 == 1) {set autosellid5,1; dispbottom "Input itemid number."; input .@itemid; set autosellidnum5,.@itemid; dispbottom "Now AutoSelling item: "+getitemname(.@itemid)+" ID: "+.@itemid+""; 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 .@i,0; .@i<@inventorylist_count; set .@i,.@i+1) {if(@inventorylist_id[.@i] == autosellidnum && @inventorylist_amount[.@i] >= 1) {set .@a,getiteminfo(autosellidnum,1); set zeny,zeny + .@a*@inventorylist_amount[.@i]; delitem @inventorylist_id[.@i],@inventorylist_amount[.@i];}} end; } function script LootIDCheck2 { for(set .@i,0; .@i<@inventorylist_count; set .@i,.@i+1) {if(@inventorylist_id[.@i] == autosellidnum2 && @inventorylist_amount[.@i] >= 1) {set .@a,getiteminfo(autosellidnum2,1); set zeny,zeny + .@a*@inventorylist_amount[.@i]; delitem @inventorylist_id[.@i],@inventorylist_amount[.@i];}} end; } function script LootIDCheck3 { for(set .@i,0; .@i<@inventorylist_count; set .@i,.@i+1) {if(@inventorylist_id[.@i] == autosellidnum3 && @inventorylist_amount[.@i] >= 1) {set .@a,getiteminfo(autosellidnum3,1); set zeny,zeny + .@a*@inventorylist_amount[.@i]; delitem @inventorylist_id[.@i],@inventorylist_amount[.@i];}} end; } function script LootIDCheck4 { for(set .@i,0; .@i<@inventorylist_count; set .@i,.@i+1) {if(@inventorylist_id[.@i] == autosellidnum4 && @inventorylist_amount[.@i] >= 1) {set .@a,getiteminfo(autosellidnum4,1); set zeny,zeny + .@a*@inventorylist_amount[.@i]; delitem @inventorylist_id[.@i],@inventorylist_amount[.@i];}} end; } function script LootIDCheck5 { for(set .@i,0; .@i<@inventorylist_count; set .@i,.@i+1) {if(@inventorylist_id[.@i] == autosellidnum5 && @inventorylist_amount[.@i] >= 1) {set .@a,getiteminfo(autosellidnum5,1); set zeny,zeny + .@a*@inventorylist_amount[.@i]; delitem @inventorylist_id[.@i],@inventorylist_amount[.@i];}} end; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.