If possible how to set the difference of each point category??
//===== rAthena Script =======================================
//= Card Trader
//===== By: ==================================================
//= Elias (og2)
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: =====================================
//= rAthena Project; SVN r15340+
//===== Description: =========================================
//= Card and Points Trader
//===== Additional Comments: =================================
//= 1.0 Translated from the Official [Elias]
//= 1.1 Fixed variables and optimized script [Elias]
//= 1.2 Fixed char being stuck with breaks [Elias] (bugreport:5374)
//= 1.3 Optimized: reduced from 123kb to 7kb! [Euphy]
//= 1.4 Variables don't need to load OnInit. [Euphy]
//= 1.4a Misc. [Capuche]
//============================================================
prontera,115,90,0 script Putty 4_F_01,{
setarray .@card1[0], 20239,19606,20259,20193,20150,20279,20043,19992,19952,20030,
20264,20459,20147,20215,31096,19746,19853,19158,20270,20298,19826,19973,
20452,19971,20212,19557,20466,31092,19876,19974,19800,20232,19565,32120;
setarray .@card2[0], 20239,19606,20259,20193,20150,20279,20043,19992,19952,20030,
20264,20459,20147,20215,31096,19746,19853,19158,20270,20298,19826,19973,
20452,19971,20212,19557,20466,31092,19876,19974,19800,20232,19565,32120;
setarray .@card3[0], 20201,20034,20071,31055,20407,31093,20132,20416,20418,20419,20420,20421,20422,20423,20424;
setarray .@card4[0], 4120,4216,4217,4219,4221,4222,4230,4234,4233,4232,
4237,4238,4242,4243,4245,4246,4249,4252,4255,4258,
4262,4264,4276,4270,4271,4218,4239,4251,4253,4269;
setarray .@size_card[1], getarraysize(.@card1), getarraysize(.@card2), getarraysize(.@card3), getarraysize(.@card4);
.@points = oversea_event9;
if (!.@points) {
mes "[Putty]";
mes "Hi there.";
mes "I don't know if I can be";
mes "of any assistance, but I";
mes "am trying to help older veterans";
mes "by exchaning the costume headgear that";
mes "they are no longer using.";
next;
switch(select("Ask for more information!","I don't have any costume right now.")) {
case 1:
mes "[Putty]";
mes "I will giving 4 point for each Spesial Grade";
mes "4 point for each Rare Grade";
mes "2 point for each Medium Grade";
mes "1 point for each Low Grade";
mes "that you bring me.";
mes "The points can be used to exchange for random costume box.";
next;
mes "[Putty]";
mes "For ^CC00004 points^000000: ^0000CC1 Randon Costume Box^000000.";
next;
break;
case 2:
mes "[Putty]";
mes "Well, remember this offer!";
close;
}
} else {
mes "[Putty]";
mes "Welcome back!";
mes "I see you already have some";
mes "trading points. Actually, you currently have ^00cc00" + .@points + "^000000.";
next;
mes "[Putty]";
mes "Would you like to exchange these";
mes "points now, or you would like to exchange more costume headgear?";
next;
}
switch(select("I would like to exchange costume headgear.","Can I exchange the points?")) {
case 1:
mes "[Putty]";
mes "Please tell me what costume headgear you want to exchange.";
next;
input .@i$;
.@input$ = "_"+.@i$;
freeloop(1);
for(.@j = 1; .@j<4; .@j++) {
for(.@i = 0; .@i<.@size_card[.@j]; .@i++)
if (compare(.@input$,"_"+getitemname(getd(".@card"+.@j+"["+.@i+"]")))) {
.@card = getd(".@card"+.@j+"["+.@i+"]");
break;
}
sleep2 10; // For good measure
if (.@card) break;
}
freeloop(0);
mes "[Putty]";
if (!.@card) mes "Please, come back here if you want to exchange a costume headgear.";
else {
.@count = countitem(.@card);
if (!.@count) {
mes "You don't have any ^0055FF"+callfunc("F_GetPlural",getitemname(.@card))+"^000000 with you!";
close;
}
mes "You've got ^0055FF"+callfunc("F_InsertPlural",.@count,getitemname(.@card))+"^000000.";
mes " ";
mes "Would you like to exchange 1 point for each of them?";
next;
switch(select("Yes, please!","No, thank you.")) {
case 1:
delitem .@card,.@count;
oversea_event9 = (.@points+.@count);
mes "[Putty]";
mes "Alright, you have received ^CC0000"+.@count+"^000000 points.";
break;
case 2:
mes "[Putty]";
mes "Okay, let me know if I can help you with something else.";
break;
}
}
close;
case 2:
if (.@points) {
mes "[Putty]";
mes "These are the items that I have.";
next;
switch(select("1 Old Card Album - 50 Points","20 Yggdrasil Berry - 50 Points","10 Blue Potion - 20 Points","4 Honey - 1 Point","^777777Nerver mind.^000000")) {
case 1:
if (.@points < 100) break;
mes "[Putty]";
mes "Great, I wish you the best";
mes "of luck with this album. I have a";
mes "very good feeling about this one!";
oversea_event9 = .@points - 100;
getitem 616,1;
close;
case 2:
if (.@points < 50) break;
mes "[Putty]";
mes "Oh, you must like adventures.";
mes "Here you go, just what you need!";
oversea_event9 = .@points - 50;
getitem 607,20;
close;
case 3:
if (.@points < 20) break;
mes "[Putty]";
mes "Blue Potions? Are you sure?";
mes "If that's what you want, here they are!";
oversea_event9 = .@points - 20;
getitem 505,10;
close;
case 4:
if (.@points < 1) break;
mes "[Putty]";
mes "It took many bees";
mes "to make all of this.";
mes "Make good use of it.";
oversea_event9 = .@points - 1;
getitem 518,4;
close;
case 5:
mes "[Putty]";
mes "Alright, come back when you have more points.";
close;
}
mes "[Putty]";
mes "Sorry, but you don't have enough points.";
close;
} else {
mes "[Putty]";
mes "You have 0 points. You need at least 1 point to exchange.";
close;
}
}
}
Question
LearningRO
i want to make npc with thist function
4 Low Grade Costume item = 1 points
2 Mid Grade Costume item = 2 points
1 Rare Grade Costume item = 4 Points
1 Special Grade Costume item = 4 points
it's possible i use script card trader ??
If possible how to set the difference of each point category??
//===== rAthena Script ======================================= //= Card Trader //===== By: ================================================== //= Elias (og2) //===== Current Version: ===================================== //= 1.4 //===== Compatible With: ===================================== //= rAthena Project; SVN r15340+ //===== Description: ========================================= //= Card and Points Trader //===== Additional Comments: ================================= //= 1.0 Translated from the Official [Elias] //= 1.1 Fixed variables and optimized script [Elias] //= 1.2 Fixed char being stuck with breaks [Elias] (bugreport:5374) //= 1.3 Optimized: reduced from 123kb to 7kb! [Euphy] //= 1.4 Variables don't need to load OnInit. [Euphy] //= 1.4a Misc. [Capuche] //============================================================ prontera,115,90,0 script Putty 4_F_01,{ setarray .@card1[0], 20239,19606,20259,20193,20150,20279,20043,19992,19952,20030, 20264,20459,20147,20215,31096,19746,19853,19158,20270,20298,19826,19973, 20452,19971,20212,19557,20466,31092,19876,19974,19800,20232,19565,32120; setarray .@card2[0], 20239,19606,20259,20193,20150,20279,20043,19992,19952,20030, 20264,20459,20147,20215,31096,19746,19853,19158,20270,20298,19826,19973, 20452,19971,20212,19557,20466,31092,19876,19974,19800,20232,19565,32120; setarray .@card3[0], 20201,20034,20071,31055,20407,31093,20132,20416,20418,20419,20420,20421,20422,20423,20424; setarray .@card4[0], 4120,4216,4217,4219,4221,4222,4230,4234,4233,4232, 4237,4238,4242,4243,4245,4246,4249,4252,4255,4258, 4262,4264,4276,4270,4271,4218,4239,4251,4253,4269; setarray .@size_card[1], getarraysize(.@card1), getarraysize(.@card2), getarraysize(.@card3), getarraysize(.@card4); .@points = oversea_event9; if (!.@points) { mes "[Putty]"; mes "Hi there."; mes "I don't know if I can be"; mes "of any assistance, but I"; mes "am trying to help older veterans"; mes "by exchaning the costume headgear that"; mes "they are no longer using."; next; switch(select("Ask for more information!","I don't have any costume right now.")) { case 1: mes "[Putty]"; mes "I will giving 4 point for each Spesial Grade"; mes "4 point for each Rare Grade"; mes "2 point for each Medium Grade"; mes "1 point for each Low Grade"; mes "that you bring me."; mes "The points can be used to exchange for random costume box."; next; mes "[Putty]"; mes "For ^CC00004 points^000000: ^0000CC1 Randon Costume Box^000000."; next; break; case 2: mes "[Putty]"; mes "Well, remember this offer!"; close; } } else { mes "[Putty]"; mes "Welcome back!"; mes "I see you already have some"; mes "trading points. Actually, you currently have ^00cc00" + .@points + "^000000."; next; mes "[Putty]"; mes "Would you like to exchange these"; mes "points now, or you would like to exchange more costume headgear?"; next; } switch(select("I would like to exchange costume headgear.","Can I exchange the points?")) { case 1: mes "[Putty]"; mes "Please tell me what costume headgear you want to exchange."; next; input .@i$; .@input$ = "_"+.@i$; freeloop(1); for(.@j = 1; .@j<4; .@j++) { for(.@i = 0; .@i<.@size_card[.@j]; .@i++) if (compare(.@input$,"_"+getitemname(getd(".@card"+.@j+"["+.@i+"]")))) { .@card = getd(".@card"+.@j+"["+.@i+"]"); break; } sleep2 10; // For good measure if (.@card) break; } freeloop(0); mes "[Putty]"; if (!.@card) mes "Please, come back here if you want to exchange a costume headgear."; else { .@count = countitem(.@card); if (!.@count) { mes "You don't have any ^0055FF"+callfunc("F_GetPlural",getitemname(.@card))+"^000000 with you!"; close; } mes "You've got ^0055FF"+callfunc("F_InsertPlural",.@count,getitemname(.@card))+"^000000."; mes " "; mes "Would you like to exchange 1 point for each of them?"; next; switch(select("Yes, please!","No, thank you.")) { case 1: delitem .@card,.@count; oversea_event9 = (.@points+.@count); mes "[Putty]"; mes "Alright, you have received ^CC0000"+.@count+"^000000 points."; break; case 2: mes "[Putty]"; mes "Okay, let me know if I can help you with something else."; break; } } close; case 2: if (.@points) { mes "[Putty]"; mes "These are the items that I have."; next; switch(select("1 Old Card Album - 50 Points","20 Yggdrasil Berry - 50 Points","10 Blue Potion - 20 Points","4 Honey - 1 Point","^777777Nerver mind.^000000")) { case 1: if (.@points < 100) break; mes "[Putty]"; mes "Great, I wish you the best"; mes "of luck with this album. I have a"; mes "very good feeling about this one!"; oversea_event9 = .@points - 100; getitem 616,1; close; case 2: if (.@points < 50) break; mes "[Putty]"; mes "Oh, you must like adventures."; mes "Here you go, just what you need!"; oversea_event9 = .@points - 50; getitem 607,20; close; case 3: if (.@points < 20) break; mes "[Putty]"; mes "Blue Potions? Are you sure?"; mes "If that's what you want, here they are!"; oversea_event9 = .@points - 20; getitem 505,10; close; case 4: if (.@points < 1) break; mes "[Putty]"; mes "It took many bees"; mes "to make all of this."; mes "Make good use of it."; oversea_event9 = .@points - 1; getitem 518,4; close; case 5: mes "[Putty]"; mes "Alright, come back when you have more points."; close; } mes "[Putty]"; mes "Sorry, but you don't have enough points."; close; } else { mes "[Putty]"; mes "You have 0 points. You need at least 1 point to exchange."; close; } } }
somebody can help?
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.