xienne15 Posted August 5, 2013 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 226 Reputation: 11 Joined: 01/09/12 Last Seen: March 15, 2018 Share Posted August 5, 2013 (edited) I want to request a mining script. This is how it works: 1) The player should have Pick (ID:25000) if (countitem(25000 > 1) { It will mine different minerals with % chancesMinerals 25001 20% chance to get 25002 50% chance to get 25003 80% chance to get 25004 2% chance to get there is also a chance that it will fail. 50% 2) When the player mined 25001 it will say after mining mes "You successfully mined a 25001"; close; and when the mined 25002 it will say mes "You successfully mined a 25002"; close; and so on And when it failed to mine it will say mes "You failed to mine."; close; After each use of the Pick 25000, it will be deleted delitem 25000,1; Edited August 5, 2013 by xienne15 Quote Link to comment Share on other sites More sharing options...
Vincent Posted August 5, 2013 Group: Members Topic Count: 130 Topics Per Day: 0.03 Content Count: 528 Reputation: 18 Joined: 09/11/12 Last Seen: March 5, 2020 Share Posted August 5, 2013 (edited) Where can the player mine? All over the worldmap or only at a special coord? The mine have to work as skill or usable item? Edited August 5, 2013 by Thor v2 Quote Link to comment Share on other sites More sharing options...
xienne15 Posted August 5, 2013 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 226 Reputation: 11 Joined: 01/09/12 Last Seen: March 15, 2018 Author Share Posted August 5, 2013 (edited) Where can the player mine? All over the worldmap or only at a special coord? The mine have to work as skill or usable item? at only 1 coordinate since i will put it in a big rock inside izlude. example is izlude,123,123,4 script MINING SPOT 111,{ Edited August 5, 2013 by xienne15 Quote Link to comment Share on other sites More sharing options...
Skorm Posted August 5, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: Sunday at 10:43 PM Share Posted August 5, 2013 (edited) That's a lot to request I suggest you download previous mining scripts and ask for adjustments. I did do something really quick but it's untested. In Item 25000 script. if(@mine) doevent("pickaxe::OnMine"); - script pickaxe -1,{ OnMine: setarray .@array, 501, 20, 502, 50, 503, 80, 504, 2 ; set .@len, getarraysize(.@array); //delitem 25000,1; if(rand(2)-1) { while(set(.@i,.@i+2)-2<.@len) if(rand(100)<=.@array[.@i-1]) { set .@item, .@array[.@i-2]; getitem(.@item,1); mes "You successfully mined a "+getitemname(.@item)+"."; } } else mes "You failed to mine."; close; } izlude,123,123,4 script MINING SPOT 111,2,2,{ end; OnTouch: getmapxy(.@map$,.@x,.@y,0); while(sqrt(pow([email protected],2)+pow([email protected],2))<=3) { sleep2 100; getmapxy(.@map$,.@x,.@y,0); set @mine, 1; } set @mine, 0; end; OnInit: getmapxy(.nmap$,.nx,.ny,1); } Edited August 6, 2013 by Skorm 1 Quote Link to comment Share on other sites More sharing options...
Vincent Posted August 5, 2013 Group: Members Topic Count: 130 Topics Per Day: 0.03 Content Count: 528 Reputation: 18 Joined: 09/11/12 Last Seen: March 5, 2020 Share Posted August 5, 2013 (edited) I thing you can add the messages by yourself. Btw not tested - izlude,123,123,4 script Rock 111,{ if (countitem(25000) > 1) { delitem 25000,1; set .@change, rand (1, 100); if (.@change < 3) { getitem 25004, rand(0, 1); } else if (.@change < 21) { getitem 25001, rand(0, 1); } else if (.@change < 51) { getitem 25001, rand(0, 1); } else { getitem 25003, rand( 0, 1); } } } Edited August 5, 2013 by Thor v2 1 Quote Link to comment Share on other sites More sharing options...
xienne15 Posted August 5, 2013 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 226 Reputation: 11 Joined: 01/09/12 Last Seen: March 15, 2018 Author Share Posted August 5, 2013 That's a lot to request I suggest you download previous mining scripts and ask for adjustments. I did do something really quick but it's untested. In Item 25000 script. if(@mine) doevent("pickaxe::OnMine"); - script pickaxe -1,{ OnMine: setarray .@array, 25001, 20, 25002, 50, 25003, 80, 25004, 2 ; set .@len, getarraysize(.@array); delitem 25000,1; if(rand(2)-1) while(set(.@i,.@i+2)-2<=.@len) if(rand(100)<=.@array[.@i]) { set .@item, .@array[.@i]-1; getitem(.@item,1); mes "You successfully mined a "+.@item; close; } mes "You failed to mine."; close; } izlude,123,123,4 script MINING SPOT 111,5,5,{ OnTouch: getmapxy(.@map$,.@x,.@y,0); while(sqrt(pow([email protected],2)+pow([email protected],2))<=5) { sleep 100; getmapxy(.@map$,.@x,.@y,0); set @mine, 1; } set @mine, 0; OnPCLogoutEvent: set @mine, 0; OnInit: getmapxy(.nmap$,.nx,.ny,1); } hmmm Quote Link to comment Share on other sites More sharing options...
Skorm Posted August 5, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: Sunday at 10:43 PM Share Posted August 5, 2013 Change sleep 100; To sleep2 100; 1 Quote Link to comment Share on other sites More sharing options...
xienne15 Posted August 5, 2013 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 226 Reputation: 11 Joined: 01/09/12 Last Seen: March 15, 2018 Author Share Posted August 5, 2013 Change sleep 100; To sleep2 100; how can i make it show item name instead of item id?mes "You successfully mined a "+.@item; this shows the number ID, not the item name. Quote Link to comment Share on other sites More sharing options...
Skorm Posted August 5, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: Sunday at 10:43 PM Share Posted August 5, 2013 mes "You successfully mined a "+getitemname(.@item)+"."; 1 Quote Link to comment Share on other sites More sharing options...
xienne15 Posted August 6, 2013 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 226 Reputation: 11 Joined: 01/09/12 Last Seen: March 15, 2018 Author Share Posted August 6, 2013 (edited) mes "You successfully mined a "+getitemname(.@item)+"."; getitem(.@item,1); is the 1 responsible for the number of items given when successfully mining? why sometimes it gives more than 1 piece? mes "You successfully mined a "+getitemname(.@item)+"."; OnMine: setarray .@array, 26106, 10, 26107, 10, 640, 15, 714, 15, 715, 60, 716, 60, 717, 60, 718, 20, 719, 20, 720, 20, 721, 20, 722, 20, 723, 20, 724, 20, 725, 20, 726, 20, 727, 20, 728, 20, 729, 20, 730, 16, 731, 14, 732, 12, 733, 50, 6077, 20, 7300, 20, 756, 20, 757, 20, 2794, 5, 7049, 70, 6078, 70, 7067, 70 ; set .@len, getarraysize(.@array); delitem 26105,1; if(rand(2)-1) while(set(.@i,.@i+2)-2<=.@len) if(rand(100)<=.@array[.@i]) { set .@item, .@array[.@i]-1; getitem(.@item,1); mes "You successfully mined a "+getitemname(.@item)+"."; close; } mes "You failed to mine."; close; } i tried to add item but it only gives the first item ID 26106 Edited August 6, 2013 by xienne15 Quote Link to comment Share on other sites More sharing options...
Skorm Posted August 6, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: Sunday at 10:43 PM Share Posted August 6, 2013 i tried to add item but it only gives the first item ID 26106 Use the version from my previous post I updated it awhile back. 1 Quote Link to comment Share on other sites More sharing options...
Question
xienne15
I want to request a mining script.
This is how it works:
1) The player should have Pick (ID:25000)
It will mine different minerals with % chancesMinerals
25001 20% chance to get
25002 50% chance to get
25003 80% chance to get
25004 2% chance to get
there is also a chance that it will fail. 50%
2) When the player mined 25001 it will say after mining
and when the mined 25002 it will say
and so on
And when it failed to mine it will say
After each use of the Pick 25000, it will be deleted
Edited by xienne15Link to comment
Share on other sites
10 answers to this question
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.