Jump to content

Search the Community

Showing results for 'lotti'.

  • Search By Author

Content Type


Forums

  • Announcements
    • Rules & Guidelines
    • Community News
    • Development News
    • Ragnarok News
    • Community Crowdfunding
  • Support & Releases
    • General
    • Scripting
    • Database
    • Source
    • Graphic Enhancements
    • Web
    • Client-side
    • Third Party
    • Projects
  • Discussion & Suggestions
    • Database Discussion
    • Script Discussion
    • Source Discussion
    • Renewal Discussion
    • Archives
  • Community
    • rAthena General
    • Arts & Writings
    • Off Topic
  • International Forums
    • Filipino Support
    • German Support
    • Indonesian/Malaysian Support
    • Portuguese Support
    • Russian Support (Русский)
    • Spanish Support

Categories

  • Server Resources
    • Server Managers/Editors
    • Scripts
    • Source Modifications
  • Web Resources
    • General Website Templates
    • Forum Templates
    • FluxCP Themes
    • FluxCP Addons
    • Other Web/CP Scripts
  • Graphics Resources
    • Sprites & Palettes
    • Maps & 3D Resources
    • Other Graphics
  • Client Resources
    • GRF Files
    • Client Tools
    • Spriting & Paletting Tools
    • Texture & Mapping Tools
    • Editors
    • Patchers

Categories

  • Low Rate
  • Mid Rate
  • High Rate
  • Super High Rate

Categories

  • Records Test
  • Complete Installation Guides
  • Client Guides
    • Data Folder
  • MySQL Guides
  • Database Guides
  • Map Guides

Categories

  • rAthena Forums
  • rAthena Development
  • FluxCP Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


Server


Github


Discord


Interests


Website URL


Yahoo


