

FrajolazitoH
Members-
Posts
10 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
FrajolazitoH's Achievements
-
Whenever a player is reported with the @reportafk command, the player is on a bugged map, can anyone help me with this?
-
//Modified by - PandaLovesHamster //Custom Guild Limiter //Credits to the owners of the individual makers of the script, I just tied them all together to create this script sec_in01,99,187,4 script Limitador de Guilda 833,{ // this part registers the guild function sf { function s; .@a = getarg(2); .@len = getarg(3); return ( sprintf( getarg(0), s(.@a, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)) ) +(( .@a+1 < .@len )?":Next":":") +(( .@a-11 > 0 )?":Back":":") +":Cancel" ); function s { if( getarg(0) >= getarg(1) ) return ""; else { .@name$ = getguildname(getelementofarray(getarg(2),getarg(0))); return .@name$=="null"?"":.@name$; } }; }; function nex { return((getarg(0)+10)<getarg(1)?getarg(0)+10:getarg(1)-(getarg(1)%10)); }; function bac { return((getarg(0)-10)>=0?getarg(0)-10:0); }; if(getgmlevel()>=80 ) { mes .Npc_Name$; mes "Olá Sr. GM, o que você gostaria de fazer?"; next; switch( select("Adicionar/Remover Guildas:Limpar Dados da Guilda:Menu do Jogador:Cancelar") ) { case 1: mes .Npc_Name$; mes "Gostaria de adicionar ou remover uma guilda?"; .@a_len = getarraysize($App_Guilds); .@format$ = "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s"; next; if( select("- Remover:- Adicionar") == 1 ) { while( .@a != 9999 ) { select( sf( .@format$, $App_Guilds, .@a, .@a_len ) ); switch( @menu ) { case 11: .@a = nex( .@a, .@a_len ); break; case 12: .@a = bac( .@a ); break; case 13: end; default: .@select = .@a+@menu-1; mes .Npc_Name$; mes "Você selecionou ^0000FF["+getguildname($App_Guilds[.@select])+"]^000000 guilda. Você gostaria de removê-los das guildas aceitas?"; next; if( select("sim:não") == 1 ) { deletearray($App_Guilds[.@select],1); mes .Npc_Name$; mes "A guilda foi removida com sucesso!"; } close; } } } else { mes .Npc_Name$; mes "Por favor, insira o nome da guilda ou o nome do Lider."; next; input(.@input$); .@len = query_sql( "Select `guild_id` from `guild` where `name` like '%"+escape_sql(.@input$)+"%' or `master` like '%"+escape_sql(.@input$)+"%';",.@guild_id ); while( .@a != 9999 ) { select( sf( .@format$, .@guild_id, .@a, .@len ) ); switch( @menu ) { case 11: .@a = nex( .@a, .@len ); break; case 12: .@a = bac( .@a ); break; case 13: end; default: .@select = .@a+@menu-1; .@a_len = getarraysize($App_Guilds); for(.@b=0;.@b<.@a_len;.@b++) if( $App_Guilds[.@b]==.@guild_id[.@select] ) { mes .Npc_Name$; mes "Você selecionou ^0000FF["+getguildname(.@guild_id[.@select])+"]^000000 guilda. Sinto muito guilda já foi adicionada, mas à lista de aceitos."; close; } mes .Npc_Name$; mes "Você selecionou ^0000FF["+getguildname(.@guild_id[.@select])+"]^000000 guilda. Você gostaria de adicioná-los às guildas aceitas?"; next; if( select("Sim:Não") == 1 ) { .@a_len = getarraysize($App_Guilds); if( .@a_len>=128 ) { mes .Npc_Name$; mes "Desculpe, mas a lista de aceitos está cheia, por favor, abra espaço e tente novamente..."; } else { mes .Npc_Name$; mes "TA guilda foi adicionada com sucesso!"; $App_Guilds[.@a_len] = .@guild_id[.@select]; } } close; } } } case 2: mes .Npc_Name$; mes "Tem certeza de que deseja limpar os dados da guilda?!"; next; if( select("Sim!:Não!")==1 ) { mes .Npc_Name$; mes "Esta é sua última chance. Você tem certeza tão certo quanto pode ser?"; next; if( select("Grosseiro!:Não, espere... Onde estou?!!")==1 ) deletearray($App_Guilds); } if( @menu==1 ) { mes .Npc_Name$; mes "A ação está feita..."; } else { mes .Npc_Name$; mes "Uau, isso foi perto... Tenha um bom dia!"; } close; case 3: break; case 4: mes .Npc_Name$; mes "Tudo bem, tenha um bom dia!"; close; } } .@len = getarraysize($App_Guilds); for( .@i=0; .@i <= .@len; .@i++ ) { if( getcharid(2) == $App_Guilds[.@i] ) set .@Guild_Check, .@Guild_Check+1; } // Esta parte ejeta os jogadores quando eles estão no mapa OnPCLoadMapEvent: if( getcharid(2) == $App_Guilds[.@i] ){ .count = 0; .@origin = getcharid(3); addrid 3, 0, getcharid(2); if ( strcharinfo(3) == .checkmap$ ) .count++; if ( !.@origin ) end; if ( .count > 20 ) { // 5 significa apenas 5 jogadores por guilda permitidos em um mapa message strcharinfo(0), "Os membros da sua guilda estão acima do limite permitido pela satff."; sleep2 2000; warp "SavePoint", 0,0; } } end; OnInit: setarray .@checkmap$, "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05", "schg_cas01", "schg_cas02", "schg_cas03", "schg_cas04", "schg_cas05"; .@len = getarraysize( .@checkmap$ ); for ( .@i = 0; .@i < .@size; .@i++ ) { setmapflag .@checkmap$[.@i], mf_loadevent; setd "."+ .@checkmap$[.@i], 1; } end; } - script kjdhfkjshf -1,{ OnPCLoadMapEvent: if ( getmapflag( strcharinfo(3), mf_gvg_castle ) && ( agitcheck() || agitcheck2() )) { .@len = getarraysize($App_Guilds); for( .@i=0; .@i <= .@len; .@i++ ) { if( getcharid(2) == $App_Guilds[.@i] ) set .@Guild_Check, .@Guild_Check+1; } if( .@Guild_Check < 1 ) { dispbottom "Sua guilda ainda não foi aprovada, entre em contato com os GMs"; sleep2 3000; warp "SavePoint",0,0; end; } if( !getcharid(2) ) { dispbottom "Desculpe, apenas membros de uma guilda podem entrar em um castelo."; sleep2 3000; warp "SavePoint",0,0; end; } } end; OnInit: setarray .castles$[0], "prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05", "payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05", "gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05", "aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05", "arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05", "schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05"; for ( .@i = 0; .@i < 30; .@i++ ) setmapflag .castles$[.@i], mf_loadevent; end; } whenever I add or remove a guild, the NPC shows me the same guild twice. This ends up buggy when removing a guild from the registry. I click on remove guild "X" and guild "Y" is removed from the registry. can anyone help me?
-
//---- MvP Ladder Logic Script - script mvpladder -1,{ OnInit: // Configurações .map_killannounce = 1; // anunciar quando o MVP é morto no mapa onde o MVP foi morto: 0 - desativado, 1 - ativado .killannounce = 1; // anunciar quando o MVP é morto globalmente: 0 - desativado, 1 - ativado .gmnokill = 60; // GMs não devem matar MVPs. Um GM com nível <este número> ou superior não fará nada. Se definido como 60, GMs de nível 60 ou superior não receberão nada ao matar jogadores: 0 - desativado // .min_gm_menu = 90; // nível mínimo do GM que pode usar o menu do GM no NPC da escada .showtotal = 10; // mostrar o comprimento da escada. .showpage = 10; // definir as visualizações por página. .showstatue = 3; // número de estátuas. Este número deve corresponder ao número de duplicatas no final do script. .fix_custom_sprite = true; // se o seu servidor tem sprites animados personalizados que se sobrepõem à animação da estátua repetidamente, ative isso // Config ends ------------------------------------------------------------------------------------------ // to prevent bug happen if (.gmnokill <= 0) .gmnokill = 100; sleep 1; OnTimer10000: // refresh statues every 1 minute. Note the `char` table is unrealiable, player still need to perform certain task to save the character -> see 'save_settings' in conf\map-server.conf .@query$ = "SELECT `char`.`char_id`, `char`.`name`, `char`.`guild_id`, `char`.`class`, " + "`char`.`sex`, `char`.`hair`, `char`.`hair_color`, `char`.`clothes_color`, " + "`char`.`body`, `char`.`head_top`, `char`.`head_mid`, `char`.`head_bottom`, `char`.`robe`, " + "SUM(`mvpladder`.`kills`) as `orderKills` " + "FROM `char` RIGHT JOIN `mvpladder` ON `char`.`char_id` = `mvpladder`.`char_id` GROUP BY `char`.`char_id` ORDER BY `orderKills` DESC LIMIT " + .showstatue; .@nb = query_sql(.@query$, .@cid, .@name$, .@guild_id, .@class, .@sex$, .@hair, .@hair_color, .@clothes_color, .@body, .@head_top, .@head_mid, .@head_bottom, .@robe, .@kills); if (.fix_custom_sprite) { for (.@i = 0; .@i < .@nb; ++.@i) { setunitdata .statue[.@i +1], UNPC_HEADTOP, 0; setunitdata .statue[.@i +1], UNPC_HEADMIDDLE, 0; setunitdata .statue[.@i +1], UNPC_HEADBOTTOM, 0; setunitdata .statue[.@i +1], UNPC_ROBE, 0; } } for (.@i = 0; .@i < .@nb; ++.@i) { setunitdata .statue[.@i +1], UNPC_CLASS, .@class[.@i]; setunitdata .statue[.@i +1], UNPC_SEX, (.@sex$[.@i] == "F")? SEX_FEMALE:SEX_MALE; setunitdata .statue[.@i +1], UNPC_HAIRSTYLE, .@hair[.@i]; setunitdata .statue[.@i +1], UNPC_HAIRCOLOR, .@hair_color[.@i]; setunitdata .statue[.@i +1], UNPC_CLOTHCOLOR, .@clothes_color[.@i]; setunitdata .statue[.@i +1], UNPC_BODY2, .@body[.@i]; setunitdata .statue[.@i +1], UNPC_HEADTOP, .@head_top[.@i]; setunitdata .statue[.@i +1], UNPC_HEADMIDDLE, .@head_mid[.@i]; setunitdata .statue[.@i +1], UNPC_HEADBOTTOM, .@head_bottom[.@i]; setunitdata .statue[.@i +1], UNPC_ROBE, .@robe[.@i]; setnpcdisplay "mvp_ladder_statue#"+(.@i +1), .@name$[.@i]; .statue_name$[.@i +1] = .@name$[.@i]; .statue_guild$[.@i +1] = getguildname(.@guild_id[.@i]); .statue_kills[.@i +1] = .@kills[.@i]; } for (.@i = .@nb; .@i < .showstatue; ++.@i) setunitdata .statue[.@i +1], UNPC_CLASS, HIDDEN_WARP_NPC; initnpctimer; end; OnNPCKillEvent: // Logic to detect when a MvP is killed if(getgmlevel() < 3) { if (getmonsterinfo(killedrid, MOB_MVPEXP) > 0) { //announce "[ Ranking MVP ] : O jogador ["+ strcharinfo(0) +"] acaba de matar o MVP "+ getmonsterinfo( killedrid, MOB_NAME ) +" em "+ strcharinfo(3), bc_all; .@selectIfKillExistQuery$ = "SELECT char_id, mob_id, kills FROM mvpladder WHERE char_id = '" + getcharid(0) + "' AND mob_id = '" + killedrid + "';"; if (query_sql(.@selectIfKillExistQuery$, .@charid, .@kills, .@name$) > 0) { // Exist a kill of that MVP so +1 to kill count .@updateLadderQuery$ = "UPDATE mvpladder SET kills = kills + 1 WHERE char_id = '" + getcharid(0) + "' AND mob_id = '" + killedrid + "'"; } else { // Create a new kill of specific MVP //.@updateLadderQuery$ = "INSERT INTO mvpladder (char_id, mob_id, kills) VALUES ('" + getcharid(0) + "','" + killedrid + "','1');"; .@updateLadderQuery$ = "INSERT INTO mvpladder (`char_id` , `mob_id` , `kills`) VALUES ('" + getcharid(0) + "','" + killedrid + "','1');"; } query_sql(.@updateLadderQuery$); } } end; } //Pontos MVP - script mvppoint01 -1,{ OnNPCKillEvent: setarray .@monsterID[0],1038,1039,1046,1059,1086,1087,1112,1115,1147,1150,1157,1159,1190,1251,1252,1272,1312,1373,1389,1418,1492,1511,1583,1623,1630,1658,1685,1688,1719,1785,1885,2068; // ID Dos Boss for(set @a,0; @a <= getarraysize(.@monsterID); set @a,@a+1) if(killedrid == .@monsterID[@a]){ set #MVPPOINTS,#MVPPOINTS+1; message strcharinfo(0),"[FriendsRO]: Você possui "+#MVPPOINTS+" ponto(s) de MvPs."; } } - script mvppoint03 -1,{ OnNPCKillEvent: setarray .@monsterID[0],1708,1734,1751,1768,1779,1832,1871,1917,1990,1991,2202; // ID Dos Boss for(set @a,0; @a <= getarraysize(.@monsterID); set @a,@a+1) if(killedrid == .@monsterID[@a]){ set #MVPPOINTS,#MVPPOINTS+3; message strcharinfo(0),"[FriendsRO]: Você possui "+#MVPPOINTS+" ponto(s) de MvPs."; } } - script mvppoint05 -1,{ OnNPCKillEvent: setarray .@monsterID[0],1646,1647,1648,1649,1650,1651,1874,1929,1956,1957,2022; // ID Dos Boss for(set @a,0; @a <= getarraysize(.@monsterID); set @a,@a+1) if(killedrid == .@monsterID[@a]){ set #MVPPOINTS,#MVPPOINTS+5; message strcharinfo(0),"[FriendsRO]: Você possui "+#MVPPOINTS+" ponto(s) de MvPs."; } } //---- Informações do NPC Lider MVP prontera,142,173,5 script Caçador MVP 733,{ .@npcname$ = strnpcinfo(0); while (1) { mes "["+ .@npcname$ +"]"; mes "Olá ^A020F0"+ strcharinfo(0) +"^000000..."; mes "Você tem atualmente ^0000ff"+#MVPPOINTS+"^000000 Pontos MVP."; next; switch (select("^339966[»]^000000 Ranking MVP","^008aff[»]^000000 MVPs mais Caçados","^A020F0[»]^000000 Abrir a Loja")) { case 1: mes "^FF0000O ranking é resetado todo dia 01.^000000"; mes ""; .@queryKillerList$ = "SELECT t1.char_id, SUM(t1.kills) as `orderKills`, t2.name " + "FROM `mvpladder` t1 " + "INNER JOIN `char` t2 " + "ON t1.char_id = t2.char_id " + "GROUP BY t1.char_id " + "ORDER BY `orderKills` DESC " + "LIMIT " + getvariableofnpc(.showtotal, "mvpladder") + ";"; .@nb = query_sql(.@queryKillerList$, .@charid, .@kills, .@name$); if (!.@nb) { mes "O Ranking está vazio no momento."; next; } for (.@j = 0; .@j < .@nb; .@j += getvariableofnpc(.showpage,"mvpladder")) { for (.@i = .@j; .@i < (getvariableofnpc(.showpage,"mvpladder") + .@j) && .@i < .@nb; ++.@i) mes "^996600" + (.@i+1) + ": ^006699" + .@name$[.@i] + " - ^00AA00[" + .@kills[.@i] + "]^FF0000 MVPs Mortos^000000"; next; } break; case 2: .@queryKilledList$ = "SELECT char_id, mob_id, SUM(kills) as `orderKills` " + "FROM `mvpladder` " + "GROUP BY mob_id " + "ORDER BY `orderKills` DESC " + "LIMIT " + getvariableofnpc(.showtotal, "mvpladder") + ";"; .@nb = query_sql(.@queryKilledList$, .@charid, .@mobid, .@kills); if (!.@nb) { mes "O top está vazio no momento."; next; } for (.@j = 0; .@j < .@nb; .@j += getvariableofnpc(.showpage,"mvpladder")) { for (.@i = .@j; .@i < (getvariableofnpc(.showpage,"mvpladder") + .@j) && .@i < .@nb; ++.@i) { mes "^996600" + (.@i+1) + ": ^006699" + strmobinfo(1, .@mobid[.@i]) + " ^FF0000MVP ^00AA00[Morto ^FF0000" + .@kills[.@i] + " ^00AA00Vezes]^000000"; } next; } query_sql("SELECT SUM(kills) FROM mvpladder;", .@killCount); mes "^996600==> ^006699Total de MVPs Mortos [^00AA00" + .@killCount[0] + "^000000^006699]^FF0000"; break; case 3: dispbottom "Você tem "+#MVPPOINTS+" Pontos de MVP."; close2; callshop "Shop_MVPPOINTS"; end; } OnInit: initnpctimer; setunittitle(getnpcid(0), "[ Ranking e Loja ]"); end; OnTimer10000: showscript("Líder MVP"); setnpctimer 0; end; } close; } //---- MSG board NPCs - script mvp_ladder_statue -1,{ .@id = getelementofarray(getvariableofnpc(.npcgid, "mvpladder"), getnpcid(0)); mes "^996600[TOP MVP "+ .@id +"]"; mes "^006699Nome: "+ getelementofarray(getvariableofnpc(.statue_name$, "mvpladder"), .@id); .@guildname$ = getelementofarray(getvariableofnpc(.statue_guild$, "mvpladder"), .@id); mes "^00AAAAGuild: "+((.@guildname$ == "null")? "^AAAAAANone": .@guildname$); mes "^00AA00Matou: ["+ getelementofarray(getvariableofnpc(.statue_kills, "mvpladder"), .@id) +"]"; close; OnInit: .@id = strnpcinfo(2); set getvariableofnpc(.statue[.@id], "mvpladder"), getnpcid(0); set getvariableofnpc(.npcgid[getnpcid(0)], "mvpladder"), .@id; end; } prontera,142,178,4 duplicate(mvp_ladder_statue) mvp_ladder_statue#1 1_F_MARIA prontera,140,180,4 duplicate(mvp_ladder_statue) mvp_ladder_statue#2 1_F_MARIA prontera,138,182,4 duplicate(mvp_ladder_statue) mvp_ladder_statue#3 1_F_MARIA //== clone base prontera,142,178,5 script #2 PORTAL,{ end; OnInit: while(1) { specialeffect EF_MVP; sleep 10000; } } //prontera,172,204,4 script #npcuniquename PORTAL,{} prontera,140,180,4 script #npcuniquename1 PORTAL,{} prontera,138,182,4 script #npcuniquename2 PORTAL,{} //== msg top da cabeça prontera,142,178,4 script #top1 111,{ OnInit: initnpctimer; end; OnTimer1000: showscript("Top-1 MVP"); setnpctimer 0; end; } prontera,140,180,4 script #top2 111,{ OnInit: initnpctimer; end; OnTimer1000: showscript("Top-2 MVP"); setnpctimer 0; end; } prontera,138,182,4 script #top3 111,{ OnInit: initnpctimer; end; OnTimer1000: showscript("Top-3 MVP"); setnpctimer 0; end; } - script reset_ranking -1,{ OnClock0005: if(gettime(DT_DAYOFMONTH) == 1){ query_sql ("TRUNCATE `mvpladder`"); end; } OnInit: bindatcmd "resetrankingmvp", strnpcinfo(0) +"::OnReset"; end; OnReset: if (getgmlevel() > 98) { query_sql ("TRUNCATE `mvpladder`"); dispbottom "Ranking MVP resetado com sucesso!"; end; } else { dispbottom "Somente Administradores podem usar este comando"; end; } end; } Can anyone help me add an automatic award system to this script? I wanted every day 1, the prize for 1st, 2nd and 3rd place, to automatically fall into the player's account
-
Thanks ;*
-
Is there the possibility of creating an item in yml that, when clicked, the player can choose the job? example: I choose the archmage job, and automatically I get maximum level? thank you very much
-
Thank you ;*
-
sec_in02,145,166,3 script Sala de MVP 767,{ // ================== Settings ============================================ set .@n$,"^0000FF[ Sala de MVP ]^000000"; // ============= End of Settings ========================================== mes .@n$; mes "Olá ^FFA500"+strcharinfo(0)+"^000000!"; mes "Escolha uma sala de MVP!"; next; switch(select("Sala 1:Sala 2:Sala 3")){ case 1: mes "Boa sorte!"; warp "que_moon",33,24; close; case 2: mes "Boa sorte!"; warp "que_moon",99,24; close; case 3: mes "Boa sorte!"; warp "que_moon",165,24; close; } } //========================= First Script End =============// //================== MVP Summoner ========================// que_moon,33,24,4 script NPC Summoner 767,{ set .@nsummon$,"^0000FF[ NPC Summoner ]^000000"; mes .@nsummon$; mes "Olá ^FFA500"+strcharinfo(0)+"^000000!"; mes "Cada MVP custa "+.zeny[1]+" Zeny"; next; set .@m,select(.smenu$) - 1; if( Zeny < .zeny[.mobze[.@m]] ) { mes .@nsummon$; mes "Voce não tem zeny suficiente."; close; } else { mes .@nsummon$; mes "Boa Sorte!"; close2; set Zeny, Zeny - .zeny[.mobze[.@m]]; atcommand "@spawn "+.mobid[.@m] + " "+.mobam[.@m]; npctalk "[ MVP Summoner]: "+getmonsterinfo(.mobid[.@m],0) +" Sumonado!"; end; } OnInit: setarray .zeny[1],15000000; // 50m,250m Zeny // Mob IDs setarray .mobid[0],1511,1785,1630,1039,1272,1719,1046,1389,1112,1115,1418,1252,1885,1251,1688,1373,1147,1059,1150,1087,1190,1038,1157,1159,1623,1312,1492; // Mob Spawn Amount setarray .mobam[0],1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; // Price: Entry as Index from .zeny // 1 = .zeny[1] - 2 = .zeny[2] setarray .mobze[0],1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; set .smenu$,""; for( set .@s,0; .@s < getarraysize(.mobid); set .@s,.@s + 1) { // Skips an Monster if it does not exist in the db if(getmonsterinfo(.mobid[.@s],0) == "" || getmonsterinfo(.mobid[.@s],0) == "null") continue; // else adding it to the menu set .smenu$,.smenu$ + "- "+getmonsterinfo(.mobid[.@s],0) + ( (.mobid[.@s+1] == 0)?"":":"); } end; } que_moon,99,24,4 duplicate(NPC Summoner) NPC Summoner#8 767 que_moon,165,24,4 duplicate(NPC Summoner) NPC Summoner#9 767 que_moon,24,14,5 script Retornar para prontera#1 837,{ warp "prontera",156,191; end; } que_moon,90,14,5 script Retornar para prontera#2 837,{ warp "prontera",156,191; end; } que_moon,156,14,5 script Retornar para prontera#3 837,{ warp "prontera",156,191; end; } que_moon mapflag nowarpto que_moon mapflag nowarp que_moon mapflag nodrop que_moon mapflag nomemo que_moon mapflag nobranch que_moon mapflag noteleport que_moon mapflag monster_noteleport Good evening, can anyone help me with this NPC. I need to add an option to summon the last mvp summoned. Thanks ;*
-
Thank you! ;*
-
// LOJA DE MVP POINTS - pointshop Shop_MVPPOINTS -1,#MVPPOINTS,13710:200,12210:150,12214:100,7621:70,12103:50,13995:40,14232:40 //---- MvP Ladder Logic Script - script mvpladder -1,{ OnInit: // Configurações .map_killannounce = 1; // anunciar quando o MVP é morto no mapa onde o MVP foi morto: 0 - desativado, 1 - ativado .killannounce = 1; // anunciar quando o MVP é morto globalmente: 0 - desativado, 1 - ativado .gmnokill = 60; // GMs não devem matar MVPs. Um GM com nível <este número> ou superior não fará nada. Se definido como 60, GMs de nível 60 ou superior não receberão nada ao matar jogadores: 0 - desativado // .min_gm_menu = 90; // nível mínimo do GM que pode usar o menu do GM no NPC da escada .showtotal = 10; // mostrar o comprimento da escada. .showpage = 10; // definir as visualizações por página. .showstatue = 3; // número de estátuas. Este número deve corresponder ao número de duplicatas no final do script. .fix_custom_sprite = true; // se o seu servidor tem sprites animados personalizados que se sobrepõem à animação da estátua repetidamente, ative isso // Config ends ------------------------------------------------------------------------------------------ // to prevent bug happen if (.gmnokill <= 0) .gmnokill = 100; sleep 1; OnTimer10000: // refresh statues every 1 minute. Note the `char` table is unrealiable, player still need to perform certain task to save the character -> see 'save_settings' in conf\map-server.conf .@query$ = "SELECT `char`.`char_id`, `char`.`name`, `char`.`guild_id`, `char`.`class`, " + "`char`.`sex`, `char`.`hair`, `char`.`hair_color`, `char`.`clothes_color`, " + "`char`.`body`, `char`.`head_top`, `char`.`head_mid`, `char`.`head_bottom`, `char`.`robe`, " + "SUM(`mvpladder`.`kills`) as `orderKills` " + "FROM `char` RIGHT JOIN `mvpladder` ON `char`.`char_id` = `mvpladder`.`char_id` GROUP BY `char`.`char_id` ORDER BY `orderKills` DESC LIMIT " + .showstatue; .@nb = query_sql(.@query$, .@cid, .@name$, .@guild_id, .@class, .@sex$, .@hair, .@hair_color, .@clothes_color, .@body, .@head_top, .@head_mid, .@head_bottom, .@robe, .@kills); if (.fix_custom_sprite) { for (.@i = 0; .@i < .@nb; ++.@i) { setunitdata .statue[.@i +1], UNPC_HEADTOP, 0; setunitdata .statue[.@i +1], UNPC_HEADMIDDLE, 0; setunitdata .statue[.@i +1], UNPC_HEADBOTTOM, 0; setunitdata .statue[.@i +1], UNPC_ROBE, 0; } } for (.@i = 0; .@i < .@nb; ++.@i) { setunitdata .statue[.@i +1], UNPC_CLASS, .@class[.@i]; setunitdata .statue[.@i +1], UNPC_SEX, (.@sex$[.@i] == "F")? SEX_FEMALE:SEX_MALE; setunitdata .statue[.@i +1], UNPC_HAIRSTYLE, .@hair[.@i]; setunitdata .statue[.@i +1], UNPC_HAIRCOLOR, .@hair_color[.@i]; setunitdata .statue[.@i +1], UNPC_CLOTHCOLOR, .@clothes_color[.@i]; setunitdata .statue[.@i +1], UNPC_BODY2, .@body[.@i]; setunitdata .statue[.@i +1], UNPC_HEADTOP, .@head_top[.@i]; setunitdata .statue[.@i +1], UNPC_HEADMIDDLE, .@head_mid[.@i]; setunitdata .statue[.@i +1], UNPC_HEADBOTTOM, .@head_bottom[.@i]; setunitdata .statue[.@i +1], UNPC_ROBE, .@robe[.@i]; setnpcdisplay "mvp_ladder_statue#"+(.@i +1), .@name$[.@i]; .statue_name$[.@i +1] = .@name$[.@i]; .statue_guild$[.@i +1] = getguildname(.@guild_id[.@i]); .statue_kills[.@i +1] = .@kills[.@i]; } for (.@i = .@nb; .@i < .showstatue; ++.@i) setunitdata .statue[.@i +1], UNPC_CLASS, HIDDEN_WARP_NPC; initnpctimer; end; OnNPCKillEvent: // Logic to detect when a MvP is killed if(getgmlevel() < 3) { if (getmonsterinfo(killedrid, MOB_MVPEXP) > 0) { //announce "[ Ranking MVP ] : O jogador ["+ strcharinfo(0) +"] acaba de matar o MVP "+ getmonsterinfo( killedrid, MOB_NAME ) +" em "+ strcharinfo(3), bc_all; .@selectIfKillExistQuery$ = "SELECT char_id, mob_id, kills FROM mvpladder WHERE char_id = '" + getcharid(0) + "' AND mob_id = '" + killedrid + "';"; if (query_sql(.@selectIfKillExistQuery$, .@charid, .@kills, .@name$) > 0) { // Exist a kill of that MVP so +1 to kill count .@updateLadderQuery$ = "UPDATE mvpladder SET kills = kills + 1 WHERE char_id = '" + getcharid(0) + "' AND mob_id = '" + killedrid + "'"; } else { // Create a new kill of specific MVP //.@updateLadderQuery$ = "INSERT INTO mvpladder (char_id, mob_id, kills) VALUES ('" + getcharid(0) + "','" + killedrid + "','1');"; .@updateLadderQuery$ = "INSERT INTO mvpladder (`char_id` , `mob_id` , `kills`) VALUES ('" + getcharid(0) + "','" + killedrid + "','1');"; } query_sql(.@updateLadderQuery$); } } end; } //Pontos MVP - script mvppoint01 -1,{ OnNPCKillEvent: setarray .@monsterID[0],1038,1039,1046,1059,1086,1087,1112,1115,1147,1150,1157,1159,1190,1251,1252,1272,1312,1373,1389,1418,1492,1511,1583,1623,1630,1658,1685,1688,1719,1785,1885,2068; // ID Dos Boss for(set @a,0; @a <= getarraysize(.@monsterID); set @a,@a+1) if(killedrid == .@monsterID[@a]){ set #MVPPOINTS,#MVPPOINTS+1; message strcharinfo(0),"[Seu-RO]: Você possui "+#MVPPOINTS+" ponto(s) de MvPs."; } } - script mvppoint03 -1,{ OnNPCKillEvent: setarray .@monsterID[0],1708,1734,1751,1768,1779,1832,1871,1917,1990,1991,2202; // ID Dos Boss for(set @a,0; @a <= getarraysize(.@monsterID); set @a,@a+1) if(killedrid == .@monsterID[@a]){ set #MVPPOINTS,#MVPPOINTS+3; message strcharinfo(0),"[Seu-RO]: Você possui "+#MVPPOINTS+" ponto(s) de MvPs."; } } - script mvppoint05 -1,{ OnNPCKillEvent: setarray .@monsterID[0],1646,1647,1648,1649,1650,1651,1874,1929,1956,1957,2022; // ID Dos Boss for(set @a,0; @a <= getarraysize(.@monsterID); set @a,@a+1) if(killedrid == .@monsterID[@a]){ set #MVPPOINTS,#MVPPOINTS+5; message strcharinfo(0),"[Seu-RO]: Você possui "+#MVPPOINTS+" ponto(s) de MvPs."; } } //---- Informações do NPC Lider MVP prontera,130,217,5 script Caçador MVP 733,{ .@npcname$ = strnpcinfo(0); while (1) { mes "["+ .@npcname$ +"]"; mes "Olá ^A020F0"+ strcharinfo(0) +"^000000..."; mes "Você tem atualmente ^0000ff"+#MVPPOINTS+"^000000 Pontos MVP."; next; switch (select("^339966[»]^000000 Ranking MVP","^008aff[»]^000000 MVPs mais Caçados","^A020F0[»]^000000 Abrir a Loja")) { case 1: mes "^FF0000O ranking é resetado todo dia 01.^000000"; mes ""; .@queryKillerList$ = "SELECT t1.char_id, SUM(t1.kills) as `orderKills`, t2.name " + "FROM `mvpladder` t1 " + "INNER JOIN `char` t2 " + "ON t1.char_id = t2.char_id " + "GROUP BY t1.char_id " + "ORDER BY `orderKills` DESC " + "LIMIT " + getvariableofnpc(.showtotal, "mvpladder") + ";"; .@nb = query_sql(.@queryKillerList$, .@charid, .@kills, .@name$); if (!.@nb) { mes "O Ranking está vazio no momento."; next; } for (.@j = 0; .@j < .@nb; .@j += getvariableofnpc(.showpage,"mvpladder")) { for (.@i = .@j; .@i < (getvariableofnpc(.showpage,"mvpladder") + .@j) && .@i < .@nb; ++.@i) mes "^996600" + (.@i+1) + ": ^006699" + .@name$[.@i] + " - ^00AA00[" + .@kills[.@i] + "]^FF0000 MVPs Mortos^000000"; next; } break; case 2: .@queryKilledList$ = "SELECT char_id, mob_id, SUM(kills) as `orderKills` " + "FROM `mvpladder` " + "GROUP BY mob_id " + "ORDER BY `orderKills` DESC " + "LIMIT " + getvariableofnpc(.showtotal, "mvpladder") + ";"; .@nb = query_sql(.@queryKilledList$, .@charid, .@mobid, .@kills); if (!.@nb) { mes "O top está vazio no momento."; next; } for (.@j = 0; .@j < .@nb; .@j += getvariableofnpc(.showpage,"mvpladder")) { for (.@i = .@j; .@i < (getvariableofnpc(.showpage,"mvpladder") + .@j) && .@i < .@nb; ++.@i) { mes "^996600" + (.@i+1) + ": ^006699" + strmobinfo(1, .@mobid[.@i]) + " ^FF0000MVP ^00AA00[Morto ^FF0000" + .@kills[.@i] + " ^00AA00Vezes]^000000"; } next; } query_sql("SELECT SUM(kills) FROM mvpladder;", .@killCount); mes "^996600==> ^006699Total de MVPs Mortos [^00AA00" + .@killCount[0] + "^000000^006699]^FF0000"; break; case 3: dispbottom "Você tem "+#MVPPOINTS+" Pontos de MVP."; close2; callshop "Shop_MVPPOINTS"; end; } OnInit: initnpctimer; setunittitle(getnpcid(0), "[ Ranking e Loja ]"); end; OnTimer10000: showscript("Líder MVP"); setnpctimer 0; end; } close; } //---- MSG board NPCs - script mvp_ladder_statue -1,{ .@id = getelementofarray(getvariableofnpc(.npcgid, "mvpladder"), getnpcid(0)); mes "^996600[TOP MVP "+ .@id +"]"; mes "^006699Nome: "+ getelementofarray(getvariableofnpc(.statue_name$, "mvpladder"), .@id); .@guildname$ = getelementofarray(getvariableofnpc(.statue_guild$, "mvpladder"), .@id); mes "^00AAAAGuild: "+((.@guildname$ == "null")? "^AAAAAANone": .@guildname$); mes "^00AA00Matou: ["+ getelementofarray(getvariableofnpc(.statue_kills, "mvpladder"), .@id) +"]"; close; OnInit: .@id = strnpcinfo(2); set getvariableofnpc(.statue[.@id], "mvpladder"), getnpcid(0); set getvariableofnpc(.npcgid[getnpcid(0)], "mvpladder"), .@id; end; } prontera,128,219,5 duplicate(mvp_ladder_statue) mvp_ladder_statue#1 1_F_MARIA prontera,129,222,5 duplicate(mvp_ladder_statue) mvp_ladder_statue#2 1_F_MARIA prontera,125,218,5 duplicate(mvp_ladder_statue) mvp_ladder_statue#3 1_F_MARIA //== clone base prontera,128,219,5 script #2 844,{ end; OnInit: while(1) { specialeffect EF_MVP; sleep 10000; } } //prontera,172,204,4 script #npcuniquename PORTAL,{} //prontera,140,180,4 script #npcuniquename1 PORTAL,{} //prontera,138,182,4 script #npcuniquename2 PORTAL,{} //== msg top da cabeça prontera,128,219,4 script #top1 111,{ OnInit: initnpctimer; end; OnTimer1000: showscript("Top-1 MVP"); setnpctimer 0; end; } prontera,129,222,5 script #top2 111,{ OnInit: initnpctimer; end; OnTimer1000: showscript("Top-2 MVP"); setnpctimer 0; end; } prontera,125,218,5 script #top3 111,{ OnInit: initnpctimer; end; OnTimer1000: showscript("Top-3 MVP"); setnpctimer 0; end; } - script reset_ranking -1,{ OnClock0005: if(gettime(DT_DAYOFMONTH) == 1){ query_sql ("TRUNCATE `mvpladder`"); end; } OnInit: bindatcmd "resetrankingmvp", strnpcinfo(0) +"::OnReset"; end; OnReset: if (getgmlevel() > 98) { query_sql ("TRUNCATE `mvpladder`"); dispbottom "Ranking MVP resetado com sucesso!"; end; } else { dispbottom "Somente Administradores podem usar este comando"; end; } end; } I need to restrict the gain of MVP points on some specific maps