Jump to content
  • 0

lotti


MusiLiciouS

Question


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  109
  • Reputation:   2
  • Joined:  06/04/13
  • Last Seen:  

How to make this announce only the grand prize ..

dewata,194,160,6	script	Lotti Girl	714,{

	mes "^C45AEC** Lotti Girl **^000000";
	mes "It costs ^FF0000"+.Cost[1]+"x "+getitemname(.Cost[0])+"^000000 to play.";
	mes " ";
	mes "GRAND PRIZE: ^0000FF1 Fallen Bishop Card^000000";
	if (countitem(.Cost[0]) < .Cost[1]) close;
	next;
	if(select("Deal me in!:No way...")==2) close;
	mes "^C45AEC** Lotti Girl **^000000";
	mes "There we go...";
	delitem .Cost[0], .Cost[1];
	set .@i, rand(1,.Total);
	if (rand(1,100) > getd(".P"+.@i+"[0]")) {
  		for(set .@j,0; .@j<getarraysize(.Default); set .@j,.@j+2) {
   		getitem .Default[.@j], .Default[.@j+1];
   	if (!.@k[0]) setarray .@k[0], .Default[.@j], .Default[.@j+1]; } }
	else {
  		for(set .@j,1; .@j<getarraysize(getd(".P"+.@i)); set .@j,.@j+2) {
   		getitem getd(".P"+.@i+"["+.@j+"]"), getd(".P"+.@i+"["+(.@j+1)+"]");
   	if (!.@k[0]) setarray .@k[0], getd(".P"+.@i+"["+.@j+"]"), getd(".P"+.@i+"["+(.@j+1)+"]"); } }
		announce "Congratulations to "+strcharinfo(0)+" for getting "+.@k[1]+"x "+getitemname(.@k[0])+"!",0;
specialeffect2 248;
close;
OnInit:
// Format: <%>,<item ID>,<count>{,...};
setarray .P1[0],75,607,25;	//Berry
setarray .P2[0],75,608,25;	//Seed
setarray .P3[0],60,7711,5;	//Event Ticket
setarray .P4[0],60,7528,1;	//Lotti Ticket
setarray .P5[0],50,14232,2;	//Box of Berry
setarray .P6[0],50,12202,1;	//STR - Food
setarray .P7[0],50,12203,1;	//AGI - Food
setarray .P8[0],50,12204,1;	//INT - Food
setarray .P9[0],50,12205,1;	//DEX - Food
setarray .P10[0],50,12206,1;	//LUK - Food
setarray .P11[0],50,12207,1;	//VIT - Food
setarray .P12[0],30,7528,10;	//Lotti Ticket
setarray .P13[0],25,7776,1;	//Gym Pass
setarray .P14[0],25,7179,1;	//Proof of Donation
setarray .P15[0],2,4441,1;	//FBH Card
setarray .Default[0],671,1;
setarray .Cost[0],7528,1;
set .Total,15;
end;
}
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  80
  • Reputation:   1
  • Joined:  10/08/13
  • Last Seen:  

scythero,110,84,2	script	Lotti Girl	113,{
mes "[Lotti Girl]";
mes "It costs "+.Cost[1]+"x "+getitemname(.Cost[0])+" to play.";
if (countitem(.Cost[0]) < .Cost[1]) close;
next;
if(select("Deal me in!:No way...")==2) close;
mes "[Lotti Girl]";
mes "Here we go...";
progressbar "",2;
delitem .Cost[0], .Cost[1];
set .@i, rand(1,.Total);
if (rand(1,100) > getd(".P"+.@i+"[0]")) {
  for(set .@j,0; .@j<getarraysize(.Default); set .@j,.@j+2) {
   getitem .Default[.@j], .Default[.@j+1];
   if (!.@k[0]) setarray .@k[0], .Default[.@j], .Default[.@j+1]; } }
else {
  for(set .@j,1; .@j<getarraysize(getd(".P"+.@i)); set .@j,.@j+2) {
   getitem getd(".P"+.@i+"["+.@j+"]"), getd(".P"+.@i+"["+(.@j+1)+"]");
   if (!.@k[0]) setarray .@k[0], getd(".P"+.@i+"["+.@j+"]"), getd(".P"+.@i+"["+(.@j+1)+"]"); } }
if(.@k[0] == 4441)
  announce "Congratulations to "+strcharinfo(0)+" for getting "+.@k[1]+"x "+getitemname(.@k[0])+"!",0;
specialeffect2 248;
close;
OnInit:
// Format: <%>,<item ID>,<count>{,...};
setarray .P1[0],60,12214,5; //convex mirror 10pcs 60%
setarray .P2[0],50,674,5;  //Mithril Coin 10pcs 70% 
setarray .P3[0],40,20251,20; //Hourly coin 20pcs 30%
setarray .P4[0],5,13413,1,13412,1; //Naght Seiger(Red) 2% 1pc
setarray .P5[0],60,7227,5; //TCG 10pcs 70%
setarray .P6[0],40,2387,1,2440,1,2744,1; //sprint set 40%
setarray .P7[0],5,4403,1; //Kiel Card 5% 1pc
setarray .P8[0],2,4399,1; // Thanatos Card 2% 1pc
setarray .Default[0],12214,1; //convex mirror default 1pcs
setarray .Cost[0],7227,15; // 15pcs tcg required para makalaro sa lotti
set .Total,8;
end;
}

Use this one. I already included the change posted by jezznar and tested it in my server. Just make sure to change the map to the one you want.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  


if(.@k[0] == 4441)

announce "Congratulations to "+strcharinfo(0)+" for getting "+.@k[1]+"x "+getitemname(.@k[0])+"!",0;

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  109
  • Reputation:   2
  • Joined:  06/04/13
  • Last Seen:  

Can you re-do the script sir.. Coz right curls are messed up.. No close button appears when getting a default prize

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
Answer this question...

×   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...