gebusog Posted April 20, 2015 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 16 Reputation: 0 Joined: 02/05/15 Last Seen: April 25, 2015 Share Posted April 20, 2015 (edited) Hello everyone it's me again xD. i just want to ask if you guys can help me . I need Lotto ball to cash points npc. Example Blue Lotto Ball (1 Point) Yellow Lotto Ball (2 Points) Red Lotto Ball (3 Points) White Lotto Ball 30 (30 Points) White Lotto Ball 100 (100 Points) If i have 5 blue lotto ball = 5 points 4 yellow lotto ball = 8 points and 1 red lotto ball = 3 points So i will have 16 cash points. Thanks sorry for bad english LOLOL Edited April 20, 2015 by gebusog Quote Link to comment Share on other sites More sharing options...
ocelote Posted April 20, 2015 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 52 Reputation: 7 Joined: 01/02/12 Last Seen: July 3, 2015 Share Posted April 20, 2015 (edited) .@i = countitem(lottoballsID); if(.@i > 0){ delitem lottoballid, .@i; #CASHPOINTS += .@i; mes "changed "+getitemname(lottoballid)+" x "+.@i+" to "+.@i+" cash points!"; close; } mes "you don't have lotto balls!"; close; this? for red lotto bal just add some like this: .@a = countitem(redlottoballid); if(.@a > 0){ delitem redlottoballid, .@a; #CASHPOINTS += .@a*3; mes "changed "+getitemname(lottoballid)+" x "+.@i+" to "+.@i*3+" cash points!"; close; } mes "you dont have lotto balls!"; close; Edited April 20, 2015 by ocelote Quote Link to comment Share on other sites More sharing options...
gebusog Posted April 21, 2015 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 16 Reputation: 0 Joined: 02/05/15 Last Seen: April 25, 2015 Author Share Posted April 21, 2015 Well @ocolote i don't really understand xD. can you please make it undestable? xD Quote Link to comment Share on other sites More sharing options...
ocelote Posted April 23, 2015 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 52 Reputation: 7 Joined: 01/02/12 Last Seen: July 3, 2015 Share Posted April 23, 2015 Well @ocolote i don't really understand xD. can you please make it undestable? xD What you don't understand? It's a piece of code for change your lotto balls to cash points.o.O .@i = countitem(lottoballsID); //change 'lottoballsID' to your ID (this command checks how much Lotto Balls have player if(.@i > 0){ //If lotto ball more than zero delitem lottoballid, .@i; //deleting lotto balls #CASHPOINTS += .@i; // cash points + lotto balls count (1lottoball = 1 cash) mes "changed "+getitemname(lottoballid)+" x "+.@i+" to "+.@i+" cash points!"; close; } mes "you don't have lotto balls!"; close; 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.