NPC#1
prontera,157,171,4 script Tratoa 489,{
if (quest_tratoa == 1) {
mes "Que bueno terminaste la quest";
mes "Yo tambien puedo enviarte a Tradoa";
close;
}
mes "Esta es la ques que te llevara al mitico mapa Tratoa";
next;
mes "Tratoa esta alado de la carcel de mosntruos llamado Las Tinieblas";
next;
mes "Los mosntruos escaparon de las Tienieblas";
mes "Por lo cual constantemente mosntrus deviles y poderosos entran a tratoa diariamente";
next;
mes "Una ves completada esta Quest tendras acseso a Tratoa";
next;
mes "Primero que nada deves ablar con siertas personas dispersadas por todo Rune Midgar";
next;
mes "Al final de todo deveras ablar con Gonsalo esta alado mio... quien es el que te enviara a Tratoa y con el deveras ablar para poder ir siempre a tratoa";
next;
mes "Ahora ve y abla con Stefan que esta en izlude";
set quest_tratoa, 1;
close;
}
NPC#2
nif_fild01,273,245,5 script Skull Trader 910,{
mes "[ Skull Girl ]";
if (quest_tratoa == 1) {
mes "Hola soy el creador de las bloody branch";
mes "no le digas a nadie";
mes "Para hacer las bloody branch necesito lo siguiete";
next;
mes " "+.skull_required+" "+getitemname(.skull_id)+"";
mes " "+.skulla_required+" "+getitemname(.skulla_id)+"";
mes " "+.skulls_required+" "+getitemname(.skulls_id)+"";
mes .exchange_qty+"x "+getitemname(.exchange_id);
mes "How many ^FF0000Bloody Branch^000000 do you want to exchange?";
input .@input;
if(!.@input){
next;
mes "[ Skull Girl ]";
mes "Come back again~";
close;
}
//check if player has the needed amount of items
if(((.@input * .skull_required) < countitem(.skull_id)) || ((.@input * .skulla_required) < countitem(.skulla_id)) || ((.@input * .skulls_required) < countitem(.skulls_id))){
next;
mes "[ Skull Girl ]";
mes "You don't have enough skulls to exchange that many.";
close;
}
next;
delitem .skull_id,.skull_required * .@input;
delitem .skulla_id,.skulla_required * .@input;
delitem .skulls_id,.skulls_required * .@input;
getitem .exchange_id,.exchange_qty * .@input;
mes "[ Skull Girl ]";
mes "Oh em geeee";
mes "Yasss I hassss "+getitemname(.skull_id)+" "+getitemname(.skulla_id)+" "+getitemname(.skulls_id)+" nowwww!";
mes "Me so happy, here take these "+getitemname(.exchange_id)+"!";
close;
}
OnInit:
set.skull_required,20; //number of skulls
set.skulla_required,20; //number of skulls
set.skulls_required,20; //number of skulls
set.skull_id,604; //id # of skull
set.skulla_id,7203; //id # of skull
set.skulls_id,7347; //id # of skull
set.exchange_qty,1; //number of exchanged items
set.exchange_id,12103; //id # of exchanged item
end;
}
Your script put an NPC inside another NPC which is a bad practice.
Also, your checking script was a nested if statement and it would be bypassed if someone has the correct amount of 1 type of skull.
Please try the scripts above