The title of the post is very self-describing! I'm here because I need your help on this issue, I developed an NPC for an instance of Chefenia, I applied hideonnpc and hideoffnpc and in theory it works well! But he is just hidding the main NPC, his duplicates are on display, I wonder if you could help me.
Follow the NPC code;
Spoiler
//=================================|===============|||||||/////\\\\\\|||||||||||/////////\ |/////|==============|//Cheffenia |===============||||||//////\\\\\\\||||||||||//////////\ |/////|==============|//=================================|===============|||||///////\\\\\\\\|||||||||///////////\ |/////|==============|//Script adaptado para: .|=====||||||||||||||/////// \\\\\\\\||||||||////////////\ |/////|==============|//=================================|===========|||||||/////// \\\\\\\\|||||||/////| \/////\ |/////|==============|//=================================|===========||||||/////// \\\\\\\\||||||/////| \/////\ |/////|==============|//Adaptado por: Fanthasy |===========|||||///////////\\\\\\\\\\\\|||||/////| \/////\ |/////|==============|//=================================|=====||||||||||////////////\\\\\\\\\\\\\||||/////| \////////////|==============|//Versão: 1.6 |=====|||||||||/////// \\\\\\\\\|||/////| \///////////|==============|//=================================|=====||||||||/////// \\\\\\\\\||/////| \//////////|==============|// |=====|||||||/////// \\\\\\\\\|/////| \/////////|==============|//=====================================================================================================|==============|- script Sample-1,{OnNPCKillEvent:
setarray .@IDMvP[0],2600,2601,2602,2603,2604,2605,2606,2606,2607,2608,2609,2610,2611,2612,2613,2614,2615,2616,2617,2618,2619,2620,2621,2622,2623,2624,2625,2626,2627,2628,2629,2630,2631,2632,2633,2635,2636,2637,2638,2639,2640,2641,2642,2643,2645;
setarray .@PTMvP[0],1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,5,1,1,1,1,1,1,1,1,1,1,1,1,5,15,15,15,15,15,15,15,15,15,35,30,40,45,50;
setarray .@reward[0],14970,1,1,//Tiquet VIP 5 dias20060,1,5,//Caixa de Stuffs12210,1,2,// Goma de Mascar13989,1,50,//Caixa de Bomba Ácida2345,1,1,//Couraça da Furia Flamejante Slotada2347,1,1,//Couraça da Submissão Oceânica Slotada2349,1,1,//Couraça da Liberdade Celestial Slotada2351,1,1,//Couraça da Perceverança Continental2543,1,2,//Manteal de Sílfides2439,1,2,//Sapatos Refrescantes20062,1,001,//Ticket Comércio Cheffenia2737,1,1,//Tornozeleira Marinha14999,1,1,//150 Bandeiras Nacionais//4702, 1, 01, //RUNA FOR+3//4712, 1, 01, //RUNA INT+3//4722, 1, 01, //RUNA DEX+3//4732, 1, 01, //RUNA AGI+3//4742, 1, 01, //RUNA VIT+3//4752, 1, 01, //RUNA LUK+32787,1,2,//Broche Gota D'agua2789,1,2,//Anél de Bradium2790,1,2,//Broche de Bradium2788,1,2,//Brinco de Bradium7619,1,001,//Elunium Enriquecido7620,1,001,//Oridecom Enriquecido30136,1,1,//Bastão de Coelho30135,1,15,//Balão de Ash30601,1,10,// Aura de LHZ Preta Vermelha30200,1,50,//Aura de Abóboras30229,1,50,//Aura de Balões Flutuantes30182,1,50,//Aura de Borboletas30186,1,25,//Fone de Ouvidos Branco30600,1,1,//DeadMouse Cinza30602,1,1,//DeadMouse Azul30604,1,1,//DeadMouse Verde30606,1,1,//DeadMouse Laranja30608,1,1,//DeadMouse Vermelho30238,1,1;//DeadMouse Rosafor(set.@i,0;.@i< getarraysize(.@IDMvP);set.@i,.@i+1)if((killedrid ==.@IDMvP[.@i])&&( strcharinfo(3)=="bossnia_01")){set#pointbosnia,#pointbosnia + .@PTMvP[.@i];
dispbottom "Parabéns, você acaba de derrotar o monstro "+getmonsterinfo(killedrid,0)+", sua pontuação por recompensa é de "+.@PTMvP[.@i]+" pontos!";
dispbottom "Você tem "+#pointbosnia+" de pontos";for(set.@a,0;.@a< getarraysize(.@reward);set.@a,.@a+3){set.@rand,rand(0,10000);if((getitemname(.@reward[.@a])!="null")&&(.@rand<=.@reward[.@a+2])){
getitem .@reward[.@a],.@reward[.@a+1];
announce "O player "+strcharinfo(0)+" obteve "+.@reward[.@a+1]+"x "+getitemname(.@reward[.@a])+" por ter matado o monstro "+getmonsterinfo(killedrid,0)+".",0;}}}
end;}
bossnia_01,203,204,0 warp bossnia04 1,1,prontera,156,176
bossnia_01,0,0,0,0 monster [Boss]Hatii2600,2,300000
bossnia_01,0,0,0,0 monster [Boss]Gorynych2601,2,300000
bossnia_01,0,0,0,0 monster [Boss]LadyBranca2602,2,300000
bossnia_01,0,0,0,0 monster [Boss]Doppelganger2603,2,300000
bossnia_01,0,0,0,0 monster [Boss]DarkLord2604,2,300000
bossnia_01,0,0,0,0 monster [Boss]Dracula2605,2,300000
bossnia_01,0,0,0,0 monster [Boss]Drake2606,2,300000
bossnia_01,0,0,0,0 monster [Boss]Maya2607,2,300000
bossnia_01,0,0,0,0 monster [Boss]AbelhaRainha2608,2,300000//bossnia_01,0,0,0,0 monster [Boss]Bafomé 2609,2,300000
bossnia_01,0,0,0,0 monster [Boss]EgnigemCenia2610,2,300000
bossnia_01,0,0,0,0 monster [Boss]AmonRa2611,2,300000
bossnia_01,0,0,0,0 monster [Boss]Atroce2612,2,300000
bossnia_01,0,0,0,0 monster [Boss]Vesper2613,2,300000
bossnia_01,0,0,0,0 monster [Boss]Eddga2614,2,300000
bossnia_01,0,0,0,0 monster [Boss]Osiris2615,2,300000//bossnia_01,0,0,0,0 monster [Boss]Senhor dos Orcs 2616,2,300000
bossnia_01,0,0,0,0 monster [Boss]OrcHeroi2617,2,300000
bossnia_01,0,0,0,0 monster [Boss]SamuraiEncarnado2618,2,300000
bossnia_01,0,0,0,0 monster [Boss]FlordoLuar2619,2,300000
bossnia_01,0,0,0,0 monster [Boss]LOD 2620,2,300000
bossnia_01,0,0,0,0 monster [Boss]LadyTanee2621,2,300000
bossnia_01,0,0,0,0 monster [Boss]TaoGunka2622,2,300000
bossnia_01,0,0,0,0 monster [Boss]GeneralTartaruga2623,2,300000
bossnia_01,0,0,0,0 monster [Boss]Faraó2624,2,300000
bossnia_01,0,0,0,0 monster [Boss]StormyKnight2625,2,300000
bossnia_01,0,0,0,0 monster [Boss]Freonni2626,2,300000
bossnia_01,0,0,0,0 monster [Boss]GTB 2627,2,300000
bossnia_01,0,0,0,0 monster [Boss]SerpenteSuprema2628,2,300000
bossnia_01,0,0,0,0 monster [Boss]RSX-08062629,2,300000
bossnia_01,0,0,0,0 monster [Boss]PesarNoturno2630,2,300000
bossnia_01,0,0,0,0 monster [Boss]Detale2631,1,300000
bossnia_01,0,0,0,0 monster [Boss]Ktullanux2632,1,300000
bossnia_01,0,0,0,0 monster [Boss]Kiel D-012633,1,300000
bossnia_01,0,0,0,0 monster [Boss]Thanatos2635,1,300000
bossnia_01,0,0,0,0 monster [Boss]Bispo2636,1,300000
bossnia_01,0,0,0,0 monster [Boss]Nidhogg2637,1,300000
bossnia_01,0,0,0,0 monster [Boss]Leão de Vinhas2638,1,300000
bossnia_01,0,0,0,0 monster [Boss]Mamute2639,1,300000
bossnia_01,0,0,0,0 monster [S-Boss]Belzebu2640,1,600000
bossnia_01,0,0,0,0 monster [S-Boss]ValkRandgris2641,1,600000
bossnia_01,0,0,0,0 monster [S-Boss]Ifrit2642,1,600000
bossnia_01,0,0,0,0 monster [S-Boss]SatãMorroc2643,1,600000
bossnia_01,0,0,0,0 monster [S-Boss]EvilShadow2645,1,600000
prontera,155,284,4 script Portal de Cheffenia::bsw 723,{
mes "[Voz]";
mes ""+strcharinfo(0)+"...";
mes "Se você se aproximou deste portal siguinifica que você é corajoso o suficiente para encarar os desafios...";
next;
mes "[Voz]";
mes "Esses portais não surgiram atoa, nosso mundo enfrenta constantemente uma tentativa de ser invadido por monstros...";
next;
mes "[Voz]";
mes "Monstros esses que estão aprissionados em um lugar impossível de se sobreviver, exceto se tiver habilidades que os destrua, caso você seja um desses com dons você poderá entrar e enfrenta-los!";
next;
mes "[Voz]";
mes "Se deseja enfrenta-los precisa saber que um preço tem que ser pago par apoder adentrar nesta instância, vai enfrenta-los?";
mes "O preço a ser pago seria com sua vida, mas... Te darei essa chance!";
next;if(Zeny>1){
mes "[Voz]";
mes "Você vai enfrentar este desafio ?";
mes "Certo. Em seguida, escolha o lugar do mapa que deseja ser teleportado!";
mes "^FF0000ATIVA O AUTOLOOT^000000!";
mes "^FF0000ATIVA O AUTOLOOT^000000!";
mes "^FF0000ATIVA O AUTOLOOT^000000!";
next;
menu "Posição A",P1,"Posição B",P2,"Posição C",P3,"Posição D",P4;
P1:
warp "bossnia_01",31,208;
next;
P2:
warp "bossnia_01",30,30;
next;
P3:
warp "bossnia_01",209,30;
next;
P4:
warp "bossnia_01",209,210;
next;}
mes "[Voz]";
mes "Parece que você não tem requisitos o sificiente para entrar, sinto muito!";
mes "Volte quando tiver!";
close;OnInit:if(gettime(4)>4|| gettime(4)==0){if(gettime(4)==4&& gettime(3)>18) end;elseif(!gettime(4)&& gettime(3)<22) end;elseif(gettime(4)==6) end;}
hideonnpc "bsw";
end;OnFri1800:
announce "O portal para Cheffenia abrirá em 1 minuto!",0;
hideoffnpc "bsw";
end;OnSun2200:
announce "Os portais de Cheffenia se fecharam! Até a proxima semana!",0;
hideonnpc "bsw";
end;}//==========================Duplicates de Cheffenia============================================|
morocc,165,102,5 duplicate(bsw)Portal de Cheffenia#02 723
payon,145,230,5 duplicate(bsw)Portal de Cheffenia#03 723
comodo,209,153,5 duplicate(bsw)Portal de Cheffenia#04 723
gonryun,152,127,5 duplicate(bsw)Portal de Cheffenia#05 723
louyang,217,105,5 duplicate(bsw)Portal de Cheffenia#06 723
lighthalzen,146,100,5 duplicate(bsw)Portal de Cheffenia#07 723//==========================Bloqueio de Habilidades============================================|
bossnia_01 mapflag nowarpto
bossnia_02 mapflag nowarpto
bossnia_03 mapflag nowarpto
bossnia_04 mapflag nowarpto
bossnia_01 mapflag nowarp
bossnia_02 mapflag nowarp
bossnia_03 mapflag nowarp
bossnia_04 mapflag nowarp
bossnia_01 mapflag nomemo
bossnia_02 mapflag nomemo
bossnia_03 mapflag nomemo
bossnia_04 mapflag nomemo
bossnia_01 mapflag nobranch
bossnia_02 mapflag nobranch
bossnia_03 mapflag nobranch
bossnia_04 mapflag nobranch
bossnia_01 mapflag noreturn
bossnia_02 mapflag noreturn
bossnia_03 mapflag noreturn
bossnia_04 mapflag noreturn
bossnia_01 mapflag nosave SavePoint
bossnia_02 mapflag nosave SavePoint
bossnia_03 mapflag nosave SavePoint
bossnia_04 mapflag nosave SavePoint
My second question is, in this npc there is a charge to access the instance, but I was not able to make this charge only once every 24 hours for example, I was wondering how do I charge it only once during the period that I set, it's possible, I know, I just don't know how to develop this function, could you please help me?
Observations: I'm not an expert scripter so I'm sorry if there are functions that are without specific logic.
Question
Fanthasy
The title of the post is very self-describing! I'm here because I need your help on this issue, I developed an NPC for an instance of Chefenia, I applied hideonnpc and hideoffnpc and in theory it works well! But he is just hidding the main NPC, his duplicates are on display, I wonder if you could help me.
Follow the NPC code;
My second question is, in this npc there is a charge to access the instance, but I was not able to make this charge only once every 24 hours for example, I was wondering how do I charge it only once during the period that I set, it's possible, I know, I just don't know how to develop this function, could you please help me?
Observations: I'm not an expert scripter so I'm sorry if there are functions that are without specific logic.
Link to comment
Share on other sites
6 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.