Jump to content

nazgul001

Members
  • Posts

    37
  • Joined

  • Last visited

Posts posted by nazgul001

  1. Ok i dont understat srry i not a good scripter.

     

    where i have to do the  change :

     

    -    script    EP7_fenris    -1,{
    OnInit:
     
        donpcevent "Joka l'éclairé#aby3::OnBG";
            
        disablenpc "#arsin16a";
        disablenpc "#arsfild62a1";
        disablenpc "#arsfild62a2";
        disablenpc "#arsfild62a3";
        disablenpc "#arsfild62b1";
        disablenpc "#arsfild62b2";
        disablenpc "#arsfild62c1";
        disablenpc "#arsfild62c2";
        disablenpc "#arsfild62c3";
        disablenpc "#arsfild62c4";
        disablenpc "#arsfild62d1";
        disablenpc "#arsfild62d4";
        disablenpc "#arsfild62d5";
        disablenpc "#arsfild62e2";
     
        disablenpc "#arsfild62fin";
     
        disablenpc "Odin#aby";
        disablenpc "Aerie#aby";
        disablenpc "Fenrir#aby";
     
     
        killmonsterall "ars_fild62";
     
        set $@ep7fenris, 0;
     
        setnpctimer 0;
        stopnpctimer;
        end;    
     
     
    OnBGJoin:
        if( $@ep7fenris == 0 )
            donpcevent "EP7_fenris::OnReadyCheck";
        end;
     
    OnReadyCheck:
        if( $@ep7fenris )
            end;
        set .@ep7fenris, getwaitingroomstate(0,"Joka l'éclairé#aby3");
        
        if( .@ep7fenris < $EP7_InstJoueurs )
        {
            if($ep7_LangChoice & 1) {mapannounce "ars_in16","Instance -- Le Combat d'Ust Nashar : " + .@ep7fenris + "/" + $EP7_InstJoueurs + "",1,0xFFCC66;}
            if($ep7_LangChoice & 2) {mapannounce "ars_in16","Instance -- The Battle of Ust Nashar : " + .@ep7fenris + "/" + $EP7_InstJoueurs + "",1,0xFFCC66;}
            if($ep7_LangChoice & 4) {mapannounce "ars_in16","Instance -- La batalla de Ust Nashar : " + .@ep7fenris + "/" + $EP7_InstJoueurs + "",1,0xFFCC66;}
            end;
        }
     
        // BG Variables
        set $@ep7fenris, 1;
        // warp joueurs
        donpcevent "Joka l'éclairé#aby3::OnEnterBG";
        if($EP7Annonce == 0 && $ep7_LangChoice & 1) {mapannounce "ars_in16","Combat Final -- Le Combat d'Ust Nashar vient de débuter !",1,0xFFCC66;}
        if($EP7Annonce == 1 && $ep7_LangChoice & 1) {announce "Combat Final -- Le Combat d'Ust Nashar vient de débuter !",0,0xFFCC66;}
        if($EP7Annonce == 0 && $ep7_LangChoice & 2) {mapannounce "ars_in16","Combat Final -- Combat Ust Nashar has just begun!",1,0xFFCC66;}
        if($EP7Annonce == 1 && $ep7_LangChoice & 2) {announce "Combat Final -- Combat Ust Nashar has just begun!",0,0xFFCC66;}
        if($EP7Annonce == 0 && $ep7_LangChoice & 4) {mapannounce "ars_in16","Combate Final -- El combate de Ust Nashar ha comenzado!",1,0xFFCC66;}
        if($EP7Annonce == 1 && $ep7_LangChoice & 4) {announce "Combate Final -- El combat de Ust Nashar ha comenzado!",0,0xFFCC66;}
            
        // Start Match!!
        initnpctimer;
        // npcs les fenetres
        delwaitingroom "Joka l'éclairé#aby3";
        end;
     
  2. Hi-ho, first of everything, its a great work what u do guys. :D

     

    i have an error when i reloadscripts or put on my server, this is the error :

     

    [Error]: npc_enable: Attempted to hide a non-existing NPC '#arsfild62a1' (flag=0).
    [Error]: npc_enable: Attempted to hide a non-existing NPC '#arsfild62a2' (flag=0).
    [Error]: npc_enable: Attempted to hide a non-existing NPC '#arsfild62a3' (flag=0).
    [Error]: npc_enable: Attempted to hide a non-existing NPC '#arsfild62b1' (flag=0).
    [Error]: npc_enable: Attempted to hide a non-existing NPC '#arsfild62b2' (flag=0).
    [Error]: npc_enable: Attempted to hide a non-existing NPC '#arsfild62c1' (flag=0).
    [Error]: npc_enable: Attempted to hide a non-existing NPC '#arsfild62c2' (flag=0).
    [Error]: npc_enable: Attempted to hide a non-existing NPC '#arsfild62c3' (flag=0).
    [Error]: npc_enable: Attempted to hide a non-existing NPC '#arsfild62c4' (flag=0).
    [Error]: npc_enable: Attempted to hide a non-existing NPC '#arsfild62d1' (flag=0).
    [Error]: npc_enable: Attempted to hide a non-existing NPC '#arsfild62d4' (flag=0).
    [Error]: npc_enable: Attempted to hide a non-existing NPC '#arsfild62d5' (flag=0).
    [Error]: npc_enable: Attempted to hide a non-existing NPC '#arsfild62e2' (flag=0).
    [Error]: npc_enable: Attempted to hide a non-existing NPC '#arsfild62fin' (flag=0).
    [Error]: npc_enable: Attempted to hide a non-existing NPC 'Odin#aby' (flag=0).
    [Error]: npc_enable: Attempted to hide a non-existing NPC 'Aerie#aby' (flag=0).
    [Error]: npc_enable: Attempted to hide a non-existing NPC 'Fenrir#aby' (flag=0).

     

    Did u kwon how can i fix this. Im using an rAthena SVN REV17425 Trunk.

  3. Phenomena and Khazou

     

    Hey guys thx for u help, i can do this and i fixed with ur help of course,

     

    I leave te script if someone want this :D

    
    //============================================================
    //===== rAthena Script =======================================
    //============================================================
    //===== Script Propiedad de Cross Way RO =====================
    //============================================================
    //===== Creado por Kayaba ¡===================================
    //============================================================
    //===== Script Warper VIP ====================================
    //============================================================
    
    // 
    // 
    
    prontera,151,186,4    script    Warper VIP    113,{
    
        cutin "kafra_05",2;
        mes "[Warper VIP]";
        mes "Hola ^0000FF" + strcharinfo(0) + "^000000, Yo soy la encargada de vender cuentas premium";
        next;
        mes"Yo estoy aqui para llevar a los usuarios VIP a las ciudades VIP.";
        mes"Te interesa?.";
        next;
    
        set .@getAccountType$,query_sql("SELECT `account_type` FROM login WHERE `account_id` = "+getcharid(3)+";",.@accountType$); //---- Revisa si hay VIP
    
            if ( .@accountType$ == "PLATINUM" ) { //--- Tipo de VIP
                    switch(select("Atlantis:Puerto Pirata")) {
                        case 1:
                            warp "atlantis",130,158;
                            break;
                        case 2:
                            warp "neko_isle",105,106;
                                break;            
                }
            }
            if ( .@accountType$ == "GOLD" ) { //--- Tipo de VIP
                switch(select("Atlantis:Puerto Pirata")) {
                    case 1:
                        warp "atlantis",130,158;
                        break;
                    case 2:
                        warp "neko_isle",105,106;
                        break;
                }
            }
            if ( .@accountType$ == "SILVER" ) { //--- Tipo de VIP
                switch(select("Atlantis:Puerto Pirata")) {
                    case 1:
                        warp "atlantis",130,158;
                        break;
                    case 2:
                        warp "neko_isle",105,106;
                        break;
                }
            }
            if ( .@accountType$ == "NORMAL" ) //--- Tipo de VIP {
                mes "[Warper VIP]";
                mes "Lo siento ^0000FF" + strcharinfo(0) + "^000000, solo a los usuarios VIP les puedo proporcionar este servicio.";    
                close;
            }
    }
    
    

     

     

     

  4. Hello, I seek in this script is a warper npc that only usable VIP users, I have vip system which has 3 types (silver, gold, platinum) same as leave here.

    
    prontera,159,186,4    script    Premium Accounts    864,{
    
    //---------------------- Tablas SQL -------------------------------------------------
    //--                                                *
    //-- Table structure for table `vip_silver`                        *
    //--                                                *
    //                                                *
    //CREATE TABLE IF NOT EXISTS `vip_silver` (                        *
    //  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,                    *
    //  `account_id` int(7) unsigned NOT NULL,                        *
    //  `account_name` varchar(45) NOT NULL,                            *
    //  `start_date` date NOT NULL,                                *
    //  `end_date` date NOT NULL,                                *
    //  `status` enum('ACTIVE','EXPIRED') NOT NULL,                        *
    //  PRIMARY KEY (`id`)                                    *
    //) ENGINE=MyISAM  DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=2 ;    *
    //-----------------------------------------------------------------------------------
    //CREATE TABLE IF NOT EXISTS `vip_platinum` (                        *
    //  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,                    *
    //  `account_id` int(7) unsigned NOT NULL,                        *
    //  `account_name` varchar(45) NOT NULL,                            *
    //  `start_date` date NOT NULL,                                *
    //  `end_date` date NOT NULL,                                *
    //  `status` enum('ACTIVE','EXPIRED') NOT NULL,                        *
    //  PRIMARY KEY (`id`)                                    *
    //) ENGINE=MyISAM  DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=5 ;    *
    //-----------------------------------------------------------------------------------
    //CREATE TABLE IF NOT EXISTS `vip_gold` (                            *
    //  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,                    *
    //  `account_id` int(7) unsigned NOT NULL,                        *
    //  `account_name` varchar(45) NOT NULL,                            *
    //  `start_date` date NOT NULL,                                *
    //  `end_date` date NOT NULL,                                *
    //  `status` enum('ACTIVE','EXPIRED') NOT NULL,                        *
    //  PRIMARY KEY (`id`)                                    *
    //) ENGINE=MyISAM  DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=11 ;    *
    //-----------------------------------------------------------------------------------
    //---------------------- CONFIG SILVER ACCOUNT --------------------------------------
    set $VIPs_SilverAccLevel,1;            // Nivel de GM asignado para la cuenta Sil*
    set $VIPs_SilverExpRate,50;            // Cuanta Exp JOP extra odtiene ( 1 = 1% )*
    set $VIPs_SilverItemRate,50;            // Cuanta drop exp extra gana( 1 = 1% )    *
    set .@COSTSILVER,500;                // Costo de la Cuenta Silver        *
    Set .@silverDays,28;                // Cuantos Dias por Cuenta Silver    *
    //---------------------- CONFIG GOLD ACCOUNT ----------------------------------------
    set $VIPs_GoldAccLevel,2;            // Nivel de cuenta que odtiene la cuenta g*
    set $VIPs_GoldExpRate,100;            // Extra Exp JOB Base     ( 1 = 1% )    *
    set $VIPs_GoldItemRate,100;            // Extra Drop Exp      ( 1 = 1% )    *
    set .@COSTGOLD,900;                // Costo de la cuenta GOLD        *
    set .@goldDays,28;                // Cuantos dias odtiene la cuenta GOLD    *
    //---------------------- CONFIG Platinum Account ------------------------------------
    set $VIPs_PlatinumAccLevel,3;        // Nivel de GM Asignado para la cuenta Pla*
    set $VIPs_PlatinumExpRate,200;        // Extra Exp Platinum ( 1 = 1%         *
    set $VIPs_PlatinumItemRate,200;        // Extra Drop exp  ( 1 = 1%)        *
    set .@platinumDays,28;            // Dias cuenta platinum            *
    set .@COSTPLAT,1200;            // Costo de la cuenta Platinum        *
    //-----------------------------------------------------------------------------------
    
                mes "[Cuentas Premium]";
                mes "Hola ^0000FF" + strcharinfo(0) + "^000000, Yo soy la encargada de vender cuentas premium";
                next;
                menu "Cuenta Silver",L_Silver,"Cuenta Gold",L_GOLD,"Cuenta Platinum",L_PLAT;
                L_Silver:
                mes "[Cuenta Silver]";
                mes "Si tienes otro tipo de cuenta sera borrado";
                mes "Exp y Job: "+$VIPs_SilverExpRate+"% extra ";
                mes "Drop: "+$VIPs_SilverItemRate+" extra";
                mes "Costo: "+.@COSTSILVER+" CashPoint";
                mes "Duracion: "+.@silverDays+"";
                switch(select("Comprar/Extender Cuenta:Salir"))
                {
    
                    Case 1:    // Add/Extend
                    if( #CASHPOINTS < .@COSTSILVER )
                        {
                        mes "[Cuenta Silver]";
                        mes "No tienes los suficientes Cash Point para comprarlo.";
                        close;
                        }
                        mes "Porfavor coloque su cuenta a la que le quiere agregar Vip Account.";
                        input .@accountName$;
                        next;
                        // Fetch account's ID using the name of the account previously typed.
                        set .@getAccountId,query_sql("SELECT `account_id`FROM login WHERE `userid` = '"+.@accountName$+"';",.@accountId);
                        mes "Identificando Cuenta: "+.@accountName$+".";
                        sleep2 rand(100,2000); // Looks like it's working on something 
                        if (!.@accountId)    // Let's verify if the entered account exists or GM is just high...
                        {
                            mes "ERROR: No se encontro tu cuenta.";
                            mes "Verifica tu cuenta y coloquela bien.";
                            close;
                        }
                        else
                        {     // Now lets check if the account is already 'vip_silver'
                            set .@getSilverAccount,query_sql("SELECT `account_id` FROM vip_silver WHERE `account_id` = "+.@accountId+";",.@silverAccountId);
                            if (.@silverAccountId == .@accountId) // If the account is already VIP we will update instead of inserting a new entry.
                            {
                                mes "Account ID: "+.@silverAccountId+".";
                                sleep2 rand(100,850);
                                query_sql("UPDATE vip_silver SET end_date = DATE_ADD(end_date, INTERVAL "+.@silverDays+" DAY) WHERE account_id = "+.@silverAccountId+";");
                                query_sql("UPDATE vip_silver SET `status` = 'ACTIVE' WHERE account_id = "+.@silverAccountId+";");
                                query_sql("UPDATE login SET `account_type` = 'SILVER' WHERE account_id = "+.@silverAccountId+";");
                                mes "Cuenta "+.@silverAccountId+" Actualizada";
                                set #CASHPOINTS, #CASHPOINTS-.@COSTSILVER;
                                mes "Listo!, extendio su cuenta Silver!";
                                close;
                            }
                            else    // Verificacion si la cuenta no aun no tiene Silver Account
                            {
                                mes "Account ID: "+.@accountId+".";
                                sleep2 rand(100,850);
                                query_sql("INSERT INTO vip_silver (`account_id`,`account_name`,`start_date`,`end_date`,`status`) VALUES ("+.@accountId+",'"+.@accountName$+"','"+gettimestr("%Y-%m-%d",21)+"','"+gettimestr("%Y-%m-%d",21)+"','ACTIVE');");
                                sleep2 100;
                                query_sql("UPDATE vip_silver SET end_date = DATE_ADD(start_date, INTERVAL "+.@silverDays+" DAY) WHERE account_id = "+.@accountId+";");
                                query_sql("UPDATE `login` SET `level` = "+$VIPs_SilverAccLevel+" WHERE `account_id` = "+.@accountId+";");
                                query_sql("UPDATE login SET `account_type` = 'SILVER' WHERE account_id = "+.@accountId+";");
                                mes "Cuenta "+.@accountId+" anadida";
                                set #CASHPOINTS, #CASHPOINTS-.@COSTSILVER;
                                mes "Listo!, Ahora tienes una cuenta Silver!, porfavor reloguea";
                                close;
                            }
                        }
    
                    Case 2:
                        mes "Nos vemos";
                        close;
                }
                
                
                L_GOLD:
                mes "[Cuenta Gold]";
                mes "Si tienes otro tipo de cuenta sera borrado";
                mes "Exp y Job: "+$VIPs_GoldExpRate+"% extra ";
                mes "Drop: "+$VIPs_GoldItemRate+" extra";
                mes "Costo: "+.@COSTGOLD+" CashPoint";
                mes "Duración: "+.@goldDays+"";
                mes "Odtienes acceso a las razas (Fantasy Races)";
                switch(select("Comprar/Extender Cuenta:Salir"))
                {
    
                    Case 1:    // Add/Extend
                    if( #CASHPOINTS < .@COSTGOLD )
                        {
                        mes "[Cuenta Silver]";
                        mes "No tienes los suficientes Cash Point para comprarlo.";
                        close;
                        }
                        mes "Porfavor coloque su cuenta a la que le quiere agregar Vip Account.";
                        input .@accountName$;
                        next;
                        // Fetch account's ID using the name of the account previously typed.
                        set .@getAccountId,query_sql("SELECT `account_id`FROM login WHERE `userid` = '"+.@accountName$+"';",.@accountId);
                        mes "Identificando Cuenta: "+.@accountName$+".";
                        sleep2 rand(100,2000); // Looks like it's working on something 
                        if (!.@accountId)    // Let's verify if the entered account exists or GM is just high...
                        {
                            mes "ERROR: No se encontro tu cuenta.";
                            mes "Verifica tu cuenta y coloquela bien.";
                            close;
                        }
                        else
                        {     // Checa si ya es 'vip_gold'
                            set .@getGoldAccount,query_sql("SELECT `account_id` FROM vip_gold WHERE `account_id` = "+.@accountId+";",.@goldAccountId);
                            if (.@goldAccountId == .@accountId) // If it exists, update, not insert
                            {
                                mes "Cuenta ID: "+.@accountId+".";
                                sleep2 rand(100,850);
                                query_sql("UPDATE vip_gold SET end_date = DATE_ADD(end_date, INTERVAL "+.@goldDays+" DAY) WHERE account_id = "+.@goldAccountId+";");
                                query_sql("UPDATE vip_gold SET `status` = 'ACTIVE' WHERE account_id = "+.@goldAccountId+";");
                                query_sql("UPDATE login SET `account_type` = 'GOLD' WHERE account_id = "+.@goldAccountId+";");
                                mes "Cuenta "+.@goldAccountId+" actualizada";
                                set #CASHPOINTS, #CASHPOINTS-.@COSTGOLD;
                                mes "Listo!, se ha extendido su cuenta Gold";
                                close;
                            }
                            else    // Si no tiene cuenta GOLD
                            {
                                mes "Cuenta ID: "+.@accountId+".";
                                sleep2 rand(100,850);
                                query_sql("INSERT INTO vip_gold (`account_id`,`account_name`,`start_date`,`end_date`,`status`) VALUES ("+.@accountId+",'"+.@accountName$+"','"+gettimestr("%Y-%m-%d",21)+"','"+gettimestr("%Y-%m-%d",21)+"','ACTIVE');");
                                sleep2 100;
                                query_sql("UPDATE vip_gold SET end_date = DATE_ADD(start_date, INTERVAL "+.@goldDays+" DAY) WHERE account_id = "+.@accountId+";");
                                query_sql("UPDATE `login` SET `level` = "+$VIPs_GoldAccLevel+" WHERE `account_id` = "+.@accountId+";");
                                query_sql("UPDATE login SET `account_type` = 'GOLD' WHERE account_id = "+.@accountId+";");
                                mes "Cuenta "+.@accountId+" actualizada";
                                set #CASHPOINTS, #CASHPOINTS-.@COSTGOLD;
                                mes "Listo!, Ahora reloguea";
                                close;
                            }
                        }
    
                    Case 2:    // Back
                        mes "Nos vemos";
                        close;
                }
                
                
                
                
                
                L_PLAT:
                mes "[Cuenta Platinum]";
                mes "Si tienes otro tipo de cuenta sera borrado";
                mes "Exp y Job: "+$VIPs_PlatinumExpRate+"% extra ";
                mes "Drop: "+$VIPs_PlatinumItemRate+" extra";
                mes "Costo: "+.@COSTPLAT+" CashPoint";
                mes "Duracion: "+.@platinumDays+"";
                switch(select("Comprar/Extender Cuenta:Salir"))
                {
    
                    Case 1:    // Add/Extend
                    if( #CASHPOINTS < .@COSTPLAT )
                        {
                        mes "[Cuenta Platinum]";
                        mes "No tienes los suficientes Cash Point para comprarlo.";
                        close;
                        }
                        mes "Porfavor coloque su cuenta a la que le quiere agregar Vip Account.";
                        input .@accountName$;
                        next;
                        // Fetch account's ID using the name of the account previously typed.
                        set .@getAccountId,query_sql("SELECT `account_id`FROM login WHERE `userid` = '"+.@accountName$+"';",.@accountId);
                        mes "Identificando Cuenta: "+.@accountName$+".";
                        sleep2 rand(100,2000); // Looks like it's working on something 
                        if (!.@accountId)    // Let's verify if the entered account exists or GM is just high...
                        {
                            mes "ERROR: No se encontro tu cuenta.";
                            mes "Verifica tu cuenta y coloquela bien.";
                            close;
                        }
                        else
                        {     // Checa si tiene platinum
                            set .@getPlatinumAccount,query_sql("SELECT `account_id` FROM vip_platinum WHERE `account_id` = "+.@accountId+";",.@platinumAccountId);
                            if (.@platinumAccountId == .@accountId) // If this account is 'vip_platinum' update instead of insterting a new entry.
                            {
                                mes "Account ID: "+.@accountId+".";
                                sleep2 rand(100,850);
                                query_sql("UPDATE vip_platinum SET end_date = DATE_ADD(end_date, INTERVAL "+.@platinumDays+" DAY) WHERE account_id = "+.@platinumAccountId+";");
                                query_sql("UPDATE vip_platinum SET `status` = 'ACTIVE' WHERE account_id = "+.@platinumAccountId+";");
                                query_sql("UPDATE login SET `account_type` = 'PLATINUM' WHERE account_id = "+.@platinumAccountId+";");
                                mes "Cuenta "+.@platinumAccountId+" actualizada";
                                set #CASHPOINTS, #CASHPOINTS-.@COSTPLAT;
                                mes "Listo!, se ha extendido tu cuenta Platinum";
                                close;
                            }
                            else    // Si no tiene cuenta Platinum
                            {
                                mes "Account ID: "+.@accountId+".";
                                sleep2 rand(100,850);
                                query_sql("INSERT INTO vip_platinum (`account_id`,`account_name`,`start_date`,`end_date`,`status`) VALUES ("+.@accountId+",'"+.@accountName$+"','"+gettimestr("%Y-%m-%d",21)+"','"+gettimestr("%Y-%m-%d",21)+"','ACTIVE');");
                                sleep2 100;
                                query_sql("UPDATE vip_platinum SET end_date = DATE_ADD(start_date, INTERVAL "+.@platinumDays+" DAY) WHERE account_id = "+.@accountId+";");
                                query_sql("UPDATE `login` SET `level` = "+$VIPs_PlatinumAccLevel+" WHERE `account_id` = "+.@accountId+";");
                                query_sql("UPDATE login SET `account_type` = 'PLATINUM' WHERE account_id = "+.@accountId+";");
                                mes "Account "+.@accountId+" updated";
                                set #CASHPOINTS, #CASHPOINTS-.@COSTPLAT;
                                mes "Listo!, Ahora solamente reloguea";
                                close;
                            }
                        }
    
                    Case 2:
                        mes "Nos vemos";
                        close;
                }
                
                
    //---------------------------------------- NO TOCAR ---------------------------------------------
    L_displayInfo:
        dispbottom "----------------------------------------------------------------------";
        dispbottom "Tipo de Cuenta:"+.@accountType$;
        dispbottom "Estado:        "+.@vipStatus$;
        dispbottom "Acaba en  :    "+.@expirationDate$;
        dispbottom "----------------------------------------------------------------------";
        end;
                
    terminateVip:    // Remueve el status de la cuenta
        set .@dbTableName$,getarg(0);    //    Table name
        set .@accountId,getarg(1);        //    Account ID
        
        query_sql("UPDATE `login` SET `level` = 0 WHERE account_id = "+.@accountId+";"); // Coloca la cuenta a nivel 0
        query_sql("DELETE FROM "+.@dbTableName$+" WHERE account_id = '"+.@accountId+"';"); // Borra la cuenta
        query_sql("ALTER TABLE "+.@dbTableName$+" AUTO_INCREMENT = 1;"); // Reseta la id
        query_sql("UPDATE `login` SET `account_type` = 'NORMAL' WHERE `account_id` = "+.@accountId+";"); // Coloca en la tabla en normal
        goto L_displayInfo;
        
    OnPCLoginEvent:
        // Odtiene la data de las tablas SQL
        set .@getAccountType$,query_sql("SELECT `account_type` FROM login WHERE `account_id` = "+getcharid(3)+";",.@accountType$);
        sc_end sc_expboost;    
        sc_end sc_itemboost;
        
        if (.@accountType$ == "PLATINUM")
        {
            set .@getVipStatus,query_sql("SELECT `status` FROM `vip_platinum` WHERE `account_id` = "+getcharid(3)+";",.@vipStatus$); // Get account type status
            set .@getExpirationDate$,query_sql("SELECT DATE_FORMAT(`end_date`, '%Y %m %d') FROM vip_platinum WHERE `account_id` = "+getcharid(3)+";",.@expirationDate$);    // Get expiration date
            if (gettimestr("%Y %m %d",21) >= .@expirationDate$) // If current date is higher than expiration date...
            {
                callsub terminateVip,"vip_platinum",getcharid(3); goto L_displayInfo;
            }
            else
            {
                sc_start sc_expboost,1000*60*60*24,200,"+$VIPs_PlatinumExpRate+";
                sc_start sc_itemboost,1000*60*60*24,200,"+$VIPs_PlatinumItemRate+"; 
                  goto L_displayInfo;
    
                         
            }
        }
        
        if (.@accountType$ == "GOLD")
        {
            set .@getVipStatus,query_sql("SELECT `status` FROM `vip_gold` WHERE `account_id` = "+getcharid(3)+";",.@vipStatus$); // Obtener el estado de la cuenta
            set .@getExpirationDate$,query_sql("SELECT DATE_FORMAT(`end_date`, '%Y %m %d') FROM vip_gold WHERE `account_id` = "+getcharid(3)+";",.@expirationDate$);    // Obtener Fecha de expiracion
            if (gettimestr("%Y %m %d",21) >= .@expirationDate$) // Si la fecha de HOY es mayor que la fecha de expiracion...
            {
                callsub terminateVip,"vip_gold",getcharid(3); goto L_displayInfo;
            }
            else
            {
                sc_start sc_expboost,1000*60*60*24,100,"+$VIPs_GoldExpRate+";
                sc_start sc_itemboost,1000*60*60*24,100,"+$VIPs_GoldItemRate+"; goto L_displayInfo;
            }
        }
        
        if (.@accountType$ == "SILVER")
        {
            set .@getVipStatus,query_sql("SELECT `status` FROM `vip_silver` WHERE `account_id` = "+getcharid(3)+";",.@vipStatus$); // Obtener el estado de la cuenta
            set .@getExpirationDate$,query_sql("SELECT DATE_FORMAT(`end_date`, '%Y %m %d') FROM vip_silver WHERE `account_id` = "+getcharid(3)+";",.@expirationDate$);    // Obtener Fecha de expiracion
            if (gettimestr("%Y %m %d",21) >= .@expirationDate$) // Si la fecha de HOY es mayor que la fecha de expiracion...
            {
                callsub terminateVip,"vip_silver",getcharid(3); goto L_displayInfo;
            }
            //    si los beneficios no an acabado
            else
            {
                sc_start sc_expboost,1000*60*60*24,50,"+$VIPs_SilverExpRate+";
                sc_start sc_itemboost,1000*60*60*24,50,"+$VIPs_SilverItemRate+"; goto L_displayInfo;
            }
        }
        
        // Checa si la cuenta es normal
        if (.@accountType$ == "NORMAL")
        {
            set .@getVipStatus,query_sql("SELECT `status` FROM `vip_silver` WHERE `account_id` = "+getcharid(3)+";",.@vipStatus$); // Obtener el estado de la cuenta
            set .@getExpirationDate$,query_sql("SELECT DATE_FORMAT(`end_date`, '%Y %M %d') FROM vip_silver WHERE `account_id` = "+getcharid(3)+";",.@expirationDate$);    // Obtener Fecha de expiracion
            goto L_displayInfo;
        }
    //---------------------------------------- NO TOCAR ---------------------------------------------
                } // Fin del SCRIPT
    

     

     

     

    So I made this script but when I try to put in the RO server freezes me.
     
    Sorry for the inconvenience but someone know what's wrong with this script? Help me plx.
     
    This is the script with the problem.
    
    
    prontera,160,186,4    script    Premium Accounts    864,{
    
                mes "[Cuentas Premium]";
                mes "Hola ^0000FF" + strcharinfo(0) + "^000000, Yo soy la encargada de vender cuentas premium";
                next;
                mes"Yo estoy aqui para llevar a los usuarios VIP a las ciudades VIP.";
                mes"Te interesa?.";
                next;
    if (.@accountType$ == "PLATINUM")
    
    {    
                            
                switch(select("Atlantis:Livion:Puerto Pirata")) {
                    case 1:
                        warp "Atlantis",27,236;
                        break;
                    case 2:
                        warp "Livion",145,120;
                        break;
                    case 3:
                        warp "neko_isle",197,86;
                        break;
                }
                break;
    }
    if (.@accountType$ == "GOLD")
    {    
                            
                switch(select("Atlantis:Livion:Puerto Pirata")) {
                    case 1:
                        warp "Atlantis",27,236;
                        break;
                    case 2:
                        warp "Livion",145,120;
                        break;
                    case 3:
                        warp "neko_isle",197,86;
                        break;
                }
                break;
    }
    if (.@accountType$ == "SILVER")
    {    
                            
                switch(select("Atlantis:Livion:Puerto Pirata")) {
                    case 1:
                        warp "Atlantis",27,236;
                        break;
                    case 2:
                        warp "Livion",145,120;
                        break;
                    case 3:
                        warp "neko_isle",197,86;
                        break;
                }
                break;
    }
    if (.@accountType$ == "NORMAL")
    {    
                mes "[Cuentas Premium]";
                mes "Lo siento ^0000FF" + strcharinfo(0) + "^000000, solo usuarios VIP pueden usar este medio.";    
                        close;
                }
    }
    

     

     

     

    Thx guys

  5. Yeah thx Blazing Spear that fixed the DB but i still have the debug problem, do you kwon how can fix that.

     

    thump_8552116error-cuentas-vip.png

     

    --------------------------------------------------------------------------------------------------------------------------------------------------

     

    Fixed i see in the script that is missing the exp rate and item rate 

     

    Original part of script

    L_displayInfo:
        dispbottom "----------------------------------------------------------------------";
        dispbottom "Tipo de Cuenta:"+.@accountType$;
        dispbottom "Estado:        "+.@vipStatus$;
        dispbottom "Acaba en  :    "+.@expirationDate$;
        dispbottom "----------------------------------------------------------------------";
        end;
                
    terminateVip:    // Remueve el status de la cuenta
        set .@dbTableName$,getarg(0);    //    Table name
        set .@accountId,getarg(1);        //    Account ID
        
        query_sql("UPDATE `login` SET `level` = 0 WHERE account_id = "+.@accountId+";"); // Coloca la cuenta a nivel 0
        query_sql("DELETE FROM "+.@dbTableName$+" WHERE account_id = '"+.@accountId+"';"); // Borra la cuenta
        query_sql("ALTER TABLE "+.@dbTableName$+" AUTO_INCREMENT = 1;"); // Reseta la id
        query_sql("UPDATE `login` SET `account_type` = 'NORMAL' WHERE `account_id` = "+.@accountId+";"); // Coloca en la tabla en normal
        goto L_displayInfo;
        
    OnPCLoginEvent:
        // Odtiene la data de las tablas SQL
        set .@getAccountType$,query_sql("SELECT `account_type` FROM login WHERE `account_id` = "+getcharid(3)+";",.@accountType$);
        sc_end sc_expboost;    
        sc_end sc_itemboost;
        
        if (.@accountType$ == "PLATINUM")
        {
            set .@getVipStatus,query_sql("SELECT `status` FROM `vip_platinum` WHERE `account_id` = "+getcharid(3)+";",.@vipStatus$); // Get account type status
            set .@getExpirationDate$,query_sql("SELECT DATE_FORMAT(`end_date`, '%Y %m %d') FROM vip_platinum WHERE `account_id` = "+getcharid(3)+";",.@expirationDate$);    // Get expiration date
            if (gettimestr("%Y %m %d",21) >= .@expirationDate$) // If current date is higher than expiration date...
            {
                callsub terminateVip,"vip_platinum",getcharid(3); goto L_displayInfo;
            }
            else
            {
                sc_start sc_expboost,1000*60*60*24,"+$VIPs_PlatinumExpRate+";
                sc_start sc_itemboost,1000*60*60*24,"+$VIPs_PlatinumItemRate+"; 
                  goto L_displayInfo;
                         
            }
        }
        
        if (.@accountType$ == "GOLD")
        {
            set .@getVipStatus,query_sql("SELECT `status` FROM `vip_gold` WHERE `account_id` = "+getcharid(3)+";",.@vipStatus$); // Obtener el estado de la cuenta
            set .@getExpirationDate$,query_sql("SELECT DATE_FORMAT(`end_date`, '%Y %m %d') FROM vip_gold WHERE `account_id` = "+getcharid(3)+";",.@expirationDate$);    // Obtener Fecha de expiracion
            if (gettimestr("%Y %m %d",21) >= .@expirationDate$) // Si la fecha de HOY es mayor que la fecha de expiracion...
            {
                callsub terminateVip,"vip_gold",getcharid(3); goto L_displayInfo;
            }
            else
            {
                sc_start sc_expboost,1000*60*60*24,"+$VIPs_GoldExpRate+";
                sc_start sc_itemboost,1000*60*60*24,"+$VIPs_GoldItemRate+"; goto L_displayInfo;
            }
        }
        
        if (.@accountType$ == "SILVER")
        {
            set .@getVipStatus,query_sql("SELECT `status` FROM `vip_silver` WHERE `account_id` = "+getcharid(3)+";",.@vipStatus$); // Obtener el estado de la cuenta
            set .@getExpirationDate$,query_sql("SELECT DATE_FORMAT(`end_date`, '%Y %m %d') FROM vip_silver WHERE `account_id` = "+getcharid(3)+";",.@expirationDate$);    // Obtener Fecha de expiracion
            if (gettimestr("%Y %m %d",21) >= .@expirationDate$) // Si la fecha de HOY es mayor que la fecha de expiracion...
            {
                callsub terminateVip,"vip_silver",getcharid(3); goto L_displayInfo;
            }
            //    si los beneficios no an acabado
            else
            {
                sc_start sc_expboost,1000*60*60*24,"+$VIPs_SilverExpRate+";
                sc_start sc_itemboost,1000*60*60*24,"+$VIPs_SilverItemRate+"; goto L_displayInfo;
            }
        }
        
        // Checa si la cuenta es normal
        if (.@accountType$ == "NORMAL")
        {
            set .@getVipStatus,query_sql("SELECT `status` FROM `vip_silver` WHERE `account_id` = "+getcharid(3)+";",.@vipStatus$); // Obtener el estado de la cuenta
            set .@getExpirationDate$,query_sql("SELECT DATE_FORMAT(`end_date`, '%Y %M %d') FROM vip_silver WHERE `account_id` = "+getcharid(3)+";",.@expirationDate$);    // Obtener Fecha de expiracion
            goto L_displayInfo;
        }
    //---------------------------------------- NO TOCAR ---------------------------------------------
    

     

    Edited part of script

    L_displayInfo:
        dispbottom "----------------------------------------------------------------------";
        dispbottom "Tipo de Cuenta:"+.@accountType$;
        dispbottom "Estado:        "+.@vipStatus$;
        dispbottom "Acaba en  :    "+.@expirationDate$;
        dispbottom "----------------------------------------------------------------------";
        end;
                
    terminateVip:    // Remueve el status de la cuenta
        set .@dbTableName$,getarg(0);    //    Table name
        set .@accountId,getarg(1);        //    Account ID
        
        query_sql("UPDATE `login` SET `level` = 0 WHERE account_id = "+.@accountId+";"); // Coloca la cuenta a nivel 0
        query_sql("DELETE FROM "+.@dbTableName$+" WHERE account_id = '"+.@accountId+"';"); // Borra la cuenta
        query_sql("ALTER TABLE "+.@dbTableName$+" AUTO_INCREMENT = 1;"); // Reseta la id
        query_sql("UPDATE `login` SET `account_type` = 'NORMAL' WHERE `account_id` = "+.@accountId+";"); // Coloca en la tabla en normal
        goto L_displayInfo;
        
    OnPCLoginEvent:
        // Odtiene la data de las tablas SQL
        set .@getAccountType$,query_sql("SELECT `account_type` FROM login WHERE `account_id` = "+getcharid(3)+";",.@accountType$);
        sc_end sc_expboost;    
        sc_end sc_itemboost;
        
        if (.@accountType$ == "PLATINUM")
        {
            set .@getVipStatus,query_sql("SELECT `status` FROM `vip_platinum` WHERE `account_id` = "+getcharid(3)+";",.@vipStatus$); // Get account type status
            set .@getExpirationDate$,query_sql("SELECT DATE_FORMAT(`end_date`, '%Y %m %d') FROM vip_platinum WHERE `account_id` = "+getcharid(3)+";",.@expirationDate$);    // Get expiration date
            if (gettimestr("%Y %m %d",21) >= .@expirationDate$) // If current date is higher than expiration date...
            {
                callsub terminateVip,"vip_platinum",getcharid(3); goto L_displayInfo;
            }
            else
            {
                sc_start sc_expboost,1000*60*60*24,200,"+$VIPs_PlatinumExpRate+";
                sc_start sc_itemboost,1000*60*60*24,200,"+$VIPs_PlatinumItemRate+"; 
                  goto L_displayInfo;
                         
            }
        }
        
        if (.@accountType$ == "GOLD")
        {
            set .@getVipStatus,query_sql("SELECT `status` FROM `vip_gold` WHERE `account_id` = "+getcharid(3)+";",.@vipStatus$); // Obtener el estado de la cuenta
            set .@getExpirationDate$,query_sql("SELECT DATE_FORMAT(`end_date`, '%Y %m %d') FROM vip_gold WHERE `account_id` = "+getcharid(3)+";",.@expirationDate$);    // Obtener Fecha de expiracion
            if (gettimestr("%Y %m %d",21) >= .@expirationDate$) // Si la fecha de HOY es mayor que la fecha de expiracion...
            {
                callsub terminateVip,"vip_gold",getcharid(3); goto L_displayInfo;
            }
            else
            {
                sc_start sc_expboost,1000*60*60*24,100,"+$VIPs_GoldExpRate+";
                sc_start sc_itemboost,1000*60*60*24,100,"+$VIPs_GoldItemRate+"; goto L_displayInfo;
            }
        }
        
        if (.@accountType$ == "SILVER")
        {
            set .@getVipStatus,query_sql("SELECT `status` FROM `vip_silver` WHERE `account_id` = "+getcharid(3)+";",.@vipStatus$); // Obtener el estado de la cuenta
            set .@getExpirationDate$,query_sql("SELECT DATE_FORMAT(`end_date`, '%Y %m %d') FROM vip_silver WHERE `account_id` = "+getcharid(3)+";",.@expirationDate$);    // Obtener Fecha de expiracion
            if (gettimestr("%Y %m %d",21) >= .@expirationDate$) // Si la fecha de HOY es mayor que la fecha de expiracion...
            {
                callsub terminateVip,"vip_silver",getcharid(3); goto L_displayInfo;
            }
            //    si los beneficios no an acabado
            else
            {
                sc_start sc_expboost,1000*60*60*24,50,"+$VIPs_SilverExpRate+";
                sc_start sc_itemboost,1000*60*60*24,50,"+$VIPs_SilverItemRate+"; goto L_displayInfo;
            }
        }
        
        // Checa si la cuenta es normal
        if (.@accountType$ == "NORMAL")
        {
            set .@getVipStatus,query_sql("SELECT `status` FROM `vip_silver` WHERE `account_id` = "+getcharid(3)+";",.@vipStatus$); // Obtener el estado de la cuenta
            set .@getExpirationDate$,query_sql("SELECT DATE_FORMAT(`end_date`, '%Y %M %d') FROM vip_silver WHERE `account_id` = "+getcharid(3)+";",.@expirationDate$);    // Obtener Fecha de expiracion
            goto L_displayInfo;
        }
    //---------------------------------------- NO TOCAR ---------------------------------------------
    
  6. I have the script like this :

     



     

     

     

    // ------------------------------------------------------------------------------------------
    // ------ Script Release
    // Title: Premium/ViP Services System
    // Author: Diconfrost VaNz - www.wipeoutgaming.info - [email protected]
    // Version: 2.0
    // Special thanks to the following for helping me making this script
    // Jezu
    // Dastgr
    // clydelion
    // 
    // Note: This is a character-based script. If you want to make this into Account-Based, just put "#" beside "premium".
    // ------------------------------------------------------------------------------------------
    prontera,155,181,5    script    Clahador    757,{
     
    mes "[^FF0000Clahador^000000]";
    mes "Hello "+strcharinfo(0)+", I'm ^FF0000Clahador the butcher^000000.";
    mes "I will be of help if you need something.";
    next;
    mes "[^FF0000Clahador^000000]";
    mes "Oh! you need help?";
    mes "What kind of help do you need?";
    next;
    menu "Newbie here",P_New,"I'm a ViP!",P_VIP,"Nevermind",P_NVM;
     
    P_New:
     
    mes "[^FF0000Clahador^000000]";
    mes "Did you already claim your free items in the ^FF0000Freebies NPC^000000???";
    menu "Yes!",F_Yes,"No!",F_No;
     
    F_No:
    mes "[^FF0000Clahador^000000]";
    mes "You should get 'em!.";
    mes "It will help you on the start.";
    close;
     
    F_Yes:
    mes "[^FF0000Clahador^000000]";
    mes "Haha, i hope you like those items.";
    next;
    mes "By the way, you can earn zennies through quests like going to daily quest, request board, and many more!";
    mes "Did you know that you can have many zennies you want if you gonna hunt more rare items?";
    mes "Try it!";
    close;
     
    P_VIP:
    mes "[^FF0000Clahador^000000]";
    mes "Oh you avail our ViP Ticket!";
    mes "Thank you!";
    next;
    mes "[^FF0000Clahador^000000]";
    mes "Your Premium Service will expire after " + callfunc("Time2Str",prmm);
    mes "You should maximize it";
    mes "Grind your skills and hunt now!";
    close;
     
    P_NVM:
    mes "[^FF0000Clahador^000000]";
    mes "Thank you!";
    mes "Come Again!";
    close;
    }
     
        function    script    getPremium    {
        set .@ticks, getarg(0);
        if (.@ticks <= 0) {
            debugmes "getPremium - tried to set a timer in the past";
            end;
        }
    }
        set prmm,    (prmm > gettimetick(2)) ? (prmm : gettimetick(2)) + .@ticks;    {
        doevent    "login::OnPCLoginEvent";
        return; 
    }
     
    -    script    login    -1,{
    OnPCLoginEvent:
        if (prmm > gettimetick(2)) {
        dispbottom "Your Premium Service will expire after " + callfunc("Time2Str",premium);
        sc_start SC_EXPBOOST,(( prmm - gettimetick(2) ) * 1000 ),200;
        sc_start SC_JEXPBOOST,(( prmm - gettimetick(2) ) * 1000 ),200;
        sc_start SC_ITEMBOOST,(( prmm - gettimetick(2) ) * 1000 ),100;
        atcommand "@adjgroup 1 "+strcharinfo(0);
        deltimer strnpcinfo(3)+"::OnPCLoginEvent";
        if ((prmm - gettimetick(2)) < 2147483) {
            addtimer (prmm - gettimetick(2)) *1000, strnpcinfo(3)+"::OnPCLoginEvent";
        } else    {
            addtimer 2147483000, strnpcinfo(3)+"::OnPCLoginEvent";
        }
    } else if (#premium) {
        atcommand "@adjgroup 0 "+strcharinfo(0);
        sc_end SC_EXPBOOST;
        sc_end SC_JEXPBOOST;
        sc_end SC_ITEMBOOST;
        set prmm, 0;
        dispbottom "Premium Services has ended.";
    }
    end;
    }
     
     OnAtcommand: {
    dispbottom "Your Premium Service will expire after " + callfunc("Time2Str",prmm);
    end;
     
    OnInit:    bindatcmd "premium",strnpcinfo(3)+"::OnAtcommand"; 
    }
    end; 
    }

     

     

    but i still having the same problem, can you help me with this?

     

    thump_8511363error-de-sintaxis.png

×
×
  • Create New...