if(Game->Counter[CR_RUPEES]+Game->DCounter[CR_RUPEES]>=price){
DrawPrice(this->X+pricexoffset, this->Y+18, price);
MessageWithName(STR_BUYQUESTION, Name);
WaitNoAction();
int Yes[] = "Yes";
int No[] = "No";
int CYes = 1;
int CNo = 6;
while(!Link->PressA){
if(Link->PressLeft||Link->PressRight){
Game->PlaySound(69);
if(CYes==1){
CYes = 6;
CNo = 1;
}
else{
CYes = 1;
CNo = 6;
}
}
Screen->DrawTile(6, 24, 8, TIL_NAMEBOX, 5, 3, 7, -1, -1, 0, 0, 0, 0, true, 128);
Screen->DrawString(6, 64, 16, FONT_GBLA, 6, -1, TF_CENTERED, Name, 128);
Screen->DrawTile(6, 24, 32, TIL_BUYQUESTION, 13, 3, 7, -1, -1, 0, 0, 0, 0, true, 128);
Screen->DrawTile(6, 152, 8, TIL_NAMEBOX, 5, 3, 7, -1, -1, 0, 0, 0, 0, true, 128);
Screen->DrawCharacter(6, 192, 16, FONT_GBLA, 1, -1, -1, -1, 47, 128);
Screen->DrawString(6, 172, 16, FONT_GBLA, CYes, -1, TF_CENTERED, Yes, 128);
Screen->DrawString(6, 212, 16, FONT_GBLA, CNo, -1, TF_CENTERED, No, 128);
DrawPrice(this->X+pricexoffset, this->Y+18, price);
WaitNoAction();
}
Game->PlaySound(65);
if(CYes==6){
item itm = CreateItemAt(itemid, Link->X, Link->Y);
itm->Pickup = IP_HOLDUP;
Game->DCounter[CR_RUPEES]-=price;
for(int i=0; i<10||Link->Action==LA_HOLD1LAND||Link->Action==LA_HOLD2LAND; i++){
DrawPrice(this->X+pricexoffset, this->Y+18, price);
WaitNoAction();
}
}
else{
for(int i=0; i<10; i++){
DrawPrice(this->X+pricexoffset, this->Y+18, price);
WaitNoAction();
}
}
}