Skype

  1. Hi Guys, For those who are familiar with Lotti Girl NPC. Is there a way for the NPC to draw like 5x or 10x so that players will not click the NPC one at a time?. It would be cool if players can enter the number of times they can pull on the Lotti NPC. This is the script that I'm using on my server: https://pastebin.com/y0hjpBjX Thanks!
  2. Hi , Can someone write my a code that can bulky gacha at one time , This is example code if can implement together , Example : 100x at once lotti.txt
  3. How can i make this lotti girl script only announce to map and only announce low chance items 10% chance blow prt_gld,168,91,4 script Lotti Girl 4_F_KAFRA7,{ function LinkItem_; if(Weight >= MaxWeight/2) goto Low; .@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 Prontera ." : ""+callfunc("F_Hi")+" ^0000FFI'm Lotti Girl^000000, of Prontera ."; 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>"; } Low: mes "You are Overweight!"; close; OnInit: .n$ = "[ Lotti Girl ]"; .loading = 0; // 0 = No Delay .itm_p = 30040; // 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; }
  4. function script F_MesItemInfo { .@item = getarg(0); .@itemname$ = getitemname(.@item); if (.@itemname$ != "null") { .@itemslot = getitemslots(.@item); if (.@itemslot) .@itemname$ = sprintf("%s [%d]", .@itemname$, .@itemslot); } else .@itemname$ = "Unknown Item"; if (PACKETVER >= 20150729) return sprintf("<ITEM>%s<INFO>%d</INFO></ITEM>", .@itemname$, .@item); else if (PACKETVER >= 20130130) return sprintf("<ITEMLINK>%s<INFO>%d</INFO></ITEMLINK>", .@itemname$, .@item); else return .@itemname$; } //===== Hercules Script ====================================== //= Lotti Girl //===== By: ================================================== //= AnnieRuru //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= Hercules 2019-02-22 //===== Description: ========================================= //= Roll a lottery ticket and get some cool items //= even if you get all the trash items, you still collecting points to buy in lotti shop //===== Topic ================================================ //= http://herc.ws/board/topic/16579-lotti-girl/ //===== Additional Comments: ================================= //= //============================================================ /* create table lotti_rank ( char_id int(11), name varchar(24), lotti_point int(11), primary key (char_id), key (lotti_point) ) engine = innodb; */ prontera,155,180,5 script Lotti Girl 1_F_MARIA,{ goto L_talk; OnInit: // Announce to the server when player roll on a rare item .rare_announcement = 1; // Default 1 : means any item with 0.00%~0.99% // Amount of points gain for each roll .lotti_points = 1; // If the player choose to Roll Repeatedly, what is the maximum amount of Roll in the input .max_roll = 100; setarray .item, Id_Lottery_Ticket, // Item ID requirement 1, // amount of the Item needed 0, // chance of not getting any items // chance of getting the items // <Item ID>, <amount>, <chance> Apple, 10, 1000, Red_Potion, 5, 50, Orange_Potion, 4, 40, Yellow_Potion, 3, 30, White_Potion, 2, 20, Blue_Potion, 1, 10; setarray .itemshop, // Item sold in the shop // <Item ID>, <Lotti Points needed> Red_Potion, 100, Orange_Potion, 200, Yellow_Potion, 300, White_Potion, 400, Blue_Potion, 500; // ========================================================================================================= .size = getarraysize(.item); for ( .@i = 2; .@i < .size; .@i += 3 ) .totalchance += .item[.@i]; for ( .@i = 2; .@i < .size; .@i += 3 ) { .@chance = .item[.@i] *10000 / .totalchance; .@division = .@chance / 100; .@remainder$ = .@chance % 100; while ( getstrlen(.@remainder$) < 2 ) .@remainder$ = insertchar(.@remainder$, "0", 0); .chance_display$[.@i] = .@division +"."+ .@remainder$ +"%"; if ( .@division < .rare_announcement ) .announce[.@i] = true; } .shop_size = getarraysize(.itemshop); npcshopdelitem "Lotti#hidden", 512; for ( .@i = 0; .@i < .shop_size; .@i += 2 ) npcshopadditem "Lotti#hidden", .itemshop[.@i], .itemshop[.@i +1]; npcshopattach "Lotti#hidden"; .npcname$ = "["+ strnpcinfo(NPC_NAME) +"]"; end; L_talk: mes .npcname$; mes "Hello, do you want to play lottery ?"; next; switch( select( "Deal me in!", "More Information", "Lotti Shop", "Lotti Ranking" ) ) { mes .npcname$; case 1: mesf "It costs %dx %s to play.", .item[1], F_MesItemInfo( .item[0] ); if ( countitem( .item[0] ) < .item[1] ) close; next; if ( select( "Play", "Roll Repeatedly" ) == 1 ) { mes .npcname$; while ( true ) { mes "Here we go..."; mes " "; .@r = rand(.totalchance); for ( .@i = 2; ( .@r -= .item[.@i] ) >= 0; .@i += 3 ); if ( checkweight( .item[.@i -2], .item[.@i -1] ) == false ) { mes "It appears you have overweight"; break; } delitem .item[0], .item[1]; if ( .@i == 2 ) mes "You get nothing..."; else { mesf "You get %s%dx%s %s", F_MesColor(C_TEAL), .item[.@i -1], F_MesColor(C_BLACK), F_MesItemInfo(.item[.@i -2]); getitem .item[.@i -2], .item[.@i -1]; if ( .announce[.@i] ) announce sprintf( _$( "Lotti Girl: Player [%s] has roll on [%s](%s)" ), strcharinfo(0), getitemname(.item[.@i -2]), .chance_display$[.@i] ), bc_all, C_PINK; } lotti_points += .lotti_points; query_sql "insert into lotti_rank values ( "+ getcharid(CHAR_ID_CHAR) +", '"+ escape_sql( strcharinfo(PC_NAME) ) +"', "+ .lotti_points +" ) on duplicate key update lotti_point = lotti_point + "+ .lotti_points; mes " "; mes "wanna try again ?"; next; if ( select( "Yes", "No" ) == 2 ) break; mes .npcname$; if ( countitem( .item[0] ) < .item[1] ) { mes " "; mesf "It appears you have ran out of %s", F_MesItemInfo( .item[0] ); break; } } } else { mes .npcname$; mes "Input how many rounds to roll"; mesf "Currently you have %dx %s", countitem( .item[0] ), F_MesItemInfo( .item[0] ); next; input .@roll_input, 1, min( countitem( .item[0] ) / .item[1], .max_roll ); mes .npcname$; mesf "Are you sure you want to roll %d times ?", .@roll_input; next; if ( select( "Yes", "No" ) == 2 ) close; mes .npcname$; mes "Here we go..."; mes " "; // freeloop true; for ( .@j = 0; .@j < .@roll_input; ++.@j ) { .@r = rand(.totalchance); for ( .@i = 2; ( .@r -= .item[.@i] ) >= 0; .@i += 3 ); if ( checkweight( .item[.@i -2], .item[.@i -1] ) == false ) { mes "It appears you have overweight"; break; } delitem .item[0], .item[1]; if ( .@i == 2 ) mes "You get nothing..."; else { mesf "You get %s%dx%s %s", F_MesColor(C_TEAL), .item[.@i -1], F_MesColor(C_BLACK), F_MesItemInfo(.item[.@i -2]); getitem .item[.@i -2], .item[.@i -1]; if ( .announce[.@i] ) announce sprintf( _$( "Lotti Girl: Player [%s] has roll on [%s](%s)" ), strcharinfo(0), getitemname(.item[.@i -2]), .chance_display$[.@i] ), bc_all, C_PINK; } ++.@roll; sleep2 1; // prevent lag the server } lotti_points += .lotti_points * .@roll; query_sql "insert into lotti_rank values ( "+ getcharid(CHAR_ID_CHAR) +", '"+ escape_sql( strcharinfo(PC_NAME) ) +"', "+ .lotti_points +" ) on duplicate key update lotti_point = lotti_point + "+( .lotti_points * .@roll ); mesf "Total roll : %d times.", .@roll; } mes " "; mes "Thank you for using Lotti service~"; close; case 2: freeloop true; mesf "Item required: %s%dx%s %s", F_MesColor(C_TEAL), .item[1], F_MesColor(C_BLACK), F_MesItemInfo(.item[0]); if ( .item[2] ) mesf "Chance to gain nothing : %s%s%s", F_MesColor(C_CHOCOLATE), .chance_display$[2], F_MesColor(C_BLACK); mes "Possible gains:"; for ( .@i = 3; .@i < .size; .@i += 3 ) mesf "%s%dx%s %s (%s%s%s)", F_MesColor(C_TEAL), .item[.@i +1], F_MesColor(C_BLACK), F_MesItemInfo(.item[.@i]), F_MesColor(C_CHOCOLATE), .chance_display$[.@i +2], F_MesColor(C_BLACK); next; mes .npcname$; mesf "Each time you roll, will gain %d Lotti Points.", .lotti_points; mes "Which can be use to buy rare items in Lotti Shop."; close; case 3: mesf "You currently have %s Lotti Points.", lotti_points; dispbottom sprintf( _$("You currently have %s Lotti Points."), lotti_points ); close2; callshop "Lotti#hidden", 1; end; case 4: .@query$ = "SELECT `name`, IF(@d=t.`lotti_point`, @r, @r:=@i), @d:=t.`lotti_point`, @i:=@i+1 "; .@query$ += "FROM `lotti_rank` t, (SELECT @d:=0, @r:=0, @i:=1)q "; .@query$ += "ORDER BY `lotti_point` DESC LIMIT 5"; .@nb = query_sql(.@query$, .@name$, .@rank, .@points, .@dummy); if ( !.@nb ) { mes "There's no ranking yet ~"; close; } for ( .@i = 0; .@i < .@nb; ++.@i ) mesf "%d. %s%s %s%d%s Points", .@rank[.@i], F_MesColor(C_TEAL), .@name$[.@i], F_MesColor(C_CHOCOLATE), .@points[.@i], F_MesColor(C_BLACK); mes " "; if ( !query_sql( "SELECT `lotti_point`, 1+(SELECT COUNT(1) FROM `lotti_rank` t1 WHERE t1.lotti_point > t2.lotti_point) FROM `lotti_rank` t2 WHERE `char_id` = "+ getcharid(CHAR_ID_CHAR), .@points, .@rank ) ) { mes "You are not in the rank."; close; } mesf "Your current Point > %d", .@points; mesf "Your current Rank > %d", .@rank; close; } end; // shouldn't reach OnBuyItem: mes .npcname$; if ( !@bought_quantity ) end; if ( checkweight2( @bought_nameid, @bought_quantity ) == false ) { mes "It appears you can't carry them all"; close; } .@size = getarraysize( @bought_nameid ); for ( .@i = 0; .@i < .@size; .@i++ ) { for ( .@j = 0; .@j < .shop_size; .@j += 2 ) if ( @bought_nameid[.@i] == .itemshop[.@j] ) break; .@itemcost += .itemshop[.@j +1] * @bought_quantity[.@i]; } if ( .@itemcost > lotti_points ) { mes "You don't have enough Lotti Points"; close; } lotti_points -= .@itemcost; for ( .@i = 0; .@i < .@size; ++.@i ) getitem @bought_nameid[.@i], @bought_quantity[.@i]; deletearray @bought_nameid; deletearray @bought_quantity; mes "Thanks for buying ~"; close; } - shop Lotti#hidden -1,512:1000 Help Translate in Rathena, got an error in mesf
  5. 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. Here's my script that im currently using. Thanking you in advance for your kind help and support. lottigirl.txt
  6. Hi there, I've been trying to modify my lotti script into not have a default prize (If you lose you get this item). I just want a Lotti / Gacha script that will take the payment, then randomly select a reward (items that I set) with their respective chances. As my current lotti script goes (the one from rathena) when you roll and if you don't get any of the set rewards you will be rewarded with a DEFAULT prize. I don't want to get default prize, I just want to get the items that are set by how high the chance to get them. Just roll me all the items, highest chance to lowest chance. Thank you for the help This is the script // http://rathena.org/board/topic/83017-pro-lotti-girl-refine-master/ turbo_room,135,97,3 script Lotti Girl 720,{ mes "[Lotti Girl]"; mes "I'm Lotti! I'll exchange"; mes "Random Prizes for every"; mes "^ff000050,000 zeny^000000."; next; mes "[Lotti Girl]"; mes "Our Grand prize is:"; mes "^ff0000 +4 Refine Ticket^000000"; mes "Consolations are:"; mes "^ff0000 x1 Silver Coin^000000"; mes "^ff0000 x1 Bronze Coin^000000"; mes "^ff0000 x?? War Badges^000000"; mes "And many more!!"; if (Zeny < 50000) close; next; if(select("Let's Do This!!:No thanks...")==2) close; mes "[Lotti Girl]"; mes "Here we go..."; set Zeny, Zeny - 50000; set .@Total,5; //<%>,<ItemID>,<Amount> setarray .@P1[0],2,6456,1; setarray .@P2[0],3,675,1; setarray .@P3[0],4,673,1; setarray .@P4[0],5,7773,rand(1,2); setarray .@Default[0],11502,rand(1,3); 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<=2) announce "Hey! "+strcharinfo(0)+" just received "+getitemname(.@k[0])+" x "+.@k[1]+" from Lotti Girl!",0; specialeffect2 248; close; }
  7. I use this Lotti Girl script but this script don't have announcement when get item with low chance (such as < 5%) and i want to have the announcement so other player can read it anyone can help me? thank you in advance lotti.txt
  8. Hi everyone, i got the script of @Haruka Mayumi Lotti npc it works fine just getting stuck on this part when you have enough zeny to play the lotti, i wish it would just tell the player that he/she doesn't have enough zeny or enough item to play the lotti game. 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: 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)+"]"); } 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; }
  9. Hi, This script works perfectly well, kudos to the owner of this script, I forgot who I apologize but just wondering if we can make the Default prize on random as well? For example: Set default prize on random of red, yellow, white potion. instead of 1 default prize of red potion only. Gotta make setarray .@Default[0],19578,1; random, not just the 19578. function script Get_MysteryBox { set .@Total,7; //<%>,<ItemID>,<Amount> setarray .@P1[0],50,19543,1; setarray .@P2[0],90,19525,1; setarray .@P3[0],90,31171,1; setarray .@P4[0],90,19620,1; setarray .@P5[0],90,19527,1; setarray .@P6[0],90,19733,1; setarray .@P7[0],90,20057,1; setarray .@Default[0],19578,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<=1) announce "Congratulations! "+strcharinfo(0)+" just received "+getitemname(.@k[0])+" x "+.@k[1]+" from the Mystery Costume Box!",0; specialeffect2 248; close; }
  10. function script F_MesItemInfo { .@item = getarg(0); .@itemname$ = getitemname(.@item); if (.@itemname$ != "null") { .@itemslot = getitemslots(.@item); if (.@itemslot) .@itemname$ = sprintf("%s [%d]", .@itemname$, .@itemslot); } else .@itemname$ = "Unknown Item"; if (PACKETVER >= 20150729) return sprintf("<ITEM>%s<INFO>%d</INFO></ITEM>", .@itemname$, .@item); else if (PACKETVER >= 20130130) return sprintf("<ITEMLINK>%s<INFO>%d</INFO></ITEMLINK>", .@itemname$, .@item); else return .@itemname$; } //===== Hercules Script ====================================== //= Lotti Girl //===== By: ================================================== //= AnnieRuru //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= Hercules 2019-02-22 //===== Description: ========================================= //= Roll a lottery ticket and get some cool items //= even if you get all the trash items, you still collecting points to buy in lotti shop //===== Topic ================================================ //= http://herc.ws/board/topic/16579-lotti-girl/ //===== Additional Comments: ================================= //= //============================================================ /* create table lotti_rank ( char_id int(11), name varchar(24), lotti_point int(11), primary key (char_id), key (lotti_point) ) engine = innodb; */ prontera,155,180,5 script Lotti Girl 1_F_MARIA,{ goto L_talk; OnInit: // Announce to the server when player roll on a rare item .rare_announcement = 1; // Default 1 : means any item with 0.00%~0.99% // Amount of points gain for each roll .lotti_points = 1; // If the player choose to Roll Repeatedly, what is the maximum amount of Roll in the input .max_roll = 100; setarray .item, Id_Lottery_Ticket, // Item ID requirement 1, // amount of the Item needed 0, // chance of not getting any items // chance of getting the items // <Item ID>, <amount>, <chance> Apple, 10, 1000, Red_Potion, 5, 50, Orange_Potion, 4, 40, Yellow_Potion, 3, 30, White_Potion, 2, 20, Blue_Potion, 1, 10; setarray .itemshop, // Item sold in the shop // <Item ID>, <Lotti Points needed> Red_Potion, 100, Orange_Potion, 200, Yellow_Potion, 300, White_Potion, 400, Blue_Potion, 500; // ========================================================================================================= .size = getarraysize(.item); for ( .@i = 2; .@i < .size; .@i += 3 ) .totalchance += .item[.@i]; for ( .@i = 2; .@i < .size; .@i += 3 ) { .@chance = .item[.@i] *10000 / .totalchance; .@division = .@chance / 100; .@remainder$ = .@chance % 100; while ( getstrlen(.@remainder$) < 2 ) .@remainder$ = insertchar(.@remainder$, "0", 0); .chance_display$[.@i] = .@division +"."+ .@remainder$ +"%"; if ( .@division < .rare_announcement ) .announce[.@i] = true; } .shop_size = getarraysize(.itemshop); npcshopdelitem "Lotti#hidden", 512; for ( .@i = 0; .@i < .shop_size; .@i += 2 ) npcshopadditem "Lotti#hidden", .itemshop[.@i], .itemshop[.@i +1]; npcshopattach "Lotti#hidden"; .npcname$ = "["+ strnpcinfo(NPC_NAME) +"]"; end; L_talk: mes .npcname$; mes "Hello, do you want to play lottery ?"; next; switch( select( "Deal me in!", "More Information", "Lotti Shop", "Lotti Ranking" ) ) { mes .npcname$; case 1: mesf "It costs %dx %s to play.", .item[1], F_MesItemInfo( .item[0] ); if ( countitem( .item[0] ) < .item[1] ) close; next; if ( select( "Play", "Roll Repeatedly" ) == 1 ) { mes .npcname$; while ( true ) { mes "Here we go..."; mes " "; .@r = rand(.totalchance); for ( .@i = 2; ( .@r -= .item[.@i] ) >= 0; .@i += 3 ); if ( checkweight( .item[.@i -2], .item[.@i -1] ) == false ) { mes "It appears you have overweight"; break; } delitem .item[0], .item[1]; if ( .@i == 2 ) mes "You get nothing..."; else { mesf "You get %s%dx%s %s", F_MesColor(C_TEAL), .item[.@i -1], F_MesColor(C_BLACK), F_MesItemInfo(.item[.@i -2]); getitem .item[.@i -2], .item[.@i -1]; if ( .announce[.@i] ) announce sprintf( _$( "Lotti Girl: Player [%s] has roll on [%s](%s)" ), strcharinfo(0), getitemname(.item[.@i -2]), .chance_display$[.@i] ), bc_all, C_PINK; } lotti_points += .lotti_points; query_sql "insert into lotti_rank values ( "+ getcharid(CHAR_ID_CHAR) +", '"+ escape_sql( strcharinfo(PC_NAME) ) +"', "+ .lotti_points +" ) on duplicate key update lotti_point = lotti_point + "+ .lotti_points; mes " "; mes "wanna try again ?"; next; if ( select( "Yes", "No" ) == 2 ) break; mes .npcname$; if ( countitem( .item[0] ) < .item[1] ) { mes " "; mesf "It appears you have ran out of %s", F_MesItemInfo( .item[0] ); break; } } } else { mes .npcname$; mes "Input how many rounds to roll"; mesf "Currently you have %dx %s", countitem( .item[0] ), F_MesItemInfo( .item[0] ); next; input .@roll_input, 1, min( countitem( .item[0] ) / .item[1], .max_roll ); mes .npcname$; mesf "Are you sure you want to roll %d times ?", .@roll_input; next; if ( select( "Yes", "No" ) == 2 ) close; mes .npcname$; mes "Here we go..."; mes " "; // freeloop true; for ( .@j = 0; .@j < .@roll_input; ++.@j ) { .@r = rand(.totalchance); for ( .@i = 2; ( .@r -= .item[.@i] ) >= 0; .@i += 3 ); if ( checkweight( .item[.@i -2], .item[.@i -1] ) == false ) { mes "It appears you have overweight"; break; } delitem .item[0], .item[1]; if ( .@i == 2 ) mes "You get nothing..."; else { mesf "You get %s%dx%s %s", F_MesColor(C_TEAL), .item[.@i -1], F_MesColor(C_BLACK), F_MesItemInfo(.item[.@i -2]); getitem .item[.@i -2], .item[.@i -1]; if ( .announce[.@i] ) announce sprintf( _$( "Lotti Girl: Player [%s] has roll on [%s](%s)" ), strcharinfo(0), getitemname(.item[.@i -2]), .chance_display$[.@i] ), bc_all, C_PINK; } ++.@roll; sleep2 1; // prevent lag the server } lotti_points += .lotti_points * .@roll; query_sql "insert into lotti_rank values ( "+ getcharid(CHAR_ID_CHAR) +", '"+ escape_sql( strcharinfo(PC_NAME) ) +"', "+ .lotti_points +" ) on duplicate key update lotti_point = lotti_point + "+( .lotti_points * .@roll ); mesf "Total roll : %d times.", .@roll; } mes " "; mes "Thank you for using Lotti service~"; close; case 2: freeloop true; mesf "Item required: %s%dx%s %s", F_MesColor(C_TEAL), .item[1], F_MesColor(C_BLACK), F_MesItemInfo(.item[0]); if ( .item[2] ) mesf "Chance to gain nothing : %s%s%s", F_MesColor(C_CHOCOLATE), .chance_display$[2], F_MesColor(C_BLACK); mes "Possible gains:"; for ( .@i = 3; .@i < .size; .@i += 3 ) mesf "%s%dx%s %s (%s%s%s)", F_MesColor(C_TEAL), .item[.@i +1], F_MesColor(C_BLACK), F_MesItemInfo(.item[.@i]), F_MesColor(C_CHOCOLATE), .chance_display$[.@i +2], F_MesColor(C_BLACK); next; mes .npcname$; mesf "Each time you roll, will gain %d Lotti Points.", .lotti_points; mes "Which can be use to buy rare items in Lotti Shop."; close; case 3: mesf "You currently have %s Lotti Points.", lotti_points; dispbottom sprintf( _$("You currently have %s Lotti Points."), lotti_points ); close2; callshop "Lotti#hidden", 1; end; case 4: .@query$ = "SELECT `name`, IF(@d=t.`lotti_point`, @r, @r:=@i), @d:=t.`lotti_point`, @i:=@i+1 "; .@query$ += "FROM `lotti_rank` t, (SELECT @d:=0, @r:=0, @i:=1)q "; .@query$ += "ORDER BY `lotti_point` DESC LIMIT 5"; .@nb = query_sql(.@query$, .@name$, .@rank, .@points, .@dummy); if ( !.@nb ) { mes "There's no ranking yet ~"; close; } for ( .@i = 0; .@i < .@nb; ++.@i ) mesf "%d. %s%s %s%d%s Points", .@rank[.@i], F_MesColor(C_TEAL), .@name$[.@i], F_MesColor(C_CHOCOLATE), .@points[.@i], F_MesColor(C_BLACK); mes " "; if ( !query_sql( "SELECT `lotti_point`, 1+(SELECT COUNT(1) FROM `lotti_rank` t1 WHERE t1.lotti_point > t2.lotti_point) FROM `lotti_rank` t2 WHERE `char_id` = "+ getcharid(CHAR_ID_CHAR), .@points, .@rank ) ) { mes "You are not in the rank."; close; } mesf "Your current Point > %d", .@points; mesf "Your current Rank > %d", .@rank; close; } end; // shouldn't reach OnBuyItem: mes .npcname$; if ( !@bought_quantity ) end; if ( checkweight2( @bought_nameid, @bought_quantity ) == false ) { mes "It appears you can't carry them all"; close; } .@size = getarraysize( @bought_nameid ); for ( .@i = 0; .@i < .@size; .@i++ ) { for ( .@j = 0; .@j < .shop_size; .@j += 2 ) if ( @bought_nameid[.@i] == .itemshop[.@j] ) break; .@itemcost += .itemshop[.@j +1] * @bought_quantity[.@i]; } if ( .@itemcost > lotti_points ) { mes "You don't have enough Lotti Points"; close; } lotti_points -= .@itemcost; for ( .@i = 0; .@i < .@size; ++.@i ) getitem @bought_nameid[.@i], @bought_quantity[.@i]; deletearray @bought_nameid; deletearray @bought_quantity; mes "Thanks for buying ~"; close; } - shop Lotti#hidden -1,512:1000 how to work this on rathena? error on mesf lines
  11. Hello Guys Lotti Girl NPC kindly Useful @ 255 Server Using This Script : and i want to add some ideas @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
  12. here's my script // http://rathena.org/board/topic/83017-pro-lotti-girl-refine-master/ prontera,164,164,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"; mes "^ff00001 Lottery Ticket^000000."; next; mes "[Lotti Girl]"; mes "Our Grand prize is:"; mes "^ff0000Costume Kirin Wing^000000"; mes "Special prizes are:"; mes "^ff0000Costume Flying Angel Wing^000000"; mes "^ff0000____^000000"; mes "and ^ff0000____^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(7528) < 1) close; next; if(Weight >= MaxWeight/2) goto Low; Low: mes "You are Overweight!"; close; next; if(select("Deal me in!:No way...")==2) close; mes "[Lotti Girl]"; mes "Here we go..."; delitem 7528,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; OnInit: waitingroom "[Lotti Girl]",0; } }
  13. Lotti Girl & Refine Master pRO Lotti Girl This script is pretty much the same pRO's Lotti Girl NPC. You must have a Premium Ticket to be able to get the jackpot prize. Script is very easy to config. Adjustable chance. A semi user friendly script. Credits to Euphy //<Chance><ItemID><Item 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; pRO Refine Master This script is pretty much the same pRO's Refine Master NPC. Player should have Refine Deed Ticket as a requirement for the upgrade. set @c,select("+5 Weapon Deed", "+6 Weapon Deed", "+7 Weapon Deed", "+8 Weapon Deed", "+9 Weapon Deed", "+10 Weapon Deed", "+11 Weapon Deed", "+12 Weapon Deed", "+5 Armor Deed", "+6 Armor Deed", "+7 Armor Deed", "+8 Armor Deed", "+9 Armor Deed", "+10 Armor Deed", "+11 Armor Deed", "+12 Armor Deed"); set @deed_item_id,8000+@c; item_db2.txt: 8001,+5_Weapon_Refine_Deed,+5 Weapon Refine Deed,3,,10,10,,,,,,,,,,,,,{},{},{} idnum2itemdisplaynametable.txt: 8001#+5_Weapon_Refine_Deed# idnum2itemresnametable.txt: 8001#ÄíÆù# idnum2itemdesctable.txt: 8001# A ticket that upgrade to +5 your weapon safely. ^ffffff_^000000 Weight :^777777 0^000000 # Lotti Girl.txt Refine Master.txt Data Refine Deed.rar
  14. 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%
  15. I want this script to be like this Each players can use this NPC 10x every 24 hours after that it will reload again to 0/10 then when you click the npc it will show Lotti Girl Use 10/10 after you use it. Next it will say You can't use Lotti Girl now comeback tomorrow. prontera,163,193,5 script Lotti Girl 719,{ 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; 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; }
  16. Hi Guys, Just wondering if anybody can give me a Lotti Girl script like the one on pRO but will only be shown every friday and will automatically hide every saturday. Thank you.
  17. 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; }
  18. 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; }
  19. hi, requesting for a script npc that will convert your 10 voting points to 1 lotti ticket. please advise, thanks
  20. Yoona

    Lotti Girl

    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; }
  21. 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
  22. 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;
  23. 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.
  24. 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; }
×
×
  • Create New...