Fizik Опубликовано 19 сентября, 2015 Жалоба Поделиться Опубликовано 19 сентября, 2015 prontera,155,181,3 script Dagos Reward Master 555,{mes "[^990000Dagos Reward Master^000000]";switch(select("I'm killed Monster's","Nothing")){Case 1:OnNPCKillEvent:if(killedrid == 3242) {mob_killed ++;if(mob_killed == 3000) {mes "Wow Good, This is your Reward, Thank you!";set Zeny,Zeny+10000000;completequest 7619;}}elseif(killedrid == 3243) {mob_killed ++;if(mob_killed == 2000) {mes "Wow Good, This is your Reward, Thank you!";set Zeny,Zeny+15000000;completequest 7621;}}elseif(killedrid == 3244) {mob_killed ++;if(mob_killed == 1000) {mes "Wow Good, This is your Reward, Thank you!";set Zeny,Zeny+20000000;completequest 7622;}}elseif(killedrid == 3231) {mob_killed ++;if(mob_killed == 1) {mes "Wow Good, This is your Reward, Thank you!";set Zeny,Zeny+5000000;completequest 7623;end;}}Case 2:mes "Good Bye";close;}}Проблема такая что бы я не выбрал он пишет "Good Bye";Вот, Помогите решить почему?) Ссылка на комментарий Поделиться на другие сайты Поделиться
Кеник Опубликовано 19 сентября, 2015 Жалоба Поделиться Опубликовано 19 сентября, 2015 switch(select("I'm killed Monster's:Nothing")){ Ссылка на комментарий Поделиться на другие сайты Поделиться
ocelote Опубликовано 19 сентября, 2015 Жалоба Поделиться Опубликовано 19 сентября, 2015 (изменено) Не тупите)Пасан использует лейбл который юзают для определения убийства моба в свитче, в диалоге!ЫДа еще и комплитквест без сетквеста и чекквеста? о.ОКароч как я и писал тебе в скайпе - переписывай, фигня какая-то вышла)npc header#1 {//берем квест, в твоем случае вешаем хз какую-то переменную чтоб определять что квест взят (сет квест не будет работать)//Например:quest_t = 1;//все квест команды можешь выкинуть из скрипта}npc header#2 -1,{// Этот нпц не должен быть виден, может конечно, но нельзя чтоб все говорили с ним, поэтому поставим сразу завершение.end;OnNPCKillEvent:if(quest_t && killedrid == mob_id) {mob_id_killed++;if(mob_id_killed == 1000) {dispbottom "Квест выполнен!";end;}}end;// тут можно еще попробовать заюзать динамические переменные через setd/getd, если монстров будет много.// но лучше юзать стандартную систему, и найти кусок кода где можно заменить дистанцию)}в общем, лень все расписывать, итак можно сказать вместо тебя уже сделал, дальше думай сам. Изменено 19 сентября, 2015 пользователем ocelote 1 Ссылка на комментарий Поделиться на другие сайты Поделиться
Fizik Опубликовано 20 сентября, 2015 Автор Жалоба Поделиться Опубликовано 20 сентября, 2015 (изменено) А можно как то сюда вставить куски? что бы он в квест панель добовлял кв и по завершению убирал?prontera,156,175,5 script Dagos Master 555,{if(c_run==1){mes "[^FF7700Questboard^000000]";mes "^0000FF"+getd("." + currentquest$ + "_collectionname$")+"^000000";mes "--------------------------------";for( set .@j, 0; .@j < getarraysize(getd("."+ currentquest$ + "_collectionitem")); set .@j,.@j+2){mes "^FF0000"+getitemname(getd("."+currentquest$+"_collectionitem["+.@j+"]"))+" - "+countitem(getd("."+currentquest$+"_collectionitem["+.@j+"]"))+"/"+getd("."+currentquest$+"_collectionitem["+(.@j+1)+"]")+" ea.^000000";}mes "--------------------------------";mes "[Reward]";mes "Item: ^0000FF"+((getd("." +currentquest$+"_collectionprize"))?getitemname(getd("." +currentquest$+"_collectionprize"))+" - "+getd("." +currentquest$+"_collectionamount")+" ea.^000000":"Nothing^000000");mes "Zeny: ^0000FF"+getd("." +currentquest$+"_collectionzeny")+"^000000";mes "Base EXP: ^0000FF"+getd("." +currentquest$+"_collectionexp["+0+"]")+"^000000";mes "Job EXP: ^0000FF"+getd("." +currentquest$+"_collectionexp["+1+"]")+"^000000";next;if(select("Finish:Abort") == 2){mes "[^FF7700Questboard^000000]";mes "Quest aborted.";set currentquest$, "";set c_run, 0;close;}goto L_checkitems;}if(h_run==1){mes "[^FF7700Questboard^000000]";mes "^0000FF"+getd("." + currentquest$ + "_huntingname$")+"^000000";mes "--------------------------------";for( set .@j, 0; .@j < getarraysize(getd("."+ currentquest$ + "_huntingmob")); set .@j,.@j+2){set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@j)+"]");mes "^FF0000"+strmobinfo(1,getd("."+currentquest$+"_huntingmob["+.@j+"]"))+" - "+getd(currentquest$+"_"+.@currentmob+"_"+(.@j+1)+"_killcount")+"/"+getd("."+currentquest$+"_huntingmob["+(.@j+1)+"]")+" ea.^000000";}mes "--------------------------------";mes "[Reward]";mes "Item: ^0000FF"+((getd("." +currentquest$+"_huntingprize"))?getitemname(getd("." +currentquest$+"_huntingprize"))+" - "+getd("." +currentquest$+"_huntingamount")+" ea.^000000":"Nothing^000000");mes "Zeny: ^0000FF"+getd("." +currentquest$+"_huntingzeny")+"^000000";mes "Base EXP: ^0000FF"+getd("." +currentquest$+"_huntingexp["+0+"]")+"^000000";mes "Job EXP: ^0000FF"+getd("." +currentquest$+"_huntingexp["+1+"]")+"^000000";next;if(select("Finish:Abort") == 2){mes "[^FF7700Questboard^000000]";mes "Quest aborted.";for(set .@x, 1; .@x < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@x,.@x+2){set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@x-1)+"]");setd(currentquest$+"_"+.@currentmob+"_"+.@x+"_killcount", 0);}set currentquest$, "";set h_run, 0;close;}goto L_checkmobs;}mes "[^FF7700Questboard^000000]";mes "Select category:";next;switch(select((.collection)?"Collection Quests":"", (.hunting)?"Hunting Quests":"", "Exit")) {case 1:set .@collectmenu$, "";for( set .@i,0; .@i < .collectionquestcount; set .@i,.@i+1){if (.@i) set .@collectmenu$,.@collectmenu$+":";set .@collectmenu$, .@collectmenu$ + "[" + getd("." +(.@i+1)+"_collectionmin") + " - " + getd("." +(.@i+1)+"_collectionmax") + "] " + getd("." + (.@i+1) + "_collectionname$");}set .@selection,select(.@collectmenu$);if(.quest_repeat == 1){if(gettimetick(2) < getd(.@selection + "_collection_delay")){set .@time_left, getd(.@selection + "_collection_delay")-gettimetick(2);mes "[^FF7700Questboard^000000]";if(.@time_left < 60) mes "You have to wait ^0000FF"+.@time_left+" seconds^000000 to do this quest again.";if(.@time_left < 3600) mes "You have to wait ^0000FF"+.@time_left/60+" minutes^000000 to do this quest again.";mes "You have to wait ^0000FF"+.@time_left/60/60+" hours^000000 to do this quest again.";close;}}else{if(getd(.@selection + "_collection_repeat") == 1){mes "[^FF7700Questboard^000000]";mes "You already did this quest.";mes "Please choose another one.";close;}}mes "[^FF7700Questboard^000000]";mes "^0000FF"+getd("." + .@selection + "_collectionname$")+"^000000";mes "--------------------------------";for( set .@j, 0; .@j < getarraysize(getd("."+ .@selection + "_collectionitem")); set .@j,.@j+2){mes "^FF0000"+getitemname(getd("."+.@selection+"_collectionitem["+.@j+"]"))+" - "+getd("."+.@selection+"_collectionitem["+(.@j+1)+"]")+" ea.^000000";}mes "--------------------------------";mes "[Reward]";mes "Item: ^0000FF"+((getd("." +.@selection+"_collectionprize"))?getitemname(getd("." +.@selection+"_collectionprize"))+" - "+getd("." +.@selection+"_collectionamount")+" ea.^000000":"Nothing^000000");mes "Zeny: ^0000FF"+getd("." +.@selection+"_collectionzeny")+"^000000";mes "Base EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+0+"]")+"^000000";mes "Job EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+1+"]")+"^000000";next;if(select("Accept:Decline") == 2){close;}if(BaseLevel >= getd("." +.@selection+"_collectionmin") && BaseLevel <= getd("." +.@selection+"_collectionmax")){mes "[^FF7700Questboard^000000]";mes "Quest accepted.";set c_run, 1;set currentquest$, .@selection;close;}else{mes "[^FF7700Questboard^000000]";mes "You don't have the required";mes "level to do this quest.";close;}case 2:set .@huntmenu$, "";for( set .@i,0; .@i < .huntingquestcount; set .@i,.@i+1){if (.@i) set .@huntmenu$,.@huntmenu$+":";set .@huntmenu$, .@huntmenu$ + "[" + getd("." +(.@i+1)+"_huntingmin") + " - " + getd("." +(.@i+1)+"_huntingmax") + "] " + getd("." + (.@i+1) + "_huntingname$");}set .@selection,select(.@huntmenu$);if(.quest_repeat == 1){if(gettimetick(2) < getd(.@selection + "_hunting_delay")){set .@time_left, getd(.@selection + "_hunting_delay")-gettimetick(2);mes "[^FF7700Questboard^000000]";if(.@time_left < 60) mes "You have to wait ^0000FF"+.@time_left+" seconds^000000 to do this quest again.";if(.@time_left < 3600) mes "You have to wait ^0000FF"+.@time_left/60+" minutes^000000 to do this quest again.";mes "You have to wait ^0000FF"+.@time_left/60/60+" hours^000000 to do this quest again.";close;}}else{if(getd(.@selection + "_hunting_repeat") == 1){mes "[^FF7700Questboard^000000]";mes "You already did this quest.";mes "Please choose another one.";close;}}mes "[^FF7700Questboard^000000]";mes "^0000FF"+getd("." + .@selection + "_huntingname$")+"^000000";mes "--------------------------------";for( set .@j, 0; .@j < getarraysize(getd("."+ .@selection + "_huntingmob")); set .@j,.@j+2){mes "^FF0000"+strmobinfo(1,getd("."+.@selection+"_huntingmob["+.@j+"]"))+" - "+getd("."+.@selection+"_huntingmob["+(.@j+1)+"]")+" ea.^000000";}mes "--------------------------------";mes "[Reward]";mes "Item: ^0000FF"+((getd("." +.@selection+"_huntingprize"))?getitemname(getd("." +.@selection+"_huntingprize"))+" - "+getd("." +.@selection+"_huntingamount")+" ea.^000000":"Nothing^000000");mes "Zeny: ^0000FF"+getd("." +.@selection+"_huntingzeny")+"^000000";mes "Base EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+0+"]")+"^000000";mes "Job EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+1+"]")+"^000000";next;if(select("Accept:Decline") == 2){close;}if(BaseLevel >= getd("." +.@selection+"_huntingmin") && BaseLevel <= getd("." +.@selection+"_huntingmax")){mes "[^FF7700Questboard^000000]";mes "Quest accepted.";set h_run, 1;set currentquest$, .@selection;close;}else{mes "[^FF7700Questboard^000000]";mes "You don't have the required";mes "level to do this quest.";close;}case 3:close;}L_checkitems:for( set .@k,0; .@k < getarraysize(getd("."+currentquest$+"_collectionitem")); set .@k,.@k+2){if(countitem(getd("."+currentquest$+"_collectionitem["+.@k+"]"))>=getd("."+currentquest$+"_collectionitem["+(.@k+1)+"]")){set .@checkitem,.@checkitem+2;}}if(.@checkitem<getarraysize(getd("."+currentquest$+"_collectionitem"))){mes "[^FF7700Questboard^000000]";mes "You don't have everything.";close;}for( set .@delcount,0; .@delcount < getarraysize(getd("."+currentquest$+"_collectionitem")); set .@delcount,.@delcount+2){delitem getd("."+currentquest$+"_collectionitem["+.@delcount+"]"),getd("."+currentquest$+"_collectionitem["+(.@delcount+1)+"]");}mes "[^FF7700Questboard^000000]";mes "Congratulation! Here is your Reward.";if(getd("." +currentquest$+"_collectionprize")!=0) getitem(getd("." +currentquest$+"_collectionprize"),getd("." +currentquest$+"_collectionamount"));set Zeny,Zeny+getd("." +currentquest$+"_collectionzeny");getexp getd("." +currentquest$+"_collectionexp["+0+"]"),getd("." +currentquest$+"_collectionexp["+1+"]");setd(currentquest$ + "_collection_delay"),gettimetick(2)+.quest_delay;setd(currentquest$ + "_collection_repeat"),1;set currentquest$, "";set c_run, 0;close;L_checkmobs:set .@goal, (getarraysize(getd("."+currentquest$+"_huntingmob"))/2);for(set .@i, 1; .@i < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@i,.@i+2){set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]");if(getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")==getd("."+currentquest$+"_huntingmob["+.@i+"]")){set .@checkmonster, .@checkmonster+1;if(.@checkmonster==.@goal){goto L_checkmobs2;}continue;}goto L_checkmobs2;}L_checkmobs2:if(.@checkmonster<.@goal){mes "[^FF7700Questboard^000000]";mes "You didn't kill everything.";close;}mes "[^FF7700Questboard^000000]";mes "Congratulation! Here is your Reward.";for(set .@x, 1; .@x < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@x,.@x+2){set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@x-1)+"]");setd(currentquest$+"_"+.@currentmob+"_"+.@x+"_killcount", 0);}if(getd("." +currentquest$+"_huntingprize")!=0) getitem(getd("." +currentquest$+"_huntingprize"),getd("." +currentquest$+"_huntingamount"));set Zeny, Zeny+getd("." +currentquest$+"_huntingzeny");getexp getd("." +currentquest$+"_huntingexp["+0+"]"),getd("." +currentquest$+"_huntingexp["+1+"]");setd(currentquest$ + "_hunting_delay"),gettimetick(2)+.quest_delay;setd(currentquest$ + "_hunting_repeat"),1;set currentquest$, "";set h_run, 0;close;OnNPCKillEvent:if(h_run!=1) end;for(set .@i, 1; .@i < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@i,.@i+2){if(killedrid==getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]")){set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]");if(getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")>=getd("."+currentquest$+"_huntingmob["+.@i+"]")) end;setd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount", getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+1);dispbottom getd("."+currentquest$+"_huntingname$")+": ["+strmobinfo(1,.@currentmob)+"] ("+ getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+"/"+getd("."+currentquest$+"_huntingmob["+.@i+"]")+")";if(getcharid(1) != 0 && .party_support == 1){getmapxy(.@map1$,.@x1,.@y1,0);set .@killerid, getcharid(3);set .@currentquest$, currentquest$;getpartymember getcharid(1),1;getpartymember getcharid(1),2;for(set .@j, 0; .@j < $@partymembercount; .@j++){if(isloggedin($@partymemberaid[.@j], $@partymembercid[.@j])){if(attachrid($@partymemberaid[.@j])){if(h_run==1 && getcharid(3) != .@killerid && .@currentquest$ == currentquest$ && HP > 0){getmapxy(.@map2$,.@x2,.@y2,0);if(.@map1$ == .@map2$ && distance(.@x1,.@y1,.@x2,.@y2) < .party_range){if(getd(.@currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")<getd("."+.@currentquest$+"_huntingmob["+.@i+"]")){setd(.@currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount", getd(.@currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+1);dispbottom getd("."+.@currentquest$+"_huntingname$")+": ["+strmobinfo(1,.@currentmob)+"] ("+ getd(.@currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+"/"+getd("."+.@currentquest$+"_huntingmob["+.@i+"]")+")";}}}}}}attachrid(.@killerid);}}continue;}end;OnInit:function AddCollection;function AddHunting;//Activate/Deactivate quest categories (1 - activated, 0 - deactivated)set .collection, 0;set .hunting, 1;//Quest Delay (seconds)//24 hours = 86400 secondsset .quest_delay, 0;//Activate/Deactivate repeatable quests (1 - activated, 0 - deactivated)set .quest_repeat, 1;//Activate/Deactivate party support(1 - activated, 0 - deactivated)set .party_support, 1;//Max range for party support (+- x & y coordinations)set .party_range, 25;//Checks if quests are loaded (prevents out of index)if(.questsloaded==1) end;set .questsloaded, 1;//Add Collection Quests here (You can add as many required items as you want)//AddCollection("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Item ID>,<Item Amount>,...);//Add Hunting Quests here (You can add as many required mobs as you want)//AddHunting("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Monster ID>,<Monster Amount>,...);AddHunting("Easy Dagos Quest",80,99,0,0,10000000,500000,500000,3242,3000);AddHunting("Normal Dagos Quest",80,99,0,0,15000000,500000,500000,3243,2000);AddHunting("Hard Dagos Quest",80,99,0,0,20000000,500000,500000,3244,1000);AddHunting("Boss Dagos Quest",80,99,0,0,5000000,500000,500000,3231,1);end;function AddCollection{set .collectionquestcount,.collectionquestcount+1;setd ("." +.collectionquestcount+"_collectionname$", getarg(0));setd ("." +.collectionquestcount+"_collectionmin", getarg(1));setd ("." +.collectionquestcount+"_collectionmax", getarg(2));setd ("." +.collectionquestcount+"_collectionprize", getarg(3));setd ("." +.collectionquestcount+"_collectionamount", getarg(4));setd ("." +.collectionquestcount+"_collectionzeny", getarg(5));set .@argcount, 6;set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionexp"));setd ("." +.collectionquestcount+"_collectionexp["+.@size+"]",getarg(.@argcount)); setd ("." +.collectionquestcount+"_collectionexp["+(.@size+1)+"]",getarg(.@argcount+1)); set .@argcount, .@argcount+2;while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1){set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionitem"));setd ("."+.collectionquestcount+"_collectionitem["+.@size+"]",getarg(.@argcount)); setd ("."+.collectionquestcount+"_collectionitem["+(.@size+1)+"]",getarg(.@argcount+1));set .@argcount,.@argcount+2;}return;}function AddHunting{set .huntingquestcount,.huntingquestcount+1;setd ("." +.huntingquestcount+"_huntingname$", getarg(0));setd ("." +.huntingquestcount+"_huntingmin", getarg(1));setd ("." +.huntingquestcount+"_huntingmax", getarg(2));setd ("." +.huntingquestcount+"_huntingprize", getarg(3));setd ("." +.huntingquestcount+"_huntingamount", getarg(4));setd ("." +.huntingquestcount+"_huntingzeny", getarg(5));set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingexp"));set .@argcount, 6;setd ("." +.huntingquestcount+"_huntingexp["+.@size+"]",getarg(.@argcount));setd ("." +.huntingquestcount+"_huntingexp["+(.@size+1)+"]",getarg(.@argcount+1)); set .@argcount, .@argcount+2;while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1){set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingmob"));setd ("."+.huntingquestcount+"_huntingmob["+.@size+"]",getarg(.@argcount)); setd ("."+.huntingquestcount+"_huntingmob["+(.@size+1)+"]",getarg(.@argcount+1));set .@argcount, .@argcount+2;}return;}} Изменено 20 сентября, 2015 пользователем Fizik Ссылка на комментарий Поделиться на другие сайты Поделиться
wl.illusion Опубликовано 20 сентября, 2015 Жалоба Поделиться Опубликовано 20 сентября, 2015 Скрипт полностью можно? Чтобы решить как помочь.А то представленый в тс кусок мягко говоря не рабочий, и заниматься телепатией что и как должно было работать — лень. 1 Ссылка на комментарий Поделиться на другие сайты Поделиться
Fizik Опубликовано 20 сентября, 2015 Автор Жалоба Поделиться Опубликовано 20 сентября, 2015 яя уже решил проблему с нерабочим скриптом, я просто спросил как можно с доской заданий похимичить что бы взятый кв отображался в панельке заданий 1 Ссылка на комментарий Поделиться на другие сайты Поделиться
ThisMushroom Опубликовано 24 декабря, 2015 Жалоба Поделиться Опубликовано 24 декабря, 2015 @Fizik, Находишь 109 и 164 строки, после них вставляешь добавление квеста1 в журнал заданий (детальнее о том как добавлять квесты в журнал заданий читаешь в доках).Находишь 198 строку(внутри L_checkitems) и 233 cтроку(внутри L_checkmobs), вставляешь выполнение задания. Только не вставь выполнение после обнуления переменной квеста.Дополнительные проверки не вижу симысла вставлять, их там и так хватает.1 - лучше написать функцию, и не загромождать скрипт дубликатами кода (хотя это не спасет ситуацию).P.S. Используйте кэмелКейс или снейк_кейс. Из глаз мимовольно начинает течь кровь, когда пытаешься прочитать такую кашу. Если код не ваш и он в таком виде - любая IDE позволяет автоматически отрефакторить код. 1 Ссылка на комментарий Поделиться на другие сайты Поделиться
Рекомендуемые сообщения