leonardofan Posted February 11, 2015 Share Posted February 11, 2015 necessito do sql deste npc alguem tem por favor?? //=============================== //======== Loja MvP============== //========by: Hold ============= //=============================== prontera,147,173,6 script MVP Points#1 561,{ // Estrutura da loja: // ID,preço, Id,preço, ID,preço...; setarray .items[0],12210,10,12208,5,12214,25; set .npcname$, "[ ^cf7500Trocador de MVP Points^000000 ]"; mes .npcname$; mes "Olá ^0000FF"+strcharinfo (0)+"^000000, eu posso trocar seus MVP Points por items especiais o catálogo de items é o seguinte."; next; switch (select ("- Goma de Mascar:- Manual de Combate:- Espelho Convexo")) { case 1: set @buying, 0; set @qt, 1; break; case 2: set @buying, 2; set @qt, 1; break; case 3: set @buying, 4; set @qt, 1; break; case 4: set @buying, 6; set @qt, 1; break; case 5: set @buying, 8; set @qt, 1; break; } set @prize, .items[@buying+1]; mes .npcname$; mes "Você escolheu comprar o item ^FF0000"+getitemname (.items[@buying])+"^000000, irá lhe custar ^FF0000"[email protected]+"^000000 MVP Points."; mes "Deseja prosseguir?"; next; if (select ("- Sim, claro!:- Não, muito caro.") == 2) { mes .npcname$; mes "Está bem, volte quando quiser negociar seus MVP Points."; close; } else { if (mvp_points < @prize) { //Verificação da quantidade de MVP Points mes .npcname$; mes "Você não possui MVP Points suficientes."; close; } if (checkweight(.items[@buying],@qt) == 0) { //Verificação de peso mes .npcname$; mes "Você está muito pesado para receber o item, por favor livre-se de um pouco de seu peso."; close; } getitem .items[@buying],@qt; set mvp_points, mvp_points - @prize; mes .npcname$; mes "Aqui está seu item, muito obrigado por utilizar nosso serviço de trocas."; dispbottom "Você gastou "[email protected]+" MVP Points, lhe restam "+mvp_points+" MVP Points."; close; } } Quote Link to comment Share on other sites More sharing options...
Ozawaowa Posted April 13, 2017 Share Posted April 13, 2017 Esse npc não usa tabelas amigo, está vendo alguma função sql nele? Quote Link to comment Share on other sites More sharing options...
johnlol Posted April 5, 2019 Share Posted April 5, 2019 Vee se esse te servEe... tabela SQL no final.. //= --- //= MvP Rank Improved v1.0 //= --- //= This Rank will count every MvP you kill, //= to be more clear, will count every mob //= defined inside the array ".mobid[0]", //= so, if you add the poring ID will count in the rank //= you can modify and ad miniBoss because this array //= only have all MvPs, that's the idea, only MvPs... //= --- - script Rank MvP -1,{ OnInit: // Script Configuration setarray .mobid[0],1511,1647,1785,1630,1399,1039,1874,2068,1272,1719,1046,1389,1112,1115,1957,1418,1871,1252,1768,1086,1688,1646, 1373,1147,1059,1150,1956,2022,1087,1190,1038,1157,1159,1502,1623,1650,1583,1708,1312,1751,1685,1648,1917,1658; // MvP Ids set .a, 0; // Broadcast who killed the MvP and wich MvP and wick Map [0 Off - 1 On] set [email protected], 10; // Max. Top Rank (Hihgly recommended between 5~10, more maybe bug the server (limited variables) end; OnNPCKillEvent: // Script execution for (set [email protected], 0; [email protected] < getarraysize(.mobid); set [email protected], [email protected] + 1) if (killedrid == .mobid[[email protected]]) set [email protected], 1; // If a MvP if ([email protected]) end; if (.a) // If announce On announce "El usuario [" +strcharinfo(0) +"] ha matado un [" +getmonsterinfo(killedrid,0) +"] en el mapa [" +strcharinfo(3) +"]",bc_blue|bc_all; set MvP, MvP + 1; callfunc ("MvPRank",MvP,strcharinfo(0)); end; } // End Script //prontera,147,171,5 script MvP Rank 405,{ // NPC that will show the ranking mes "[^FF0000MvP ^0000FFRank ^00FF00Top ^FF0000" [email protected] +"^000000]"; for (set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected] + 1) mes "Top ^FF0000" +([email protected] + 1) +"^000000 ^0000FF" +getd("$topmvp" [email protected] +"$") +"^000000 with ^FF0000" +getd("$topmvp" [email protected]) +"^000000 MvP killed."; close; } // End if function script MvPRank { set @mvptotal, getarg(0); set @nomb$, getarg(1); for (set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected] + 1) { if (@mvptotal >= getd("$topmvp" [email protected])) { if (strcharinfo(0) == getd("$topmvp" [email protected] +"$")) { setd "$topmvp" [email protected], @mvptotal; setd "$topmvp" [email protected] +"$", @nomb$; return; } else { if (getd("$topmvp" +([email protected] + 1) +"$") == "") { setd "$topmvp" [email protected], @mvptotal; setd "$topmvp" [email protected] +"$", @nomb$; return; } else { setd "$topmvp" +([email protected] + 1), getd("$topmvp" [email protected]); setd "$topmvp" +([email protected] + 1) +"$", getd("$topmvp$" [email protected]); setd "$topmvp" [email protected], @mvptotal; setd "$topmvp" [email protected] +"$", @nomb$; return; } // End if } // End if } // End if } // End loop return; } // End function //CREATE TABLE IF NOT EXISTS `E-MVPRank` ( //`char_id` int(11) unsigned NOT NULL default '0', //`name` varchar(30) NOT NULL DEFAULT '', //`Count` int(11) unsigned NOT NULL default '0', //PRIMARY KEY (`char_id`) //) ENGINE=MyISAM; Quote Link to comment Share on other sites More sharing options...