as title said, i was trying to add @craft command so that player can call the npc from any map, but for dumb reason it did not work. here are the details.
Spoiler
and here are the script:
Spoiler
neko_isle,77,127,4 script Crafter826,{OnAtcommand:
mes "^00c000Master Craft^000000";
mes "Please select which would you like to craft";
next;switch(select("- Weapon:- Armor:- Headgear:- Accessories:- Shield:- Garment:- Footgear:- Usable Item:- Exit")){case1:
mes "^00c000Master Craft^000000";
mes "Please select which would you like to craft";
next;switch(select("- Dagger:- 1 Hand Swords:- 2 Hand Swords:- 1 Hand Spear:- 2 Hand Spear:- 1 Hand Axe:- 2 Hand Axe:- Mace:- 1 Hand Staff:- 2 Hand Staff:- Bow:- Knuckle:- Musical Weapons:- Whip:- Book:- Katar:- Revolver:- Rifle:- Gatling Gun:- Shot Gun:- Grenade Luncher:- Shuriken:- Exit")){case1:
mes "^00c000Master Craft^000000";
mes "Just give me the required items and ill give you Coin of Ymir.";
mes "Required Mats per ^FF0000"+getitemname(.GiveItem)+"^000000:";for(set.@i,0;.@i< getarraysize(.Item)-1;set.@i,.@i+2)
mes "- ^FF0000"+.Item[.@i+1]+" "+getitemname(.Item[.@i]);
next;if( select("Make ^FF0000"+getitemname(.GiveItem)+"^000000:Cancel")==2) end;
mes "[Ymir Coin Exchanger]";
mes "How many would you like to make?";
next;
input .@amount,1,999;
mes "[Ymir Coin Exchanger]";
mes .@amount+"x ^FF0000"+getitemname(.GiveItem)+"^000000, is this correct?";
next;if( select("Yes, Make ^FF0000"+.@amount+" "+getitemname(.GiveItem)+"^000000:Cancel")==2) end;for(set.@i,0;.@i< getarraysize(.Item)-1;set.@i,.@i+2)if( countitem(.Item[.@i])<.Item[.@i+1]*.@amount){
mes "[Ymir Coin Exchanger]";
mes "Insufficient Materials";for(set.@i,0;.@i< getarraysize(.Item)-1;set.@i,.@i+2)
mes "- Need ( "+countitem(.Item[.@i])+"/"+.Item[.@i+1]*.@amount+" ) "+getitemname(.Item[.@i]);
end;}if(!checkweight(.GiveItem,.@amount)){
mes "Insufficient inventory space or weight.";
end;}for(set.@i,0;.@i< getarraysize(.Item)-1;set.@i,.@i+2)
delitem .Item[.@i],.Item[.@i+1]*.@amount;
getitem .GiveItem,.@amount;
mes "[Ymir Coin Exchanger]";
mes "You have Made ^FF0000"+.@amount+"x "+getitemname(.GiveItem)+"^000000";
announce "["+strcharinfo(0)+"] has made "+.@amount+"x ["+getitemname(.GiveItem)+"]",0;
close;OnInit:
bindatcmd "craft","Crafter::OnAtcommand";// What Item you want to Make ?set.GiveItem,7539;// Item Requirements + Amounts
setarray .Item[0],607,1,608,1,512,1;
end;case2:
mes "^00c000Master Craft^000000";
mes "1 Hand Swords";
end;case3:
mes "^00c000Master Craft^000000";
mes "2 Hand Swords";
end;case4:
mes "^00c000Master Craft^000000";
mes "1 Hand Spear";
end;case5:
mes "^00c000Master Craft^000000";
mes "2 Hand Spear";
end;case6:
mes "^00c000Master Craft^000000";
mes "1 Hand Axe";
end;case7:
mes "^00c000Master Craft^000000";
mes "2 Hand Axe";
end;case8:
mes "^00c000Master Craft^000000";
mes "Mace";
end;case9:
mes "^00c000Master Craft^000000";
mes "1 Hand Staff";case10:
mes "^00c000Master Craft^000000";
mes "2 Hand Staff";
end;case11:
mes "^00c000Master Craft^000000";
mes "Bow";
end;case12:
mes "^00c000Master Craft^000000";
mes "Knuckle";
end;case13:
mes "^00c000Master Craft^000000";
mes "Musical Weapons";
end;case14:
mes "^00c000Master Craft^000000";
mes "Whip";
end;case15:
mes "^00c000Master Craft^000000";
mes "Book";
end;case16:
mes "^00c000Master Craft^000000";
mes "Katar";
end;case17:
mes "^00c000Master Craft^000000";
mes "Revolver";
end;case18:
mes "^00c000Master Craft^000000";
mes "Rifle";
end;case19:
mes "^00c000Master Craft^000000";
mes "Gatling Gun";
end;case20:
mes "^00c000Master Craft^000000";
mes "Shot Gun";
end;case21:
mes "^00c000Master Craft^000000";
mes "Grenade Luncher";
end;case22:
mes "^00c000Master Craft^000000";
mes "Shuriken";
end;case23:
mes "^00c000Master Craft^000000";
mes "Good Bye";
close;}case2:
warp "payon",165,59;// Change this warp coordinates
end;case3:
warp "morocc",160,85;// Change this warp coordinates
end;case4:
warp "geffen",119,67;// Change this warp coordinates
end;case5:
warp "alberta",117,57;// Change this warp coordinates
end;case6:
warp "aldebaran",141,114;// Change this warp coordinates
end;case7:
warp "comodo",196,143;// Change this warp coordinates
end;case8:
warp "izlude",127,107;// Change this warp coordinates
end;case9:
mes "[Rohayu]";
mes "Well if you need warp just come look for me";
mes "Good Bye";
close;}}
and yeah the script is not well polished, if anyone could polish it for me that would be very nice.
the idea was for player to use command @craft and it will lay out the script for the player no matter where he is in the server
Question
Dolphin86
as title said, i was trying to add @craft command so that player can call the npc from any map, but for dumb reason it did not work. here are the details.
and here are the script:
and yeah the script is not well polished, if anyone could polish it for me that would be very nice.
the idea was for player to use command @craft and it will lay out the script for the player no matter where he is in the server
thanks
Edited by Dolphin862 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.