Mizore Posted May 10, 2020 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 13 Reputation: 0 Joined: 03/15/20 Last Seen: April 22, 2021 Share Posted May 10, 2020 Hi people~ I'm looking for a script that after a player A kill another player B on a specific map, A have a chance on getting a item or cash. Anyone knows a command to do that? Thanks ~ Quote Link to comment Share on other sites More sharing options...
0 Mabuhay Posted May 10, 2020 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 446 Reputation: 232 Joined: 03/20/12 Last Seen: October 22, 2020 Share Posted May 10, 2020 (edited) - script asdahjhla -1,{ OnPCKillEvent: if ( inarray(.map$, strcharinfo(3)) != -1 ) { if ( rand(100) <= .chance ) { getitem 501, 10; #CASHPOINTS += 1; // I forgot to add this dispbottom "You earned 1 Cash Point. Total : "+ #CASHPOINTS; } } end; OnInit: .chance = 50; // chance to get something setarray .map$, "prontera", "payon"; // map list } Edited May 10, 2020 by Mabuhay 1 Quote Link to comment Share on other sites More sharing options...
0 Mizore Posted May 10, 2020 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 13 Reputation: 0 Joined: 03/15/20 Last Seen: April 22, 2021 Author Share Posted May 10, 2020 Thanks a lot. Quote Link to comment Share on other sites More sharing options...
0 Patskie Posted May 11, 2020 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 10 hours ago Share Posted May 11, 2020 9 hours ago, Mabuhay said: - script asdahjhla -1,{ OnPCKillEvent: if ( inarray(.map$, strcharinfo(3)) != -1 ) { if ( rand(100) <= .chance ) { getitem 501, 10; #CASHPOINTS += 1; // I forgot to add this dispbottom "You earned 1 Cash Point. Total : "+ #CASHPOINTS; } } end; OnInit: .chance = 50; // chance to get something setarray .map$, "prontera", "payon"; // map list } This can be exploited if you do a suicide mission (paladin casting grand cross for instance) @Mizore Change if ( rand(100) <= .chance ) { to if ( rand(100) <= .chance && killedrid != getcharid(3) ) { 1 Quote Link to comment Share on other sites More sharing options...
0 Mizore Posted May 11, 2020 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 13 Reputation: 0 Joined: 03/15/20 Last Seen: April 22, 2021 Author Share Posted May 11, 2020 55 minutes ago, Patskie said: This can be exploited if you do a suicide mission (paladin casting grand cross for instance) @Mizore Change if ( rand(100) <= .chance ) { to if ( rand(100) <= .chance && killedrid != getcharid(3) ) { Yeah that's great. Thank you guys. I have another question. I wanna add to this script a chance to drop a costume at 0.1% of chance. My question is: Can I use the variable value .chance = 0.1;? Thanks again Quote Link to comment Share on other sites More sharing options...
Question
Mizore
Hi people~
I'm looking for a script that after a player A kill another player B on a specific map, A have a chance on getting a item or cash.
Anyone knows a command to do that?
Thanks ~
Link to comment
Share on other sites
4 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.