Jump to content
  • 0

@request Paid Lotti Girl


PapaZola

Question


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

hello its it possible make a lotti girl npc paid

if player want play the lottery need pay 1 ticket

and player will give a random reward with % like gold 90% TCG 50%

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

// 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 Premium Ticket^000000.";
	next;
	mes "[Lotti Girl]";
	mes "Our Grand prize is:";
	mes "^ff0000+8 Armor Refine Deed^000000";
	mes "Special prizes are:";
	mes "^ff0000+7 Armor Refine Deed^000000";
	mes "^ff0000+10 Weapon Refine Deed^000000";
	mes "and ^ff0000+6 Armor Refine Deed^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(7608) < 1)
		close;
	next;
	if(select("Deal me in!:No way...")==2)
		close;
	mes "[Lotti Girl]";
	mes "Here we go...";
	delitem 7608,1;
	set .@Total,8;
	//<%>,<ItemID>,<Amount>
	setarray .@P1[0],0,8012,1;
	setarray .@P2[0],1,8011,1;
	setarray .@P3[0],5,8006,1;
	setarray .@P4[0],20,8010,1;
	setarray .@P5[0],90,13517,5;
	setarray .@P6[0],80,12080,10;
	setarray .@P7[0],90,30110,5;
	setarray .@P8[0],80,12075,10;
	setarray .@Default[0],30095,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;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   55
  • Joined:  12/02/11
  • Last Seen:  

It's possible, can you give me some more information? what are the payment to play the game?
What are the items to be rewarded please LIST them?

Structure:
 

Quote

<item_id>,<chances%>

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   55
  • Joined:  12/02/11
  • Last Seen:  

1 hour ago, PapaZola said:

hello its it possible make a lotti girl npc paid

if player want play the lottery need pay 1 ticket

and player will give a random reward with % like gold 90% TCG 50%

 
 

Hi, please give a try easy to read.

prontera,157,180,4	script	Lotti Girl	4_F_KAFRA7,{
function LinkItem_;

	.@name$ = strcharinfo(0);
	.@rand = rand(.chances);
	.@i = 0;
	
	if( countitem(.itm_p) < .itm_a ){
		mes .n$;
		mes "You don't have any";
		mes .itm_a+" x "+.itm_n$;
		mes "in your inventory.";
		mes " ";
		mes "Please come back to me if you have it already.";
		close;
	}
	mes .n$;
	mes rand(2) ? ""+callfunc("F_Hi")+" ^0000FFI'm Lotti Girl^000000, of Arlandria Rune-Midgard City." 
	: ""+callfunc("F_Hi")+" ^0000FFI'm Lotti Girl^000000, of Arlandria Rune-Midgard City."; 
	mes "Required Item: "+.itm_a+" x "+(.itm_n$)+"";
	mes " ";
	mes "Would you risk to play this game?";
	next;
	if( select("- Play Game","- Cancel") == 2 ) {
		mes .n$;
		mes "Alright! "+ strcharinfo(0) +" come back anytime you want.";
		close;
	}
	while (( .@rand -= .item_Rate[.@i] ) >= 0 ) .@i++;
	progressbar "0x11CC99",.loading; specialeffect2 EF_REMOVETRAP;
	getitem .item_ID[.@i], 1;
	delitem .itm_p, 1;
	announce "[ Lotti Girl ]: Player "+ .@name$ +" obtained 1 x "+ getitemname(.item_ID[.@i]) +" with "+ .item_Rate[.@i] +"%.",0;
	mes .n$;
	mes "You have obtained 1 x ^FF3000"+ getitemname(.item_ID[.@i]) +"^000000 with "+ .item_Rate[.@i] +"%.";
	close;
	
function	LinkItem_	{
	.@id = getarg(0);
	.@showslot = getarg(1,0);
	.@slot = getitemslots(.@id);
	return "<ITEM>"+(.@slot&&.@showslot?getitemname(.@id)+" ["+.@slot+"]":getitemname(.@id))+"<INFO>"+.@id+"</INFO></ITEM>";
}	

OnInit:
	.n$ = "[ Lotti Girl ]";
	.loading = 1; 												// 0 = No Delay
	.itm_p = 7608;												// Required Item
	.itm_a = 1;													// Required Amount
	.itm_n$ = LinkItem_(.itm_p);
	setarray .item_ID, 607,502,503,504,505,506,507,508,509;		// Item ID List
	setarray .item_Rate, 100,10,10,10,3,10,10,10,10;			// Item ID Chances
	.@i = 0;
	while ( .item_ID[.@i] ) {
		.chances += .item_Rate[.@i];
		.@i++;
	}
	end;
}


 

Raw Link: http://immortalsro.com/rAScripts/lotti_girl.txt

Edited by Kaze
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...