Jump to content

leonardofan

Members
  • Content Count

    16
  • Joined

  • Last visited

Posts posted by leonardofan


  1. NPC HERCULES

    kill monster does not count

     

     

    //===== Hercules Script ======================================
    //= Hunting Missions
    //===== By: ==================================================
    //= Euphy
    //===== Current Version: =====================================
    //= 1.4b
    //===== Description: =========================================
    //= Random hunting missions.
    //= Rewards are based on quest difficulty.
    //===== Additional Comments: =================================
    //= 1.0 Initial script.
    //= 1.1 Small improvements and fixes.
    //= 1.2 Added party support and replaced blacklists with an
    //=     SQL query, both thanks to AnnieRuru.
    //= 1.3 Re-added a blacklist adapted for the SQL query.
    //= 1.3a Added mission reset options.
    //= 1.4 Fix ranking table using new SQL database [ossi0110]
    //= 1.4a Fix a bug when a character has deleted, that account
    //=     can't do mission. [AnnieRuru]
    //= 1.4b Update to follow author's method on fixing
    //=     character deletion bug [AnnieRuru]
    //============================================================

     

    prontera,152,187,6    script    Hunting Missions    4_F_EDEN_MASTER,{
    function Chk; function Cm;
        mes "[Hunting Missions]";
        mes "Hello, "+strcharinfo(PC_NAME)+"!";
        if (!#Mission_Delay) {
            next;
            mes "[Hunting Missions]";
            mes "I can't find any records...";
            mes "You must be new here!";
            emotion e_omg;
            next;
            callsub Mission_Info;
            emotion e_go;
            set #Mission_Delay,1;
            close;
        }
        mes rand(2)?"Working hard, as always...":"Not slacking, I hope...";
        mes "Is there anything I can help";
        mes "you with?";
        mes " ";
        mes "^777777~ You've completed ^0055FF"+Mission_Total+"^777777 mission"+((Mission_Total == 1)?"":"s")+". ~^000000";
        next;
        switch(select(((!Mission0)?" ~ New Mission::":": ~ Mission Status: ~ Abandon Mission")+": ~ Information: ~ Mission Shop: ~ View Top Hunters: ~ ^777777Cancel^000000")) {
        case 1:
            mes "[Hunting Missions]";
            if ( #Mission_Count ) {
                mes "You've started a mission";
                mes "on another character.";
                if ( !@hm_char_del_check ) {
                    if ( !query_sql( "SELECT 1 FROM `char_reg_num_db` WHERE `key` = 'Mission0' AND `char_id` IN ( SELECT `char_id` FROM `char` WHERE `account_id` = "+ getcharid(CHAR_ID_ACCOUNT) +" )", .@dummy ) ) {
                        next;
                        mes "[Hunting Missions]";
                        mes "I can't seem to find any records";
                        mes "for that character, though...";
                        mes "One moment, please.";
                        emotion e_hmm;
                        set #Mission_Count, 0;
                    }
                    set @hm_char_del_check, 1;
                }
                close;
            }
            if (#Mission_Delay > gettimetick(2) && .Delay) {
                set .@i, #Mission_Delay-gettimetick(2);
                if (.@i > 3600) set .@j$, (.@i/3600)+" hour"+(((.@i/3600) == 1)?"":"s");
                else if (.@i > 60) set .@j$, (.@i/60)+" minute"+(((.@i/60) == 1)?"":"s");
                else set .@j$, (.@i)+" second"+((.@i == 1)?"":"s");
                mes "I'm afraid you'll have to wait "+.@j$+" before taking another mission.";
                close;
            }
            mes "You must hunt:";
            query_sql("SELECT ID FROM `mob_db` WHERE left(Sprite, 4) != 'meta' AND left(Sprite, 2) != 'E_' AND ~Mode & 32 AND EXP > 0 AND MVP1id = 0 AND DropCardid > 4000 AND DropCardid < 5000 AND ID < 2000 AND instr('"+.Blacklist$+"',ID) = 0 ORDER BY rand() LIMIT "+.Quests, .@mob);
            for (set .@i,0; .@i<.Quests; set .@i,.@i+1) {
                setd "Mission"+.@i, .@mob[.@i];
                setd "Mission"+.@i +"_",0;
            }
            set #Mission_Count, rand(.Count[0],.Count[1]);
            callsub Mission_Status;
            next;
            mes "[Hunting Missions]";
            mes "Report back when";
            mes "you've finished.";
            mes "Good luck!";
            close;
        case 2:
            mes "[Hunting Missions]";
            mes "Mission status:";
            callsub Mission_Status;
            close;
        case 3:
            mes "[Hunting Missions]";
            mes "Do you really want to";
            mes "abandon your mission?";
            if (.Reset < 0 && .Delay)
                mes "Your delay time will not be reset.";
            else if (.Reset > 0)
                mes "It will cost "+Cm(.Reset)+" Zeny.";
            next;
            switch(select(" ~ Abandon...", " ~ ^777777Cancel^000000")) {
            case 1:
                if (.Reset > 0) {
                    if (Zeny < .Reset) {
                        mes "[Hunting Missions]";
                        mes "You don't have enough";
                        mes "Zeny to drop this mission.";
                        emotion e_sry;
                        close;
                    }
                    Zeny -= .Reset;
                    emotion e_cash;
                }
                mes "[Hunting Missions]";
                mes "Alright, I've dropped";
                mes "your current mission.";
                specialeffect(EF_STORMKICK4, AREA, playerattached());
                for(set .@i,0; .@i<.Quests; set .@i,.@i+1) {
                    setd "Mission"+.@i,0;
                    setd "Mission"+.@i+"_",0;
                }
                set #Mission_Count,0;
                if (.Reset < 0 && .Delay) set #Mission_Delay, gettimetick(2)+(.Delay*3600);
                close;
            case 2:
                mes "[Hunting Missions]";
                mes "I knew you were kidding!";
                mes "Keep up the good work.";
                emotion e_heh;
                close;
            }
        case 4:
            callsub Mission_Info;
            close;
        case 5:
            mes "[Hunting Missions]";
            mes "You have ^0055FF"+#Mission_Points+"^000000 Mission Points.";
            mes "Use them well!";
            callshop "mission_shop",1;
            npcshopattach "mission_shop";
            end;
        case 6:
            mes "[Hunting Missions]";
            mes "The top hunters are:";
            query_sql("SELECT char_id AS id, (SELECT `name` FROM `char` WHERE char_id = id),`value` FROM `char_reg_num_db` WHERE `key` = 'Mission_Total' ORDER BY `value` DESC LIMIT 5",.@id,.@name$,.@val);
            for(set .@i,0; .@i<5; set .@i,.@i+1)
                mes "  [Rank "+(.@i+1)+"]  "+((.@name$[.@i] == "")?"^777777none":"^0055FF"+.@name$[.@i]+"^000000 : ^FF0000"+.@val[.@i]+" pt.")+"^000000";
            close;
        case 7:
            mes "[Hunting Missions]";
            mes "Nothing? Okay...";
            emotion e_hmm;
            close;
        }

    Mission_Status:
        set @f,0;
        deletearray .@j[0], getarraysize(.@j);
        for(set .@i,0; .@i<.Quests; set .@i,.@i+1) {
            set .@j[.@i], getd("Mission"+.@i);
            set .@j[.Quests], .@j[.Quests]+strmobinfo(3,.@j[.@i]);
            set .@j[.Quests+1], .@j[.Quests+1]+(strmobinfo(6,.@j[.@i])/(getbattleflag("base_exp_rate")/100)*.Modifier[0]);
            set .@j[.Quests+2], .@j[.Quests+2]+(strmobinfo(7,.@j[.@i])/(getbattleflag("job_exp_rate")/100)*.Modifier[1]);
            mes " > "+Chk(getd("Mission"+.@i+"_"),#Mission_Count)+strmobinfo(1,.@j[.@i])+" ("+getd("Mission"+.@i+"_")+"/"+#Mission_Count+")^000000";
        }

        // Reward formulas:
        set .@Mission_Points, 3+(.@j[.Quests]/.Quests/6);
        set .@Base_Exp, #Mission_Count*.@j[.Quests+1]/5;
        set .@Job_Exp, #Mission_Count*.@j[.Quests+2]/5;
        set .@zeny, #Mission_Count*.Quests*.@j[.@i]*.Modifier[2];

        next;
        mes "[Hunting Missions]";
        mes "Mission rewards:";
        mes " > Mission Points: ^0055FF"+.@Mission_Points+"^000000";
        mes " > Base Experience: ^0055FF"+Cm(.@Base_Exp)+"^000000";
        mes " > Job Experience: ^0055FF"+Cm(.@Job_Exp)+"^000000";
        mes " > Zeny: ^0055FF"+Cm(.@zeny)+"^000000";
        if (@f) { set @f,0; return; }
        next;
        mes "[Hunting Missions]";
        mes "Oh, you're done!";
        mes "Good work.";
        mes "Here's your reward.";
        emotion e_no1;
        specialeffect(EF_ANGEL, AREA, playerattached());
        specialeffect(EF_TRUESIGHT, AREA, playerattached());
        set #Mission_Points, #Mission_Points+.@Mission_Points;
        set BaseExp, BaseExp+.@Base_Exp;
        set JobExp, JobExp+.@Job_Exp;
        Zeny += .@zeny;
        for(set .@i,0; .@i<.Quests; set .@i,.@i+1) {
            setd "Mission"+.@i,0;
            setd "Mission"+.@i+"_",0;
        }
        set #Mission_Count,0;
        if (.Delay) set #Mission_Delay, gettimetick(2)+(.Delay*3600);
        set Mission_Total, Mission_Total+1;
        if (Mission_Total == 1) query_sql("INSERT INTO `char_reg_num_db` (`char_id`,`key`,`index`,`value`) VALUES ("+getcharid(CHAR_ID_CHAR)+",'Mission_Total','0',1)");
        else query_sql("UPDATE `char_reg_num_db` SET `value` = "+Mission_Total+" WHERE `char_id` = "+getcharid(CHAR_ID_CHAR)+" AND `key` = 'Mission_Total'");
        close;

    Mission_Info:
        mes "[Hunting Missions]";
        mes "If you so choose, I can assign";
        mes "you a random hunting quest.";
        mes "Some are easier than others, but";
        mes "the rewards increase with difficulty.";
        next;
        mes "[Hunting Missions]";
        mes "Missions points are shared";
        mes "amongst all your characters.";
        if (.Delay) mes "Delay time is, too.";
        mes "You can't take missions on";
        mes "multiple characters at once.";
        next;
        mes "[Hunting Missions]";
        mes "You can start a quest";
        if (.Delay) mes "every "+((.Delay == 1)?"hour.":.Delay+" hours.");
        else mes "whenever you want.";
        mes "That's everything~";
        return;

    function Chk {
        if (getarg(0) < getarg(1)) { set @f,1; return "^FF0000"; }
        else return "^00FF00"; }

    function Cm {
        set .@str$, getarg(0);
        for(set .@i,getstrlen(.@str$)-3; .@i>0; set .@i,.@i-3)
            set .@str$, insertchar(.@str$,",",.@i);
        return .@str$; }

    OnBuyItem:
        set @cost,0;
        for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1)
            for(set .@j,0; .@j<getarraysize(.Shop); set .@j,.@j+2)
                if (@bought_nameid[.@i] == .Shop[.@j]) {
                    set @cost, @cost+(.Shop[.@j+1]*@bought_quantity[.@i]);
                    break;
                }
        mes "[Hunting Missions]";
        if (@cost > #Mission_Points) mes "You don't have enough Mission Points.";
        else {
            for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1) {
                getitem @bought_nameid[.@i], @bought_quantity[.@i];
                dispbottom "Purchased "+@bought_quantity[.@i]+"x "+getitemname(@bought_nameid[.@i])+".";
            }
            set #Mission_Points, #Mission_Points-@cost;
            mes "Deal completed.";
            emotion e_cash;
        }
        set @cost,0;
        deletearray @bought_nameid[0], getarraysize(@bought_nameid);
        deletearray @bought_quantity[0], getarraysize(@bought_quantity);
        close;

    OnNPCKillEvent:
        if (!getcharid(CHAR_ID_PARTY) || !.Party) {
            if (!#Mission_Count || !Mission0) end;
            for (set .@i, 0; .@i<.Quests; set .@i,.@i+1) {
                if (strmobinfo(1,killedrid) == strmobinfo(1,getd("Mission"+.@i))) {
                    if (getd("Mission"+.@i+"_") < #Mission_Count) {
                        dispbottom "[Hunting Mission] Killed "+(set(getd("Mission"+.@i+"_"),getd("Mission"+.@i+"_")+1))+" of "+#Mission_Count+" "+strmobinfo(1,killedrid)+".";
                        end;
                    }
                }
            }
        } else if (.Party) {
            set .@mob, killedrid;
            getmapxy(.@map1$, .@x1, .@y1, UNITTYPE_PC);
            getpartymember getcharid(CHAR_ID_PARTY),1;
            getpartymember getcharid(CHAR_ID_PARTY),2;
            for(set .@i,0; .@i<$@partymembercount; set .@i,.@i+1) {
                if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i])) {
                    attachrid $@partymemberaid[.@i];
                    if (#Mission_Count && Mission0 && Hp > 0) {
                        getmapxy(.@map2$, .@x2, .@y2, UNITTYPE_PC);
                        if ((.@map1$ == .@map2$ || .Party == 1) && (distance(.@x1,.@y1,.@x2,.@y2) <= 30 || .Party < 3)) {
                            for(set .@j,0; .@j<.Quests; set .@j,.@j+1) {
                                if (strmobinfo(1,.@mob) == strmobinfo(1,getd("Mission"+.@j))) {
                                    if (getd("Mission"+.@j+"_") < #Mission_Count) {
                                        dispbottom "[Hunting Mission] Killed "+(set(getd("Mission"+.@j+"_"),getd("Mission"+.@j+"_")+1))+" of "+#Mission_Count+" "+strmobinfo(1,.@mob)+".";
                                        break;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        end;

    OnInit:
        set .Delay,12;        // Quest delay, in hours (0 to disable).
        set .Quests,4;        // Number of subquests per mission (increases rewards).
        set .Party,3;        // Party options: 0 (exclude party kills), 1 (include party kills), 2 (same map only), 3 (screen area only)
        set .Reset,-1;        // Reset options: -1 (abandoning mission sets delay time), 0 (no delay time), [Zeny] (cost to abandon mission, no delay time)
        setarray .Count[0],    // Min and max monsters per subquest (increases rewards).
            40,70;
        setarray .Modifier[0],    // Multipliers for Base Exp, Job Exp, and Zeny rewards.
            getbattleflag("base_exp_rate")/100,getbattleflag("job_exp_rate")/100,60;
        setarray .Shop[0],    // Reward items: <ID>,<point cost> (about 10~20 points per hunt).
            512,1,513,1,514,1,538,5,539,5,558,10,561,10;
        set .Blacklist$,    // Blacklisted mob IDs.
            "1062,1088,1183,1186,1200,1212,1220,1221,1234,1235,"+
            "1244,1245,1250,1268,1290,1293,1294,1296,1298,1299,"+
            "1300,1301,1303,1304,1305,1306,1308,1309,1311,1313,"+
            "1515,1588,1618,1676,1677,1678,1679,1796,1797,1974,"+
            "1975,1976,1977,1978,1979";

        npcshopdelitem "mission_shop",512;
        for(set .@i,0; .@i<getarraysize(.Shop); set .@i,.@i+2)
            npcshopadditem "mission_shop", .Shop[.@i], .Shop[.@i+1];
        end;
    }
    -    shop    mission_shop    FAKE_NPC,512:-1


  2. Tenho esse MVP points

    prontera,150,150,6      script  Trocador de MVP Points#1        753,{
         
           
    // Estrutura da loja:
            // ID,preço, Id,preço, ID,preço...;
    setarray .items[0],5463,175, 5462,175, 10501,200, 10502,400, 5377,400;
               
    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 ("- Máscara Colorida:- Máscara do Exterminador:- Goma de Mascar:- Donut:- Antique Pipe")) {
            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"+@prize+"^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 "+@prize+" MVP Points, lhe restam "+mvp_points+" MVP Points.";
            close;
            }
    }

    e uso esse sql
     
    CREATE TABLE IF NOT EXISTS `mvp_rank` (
    `id` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0',
    `name` VARCHAR( 23 ) NOT NULL ,
    `mvpkills` BIGINT( 20 ) UNSIGNED NOT NULL ,
    `mvp_points` BIGINT( 20 ) UNSIGNED NOT NULL ,
    UNIQUE KEY `id` ( `id` )
    ) TYPE = MYISAM DEFAULT CHARSET = latin1
     
    e uso esse ranking.
     
     
    //=========================================================
    // Cronus Script - Ranking MVP
    //=========================================================
    // Escrito por Kant - 18/02/2011
    //=========================================================
    // 20/05/2014 -- mcsxD // Criação Tabela SQl automatico e 
    //                          Nick top 1º no waitingroom 
    //=========================================================
    //-Mostra um top com os players que mais mataram
    // mvps no servidor.
    //-Configurações disponíveis in-game: anúncio quando um
    // player matar um mvp, número de posições mostradas e
    // resetar top.
    //-Tabela sql será criada automaticamente.
    //=========================================================
    //-Fiz esse npc a fim de melhorar um pouco  o script do
    // Rokimoki e fazer uma versão sql, usando uma tabela 
    // para guardar os dados, facilitando o uso em sites e cp.
    //-Agradecimentos ao Rokimoki por ter feito a array com AS
    // ids dos mvps.
    //=========================================================
     
    - script Rank MvP -1,{
    OnInit:
    query_sql "CREATE TABLE IF NOT EXISTS `mvprank` (`id` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0',`name` VARCHAR( 23 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,`mvpkills` BIGINT UNSIGNED NOT NULL ,UNIQUE (`id`)) ENGINE = MYISAM";
    SET $a, 1;
    SET $topmvp, 10;
    setarray $mvpid[0],1511,1251,1734,1647,1651,1785,1630,1399,1039,1874,2068,1272,1719,1046,1389,1885,1876,1112,1115,1957,1418,1871,1252,1768,1086,1688,1646,1373,1147,1492,1059,1150,1956,2022,1087,1190,1038,1157,1159,1502,1623,1650,1583,1779,1708,1312,1751,1685,1648,1649,1917,1658,1832,1916,2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2021,2024,2025,2026,2027,2028,2032;
    end;
     
    OnNPCKillEvent:
    FOR (SET .@i, 0; .@i < getarraysize($mvpid); SET .@i, .@i + 1) {
    IF (killedrid == $mvpid[.@i]) SET .@s,1;
    }
    IF (!.@s) end;
    IF ($a) announce "O player [ "+strcharinfo(0)+" ] matou o MvP [ "+getmonsterinfo(killedrid,0)+" ] no mapa [ "+strcharinfo(3)+" ]",bc_blue|bc_all;
    query_sql "INSERT INTO mvprank (id, name, mvpkills) values('"+getcharid(0)+"','"+strcharinfo(0)+"','1') ON DUPLICATE KEY UPDATE mvpkills = mvpkills + '1'";
    end;
    }
     
    prontera
    ,150,150,4 script Top MVP Killers 837,{
    IF (getgroupid() > 90) {
    mes "[^0000FFTop MvP "+$topmvp+"^000000]";
    mes "O que deseja fazer?";
    switch(SELECT("Ver Top",(($a) ? "Desligar anúncio":"Ligar anúncio"),"Resetar Top MvP:Número de posições")) {
    case 1: break;
    case 2:
    SET $a, ($a) ? 0 : 1;
    close;
    case 3:
    query_sql "TRUNCATE `mvprank`";
    close;
    case 4:
    mes "Digite o número de posições do top mvp.";
    input $topmvp;
    break;
    }
    next;
    }
    query_sql "SELECT `name`,`mvpkills` FROM `mvprank` ORDER BY `mvpkills` DESC LIMIT "+$topmvp+"",@names$,@mvpkills;
    mes "[^0000FFTop MvP "+$topmvp+"^000000]";
    FOR (SET @c, 0; @c < $topmvp; SET @c, @c + 1) {
    mes "^FF0000"+(@c+1)+"º^000000 ^0000FF"+@names$[@c]+"^000000 matou ^FF0000"+@mvpkills[@c]+"^000000 MvP's.";
    }
    close;
    OnInit:
    query_sql "SELECT `name`,`mvpkills` FROM `mvprank` ORDER BY `mvpkills` DESC LIMIT 1",.@names$,.@mvpkills;
    waitingroom .@names$,0;
    end;
    }

     

     

    O ranking está funcionando 100% porém quando clico no mvp point ele diz que não tenho pontos MVP creio que que o MVP points não está lendo a ranking MVP alguem pode me ajuda???


  3. //=========================================================// Cronus Script - Ranking MVP//=========================================================// Escrito por Kant - 18/02/2011//=========================================================// 20/05/2014 -- mcsxD // Criação Tabela SQl automatico e //                          Nick top 1º no waitingroom //=========================================================//-Mostra um top com os players que mais mataram// mvps no servidor.//-Configurações disponíveis in-game: anúncio quando um// player matar um mvp, número de posições mostradas e// resetar top.//-Tabela sql será criada automaticamente.//=========================================================//-Fiz esse npc a fim de melhorar um pouco  o script do// Rokimoki e fazer uma versão sql, usando uma tabela // para guardar os dados, facilitando o uso em sites e cp.//-Agradecimentos ao Rokimoki por ter feito a array com AS// ids dos mvps.//========================================================= - script Rank MvP -1,{OnInit:query_sql "CREATE TABLE IF NOT EXISTS `mvprank` (`id` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0',`name` VARCHAR( 23 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,`mvpkills` BIGINT UNSIGNED NOT NULL ,UNIQUE (`id`)) ENGINE = MYISAM";SET $a, 1;SET $topmvp, 10;setarray $mvpid[0],1511,1251,1734,1647,1651,1785,1630,1399,1039,1874,2068,1272,1719,1046,1389,1885,1876,1112,1115,1957,1418,1871,1252,1768,1086,1688,1646,1373,1147,1492,1059,1150,1956,2022,1087,1190,1038,1157,1159,1502,1623,1650,1583,1779,1708,1312,1751,1685,1648,1649,1917,1658,1832,1916,2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2021,2024,2025,2026,2027,2028,2032;end; OnNPCKillEvent:FOR (SET .@i, 0; .@i < getarraysize($mvpid); SET .@i, .@i + 1) {IF (killedrid == $mvpid[.@i]) SET .@s,1;}IF (!.@s) end;IF ($a) announce "O player [ "+strcharinfo(0)+" ] matou o MvP [ "+getmonsterinfo(killedrid,0)+" ] no mapa [ "+strcharinfo(3)+" ]",bc_blue|bc_all;query_sql "INSERT INTO mvprank (id, name, mvpkills) values('"+getcharid(0)+"','"+strcharinfo(0)+"','1') ON DUPLICATE KEY UPDATE mvpkills = mvpkills + '1'";end;} prontera,150,150,7 script Top MVP Killers 837,{IF (getgmlevel() > 90) {mes "[^0000FFTop MvP "+$topmvp+"^000000]";mes "O que deseja fazer?";switch(SELECT("Ver Top",(($a) ? "Desligar anúncio":"Ligar anúncio"),"Resetar Top MvP:Número de posições")) {case 1: break;case 2:SET $a, ($a) ? 0 : 1;close;case 3:query_sql "TRUNCATE `mvprank`";close;case 4:mes "Digite o número de posições do top mvp.";input $topmvp;break;}next;}query_sql "SELECT `name`,`mvpkills` FROM `mvprank` ORDER BY `mvpkills` DESC LIMIT "+$topmvp+"",@names$,@mvpkills;mes "[^0000FFTop MvP "+$topmvp+"^000000]";FOR (SET @c, 0; @c < $topmvp; SET @c, @c + 1) {mes "^FF0000"+(@c+1)+"º^000000 ^0000FF"+@names$[@c]+"^000000 matou ^FF0000"+@mvpkills[@c]+"^000000 MvP's.";}close;OnInit:query_sql "SELECT `name`,`mvpkills` FROM `mvprank` ORDER BY `mvpkills` DESC LIMIT 1",.@names$,.@mvpkills;waitingroom .@names$,0;end;}

     

    to usando esse sql

     

    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'query_sql "CREATE TABLE IF NOT EXISTS `mvp` (`id` INT( 11 ) UNSIGNED NOT NULL DE' at line 1

     

    [/color] query_sql "CREATE TABLE IF NOT EXISTS `mvp` (`id` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0',`name` VARCHAR( 23 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,`mvpkill` BIGINT UNSIGNED NOT NULL ,UNIQUE (`id`)) TYPE = MYISAM"; 


  4. Alguem tem o sql desde npc?

     

     //===============================//======== 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"+@prize+"^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 Pointsmes .npcname$;mes "Você não possui MVP Points suficientes.";close;}if (checkweight(.items[@buying],@qt) == 0) { //Verificação de pesomes .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 "+@prize+" MVP Points, lhe restam "+mvp_points+" MVP Points.";close;}} 

  5. - Emulador Rathena
    - Hexed 20120410
    - nenhuma que lembre
    - Não tentei

    - aparece sim este:

    Debug]: at mapreg.c:184 - UPDATE `mapreg` SET `value`='A Guerra do Emperium 1.0 do RagnApple começou!' WHERE `varname`='$MsgInitWoE1$' AND `index`='0'

     

    o error não é relevante para o problema eu axo.


  6. Seguinte eu to com o seguinte problema quando eu entro no personagem equipo 1 item ele equipa mais não sai da inventorio quando eu jogo no chão ele cai e desequipa de min oque posso fazer pra arruma isso?

     

    quando teleporte para de @go 0 para @go 2 ele sai do inventorio e equipa normal.


  7. Hello, please help,

     

    Emulator Hercules: http://prntscr.com/5p6mhl

     

     

    Hexed: 2011 06 09 : http://prntscr.com/5p6mqx + data Compatível com Hexed.

     

    data.ini

    [Data]2=data.grf3=data 

     

    Sclientinfo

    <?xml version="1.0" encoding="euc-kr" ?><clientinfo>	<desc>Ragnarok Client Information - Taiwan Version</desc>	<servicetype>korea</servicetype>	<servertype>sakray</servertype>	<connection>		<display>RagnaFox</display>		<desc>FoxFoxFox</desc>		<balloon>101010</balloon>		<langtype>12</langtype>		<version>22</version>		<address>127.0.0.1</address>		<port>6900</port>		<aid>			<admin>200000</admin>		</aid>		<loading>			<image>100000</image>		</loading>	</connection>	<registrationweb>emocore.com</registrationweb></clientinfo>

     

    http://prntscr.com/5p6nhp

     

     
    See below when I open my hexed. I do not know WHAT do not know what it can is wrong
     
    NOTE: Server're normally on.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.