Jump to content
  • 0

Help Lotti Girl w/ Zeny & PoDs option


rekcah

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  14
  • Reputation:   0
  • Joined:  09/06/14
  • Last Seen:  

Can you help me with this script? My players requesting for Zeny option here in my Lotti Girl here's the code. I hope you help me guys.

 

So if they play Lotti Girl there would be two option for players

 

1. 1m Zeny

2. 1pc Proof of Donation


// http://rathena.org/board/topic/83017-pro-lotti-girl-refine-master/
prontera,141,226,6 script Lotti Girl 714,{
mes "[Lotti Girl]";
mes "Hello Sir! Are you out";
mes "shopping in the city?!";
next;
mes "[Lotti Girl]";
mes "I'm Lotti! I'll exchange cool";
mes "random prizes for every";
mes "^ff00001 Proof of Donation^000000.";
next;
mes "[Lotti Girl]";
mes "Our Grand prize is:";
mes "^ff0000+9 Armor Refine Deed^000000";
mes "Special prizes are:";
mes "^ff0000+8 Armor Refine Deed^000000";
mes "^ff0000+9 Weapon Refine Deed^000000";
mes "and ^ff0000Reins of Mount^000000";
next;
mes "[Lotti Girl]";
mes "You can still get random item";
mes "if you failed to get the grand";
mes "prize and special prizes.";
if (countitem(7179) < 1)
close;
next;
if(select("Deal me in!:No way...")==2)
close;
mes "[Lotti Girl]";
mes "Here we go...";
delitem 7179,1;
set .@Total,9;
//<%>,<ItemID>,<Amount>
setarray .@P1[0],0,6232,1;
setarray .@P2[0],1,6228,1;
setarray .@P3[0],5,6233,1;
setarray .@P4[0],20,12221,5;
setarray .@P5[0],90,663,100;
setarray .@P6[0],80,13550,1;
setarray .@P7[0],90,12210,5;
setarray .@P8[0],80,12263,5;
setarray .@P9[0],10,12622,1;
setarray .@Default[0],7227,5;
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])
{
set .@gz,.@i;
setarray .@k[0], getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]");
break;
}
}
}
if(1<=.@gz&&.@gz<=4)
announce "Congratulations! "+strcharinfo(0)+" just received "+getitemname(.@k[0])+" x "+.@k[1]+" from Lotti Girl (prontera 139 173)!",0;
specialeffect2 248;
close;
}
Edited by Emistry
codebox
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  420
  • Reputation:   89
  • Joined:  01/30/12
  • Last Seen:  

Try this. Test it first pz, I might have made some mistakes, cause only used notepad and didn't had the chance to test it.

prontera,141,226,6	script	Lotti Girl	714,{
	.@zenyprice = 1000000;
	
	mes "[Lotti Girl]";
	mes "Hello Sir! Are you out";
	mes "shopping in the city?!";
	next;
	
	mes "[Lotti Girl]";
	mes "I'm Lotti! I'll exchange cool";
	mes "random prizes for every";
	mes "^ff00001 Proof of Donation^000000";
	mes "or for^ff00001" + .@zenyprice + " zeny.^000000";
	next;
	
	mes "[Lotti Girl]";
	mes "Our Grand prize is:";
	mes "^ff0000+9 Armor Refine Deed^000000";
	mes "Special prizes are:";
	mes "^ff0000+8 Armor Refine Deed^000000";
	mes "^ff0000+9 Weapon Refine Deed^000000";
	mes "and ^ff0000Reins of Mount^000000";
	next;
	
	mes "[Lotti Girl]";
	mes "You can still get random item";
	mes "if you failed to get the grand";
	mes "prize and special prizes.";
	next;
	
	if(select("Deal me in!:No way...")==2)
		close;
	
	mes "[Lotti Girl]";
	mes "What do you wish to exchange?";
	if(select("Proof of Donation:Zeny")==1)
	{	
		if (countitem(7179) < 1)
			close;
		mes "Here we go..";
		delitem 7179,1;
	} else {
		if (Zeny < .@zenyprice)
			close;
		mes "Here we go...";
		set Zeny,Zeny-.@zenyprice;
	}
	
	set .@Total,9;
	//<%>,<ItemID>,<Amount>
	setarray .@P1[0],0,6232,1;
	setarray .@P2[0],1,6228,1;
	setarray .@P3[0],5,6233,1;
	setarray .@P4[0],20,12221,5;
	setarray .@P5[0],90,663,100;
	setarray .@P6[0],80,13550,1;
	setarray .@P7[0],90,12210,5;
	setarray .@P8[0],80,12263,5;
	setarray .@P9[0],10,12622,1;
	setarray .@Default[0],7227,5;
	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])
			{
				set .@gz,.@i;
				setarray .@k[0], getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]");
				break;
			}
		}
	}
	if(1<=.@gz&&.@gz<=4)
	announce "Congratulations! "+strcharinfo(0)+" just received "+getitemname(.@k[0])+" x "+.@k[1]+" from Lotti Girl (prontera 139 173)!",0;
	specialeffect2 248;
	close;
}

ps.: Next time pz use [ code] block :)

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