Search the Community
Showing results for 'lotti'.
-
prontera,170,181,3 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"; if(.LottoID && .LottoAmt) mes "^ff0000"+.LottoAmt+" "+getitemname(.LottoID)+"^000000."; if(.ZenyPay) mes "^ff0000"+callfunc("F_InsertComma",.ZenyPay)+"z"; next; mes "[Lotti Girl]"; if(getarraysize(.P1)<4){ mes "Our Grand prize is:"; mes "^ff0000"+.P1[2]+" "+getitemname(.P1[1])+"^000000"; } else { mes "Random Grand prize:"; for(.@i=1;.@i<getarraysize(.P1);.@i+=2) mes "^ff0000"+.P1[.@i+1]+" "+getitemname(.P1[.@i])+"^000000"; } if(getarraysize(.P2)<4){ mes "Special prize is:"; mes "^ff0000"+.P2[2]+" "+getitemname(.P2[1])+"^000000"; } else { mes "Random Special prize:"; for(.@i=1;.@i<getarraysize(.P2);.@i+=2) mes "^ff0000"+.P2[.@i+1]+" "+getitemname(.P2[.@i])+"^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(.LottoID && .LottoAmt && (countitem(.LottoID) < .LottoAmt)) close; if(.Zeny && Zeny < .Zeny) close; next; if(select("Deal me in!:No way...")==2) close; L_Roll: if (Zeny < .ZenyPay) { mes "[Lotti Girl]"; mes "You don't have enough zeny."; close; } mes "[Lotti Girl]"; mes "Here we go..."; if(.LottoID && .LottoAmt) delitem .LottoID,.LottoAmt; if(.ZenyPay) Zeny -= .ZenyPay; set .@i, rand(1,.Total); set .@rand,rand(10000); for(.@j=.Total;.@j>=1;.@j--) if( getd(".P"+.@j+"[0]") >= .@rand) .@i = .@j; next; if ( .@rand > getd(".P"+.@i+"[0]")){ .@iid = rand(getarraysize(.Default)/2); setarray .@get,.Default[(.@iid*2)],.Default[((.@iid*2)+1)]; } else { .@iid = rand(getarraysize(getd(".P"+.@i))/2); setarray .@get,getd(".P"+.@i+"["+((.@iid*2)+1)+"]"),getd(".P"+.@i+"["+((.@iid*2)+2)+"]"); } close2; getitem .@get[0],.@get[1]; if(inarray(.AnnouncedID,.@get) >=0 ) announce "Congratulations! "+strcharinfo(0)+" just received "+getitemname(.@get[0])+" x "+.@get[1]+" from Lotti Girl ("+.map$+" "+.x+" "+.y+")!",0; specialeffect2 248; if(.LottoID && .LottoAmt && (countitem(.LottoID) < .LottoAmt)) close; if(.Zeny && Zeny < .Zeny) close; next; mes "[Lotti Girl]"; mes "Want to roll again?"; if(select("Roll again:Nope, No luck!")==1){ clear(); goto L_Roll; } close; OnInit: //No need to edit the main script. all editable are here. .ZenyPay = 100000; //Zeny to Pay [0 = Disable] .LottoID = 0; //ItemID to Roll [0 = Disable] .LottoAmt = 0; //Amount of LottoID Per Roll[0 = Disable] set .Total,4; setarray .AnnouncedID,501,502,512,513; //To reduce announcement. let's not announce common items. //setarray .P#[0],<% chance(1-10000)>,<ItemID>,<Amount> setarray .P1[0],100,501,1; //Grand Prize setarray .P2[0],1000,502,1,512,2,513,3; //Special Prizes setarray .P3[0],5000,503,1; setarray .P4[0],7500,504,1,514,4; setarray .Default[0],505,5,506,1; getmapxy(.map$,.x,.y,BL_NPC); end; }
-
What is the problem with this one? because some of the players complaining that some they will be log out/DC ///////////////////////////////////////////////// // Credits to Anakid for providing this script // ///////////////////////////////////////////////// - script Lotti -1,{ OnInit: disablenpc "Lotti Girl#Lotti"; end; OnWhisperGlobal: if ( getgmlevel() < 99 ) end; else if ( compare ( @whispervar0$, "on" ) ) goto L_start; else if ( compare ( @whispervar0$, "off" ) ) goto L_end; else end; L_end: OnClock1300: OnClock0000: announce "The Lotti Girl will be back soon! Thanks for Joining",bc_all,0x00CED1; disablenpc "LottiGirl#Lotti"; end; L_start: OnClock1200: OnClock0100: announce "The Lotti Girl is Back! Come here @ zhakastia 98 51",bc_all,0x00CED1; enablenpc "Lotti Girl#Lotti"; end; } zhakastia,98,51,4 script Lotti Girl#Lotti 714,{ if(Weight >= MaxWeight/2) goto Low; 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 "^ff000010 MavenRO Credits^000000."; next; mes "[Lotti Girl]"; mes "Our Grand prize is:"; mes "^ff0000Kiel D-01 Card^000000"; mes "Special prizes are:"; mes "^ff0000100 Bravery Badges^000000"; mes "^ff00001 Bloody Branch^000000"; mes "and ^ff0000100 MavenRO Credits^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(22001) < 10) end; next; if(select("Deal me in!:No way...")==2) end; mes "[Lotti Girl]"; mes "Here we go..."; delitem 22001,10; set .@Total,8; //<%>,<ItemID>,<Amount> setarray .@P1[0],0,4403,1; setarray .@P2[0],1,7828,1; setarray .@P3[0],2,12103,1; setarray .@P4[0],3,22001,100; setarray .@P5[0],10,14232,10; setarray .@P6[0],15,22001,10; setarray .@P7[0],25,12214,1; setarray .@P8[0],50,607,10; setarray .@Default[0],12221,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]) { 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; end; Low: mes "You are Overweight!"; end; }
-
Hi guys im here again ) I have tried and tried but still i can't make it correctly as what i need,. I have here a working LOTTI SCRIPT, can you help me that it ONLY ANNOUNCES the rare item that obtain by a player. not all items. just the RARE ONES. Thanks in advance :) cokz_Lotti_Girl.txt
-
how to make this lotti girl announcer will announce only if you get item below 10%. and it will not announce the default reward item. mes "[Lotti Girl]"; mes "It costs "+.Price+" Zeny to play."; if (Zeny < .Price) close; next; if(select("Deal me in!:No way...")==2) close; mes "[Lotti Girl]"; mes "Here we go..."; progressbar "",2; set Zeny, Zeny-.Price; 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;
-
prontera,139,172,4 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 Lottery Ticket^000000."; next; mes "[Lotti Girl]"; mes "Our Grand prize is:"; mes "^ff0000+9 Weapon Refine Deed^000000"; mes "^ff0000+10 Weapon Refine Deed^000000"; mes "^ff0000+9 Armor Refine Deed^000000"; mes "^ff0000+10 Armor Refine Deed^000000"; next; mes "[Lotti Girl]"; mes "Special prizes are:"; mes "^ff0000+5 Armor Refine Deed^000000"; mes "^ff0000+6 Armor Refine Deed^000000"; mes "^ff0000+7 Armor Refine Deed^000000"; mes "^ff0000+8 Armor Refine Deed^000000"; mes "^ff0000+5 Weapon Refine Deed^000000"; mes "^ff0000+6 Weapon Refine Deed^000000"; mes "^ff0000+7 Weapon Refine Deed^000000"; mes "^ff0000+8 Weapon Refine Deed^000000"; next; mes "[Lotti Girl]"; mes "MVP Card & Headgear prizes are:"; mes "^ff0000Tao Gunka Card^000000"; mes "^ff0000Turtle General Card^000000"; mes "^ff0000Japan Anniversary Hat^000000"; next; mes "Consolation prizes are:"; mes "^ff0000Food Buffs^000000"; mes "^ff0000Healing Foods^000000"; mes "^ff0000Random Dye Box^000000"; if (countitem(7528) < 1) close; next; if(select("Deal me in!:No way...")==2) close; mes "[Lotti Girl]"; mes "Here we go..."; delitem 7528,1; set .@Total,33; //<%>,<ItemID>,<Amount> setarray .@P1[0],6,8001,1; setarray .@P2[0],5,8002,1; setarray .@P3[0],4,8003,1; setarray .@P4[0],3,8004,1; setarray .@P5[0],2,8005,1; setarray .@P6[0],1,8006,1; setarray .@P7[0],6,8007,1; setarray .@P8[0],5,8008,1; setarray .@P9[0],4,8009,1; setarray .@P10[0],3,8010,1; setarray .@P11[0],2,8011,1; setarray .@P12[0],1,8012,1; setarray .@P13[0],20,13517,3; setarray .@P14[0],20,12080,5; setarray .@P15[0],20,12075,5; setarray .@P16[0],20,12085,5; setarray .@P17[0],20,12090,5; setarray .@P18[0],20,12095,5; setarray .@P18[0],20,12100,5; setarray .@P19[0],50,26000,1; setarray .@P20[0],40,7528,1; setarray .@P21[0],1,4305,1; setarray .@P22[0],45,12033,10; setarray .@P23[0],45,13548,2; setarray .@P24[0],60,12709,20; setarray .@P25[0],65,663,50; setarray .@P26[0],50,26048,1; setarray .@P27[0],1,5846,1; setarray .@P28[0],1,4302,1; setarray .@P29[0],80,13517,1; setarray .@P30[0],80,13517,1; setarray .@P31[0],80,13517,1; setarray .@P32[0],80,13517,1; setarray .@P33[0],80,13517,1; setarray .@Default[0],13517,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]) { 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!",0; specialeffect2 248; close; } I am using this script but after i edited the prizes, it only gives mostly the default prize which is setarray .@Default[0],13517,1; i don't know i'f im wrong or maybe the npc is more likely choosing the default....Can you help me with this? even i put 100% on the item mostyly the item give is default.
-
how to make 1 proof of donation needs to play then 1 proof of donation = 5 try. and how to change the announce item won prontera,155,181,5 script Lotti Girl 714,{ mes "[Lotti Girl]"; mes "It costs "+ .cost[1] +"x "+ getitemname( .cost[0] ) +" to play."; mes " "; for ( .@i = 0; .@i < 20; .@i++ ) mes $lotti_girl_ladder$[.@i]; if ( countitem( .cost[0] ) < .cost[1] ) close; next; if ( select( "Deal me in!", "No way..." ) == 2 ) close; mes "[Lotti Girl]"; while (1) { callsub L_default; mes "Here we go..."; delitem .cost[0], .cost[1]; .@rand = rand(.totalchance); .@r = 0; // <-- think you forgot to put this while ( ( .@rand = .@rand - getd( ".p"+ .@r +"[0]" ) ) >= 0 ) .@r++; .@size = getarraysize( getd(".p"+ .@r ) ); for ( .@i = 1; .@i < .@size; .@i += 2 ) getitem getd( ".p"+ .@r +"["+ .@i +"]" ), getd( ".p"+ .@r +"["+( .@i +1 )+"]" ); if ( getd( ".p"+ .@r +"[0]" ) < 50 ) // announce if below 50% chance announce "Congratulations to "+strcharinfo(0)+" for getting "+ .ann$[.@r] +"!", 0; if ( getd( ".p"+ .@r +"[0]" ) < 10 ) { // score the ladder if below 10% chance copyarray $lotti_girl_ladder$[1], $lotti_girl_ladder$[0], 19; $lotti_girl_ladder$ = strcharinfo(0) +" gains "+ .ann$[.@r] +" at "+ gettimestr( "%d/%m/%Y %H:%M %p", 21 ); } mes " "; mes "wanna try again ?"; next; if ( select( "Yes", "No" ) == 2 ) close; mes "[Lotti Girl]"; if ( countitem( .cost[0] ) < .cost[1] ) { mes "it seems you have ran out of "+ getitemname( .cost[0] ); close; } } close; OnInit: // setarray .p1, 70, 501,25; // debugging ... // setarray .p2, 70, 502,1; // setarray .p3, 40, 503,1; // setarray .p4, 40, 504,1; // setarray .p5, 40, 505,1; // setarray .p6, 50, 506,1, 507,1, 508,1, 509,1; // setarray .p7, 25, 512,1; // setarray .p8, 5, 513,1; setarray .p1, 70, 607,25; setarray .p2, 70, 13710,1; setarray .p3, 40, 5471,1; setarray .p4, 40, 5210,1; setarray .p5, 40, 5224,1; setarray .p6, 50, 2357,1, 2524,1, 2421,1, 2115,1; setarray .p7, 25, 2701,1; setarray .p8, 5, 2394,1; callsub L_default; setarray .cost, 7227,300; .total = 9; freeloop 1; .@i = 1; while ( .@i <= .total ) { .totalchance = .totalchance + getd(".p"+ .@i ); .@j = 1; .@size = getarraysize( getd(".p"+ .@i ) ); while ( .@j < .@size ) { .ann$[.@i] = .ann$[.@i] + getd( ".p"+ .@i +"["+( .@j +1 )+"]" ) +"x "+ getitemname( getd( ".p"+ .@i +"["+ .@j +"]" ) ) +( ( .@j == .@size -2 )? "":"," ); // I think Euphy forgotten to make announcement when configuration has set more than 1 items .@j += 2; } .@i++; } freeloop 0; end; L_default: deletearray .p9; setarray .p9, 30+30+60+60+60+50+75+95, callfunc( "F_RandMes", 5, 12214,502,503,504,505 ),1; // default ... the chance are added up by 100-n% return; }
-
This is my own version of Lottery/Lotti npc script. Options: set .npc$,"[Lotti]"; // NPC Name set .MaxNum,10; // Total number to win setarray .SWinNum[0],1,2,5; // Number need to win Single Reward setarray .MWinNum[0],3,4,6; // Number need to win Multi Reward // Setup the .MWinT if you use Give random set .MWinall,0; // 1 = Give all Multi Reward, 0 = Give random // Note: .MWinall must be 0 inorder to use this) // Note: If Not-Repeat make sure Amount of reward >= .MReward item) // 0 = Off (Default: 1 random item only), 1 = On; 0 = Consecutive , 1 = Random; 0 = Not, 1 = Repeat Reward; // Format: <On/Off>,<Consecutive/Random>,<Not-Repeat/Repeat>,<Amount of reward can win> setarray .MWinT[0],1,1,1,2; // 1 = On , 0 = off; set .announce,1; // announce set .announcec$,"ffc0cb"; // announce color // Format: <item ID>,<amount>{,...}; setarray .ItemR[0],909,5,7126,5; // Item ID,Item Amount setarray .ZenyR,1000000; // Item Requirements // Format: <item ID>,<amount>,<Refine>{,...}; setarray .SReward[0],2301,1,10,1202,1,5,2304,1,5,2319,1,5,909,5,0,741,1,0; // Single Reward // Format: <item ID>,<amount>,<Refine>{,....}; setarray .MReward[0],501,5,0,502,5,0,503,5,0,504,5,0; //Multiple Reward ________________________________ I hope you like it Lottie.txt
- 1 reply
-
- 1
-
Is it possible to call cuttin on equip collection?
naskahlec28 posted a question in Scripting Support
Is it possible to call cuttin on item collection? I have an idea to make npc or box item (Like OBB or Lotti NPC) But i want to create the random item animation show up is there a way to do it? Sorry if i post on wrong section -
I want to request an npc that is almost the same with the Lotti Girl in Philippine Ragnarok Online. In pRO, this Lotti Girl gives item randomly with the use of a ticket. So this what I want, My Tcg drainer npc goes like this, this needs 300 TCG to play the game. . . The player will choose if he wants to Draw a prize.. . and then a random item will be given... There's more, the prizes should be based on % chance . . . . Here's the prizes **This item will be get by the player if non of the items below was taken. 1 Convex Mirror **Here are the items which the player can get randomly [With Chances] 25 Yggdrasil Berries - 70% Gym Pass Box [10pcs of Gym pass] - 70% Hairband of Reginleif - 40% Flying Angel Wing - 40% Evolved Orc Hero Helm - 40% [Vset] with out the helm - 50% Orleans Glove - 25% Glorious Suit - 5% ** If the player got any one of these items which has % chance. . . they will not get the convex mirror. . . in short. . . convex mirror is just a replacement for not getting any rare items. . and another one, there will be a broadcast on the whole server which says that "Congratulations to [Name of the Char] for getting [Name of the item] !!" I hope that there's a professional scripter here that can make this kind of NPC. . . . and i know that many server will benefit from this because this is also a way of controlling the economy of the server by reducing the items which they use as the medium of exchange. . . Thanks a lot!! please help me =) bump~
-
Sir can someone help me about this lotti girl im always stock at here we go if i havent get any item -.- <header> { 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)+"]"); } } 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],70,607,25; setarray .P2[0],70,13710,1; setarray .P3[0],40,5471,1; setarray .P4[0],40,5210,1; setarray .P5[0],40,5224,1; setarray .P6[0],50,2357,1,2524,1,2421,1,2115,1; setarray .P7[0],25,2701,1; setarray .P8[0],5,2394,1; setarray .Default[0],12214,1; setarray .Cost[0],7227,300; set .Total,8; end; } i think theres a wrong code can some one help me gimme a full script that i can use im begging
-
this script is from lotti npc right? is it alright to use this in random box?? what is the difference between this 2 script...
-
set .@Total,12; setarray .@P1[0],1,1230,1; //Ice Pick setarray .@P2[0],1,5135,1; //Cyclops setarray .@P3[0],1,4365,1; // HW Card setarray .@P4[0],1,4451,1; // Crothen Card setarray .@P5[0],1,18885,1; // Jejecap setarray .@P6[0],1,20036,1; // Sword Master Crown setarray .@P7[0],1,4357,1; // LK Card setarray .@P8[0],1,4403,1; // kiel card setarray .@P9[0],20,12210,20; // BGUM setarray .@P10[0],30,7227,20; // TCG setarray .@P11[0],100,7227,2; // TCG setarray .@P12[0],100,7227,2; // TCG do{ set .@i, rand(1,.@Total); }while( rand(1,100) > getd(".@P"+.@i+"[0]") ); 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( .@gz && .@gz <= 10 ) // 10% equal or below will announce announce "Congratulations! "+strcharinfo(0)+" just received "+getitemname(.@k[0])+" x "+.@k[1]+" from Lotti Girl",0; specialeffect2 248; close;
-
I need a random item generator can anyone help me?
AnnieRuru replied to ADM Ytallo's question in Script Requests
prontera,157,180,5 script test item_reward#3 2_VENDING_MACHINE1,{ if ( !countitem(.itemuse) ) { mes "A "+ getitemname(.itemuse) +" is needed to use this machine"; close; } delitem .itemuse, 1; .@r = rand(.totalchance); for ( .@i = 0; ( .@r -= .itemchance[.@i] ) >= 0; ++.@i ); getitem .itemid[.@i], 1; end; OnInit: .itemuse = 7539; // poring coin setarray .itemid, 501,502,503,504,505,506,507,508,509; setarray .itemchance, 10,10,10,10,3,10,10,10,10; for ( .@i = 0; .itemid[.@i]; ++.@i ) .totalchance += .itemchance[.@i]; end; } btw this script is call "lotti girl" https://rathena.org/board/search/?&q=lotti&search_and_or=and&sortby=relevancy a lot of results return from it -
@AnnieRuru i try on ramod i got error this https://imgur.com/a/jabaBAw so i try on latest Rathena First Problem i won the Gym Pass Box setarray .p2, 70, 13710,1; https://imgur.com/a/qsMjlDs the point should be Only 1 because on chance code setarray .chance, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1; setarray .points, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100; Lotti Shop if have 0 zeny even i have lotti points i cant buy items on shop https://imgur.com/a/kjp6uHr
-
@AnnieRuru can you Add more ideas and Option Menu? switch(select("Play","Lotti Ranking","Lotti Shop")) Play Option Every Play of Lotti Girl you gain 1 Lotti Ladder Point and Lotti Shop Point Points System 10% = 10Points Lotti Ladder Points & Lotti Shop Points 9% = 20Points Lotti Ladder Points & Lotti Shop Points 8% = 30Points Lotti Ladder Points & Lotti Shop Points 7% = 40Points Lotti Ladder Points & Lotti Shop Points 6% = 50Points Lotti Ladder Points & Lotti Shop Points 5% = 60Points Lotti Ladder Points & Lotti Shop Points 4% = 70Points Lotti Ladder Points & Lotti Shop Points 3% = 80Points Lotti Ladder Points & Lotti Shop Points 2% = 90Points Lotti Ladder Points & Lotti Shop Points 1% = 100Points Lotti Ladder Points & Lotti Shop Points Lotti Ladder System 1 > Name > Lotti Ladder Points 2 > Name > Lotti Ladder Points 3 > Name > Lotti Ladder Points 4 > Name > Lotti Ladder Points 5 > Name > Lotti Ladder Points Lotti Shop Players can use there Lotti Shop Points to buy any items on Lotti Shop
-
here my script please help thanks amatsu,132,161,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 Lotti Ticket Need If Wanna Play^000000."; next; mes "[Lotti Girl]"; mes "Our Grand prize is:"; mes "^ff0000Proof of Donation^000000"; mes "Special prizes are:"; mes "^ff0000Event Coin^000000"; mes "^ff0000Castle Drop ETC^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(30008) < 1) close; next; if(select("Deal me in!:No way...")==2) close; mes "[Lotti Girl]"; mes "Here we go..."; delitem 30008,1; set .@Total,20; //<%>,<ItemID>,<Amount> setarray .@P2[0],90,673,1; setarray .@P2[0],70,7227,1; setarray .@P3[0],60,7776,1; setarray .@P4[0],50,12903,1; setarray .@P5[0],50,12904,1; setarray .@P6[0],50,12905,1; setarray .@P7[0],50,12906,1; setarray .@P8[0],50,12907,1; setarray .@P9[0],50,12908,1; setarray .@P14[0],30,7830,1; setarray .@P15[0],30,7091,1; setarray .@P16[0],30,7075,1; setarray .@P17[0],30,7085,1; setarray .@P18[0],30,7835,1; setarray .@P19[0],10,30004,20; setarray .@P20[0],1,7179,1; setarray .@Default[0],969,10; 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 (amatsu 139 173)!",0; specialeffect2 248; close; }
-
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
-
// 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; }
-
Like this Lotti Girl.txt
-
Not tested, but something like that (below) prontera,163,193,5 script Lotti Girl 719,{ if( lotti_doll_timeout < gettimetick(0) ) { lotti_doll_counter = 0; } if( lotti_doll_counter > 10 ) { mes "[Lotti Girl]"; mes "Lotti Girl Use 10/10"; mes "Limit reached, please try at next day"; close; } mes "[Lotti Girl]"; mes "It costs ["+.Price+"] Zeny to play."; mes "This are the list of prizes:"; mes "1 Bronze Coin, 1 Silver Coin, 1 Gold Coin, 1 Mithril Coin, 2 Convex Mirror and 3 TCG for the JACKPOT!"; if (Zeny < .Price) end; next; if(select("Deal me in!","No way...")==2) end; mes "[Lotti Girl]"; mes "Here we go..."; progressbar "",2; set Zeny, Zeny-.Price; 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; lotti_doll_counter++; lotti_doll_timeout = gettimetick(0) + 60 * 60 * 24; end; OnInit: // Format: <%>,<item ID>,<count>{,...}; setarray .P1[0],50,675,1; //Baphomet Card 1 PC 50% setarray .P2[0],50,671,1; //Alice Apron 50% setarray .P3[0],50,674,1; //Cursed Baphomet Doll 5 pcs 40% setarray .P4[0],2,7199,10; //Berry Ticket setarray .P4[0],2,7227,3; //TCG //setarray .P5[0],2,12214,3; //Convex Mirror 1pc setarray .Default[0],673,1; //convex mirror default 1pcs //setarray .Cost[0],6242,1; // 1pcs Woe coinrequired para makalaro sa lotti .Price = 10000000; set .Total,8; end; } Main logic: every time when player uses this npc services, his counter increased + setted new nexttime timer.
-
can someone help fix this? i want this npc announce the name of the player who got reward with 1%-10% chance! thank you! setarray .P1[0],1,7179,1; //pods >>>>>>>> [0],1 = 1% setarray .P2[0],5,26224,1; //1>>>>>>>>>>>[0],5 = 5% prontera,141,181,5 script Lotti Girl 714,{ specialeffect 372; 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)+"]"); } } specialeffect2 248; OnInit: // Format: <%>,<item ID>,<count>{,...}; setarray .P1[0],1,7179,1; //pods setarray .P2[0],5,26224,1; //1 setarray .P3[0],5,26225,1; //2 setarray .P4[0],5,26226,1; //3 setarray .P5[0],5,26227,1; //4 setarray .P6[0],5,26228,1; //5 setarray .P7[0],5,26229,1; //6 setarray .Default[0],607,1; //Berry setarray .Cost[0],26080,10; //Credit set .Total,7; end; }
-
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.
-
Halo rathena. Can someone edit this script. If a player bought any items in my donation, it will announce globally. Thanks. // Awesomazing Coin Rewards - shop Emistry_Shop1 -1,512:100 turbo_room,123,97,4 script Donation Rewards 829,{ function ShopSettings; function ValidateCost; function CurrencyInfo; function ClearData; function ValueConvert; function ErrorNotice; mes "[ RO2K15 Coin Rewards]"; mes "^d21838PODs^000000 can be traded here."; mes "You can obtain PODs from:"; mes "1. Donation"; mes "2. Lotti Girl"; mes "3. GM Held Events"; mes "4. Facebook Contest"; next; // Menu Selection select("Headgear","Mid Headgear","Lower Headgear","Consumables & ETC"); ClearData(); ShopSettings( @menu ); npcshopitem "Emistry_Shop1",512,100; npcshopdelitem "Emistry_Shop1",512; for(set .@i,0; .@i < getarraysize( @ItemLists ); set .@i,.@i+1) npcshopadditem "Emistry_Shop1",@ItemLists[.@i],@ItemCost[.@i]; CurrencyInfo( @Currency$ ); callshop "Emistry_Shop1",1; npcshopattach "Emistry_Shop1"; end; function ShopSettings { switch( getarg(0) ){ Case 1: // Currency [ Item ID / Variable Name ] set @Currency$,"7179"; // Item ID Lists setarray @ItemLists[0],5375,5376,5396,5498,5420,5383,5481,5423,5564,5399,5374,5518,5805,5452; // Item Price setarray @ItemCost[0],5,5,5,5,5,5,5,7,7,10,10,10,12,15; break; Case 2: // Currency [ Item ID / Variable Name ] set @Currency$,"7179"; // Item ID Lists setarray @ItemLists[0],5421,5325,5800,5389,5664,5471,5402; // Item Price setarray @ItemCost[0],5,5,5,5,5,5,5; break; Case 3: // Currency [ Item ID / Variable Name ] set @Currency$,"7179"; // Item ID Lists setarray @ItemLists[0],5532,5462,5155,5377,5521; // Item Price setarray @ItemCost[0],3,6,8,9,15; break; Case 4: // Currency [ Item ID / Variable Name ] set @Currency$,"7179"; // Item ID Lists setarray @ItemLists[0],7776,7619,7620; // Item Price setarray @ItemCost[0],1,1,1; break; // Case 4,5,6.....etc... default: ErrorNotice( "Invalid Menu Selection for Menu "+@menu+"." ); close; } if( @Currency$ == "" ) ErrorNotice( "Invalid Currency Setting in Menu "+@menu+" ." ); if( getarraysize( @ItemCost ) != getarraysize( @ItemLists ) || getarraysize( @ItemLists ) != getarraysize( @ItemCost ) ) ErrorNotice( "Missing or Extra Value of Item or Cost Settings in Menu "+@menu+" ." ); return; } function ErrorNotice { mes "^FF0000ERROR^000000 - "+getarg(0); mes "^00FF00____________________________^000000"; mes "Inform this Message to ^0000FFGame Staffs^000000 immediately !"; close; } function CurrencyInfo { if( getitemname( atoi( getarg(0) ) ) != "null" ){ mes "Item Currency : ^FF0000"+getitemname( atoi( getarg(0) ) )+"^000000"; mes "Available Amount : ^0000FF"+ValueConvert( countitem( atoi( getarg(0) ) ) )+"^000000"; }else if( getitemname( atoi( getarg(0) ) ) == "null" ){ mes "Variable Currency : ^FF0000"+getarg(0)+"^000000"; mes "Available Amount : ^0000FF"+ValueConvert( getd( getarg(0) ) )+"^000000"; } return; } function ValidateCost { if( getitemname( atoi( getarg(0) ) ) != "null" ){ if( countitem( atoi( getarg(0) ) ) < getarg(1) ) return 1; }else{ if( getd( getarg(0) ) < getarg(1) ) return 1; } return 0; } function ClearData { set @Currency$,""; set @TotalCost,0; deletearray @bought_nameid[0],getarraysize( @bought_nameid ); deletearray @bought_quantity[0],getarraysize( @bought_quantity ); deletearray @ItemLists[0],getarraysize( @ItemLists ); deletearray @ItemCost[0],getarraysize( @ItemCost ); return; } function ValueConvert { set .@num, atoi(""+getarg(0)); if ( .@num == 0 || .@num >= 2147483647 ) return getarg(0); set .@l, getstrlen(""+.@num); for ( set .@i,0; .@i < .@l; set .@i, .@i + 1 ) { set .@num$, .@num % pow(10,.@i+1) / pow(10,.@i) + .@num$; if ( (.@i+1) % 3 == 0 && .@i+1 != .@l ) set .@num$, ","+ .@num$; } return .@num$; } OnBuyItem: ShopSettings( @menu ); for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1) for(set @j,0; @j < getarraysize( @ItemLists ); set @j,@j+1) if( @ItemLists[@j] == @bought_nameid[@i] ) set @TotalCost,@TotalCost + ( @ItemCost[@j] * @bought_quantity[@i] ); for( set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1 ) mes "Reward : "+@bought_quantity[@i]+" "+getitemname( @bought_nameid[@i] )+""; mes "-----------------------------------"; if( getitemname( atoi( @Currency$ ) ) != "null" ) mes "Total Cost : "+ValueConvert( @TotalCost )+" "+getitemname( atoi( @Currency$ ) )+""; else if( getitemname( atoi( @Currency$ ) ) == "null" ){ mes "Total Cost : "+ValueConvert( @TotalCost )+" "+@Currency$+""; } if( ValidateCost( @Currency$,@TotalCost ) ){ if( getitemname( atoi( @Currency$ ) ) != "null" ) mes " Insufficient "+getitemname( atoi( @Currency$ ) )+""; else{ mes "[^00FF00Insufficient^000000"+@Currency$+""; } }else{ if( select( "^0000FFPurchase^000000:Cancel" ) == 1 ){ if( getitemname( atoi( @Currency$ ) ) != "null" ) delitem atoi( @Currency$ ),@TotalCost; else{ set getd( @Currency$ ),getd( @Currency$ ) - @TotalCost; } for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1) getitem @bought_nameid[@i],@bought_quantity[@i]; message strcharinfo(0),"Purchased "+getarraysize( @bought_nameid )+" Items."; mes "Thank you for purchasing!."; } } ClearData(); close; } Anyone? UP
-
Announce when player bought in Donation NPC
Luciar replied to awesomazingxed's question in Scripting Support
// Awesomazing Coin Rewards - shop Emistry_Shop1 -1,512:100 turbo_room,123,97,4 script Donation Rewards 829,{ function ShopSettings; function ValidateCost; function CurrencyInfo; function ClearData; function ValueConvert; function ErrorNotice; mes "[ RO2K15 Coin Rewards]"; mes "^d21838PODs^000000 can be traded here."; mes "You can obtain PODs from:"; mes "1. Donation"; mes "2. Lotti Girl"; mes "3. GM Held Events"; mes "4. Facebook Contest"; next; // Menu Selection select("Headgear","Mid Headgear","Lower Headgear","Consumables & ETC"); ClearData(); ShopSettings( @menu ); npcshopitem "Emistry_Shop1",512,100; npcshopdelitem "Emistry_Shop1",512; for(set .@i,0; .@i < getarraysize( @ItemLists ); set .@i,.@i+1) npcshopadditem "Emistry_Shop1",@ItemLists[.@i],@ItemCost[.@i]; CurrencyInfo( @Currency$ ); callshop "Emistry_Shop1",1; npcshopattach "Emistry_Shop1"; end; function ShopSettings { switch( getarg(0) ){ Case 1: // Currency [ Item ID / Variable Name ] set @Currency$,"7179"; // Item ID Lists setarray @ItemLists[0],5375,5376,5396,5498,5420,5383,5481,5423,5564,5399,5374,5518,5805,5452; // Item Price setarray @ItemCost[0],5,5,5,5,5,5,5,7,7,10,10,10,12,15; break; Case 2: // Currency [ Item ID / Variable Name ] set @Currency$,"7179"; // Item ID Lists setarray @ItemLists[0],5421,5325,5800,5389,5664,5471,5402; // Item Price setarray @ItemCost[0],5,5,5,5,5,5,5; break; Case 3: // Currency [ Item ID / Variable Name ] set @Currency$,"7179"; // Item ID Lists setarray @ItemLists[0],5532,5462,5155,5377,5521; // Item Price setarray @ItemCost[0],3,6,8,9,15; break; Case 4: // Currency [ Item ID / Variable Name ] set @Currency$,"7179"; // Item ID Lists setarray @ItemLists[0],7776,7619,7620; // Item Price setarray @ItemCost[0],1,1,1; break; // Case 4,5,6.....etc... default: ErrorNotice( "Invalid Menu Selection for Menu "+@menu+"." ); close; } if( @Currency$ == "" ) ErrorNotice( "Invalid Currency Setting in Menu "+@menu+" ." ); if( getarraysize( @ItemCost ) != getarraysize( @ItemLists ) || getarraysize( @ItemLists ) != getarraysize( @ItemCost ) ) ErrorNotice( "Missing or Extra Value of Item or Cost Settings in Menu "+@menu+" ." ); return; } function ErrorNotice { mes "^FF0000ERROR^000000 - "+getarg(0); mes "^00FF00____________________________^000000"; mes "Inform this Message to ^0000FFGame Staffs^000000 immediately !"; close; } function CurrencyInfo { if( getitemname( atoi( getarg(0) ) ) != "null" ){ mes "Item Currency : ^FF0000"+getitemname( atoi( getarg(0) ) )+"^000000"; mes "Available Amount : ^0000FF"+ValueConvert( countitem( atoi( getarg(0) ) ) )+"^000000"; }else if( getitemname( atoi( getarg(0) ) ) == "null" ){ mes "Variable Currency : ^FF0000"+getarg(0)+"^000000"; mes "Available Amount : ^0000FF"+ValueConvert( getd( getarg(0) ) )+"^000000"; } return; } function ValidateCost { if( getitemname( atoi( getarg(0) ) ) != "null" ){ if( countitem( atoi( getarg(0) ) ) < getarg(1) ) return 1; }else{ if( getd( getarg(0) ) < getarg(1) ) return 1; } return 0; } function ClearData { set @Currency$,""; set @TotalCost,0; deletearray @bought_nameid[0],getarraysize( @bought_nameid ); deletearray @bought_quantity[0],getarraysize( @bought_quantity ); deletearray @ItemLists[0],getarraysize( @ItemLists ); deletearray @ItemCost[0],getarraysize( @ItemCost ); return; } function ValueConvert { set .@num, atoi(""+getarg(0)); if ( .@num == 0 || .@num >= 2147483647 ) return getarg(0); set .@l, getstrlen(""+.@num); for ( set .@i,0; .@i < .@l; set .@i, .@i + 1 ) { set .@num$, .@num % pow(10,.@i+1) / pow(10,.@i) + .@num$; if ( (.@i+1) % 3 == 0 && .@i+1 != .@l ) set .@num$, ","+ .@num$; } return .@num$; } OnBuyItem: ShopSettings( @menu ); for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1) for(set @j,0; @j < getarraysize( @ItemLists ); set @j,@j+1) if( @ItemLists[@j] == @bought_nameid[@i] ) set @TotalCost,@TotalCost + ( @ItemCost[@j] * @bought_quantity[@i] ); for( set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1 ) mes "Reward : "+@bought_quantity[@i]+" "+getitemname( @bought_nameid[@i] )+""; mes "-----------------------------------"; if( getitemname( atoi( @Currency$ ) ) != "null" ) mes "Total Cost : "+ValueConvert( @TotalCost )+" "+getitemname( atoi( @Currency$ ) )+""; else if( getitemname( atoi( @Currency$ ) ) == "null" ){ mes "Total Cost : "+ValueConvert( @TotalCost )+" "+@Currency$+""; } if( ValidateCost( @Currency$,@TotalCost ) ){ if( getitemname( atoi( @Currency$ ) ) != "null" ) mes " Insufficient "+getitemname( atoi( @Currency$ ) )+""; else{ mes "[^00FF00Insufficient^000000"+@Currency$+""; } }else{ if( select( "^0000FFPurchase^000000:Cancel" ) == 1 ){ if( getitemname( atoi( @Currency$ ) ) != "null" ) delitem atoi( @Currency$ ),@TotalCost; else{ set getd( @Currency$ ),getd( @Currency$ ) - @TotalCost; } for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1) getitem @bought_nameid[@i],@bought_quantity[@i]; announce "Player "+ strcharinfo(0) +" has purchased "+ @bought_quantity[@i] +" "+ getitemname(@bought_nameid[@i]),bc_all; message strcharinfo(0),"Purchased "+getarraysize( @bought_nameid )+" Items."; mes "Thank you for purchasing!."; } } ClearData(); close; } Try that -
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