Jump to content

astralprojection

Members
  • Content Count

    333
  • Joined

  • Last visited

  • Days Won

    8

Posts posted by astralprojection


  1. Quote

    1. Add ".gat", ".gnd", ".rsw" files to data folder.

    2. Edit "mapnametable.txt" and "resnametable.txt" files in data folder.

    3. Edit "map_index.txt" in db folder.

    linux:

    4. login to your linux machine

    5. change directory to Hercules or your custom folder and make tools then use mapcache to compile it.

    $ cd Hercules

    Hercules]$ make tools

    Hercules]$ ./mapcache

     


  2. need help on this, what i  need to accomplish here is player click npc and open sell window.  Player drag items to window and sell.  If item sold matches the given array, they will get the predefined  item from the array.  I can pay for this to accomplish, just pm me.

    -	shop	dyn_shop1	FAKE_NPC,501:50.
    
    prontera,145,94,3	script	Jaiho	4_F_JPNOBA,{
    	callshop "dyn_shop1",2;  // sell only
    	npcshopattach "dyn_shop1";
    	end;
    
    OnSellItem:
    	check all @sold_nameid if matches the needed item below, then give the .@?item if matches. 
    
    OnInit:
    	// if 1 item sold to npc then cancell
    	
    	// if 2 item sold to npc then check from the array below
    	setarray .@2items[ 0 ] = 501,502,503,504,505,506,545,546;
    	setarray .@2need1[ 0 ], 507, 1, 508, 1;
    	setarray .@2need2[ 0 ], 509, 1, 510, 2;
    	setarray .@2need3[ 0 ], 511, 2, 512, 1;
    	setarray .@2need4[ 0 ], 513, 1, 514, 1;
    	setarray .@2need5[ 0 ], 515, 1, 516, 2;
    	setarray .@2need6[ 0 ], 517, 1, 518, 1;
    	setarray .@2need7[ 0 ], 519, 2, 520, 1;
    	setarray .@2need8[ 0 ], 521, 1, 522, 3;	
    	
    	// if 3 item sold to npc then check from the array below
    	setarray .@3items[ 0 ] = 501,502,503,504,505;
    	setarray .@3need1[ 0 ], 507, 1, 508, 1, 509, 1;
    	setarray .@3need2[ 0 ], 509, 1, 510, 2, 511, 2;
    	setarray .@3need3[ 0 ], 511, 2, 512, 1, 513, 4;
    	setarray .@3need4[ 0 ], 513, 1, 514, 1, 515, 2;
    	setarray .@3need5[ 0 ], 515, 1, 516, 2, 517, 1;
    
    	// if 4 item sold to npc then cancell
    	// if 5 item sold to npc then cancell
    
    	
    	// if 6 item sold to npc then check from the array below
    	setarray .@6items[ 0 ] = 501,502,503,504,505 ...;
    	setarray .@6need1[ 0 ], 507, 1, 508, 1, 509, 1, 509, 1, 510, 2, 511, 2;
    	setarray .@6need2[ 0 ], 509, 1, 510, 2, 511, 2, 511, 2, 512, 1, 513, 4;
    	setarray .@6need3[ 0 ], 511, 2, 512, 1, 513, 4, 513, 1, 514, 1, 515, 2;
    	setarray .@6need4[ 0 ], 513, 1, 514, 1, 515, 2, 515, 1, 516, 2, 517, 1;
    	setarray .@6need5[ 0 ], 515, 1, 516, 2, 517, 1, 507, 1, 508, 1, 509, 1;
    	...
    	...
    	...
    	
    	// if more than 6 item sold to npc then cancel
    			
    	end;
    }

     


  3. {
    	Id: 4147
    	AegisName: "Baphomet_Card"
    	Name: "Baphomet Card"
    	Type: 6
    	Buy: 20
    	Weight: 10
    	Loc: 2
            DropAnnounce: true
    	Script: <"
    		bonus bHit,-10;
    		bonus bSplashRange,1;
    	">
    },
    

    you can do it on all rate items that you want to announce.


  4. @haru sir, kindly update the plugin please :D

     

            CC      naviluagenerator.c
    naviluagenerator.c: In function 'atcommand_createnavigationlua_sub_mob':
    naviluagenerator.c:402:81: error: 'const struct view_data' has no member named  class_'
      fprintf(fp, OUT_INDENT OUT_INDENT "%d," OUT_SEPARATOR, (amount<<16)|mobinfo->vd.class_);
                                                                                     ^
    naviluagenerator.c: In function 'atcommand_createnavigationlua_sub_warp':
    naviluagenerator.c:448:69: error: 'struct view_data' has no member named 'class '
      fprintf(fp_link, OUT_INDENT OUT_INDENT "%d," OUT_SEPARATOR, (nd->vd->class_ == WARP_CLASS) ? 99999 : (int)nd->vd->class_);
                                                                         ^
    naviluagenerator.c:448:114: error: 'struct view_data' has no member named 'class_'
      fprintf(fp_link, OUT_INDENT OUT_INDENT "%d," OUT_SEPARATOR, (nd->vd->class_ == WARP_CLASS) ? 99999 : (int)nd->vd->class_);
                                                                                                                      ^
    make[1]: *** [../../plugins/naviluagenerator.so] Error 1
    
    

  5. just create 2 sets of database

     

    example:

    server 2: ragnarok2 & log2 <- 2nd server..  I suggest create new user on your VPS by:

     

    login as root:

    #add new user for 2nd server
    useradd --create-home --shell /bin/bash <NewUser>
    passwd <NewUser>
    
    

    login as <NewUser> and obtain Hercules

     

     

    login as root in your vps and run these commands:

    or you can use "su" command

    mysql --user=root
    CREATE DATABASE ragnarok2;
    CREATE DATABASE log2;
    // To grant access for your localhost
    CREATE USER '<your_new_db_user>'@'localhost' IDENTIFIED BY '<your_new_db_pass>';
    GRANT ALL ON `ragnarok2`.* TO '<your_new_db_user>'@'localhost';
    GRANT ALL ON `log2.* TO '<your_new_db_user>'@'localhost';
    // To grant access for your webhost
    CREATE USER '<your_new_db_user>'@'<your webhost>' IDENTIFIED BY '<your_new_db_pass>';
    GRANT ALL ON `ragnarok2`.* TO '<your_new_db_user>'@'<your webhost>';
    GRANT ALL ON `log2`.* TO '<your_new_db_user>'@'<your webhost>';
    FLUSH PRIVILEGES;
    exit
    
    cd ~/home/<NewUser>/Hercules2/sql-files/
    mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < main.sql
    mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < item_db.sql
    mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < item_db2.sql
    mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < mob_db.sql
    mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < mob_db2.sql
    mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < mob_skill_db.sql
    mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < mob_skill_db2.sql
    mysql -u <your_new_db_user> -p<your_new_db_pass> log2 < logs.sql
    // add renewal db if you are running renewal
    mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < item_db_re.sql
    mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < item_db2_re.sql
    mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < mob_db_re.sql
    mysql -u <your_new_db_user> -p<your_new_db_pass> ragnarok2 < mob_skill_db_re.sql
    // add administrator
    mysql --user=root
    use ragnarok2;
    INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`,`group_id`) VALUES ('2000000', '<admin username>', '<admin_pass>', 'M','[email protected]',99);
    
    

  6. You can change the PORT, it will not conflict

    char-server.conf
    ---------------------
    char_configuration: {
    	server_name: "New Server"
    	inter: {
    		char_ip: "server2 IP"
    		login_ip: "localhost"
     		char_port: 6122
    		login_port: 6901	
    	}
    }
    
    login-server.conf
    ---------------------
    login_configuration: {
                    inter: {
                            login_port: 6901
                    }
    }
    
    map-server.conf
    ---------------------
    map_configuration: {
                    inter: {
                            map_port: 5122
                            char_ip: "localhost"
                            char_port: 6122
                            map_ip: "New Server IP"
                    }
    }
    

  7. open  /conf/channels.conf and // on those channel to disable

     

     

    chsys: (
    {
        /* Default Channels (available on boot) */
        default_channels: {
            /* channel_name : channel_messages_color */
            //main: "Orange" /* Available as #main */
            //support: "Blue" /* Available as #support */
            //trade: "Red" /* Available as #trade */
            //offtopic: "Cyan" /* Available as #offtopic */
            /* You may add as many channels as you like */
        }
        /* Colors Available */
     

  8.  

    excuse revive the topic but I am an error and could not solve

     

    ERROR
    vending.c: In function ‘vending_closevending’:vending.c:63: error: ‘SQL_ERROR’ undeclared (first use in this function)
    vending.c:63: error: (Each undeclared identifier is reported only once
    vending.c:63: error: for each function it appears in.)
    vending.c:63: error: ‘SQL’ undeclared (first use in this function)
    vending.c:64: warning: implicit declaration of function ‘Sql_ShowDebug’
    vending.c:64: warning: nested extern declaration of ‘Sql_ShowDebug’
    vending.c: In function ‘vending_purchasereq’:
    vending.c:205: error: too few arguments to function ‘clif->vendingreport’
    vending.c:209: error: ‘SQL_ERROR’ undeclared (first use in this function)
    vending.c:209: error: ‘SQL’ undeclared (first use in this function)
    vending.c: In function ‘vending_openvending’:
    vending.c:336: error: ‘SQL_ERROR’ undeclared (first use in this function)
    vending.c:336: error: ‘SQL’ undeclared (first use in this function)
    
     

     

     

    I applied in this source

     

    diff --git a/src/map/unit.c b/src/map/unit.cindex 22c7165..9b0aa6a 100644
    --- a/src/map/unit.c
    +++ b/src/map/unit.c
    @@ -2135,6 +2135,9 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
                     chat->leavechat(sd,0);
                 if(sd->trade_partner)
                     trade->cancel(sd);
    +            //vending to db [Sanasol]
    +            vending->close(sd);
    +            //vending to db [Sanasol]
                 buyingstore->close(sd);
                 searchstore->close(sd);
                 if(sd->state.storage_flag == 1)
    diff --git a/src/map/vending.c b/src/map/vending.c
    index 2784d46..0f213a2 100644
    --- a/src/map/vending.c
    +++ b/src/map/vending.c
    @@ -37,6 +37,10 @@ void vending_closevending(struct map_session_data* sd) {
         if( sd->state.vending ) {
             sd->state.vending = false;
             clif->closevendingboard(&sd->bl, 0);
    +        //vending to db [Sanasol]
    +        if( SQL_ERROR == SQL->Query(map->mysql_handle,"delete from `vending` where `char_id`='%d'", sd->status.char_id) )
    +        Sql_ShowDebug(map->mysql_handle);
    +        //vending to db [Sanasol]
             idb_remove(vending->db, sd->status.char_id);
         }
     }
    @@ -174,7 +178,18 @@ void vending_purchasereq(struct map_session_data* sd, int aid, unsigned int uid,
             vsd->vending[vend_list[i]].amount -= amount;
             pc->cart_delitem(vsd, idx, amount, 0, LOG_TYPE_VENDING);
             clif->vendingreport(vsd, idx, amount);
    -
    +        //vending to db [Sanasol]
    +        if(vsd->vending[vend_list[i]].amount >= 1)
    +        {
    +            if( SQL_ERROR == SQL->Query(map->mysql_handle,"update `vending` set `amount`='%d' where `char_id`='%d' and `index`='%d'", vsd->vending[vend_list[i]].amount, vsd->status.char_id, vend_list[i]) )
    +                Sql_ShowDebug(map->mysql_handle);
    +        }
    +        else
    +        {
    +            if( SQL_ERROR == SQL->Query(map->mysql_handle,"delete from `vending` where `char_id`='%d' and `index`='%d'", vsd->status.char_id, vend_list[i]) )
    +                Sql_ShowDebug(map->mysql_handle);
    +        }
    +        //vending to db [Sanasol]
             //print buyer's name
             if( battle_config.buyer_name ) {
                 char temp[256];
    @@ -281,6 +296,19 @@ void vending_openvending(struct map_session_data* sd, const char* message, const
         safestrncpy(sd->message, message, MESSAGE_SIZE);
    
    
         clif->openvending(sd,sd->bl.id,sd->vending);
    +     //vending to db [Sanasol]
    +    for( j = 0; j < count; j++ )
    +    {
    +        int index = sd->vending[j].index;
    +        struct item_data* data = itemdb->search(sd->status.cart[index].nameid);
    +        int nameid = ( data->view_id > 0 ) ? data->view_id : sd->status.cart[index].nameid;
    +        int amount = sd->vending[j].amount;
    +        int price = cap_value(sd->vending[j].value, 0, (unsigned int)battle_config.vending_max_value);
    +        
    +        if( SQL_ERROR == SQL->Query(map->mysql_handle,"INSERT INTO `vending` (`char_id`,`name`,`index`,`nameid`,`amount`,`price`,`refine`,`card0`,`card1`,`card2`,`card3`) VALUES (%d, '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')", sd->status.char_id, message, j, nameid, amount, price, sd->status.cart[index].refine, sd->status.cart[index].card[0], sd->status.cart[index].card[1], sd->status.cart[index].card[2], sd->status.cart[index].card[3]) )
    +        Sql_ShowDebug(map->mysql_handle);
    +    }
    +    //vending to db [Sanasol]
         clif->showvendingboard(&sd->bl,message,0);
         
         idb_put(vending->db, sd->vender_id, sd);
    
     

     

    add:

    #include "common/sql.h"


  9. Hi, all.

    I'd like to tell all hec members that I will setup an Aegis Server of EP14.3 which contained Rebellion for testing in a few days.

    We may found a lot of skills in herc not very correct and the same in rAthena.

    But we can test to improve them through the Aegis Server which I setup in the future.

     

    I really hope the day herc and rAthena will be closer to Aegis.

     

    Now, thes test way is here:

    http://bbs.ro250.com/forum.php?mod=viewthread&tid=15

     

    I will apply an English patch in a few days.

     

    Update 2016.10.06

    The lite patch for kro client is here.

    http://pan.baidu.com/s/1cyxPAe

     

    Please upload an English patch if someone intersted.

     

    can you upload to mediafire or other filehosting alternative?


  10. check the format of your import file.  It should look like this:

     

    char-server.conf

    char_configuration: {
    	server_name: "Chaos"
    	inter: {
    		char_ip: "your IP"
    		login_ip: "localhost"
     		char_port: 6121
    		login_port: 6900	
    	}
    
    
    }
    

     

     

     

    map-server.conf

    map_configuration: {
                    inter: {
                            map_port: 5121
                            char_ip: "localhost"
                            char_port: 6121
                            map_ip: "your IP"
                    }
    
    }
    

  11. I hope to get this added, it is a very important to track and monitor cash movement of players

     

    		case LOG_TYPE_REFINE:           return '2';  // Refine
    		case LOG_TYPE_OTHER:            return 'X';  // Other
                    case LOG_TYPE_CASH:             return '$';  // Cash Points
    	}
    
    
×
×
  • Create New...

Important Information

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