Jump to content
  • 0

Lotti Girl with Multiple Items set as requirement to play


amanikoko

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.01
  • Content Count:  40
  • Reputation:   0
  • Joined:  02/26/21
  • Last Seen:  

Good Day Rathenians,

I am currently using this Lotti Girl Script that i've found somewhere around here and was trying to add multiple items as requirement to play; however it always ended up needing just 1 item needed only.

in addition to that, item quantity seems not working as set too as when i've changed it to 10; player are still able to play by using 1 quantity only instead of 10 quantity.

image.thumb.png.635b0d6b9ea62dd179209b0b0141af4e.png

Here's my script that im currently using.

Thanking you in advance for your kind help and support.

lottigirl.txt

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   46
  • Joined:  03/27/13
  • Last Seen:  

5 hours ago, amanikoko said:

Good Day Rathenians,

I am currently using this Lotti Girl Script that i've found somewhere around here and was trying to add multiple items as requirement to play; however it always ended up needing just 1 item needed only.

in addition to that, item quantity seems not working as set too as when i've changed it to 10; player are still able to play by using 1 quantity only instead of 10 quantity.

image.thumb.png.635b0d6b9ea62dd179209b0b0141af4e.png

Here's my script that im currently using.

Thanking you in advance for your kind help and support.

lottigirl.txt 1.84 kB · 0 downloads

delitem .itm_p, 1;

to:

delitem .itm_p, .itm_a;

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.01
  • Content Count:  40
  • Reputation:   0
  • Joined:  02/26/21
  • Last Seen:  

19 hours ago, Scylla said:
delitem .itm_p, 1;

to:

delitem .itm_p, .itm_a;

 

Thank you very much Sir @Scylla !!!

You helped me solved the Item Quantity error.

Hopefully you're able to help me with the Multiple Item too...

Once again thank you for your help and respond Sir @Scylla !!!!!!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   46
  • Joined:  03/27/13
  • Last Seen:  

4 hours ago, amanikoko said:

Thank you very much Sir @Scylla !!!

You helped me solved the Item Quantity error.

Hopefully you're able to help me with the Multiple Item too...

Once again thank you for your help and respond Sir @Scylla !!!!!!

You can basically just do it like this:

prontera,155,139,5	script	ShenRon 	10500,{
function LinkItem_;

	.@name$ = strcharinfo(0);
	.@rand = rand(.chances);
	.@i = 0;
	
	if( countitem(Item_ID1) < Amount && countitem(Item_ID2) < Amount && countitem(Item_ID3) < Amount ){
		mes .n$;
		mes "You don't have any";
		mes "Item_ID1 name xAmount";
		mes "Item_ID2 name xAmount";
		mes "Item_ID3 name xAmount";
		mes "in your inventory.";
		mes " ";
		mes "Come back to me if you have it already.";
		close;
	}
	mes .n$;
	mes rand(2) ? ""+callfunc("F_Hi")+" ^0000FFI am Shenron^000000, of Prontera Rune-Midgard City." 
	: ""+callfunc("F_Hi")+" ^0000FFI am Shenron^000000, of Prontera 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 Item_ID1, Amount;
	delitem Item_ID2, Amount;
	delitem Item_ID3, Amount;
	announce "[ Shenron ]: 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$ = "[ Shenron ]";
	.loading = 1; 												// 0 = No Delay
	//.itm_p = 60796;												// Required Item
	//.itm_a = 10;													// Required Amount
	.itm_n$ = LinkItem_(.itm_p);
	setarray .item_ID, 7539,35434,35390,60043,60066,60081,60068,60147,60148,60149,60150,60151,60152,7179;		// Item ID List
	setarray .item_Rate, 90,10,10,10,10,10,10,5,5,5,5,5,5,1;			// Item ID Chances
	.@i = 0;
	while ( .item_ID[.@i] ) {
		.chances += .item_Rate[.@i];
		.@i++;
	}
	end;

I'm sure there's a better way to do this, but simply can be just like this.

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