Jump to content

Lotto ball to cash points npc?


Recommended Posts


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  16
  • Reputation:   0
  • Joined:  02/05/15
  • Last Seen:  

Hello everyone it's me again xD. i just want to ask if you guys can help me :D. 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 by gebusog
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  52
  • Reputation:   7
  • Joined:  01/02/12
  • Last Seen:  

.@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 by ocelote
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  16
  • Reputation:   0
  • Joined:  02/05/15
  • Last Seen:  

Well @ocolote i don't really understand xD. can you please make it undestable? xD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  52
  • Reputation:   7
  • Joined:  01/02/12
  • Last Seen:  

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;
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...