ADM Ytallo Posted January 20, 2019 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 98 Reputation: 3 Joined: 09/02/18 Last Seen: May 29, 2020 Share Posted January 20, 2019 I need a npc that puts slots in the sunglasses with a rate of 10% Quote Link to comment Share on other sites More sharing options...
0 AnnieRuru Posted January 21, 2019 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 21, 2019 function script F_MesItemInfo { .@item = getarg(0); return sprintf("<ITEM>%s<INFO>%d</INFO></ITEM>", getitemname(.@item), .@item); } prontera,155,185,5 script skdfjhskdf 1_F_MARIA,{ if ( !countitem(2201) ) { mes "I need a "+ F_MesItemInfo(2201); close; } if ( Zeny < 1000 ) { mes "you don't have a thousand zeny"; close; } disable_items; mes "Are you sure you want to exchange your sunglasses into slotted on in 1/10 chance ?"; next; if ( select ( "Yes", "No" ) == 2 ) close; if ( !countitem(2201) ) { // just a double check mes "I need a "+ F_MesItemInfo(2201); close; } if ( Zeny < 1000 ) { mes "you don't have a thousand zeny"; close; } Zeny -= 1000; if ( rand(100) < 10 ) { delitem 2201, 1; getitem 2202, 1; mes "your "+ F_MesItemInfo(2201) +" now has slot"; emotion ET_BEST; } else { delitem 2201, 1; mes "it fails"; emotion ET_SORRY; } close; } script_commands.txt is your best friend Quote Link to comment Share on other sites More sharing options...
0 AnnieRuru Posted January 20, 2019 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 20, 2019 prontera,155,185,5 script skdfjhskdf 1_F_MARIA,{ if ( !countitem(2201) ) { mes "I need a sunglasses"; close; } disable_items; mes "Are you sure you want to exchange your sunglasses into slotted on in 1/10 chance ?"; next; if ( select ( "Yes", "No" ) == 2 ) close; if ( !countitem(2201) ) { // just a double check mes "I need a sunglasses"; close; } if ( rand(100) < 10 ) { delitem 2201, 1; getitem 2202, 1; mes "your sunglasses now has slot"; } else { delitem 2201, 1; mes "it fails"; } close; } 1 Quote Link to comment Share on other sites More sharing options...
0 ADM Ytallo Posted January 20, 2019 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 98 Reputation: 3 Joined: 09/02/18 Last Seen: May 29, 2020 Author Share Posted January 20, 2019 6 hours ago, AnnieRuru said: prontera,155,185,5 script skdfjhskdf 1_F_MARIA,{ if ( !countitem(2201) ) { mes "I need a sunglasses"; close; } disable_items; mes "Are you sure you want to exchange your sunglasses into slotted on in 1/10 chance ?"; next; if ( select ( "Yes", "No" ) == 2 ) close; if ( !countitem(2201) ) { // just a double check mes "I need a sunglasses"; close; } if ( rand(100) < 10 ) { delitem 2201, 1; getitem 2202, 1; mes "your sunglasses now has slot"; } else { delitem 2201, 1; mes "it fails"; } close; } very good . I want him to order a thousand zenys. and tells me how I put emotion when the process fails..: ) Quote Link to comment Share on other sites More sharing options...
Question
ADM Ytallo
I need a npc that puts slots in the sunglasses with a rate of 10%
Link to comment
Share on other sites
3 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.