my script don't work and I don't know where is the error ;x
Script:
- shop Obsc#Colored Feather Beret -1,20043:0,20044:0,20046:0,20049:0,20050:0,20051:0,20052:0;
- shop Obsc#Colored Baphomet Horns -1,20154:0,20155:0,20156:0,20157:0,20158:0,20159:0,20160:0,20161:0,20162:0;
- shop Obsc#Colored Cowboy Hats -1,20140:0,20141:0,20142:0,20143:0,20144:0,20145:0,20146:0;
- shop Obsc#Colored Dark Fairy Wings -1,23093:0,23094:0,23095:0,23096:0,23097:0,23098:0;
- shop Obsc#Colored Crunch Toast -1,23075:0,23076:0,23077:0,23078:0,23079:0,23080:0,23081:0,23082:0;
- shop Obsc#Colored Angel Wing Ears -1,21006:0,21007:0,21008:0,21009:0,21010:0,21011:0,21012:0,21006:0;
- shop Obsc#Colored Gangster Scarf -1,23053:0,23053:0,23054:0,23055:0,23056:0,23057:0,23058:0,23059:0;
dragonia,67,79,0 script Quest 51,{
set .name$, "^3399FF[Quest NPC]^000000";
mes ""+.name$+"";
mes "Hello.";
mes "What are you searching for?";
next;
switch(select("Feather Berets:Baphomet Horns:Cowboy Hats:Dark Fairy Wings:Crunch Toasts:Angel Wing Ears:Gangster Scarfs"))
{
case 1: set @quest,1; npcshopattach "Obsc#Colored Feather Beret",1; callshop "Obsc#Colored Feather Beret",1; end;
case 2: set @quest,2; npcshopattach "Obsc#Colored Baphomet Horns",1; callshop "Obsc#Colored Baphomet Horns",1; end;
case 3: set @quest,3; npcshopattach "Obsc#Colored Cowboy Hats",1; callshop "Obsc#Colored Cowboy Hats",1; end;
case 4: set @quest,4; npcshopattach "Obsc#Colored Dark Fairy Wings",1; callshop "Obsc#Colored Dark Fairy Wings",1; end;
case 5: set @quest,4; npcshopattach "Obsc#Colored Crunch Toast",1; callshop "Obsc#Colored Crunch Toast",1; end;
case 6: set @quest,4; npcshopattach "Obsc#Colored Angel Wing Ears",1; callshop "Obsc#Colored Angel Wing Ears",1; end;
case 7: set @quest,4; npcshopattach "Obsc#Colored Gangster Scarf",1; callshop "Obsc#Colored Gangster Scarf",1; end;
}
OnBuyItem:
mes ""+.name$+"";
mes "^0000FF"+getitemname(@bought_)+"^000000 costs:";
switch(@quest)
{
//Colored Feather Beret
case 1:
set .@req1,5170;
set .@amount1,1;
set .@req2,916;
set .@amount2,50;
break;
//Colored Baphomet Horns
case 2:
set .@req1,939;
set .@amount1,150;
set .@req2,2256;
set .@amount2,1;
set .@req3,7161;
set .@amount3,200;
break;
//Colored Cowboy Hats
case 3:
set .@req1,5120;
set .@amount1,1;
set .@req2,7214;
set .@amount2,150;
set .@req3,949;
set .@amount3,100;
break;
//Colored Dark Fairy Wings
case 4:
set .@req1,7006;
set .@amount1,200;
set .@req2,1039;
set .@amount2,150;
set .@req3,2255;
set .@amount3,1;
break;
//Colored Crunch Toast
case 5:
set .@req1,5107;
set .@amount1,1;
set .@req2,553;
set .@amount2,50;
break;
//Colored Angel Wing Ears
case 6:
set .@req1,2254;
set .@amount1,10;
set .@req2,2286;
set .@amount2,10;
set .@req3,714;
set .@amount3,10;
set .@req4,5074;
set .@amount4,1;
break;
//Colored Gangster Scarf
case 7:
set .@req1,7216;
set .@amount1,250;
set .@req2,7215;
set .@amount2,50;
break;
//Standart
default:
set .@req1,7061;
set .@amount1,500;
set .@req2,7036;
set .@amount2,15;
set .@req3,674;
set .@amount3,25;
set .@req4,674;
set .@amount4,25;
break;
}
mes ""+.@amount1+"x "+getitemname(.@req1)+"";
mes ""+.@amount2+"x "+getitemname(.@req2)+"";
mes ""+.@amount3+"x "+getitemname(.@req3)+"";
dispbottom ""+getitemname(@bought_nameid)+":";
dispbottom ""+.@amount1+"x "+getitemname(.@req1)+"";
dispbottom ""+.@amount2+"x "+getitemname(.@req2)+"";
dispbottom ""+.@amount3+"x "+getitemname(.@req3)+"";
if (getgmlevel()>=80) {
dispbottom "[GM Bonus] You got "+@bought_20008+"";
getitem @bought_nameid, 1;
}
next;
switch(select("I've got the items!:I will search them"))
{
case 1: break;
case 2: mes ""+.name$+""; mes "good luck!"; close;
}
mes ""+.name$+"";
if (countitem(.@req1) < .@amount1) {mes "You don't have "+.@amount1+"x "+getitemname(.@req1)+""; close; }
if (countitem(.@req2) < .@amount2) {mes "You don't have "+.@amount2+"x "+getitemname(.@req2)+""; close; }
if (countitem(.@req3) < .@amount3) {mes "You don't have "+.@amount3+"x "+getitemname(.@req3)+""; close; }
if (countitem(.@req4) < .@amount4) {mes "You don't have "+.@amount4+"x "+getitemname(.@req4)+""; close; }
mes "are you sure you want to trade your items?";
switch(select("Yes:No"))
{
case 1: break;
case 2: mes ""+.name$+""; mes "Well... think about it!"; close;
}
delitem .@req1, .@amount1;
delitem .@req2, .@amount2;
delitem .@req3, .@amount3;
delitem .@req3, .@amount4;
getitem @bought_nameid, 1;
set #quests,#quests+1;
close;
}
Question
Werdio
Hello,
my script don't work and I don't know where is the error ;x
Script:
Link to comment
Share on other sites
4 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.