Jump to content
  • 0

Warper VIP, help me plx!


nazgul001

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  37
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

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

Edited by Emistry
changed to code bbcode.
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  37
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

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;
        }
}

 

 

 

Edited by Emistry
changed to code bbcode.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  94
  • Reputation:   4
  • Joined:  10/31/12
  • Last Seen:  

Try use this:

 

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;
			}
		}
		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;
			}
		}
		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;
			}
		}
		if ( .@accountType$ == "" ) {
			mes "[Cuentas Premium]";
			mes "Lo siento ^0000FF" + strcharinfo(0) + "^000000, solo usuarios VIP pueden usar este medio.";    
			close;
		}
}
Edited by Phenomena
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  44
  • Reputation:   5
  • Joined:  12/06/11
  • Last Seen:  

You're using a NPC variable .@accountType$, use an account one: #accountType$

 

Edit:

 

You should also use an int variable like:

#accountType

if 0 = normal player

if 1 = VIP

 

Or make a if(!#accountType$)

 

Because here your problem is that the .@accountType$ variable is not define so she's equal to "" and since you don't have any if statement for a null variable your script stop here:

mes"Yo estoy aqui para llevar a los usuarios VIP a las ciudades VIP.";
	mes"Te interesa?.";
	next;
Edited by Khazou
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...