KCritz Posted February 19, 2014 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 95 Reputation: 0 Joined: 12/23/12 Last Seen: March 1, 2015 Share Posted February 19, 2014 (edited) Heres the script that i've requested long ago - script gvubhnji -1,{ OnNPCKillEvent: if( killedrid && ( getmonsterinfo(killedrid, 21) & 0x0020 ) && ( killedrid <= 3000 ) ) { if( getmonsterinfo(killedrid, 22) ) .@R = rand( 100, 500 );//-- MVP else .@R = rand( 50, 150 );//-- MINIBOSS #CASHPOINTS = #CASHPOINTS + .@R; dispbottom "Gained : "+ .@R +" points. Total : "+ #CASHPOINTS +" points."; } end; } just wanna make it have a percentage to get the cashpoint like MVP - 100 - 500 (random) cashpoint 25% chance to earn mini boss -50 - 150 (random) cashpoint 50% chance to earn Edited February 19, 2014 by KCritz Quote Link to comment Share on other sites More sharing options...
Patskie Posted February 20, 2014 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 4 hours ago Share Posted February 20, 2014 (edited) OnNPCKillEvent: if( killedrid && ( getmonsterinfo( killedrid, 21 ) & 0x0020 ) && ( killedrid <= 3000 ) ) { if ( getmonsterinfo( killedrid, 22 ) ) { if ( rand( 100 ) < 25 ) { #CASHPOINTS += rand( 100, 500 ); dispbottom "You now have " +#CASHPOINTS+ " cash points."; } } else { if ( rand( 100 ) < 50 ) #CASHPOINTS += rand( 50, 150 ); } } end; Edited February 20, 2014 by Patskie Edited Quote Link to comment Share on other sites More sharing options...
sandbox Posted February 20, 2014 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 949 Reputation: 174 Joined: 06/12/12 Last Seen: Friday at 12:25 PM Share Posted February 20, 2014 Kindly test.. find if( getmonsterinfo(killedrid, 22) ) replace set .@R,0; if( getmonsterinfo(killedrid, 22) ) find .@R = rand( 100, 500 );//-- MVP replace set .@MVPc,rand(3); if(.@MVPc == 1) set .@R,rand( 100, 500 ); //-- MVP find .@R = rand( 50, 150 );//-- MINIBOSS replace set .@MVPc,rand(1); if(.@MVPc == 1) set .@R,rand( 50, 150 ); //-- MINIBOSS Quote Link to comment Share on other sites More sharing options...
KCritz Posted February 20, 2014 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 95 Reputation: 0 Joined: 12/23/12 Last Seen: March 1, 2015 Author Share Posted February 20, 2014 I tested it and its working no error on server map but the problem is it don't give any cashpoint Quote Link to comment Share on other sites More sharing options...
sandbox Posted February 20, 2014 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 949 Reputation: 174 Joined: 06/12/12 Last Seen: Friday at 12:25 PM Share Posted February 20, 2014 (edited) remove set .@R,0; find set .@MVPc,rand(3); replace set .@MVPc,rand(4); find set .@MVPc,rand(1); replace set .@MVPc,rand(2); Edited February 20, 2014 by sandbox Quote Link to comment Share on other sites More sharing options...
sandbox Posted February 20, 2014 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 949 Reputation: 174 Joined: 06/12/12 Last Seen: Friday at 12:25 PM Share Posted February 20, 2014 Wow i'm a caveman, didn't know 'set' can be ignored once a variable has been declared anymore.. The disadvantages of not using an svn for almost a year Quote Link to comment Share on other sites More sharing options...
KCritz Posted February 20, 2014 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 95 Reputation: 0 Joined: 12/23/12 Last Seen: March 1, 2015 Author Share Posted February 20, 2014 OnNPCKillEvent: if( killedrid && ( getmonsterinfo( killedrid, 21 ) & 0x0020 ) && ( killedrid <= 3000 ) ) { if ( getmonsterinfo( killedrid, 22 ) ) { if ( rand( 100 ) < 25 ) #CASHPOINTS += rand( 100, 500 ); } else { if ( rand( 100 ) < 50 ) #CASHPOINTS += rand( 50, 150 ); } } dispbottom "You now have " +#CASHPOINTS+ " cash points."; end; getting error Quote Link to comment Share on other sites More sharing options...
sandbox Posted February 20, 2014 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 949 Reputation: 174 Joined: 06/12/12 Last Seen: Friday at 12:25 PM Share Posted February 20, 2014 I think you forgot the NPC headers? Quote Link to comment Share on other sites More sharing options...
KCritz Posted February 20, 2014 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 95 Reputation: 0 Joined: 12/23/12 Last Seen: March 1, 2015 Author Share Posted February 20, 2014 (edited) oopppsss ahaha my bad ahm sorry still got a lil problem. it always give info about your cashpoint even I just kill normal monster like poring I kill angeling give me 50 cashpoint then in window chat will say "You now have 50 cash points." - check I kill poring it shouldnt give me any cash but in window chat say "You now have 50 cash points." I would like to happen in getting cash isYou earn 50 cash points Your total cash poins is 50 and when you kill another mvp or miniboss You earn 38 cash point Your total cash points is 88 Edited February 20, 2014 by KCritz Quote Link to comment Share on other sites More sharing options...
Patskie Posted February 20, 2014 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 4 hours ago Share Posted February 20, 2014 Edited previous post Quote Link to comment Share on other sites More sharing options...
KCritz Posted February 20, 2014 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 95 Reputation: 0 Joined: 12/23/12 Last Seen: March 1, 2015 Author Share Posted February 20, 2014 Thank you sir Patskie Quote Link to comment Share on other sites More sharing options...
Question
KCritz
Heres the script that i've requested long ago
just wanna make it have a percentage to get the cashpoint like
MVP - 100 - 500 (random) cashpoint 25% chance to earn
mini boss -50 - 150 (random) cashpoint 50% chance to earn
Edited by KCritzLink 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.