Not tested. Also check out the basic_scripting page of rA's Wiki.
payon,107,327,0 script Man#NPC1 82,{
if (variablex < 1){
mes "[Man]";
mes "Would you spare 500Zeny";
mes "and some food- perhaps an apple?";
next;
if (select("Yes:No") == 1){
if (Zeny > 500 && countitem(512) > 0) {
mes "[Man]";
mes "Thank you!";
mes "God bless you.";
set Zeny,Zeny-500;
delitem 512,1;//Apple
set variablex,1;
}
else {
}
mes "[Man]";
mes "I understand if you";
mes "don't have anything to spare...";
}
}
else {
mes "[Man]";
mes "Thank you for your patronage.";
end;
}
}
payon,104,325,0 script Man#NPC2 919,{
if (variablex < 1) {
mes "[Man]";
mes "Life on the strees is";
mes "rough this time of year.";
end;
}
if (variablex == 1){
mes "[Man]";
mes "Such a generous soul...";
mes "Would you also spare me";
mes " 500Zeny and an apple?";
next;
if (select("Yes:No") == 1){
if (Zeny > 500 && countitem(512) > 0) {
mes "[Man]";
mes "Thank you!";
mes "God bless you.";
next;
mes "[Man]";
mes "It isn't much, but please";
mes "take this with you.";
set Zeny,Zeny-500;
delitem 512,1;//Apple
getitem 713,1;//Empty Bottle
set variablex,2;
end;
}
else {
}
mes "[Man]";
mes "I understand if you";
mes "don't have anything to spare...";
}
}
else {
mes "[Man]";
mes "I hope you find a good";
mes "home for that bottle.";
end;
}
}
Regards, ~Azura Skyy