i made this script with a friend, and both can't find where we screw up...
script works fine until we go to give all items to NPC, and get back the quest item !!!
if we have all the required itens works fine, but...
if we don't have 1 item exemple : needs 500 id = 607, we have 499 id = 607
the NPC remove all itens of the quest, and don't show any error !!!
there he is :
Quote
1@def02,30,38,4 script QuestsViajante#Killik4_M_YOUNGKNIGHT,{Inicio://Insira as quests aqui --
setarray .@quest_0,20854,1,0,660,150,734,200,990,400,975,30,7440,300,7447,300,7450,2,7444,50;//Red aura
setarray .@quest_1,20723,1,0,7063,200,1038,200,7048,10,641,300,983,30,7019,30,7297,10;//Black phonix wing
setarray .@quest_2,20795,1,0,7512,350,7507,350,7325,400,7315,250,7290,10,2255,3,4406,5,982,30;//skelletron
setarray .@quest_3,20813,1,0,4105,30,720,100,984,500,7321,250,2254,5,7446,250,978,30;//Cavalo marinho wing
setarray .@quest_4,20756,1,0,7507,250,995,300,7561,350,749,150,7319,400,978,15,982,15,7036,5;//Ice Metal wing//Nome do NPCset@nomedonpc$,"^B22222"+strnpcinfo(2)+"^000000";//Configuração Status//Interação do NPC
mes "["+@nomedonpc$+"]";
mes "Olá ^4682B4"+strcharinfo(0)+"^000000, sobre qual quest você quer saber mais?";for(set.@i,0; getd (".@quest_"+.@i);set.@i,.@i+1)set.@menu$,.@menu$+""+ getitemname (getd (".@quest_"+.@i))+":";set.@i, select(.@menu$)-1;set.@size, getarraysize (getd (".@quest_"+.@i));
next;VoltaMenu:
mes "["+@nomedonpc$+"]";
mes "Você escolheu ^9400D3"+ getitemname (getd (".@quest_"+.@i))+"^000000, o que deseja fazer?";switch(select("Trocar Item","Ver Itens Necessários","Ver Atributos","Visualizar Item","Escolher Outro Item","Sair")){case1:
next;
mes "["+@nomedonpc$+"]";
mes "Tem certeza?";switch(select ("Tenho sim.","Ainda não.")){case1:
next;for(set.@j,3;.@j<.@size;set.@j,.@j+2)if(countitem (getd (".@quest_"+.@i+"["+.@j+"]"))< getd (".@quest_"+.@i+"["+(.@j+1)+"]")||Zeny< getd (".@quest_"+.@i+"[2]")){if(rand(3)==0){
mes "["+@nomedonpc$+"]";
mes "Tá querendo me passar a perna, garot"+(Sex?"o":"a")+"? Sai fora! E só volte quando estiver com meus itens!";}elseif(rand (3)==1){
mes "["+@nomedonpc$+"]";
mes "Você realmente acha que pode me enganar fácil assim? Sai daqui e vá buscar meus itens!";}else{
mes "["+@nomedonpc$+"]";
mes "Tentando conseguir um item valioso como esse sem dar nada em troca? Sai da minha frente e não volte sem os itens de troca!";}
close;}else{for(set.@j,3;.@j<.@size;set.@j,.@j+2)
delitem getd (".@quest_"+.@i+"["+.@j+"]"), getd (".@quest_"+.@i+"["+(.@j+1)+"]");
getitem getd (".@quest_"+.@i+"[0]"), getd (".@quest_"+.@i+"[1]");setZeny,Zeny- getd (".@quest_"+.@i+"[2]");
mes "["+@nomedonpc$+"]";
mes "Aí está a sua recompensa.";
close;}case2:
next;
mes "["+@nomedonpc$+"]";
mes "Volte quando tiver certeza, não me faça mais perder tempo!";
close;}
close;case2:
next;
mes "["+@nomedonpc$+"]";
mes "Os itens que quero para produzir ^9400D3"+ getitemname (getd (".@quest_"+.@i))+"^000000 são:";for(set.@j,3;.@j<.@size;set.@j,.@j+2)
mes "- "+ getd (".@quest_"+.@i+"["+(.@j+1)+"]")+"x "+ getitemname(getd (".@quest_"+.@i+"["+.@j+"]"));if(getd (".@quest_"+.@i+"[2]"))
mes "- "+ getd (".@quest_"+.@i+"[2]")+" Zenies";
next;
deletearray .@menu$[0],getarraysize(.@menu$);gotoVoltaMenu;case3:
next;gotoStatusCustons;case4:set@bottomview, getlook(3);set@topview, getlook(4);set@midview, getlook(5);
addtimer 1000, strnpcinfo(3)+"::On_Leave";set@equip,getiteminfo(getd (".@quest_"+.@i),5);set@view, getiteminfo(getd (".@quest_"+.@i),11);if(@equip!=-1&&@view>0){if(@equip&1) atcommand "@changelook 3 "+@view;if(@equip&256) atcommand "@changelook 1 "+@view;if(@equip&512) atcommand "@changelook 2 "+@view;}
next;
atcommand "@changelook 1 "+@topview;
atcommand "@changelook 2 "+@midview;
atcommand "@changelook 3 "+@bottomview;set@equip,0;set@view,0;set@topview,0;set@midview,0;set@bottomview,0;gotoVoltaMenu;case5:
next;
deletearray .@menu$[0],getarraysize(.@menu$);gotoInicio;case6:
next;
mes "["+@nomedonpc$+"]";
mes "Volte quando realmente quiser algo!";
close;}On_Leave:set@bottomview, getlook(3);set@topview, getlook(4);set@midview, getlook(5);
atcommand "@changelook 1 "+@topview;
atcommand "@changelook 2 "+@midview;
atcommand "@changelook 3 "+@bottomview;set@equip,0;set@view,0;set@topview,0;set@midview,0;set@bottomview,0;
end;StatusCustons:if(getitemname (getd (".@quest_"+.@i)))== getitemname(getd (".@quest_0")){
mes "["+@nomedonpc$+"]";
mes "Os atributos de ^9400D3"+ getitemname (getd (".@quest_"+.@i))+"^000000 são:^4169E1";
mes " +10 Inteligência";
mes " +3 Desteza";
mes " +5 Vitalitade";
mes "+10% Congelar Atacante";}if(getitemname (getd (".@quest_"+.@i)))== getitemname(getd (".@quest_1")){
mes "["+@nomedonpc$+"]";
mes "Os atributos de ^9400D3"+ getitemname (getd (".@quest_"+.@i))+"^000000 são:^4169E1";
mes " +1 Inteligência";
mes " +3 Desteza";
mes " +5 Vitalitade";
mes "+10% Congelar Atacante";}if(getitemname (getd (".@quest_"+.@i)))== getitemname(getd (".@quest_2")){
mes "["+@nomedonpc$+"]";
mes "Os atributos de ^9400D3"+ getitemname (getd (".@quest_"+.@i))+"^000000 são:^4169E1";
mes " +1 Inteligência";
mes " +3 Desteza";
mes " +5 Vitalitade";
mes "+10% Congelar Atacante";}if(getitemname (getd (".@quest_"+.@i)))== getitemname(getd (".@quest_3")){
mes "["+@nomedonpc$+"]";
mes "Os atributos de ^9400D3"+ getitemname (getd (".@quest_"+.@i))+"^000000 são:^4169E1";
mes " +1 Inteligência";
mes " +3 Desteza";
mes " +5 Vitalitade";
mes "+10% Congelar Atacante";}if(getitemname (getd (".@quest_"+.@i)))== getitemname(getd (".@quest_4")){
mes "["+@nomedonpc$+"]";
mes "Os atributos de ^9400D3"+ getitemname (getd (".@quest_"+.@i))+"^000000 são:^4169E1";
mes " +1 Inteligência";
mes " +3 Desteza";
mes " +5 Vitalitade";
mes "+10% Congelar Atacante";}
next;
deletearray .@menu$[0],getarraysize(.@menu$);gotoVoltaMenu;}
i Will be grateful if anyone can help me with that
yO...
i made this script with a friend, and both can't find where we screw up...
script works fine until we go to give all items to NPC, and get back the quest item !!!
if we have all the required itens works fine, but...
if we don't have 1 item exemple : needs 500 id = 607, we have 499 id = 607
the NPC remove all itens of the quest, and don't show any error !!!
there he is :
i Will be grateful if anyone can help me with that
Share this post
Link to post
Share on other sites