I really had no idea on this part how can i make this npc individual, since currently all the npc react the same, like if i start crafting on npc A i can still claim it from NPC B or C,D,E and the list goes on, how can i make it individuals, if player craft on NPC A, the player can only claim in from the NPC A, also how can i change the timer...
and how can i make the another version of the same NPC will only react to only it's own owner ? (Onwer must have a certain item indicate only it owner can talk to the NPC..)
Spoiler
- script Workbench-1,{if($wrkb_crafting_state ==1){
mes "Please wait until the crafting process is finished. ";
close;}if($wrkb_crafting_state ==2){
mes "Here are your crafted item.";for(.@i=0;.@i< getarraysize($product);.@i+=2)
getitem($product[.@i], $product[.@i+1]);
delwaitingroom;
$wrkb_crafting_state =0;
close;}
mes "==============================";
mes "^ff0000 Any crafted item using public Workbech can be stolen by other player !! ^000000";
mes "==============================";
next;
mes "What do you want to craft?";
next;switch(select("Stone Dagger:Stone Axe:Ropes:Stone Chunk:Cancel")){case1:if(countitem(40005)<4){
mes "^ff0000 To craft Stone Dagger ^000000";
mes "Require:-";
mes "- [4] Rocks";
close;}
delitem(40005,4);
setarray($product,40007,1,40009,1);gotoOnCraftingStart;case2:if(countitem(40018)<1|| countitem(40014)<2|| countitem(40003)<1){
mes "^ff0000 To craft Stone Axe ^000000";
mes "Require:-";
mes "- [1] Rock Chunk";
mes "- [2] Ropes";
mes "- [1] Branch";
close;}
delitem(40018,1);
delitem(40014,2);
delitem(40003,1);
setarray($product,40007,1,40017,1);gotoOnCraftingStart;case3:if(countitem(40008)<4){
mes "^ff0000 To craft Ropes ^000000";
mes "Require:-";
mes "- [4] Stalk";
close;}
delitem(40008,4);
setarray($product,40007,1,40014,1);gotoOnCraftingStart;case4:if(countitem(40005)<4){
mes "^ff0000 To craft Rock Chunk ^000000";
mes "Require:-";
mes "- [4] Rock";
close;}
delitem(40005,4);
setarray($product,40007,1,40018,1);gotoOnCraftingStart;case5:
mes "Crafting canceled.";
close;}
end;OnCraftingStart:
$wrkb_crafting_state =1;
waitingroom("CRAFTING...",0);
initnpctimer;
end;OnTimer60000:
$wrkb_crafting_state =2;
delwaitingroom;
waitingroom("COMPLETED!",0);
end;OnInit:.npc_name = strnpcinfo(1);if($wrkb_crafting_state ==1)gotoOnCraftingStart;}//Duplicate//=====================================================
new_1-3,98,58,6 duplicate(Workbench)Workbench#neko 665
new_1-3,98,50,6 duplicate(Workbench)Workbench#neko1 665
new_1-3,98,43,6 duplicate(Workbench)Workbench#neko2 665//new_1-3,113,45,6 duplicate(Workbench) Workbench#neko3 665//new_1-3,114,39,6 duplicate(Workbench) Workbench#neko4 665//new_1-3,110,36,6 duplicate(Workbench) Workbench#neko5 665//new_1-3,114,33,6 duplicate(Workbench) Workbench#neko6 665
Question
Dolphin86
I really had no idea on this part how can i make this npc individual, since currently all the npc react the same, like if i start crafting on npc A i can still claim it from NPC B or C,D,E and the list goes on, how can i make it individuals, if player craft on NPC A, the player can only claim in from the NPC A, also how can i change the timer...
and how can i make the another version of the same NPC will only react to only it's own owner ? (Onwer must have a certain item indicate only it owner can talk to the NPC..)
Link to comment
Share on other sites
5 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.