Jump to content

AnnieRuru

Script Developers
  • Content Count

    1677
  • Joined

  • Last visited

  • Days Won

    245

Posts posted by AnnieRuru


  1. can't reproduce your problem

    	SoulLinker: {
    		MaxLevel: 123
    		Exp: [
    			2500, 4200, 7000, 10300, 15900, 18900, 20900, 22600, 24900, 28800,
    			31500, 32000, 33300, 35100, 40500, 44100, 46300, 48500, 50700, 56000,
    			59400, 63500, 68100, 75000, 85700, 90500, 96600, 102600, 108600, 119700,
    			126000, 132300, 138600, 146100, 157500, 170600, 180400, 190300, 196800, 214900,
    			225200, 232000, 245700, 255900, 279300, 294000, 308700, 327000, 345400
    		]
    	}

    my max level becomes 123

     


     

    ok wait, this is renewal, let me compile to pre-renewal because I kinda remember you said using 20180620 client

     

    yup correct, if compile as pre-renewal, it will read SecondClasses: instead of SoulLinker: field

    in fact, pre-renwal doesn't even has SoulLinker: field

     

    so either change to renewal, or edit the source code yourself


  2. /// Updates the object's (bl) name on client.
    /// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME)
    /// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL)
    /// 0A30 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B <title id>.L (ZC_ACK_REQNAMEALL2)
    static void clif_mobname_ack(int fd, struct block_list *bl)
    {
    	nullpo_retv(bl);
    	Assert_retv(bl->type == BL_MOB);
    
    	const struct mob_data *md = BL_UCCAST(BL_MOB, bl);
    
    	if (md->guardian_data && md->guardian_data->g) {
    		clif->mobname_guardian_ack(fd, bl);
    	} else if (battle_config.show_mob_info) {
    		clif->mobname_additional_ack(fd, bl);
    	} else {
    		clif->mobname_normal_ack(fd, bl);
    	}
    }

    if that monster belongs to the guild, it won't show the hp/maxhp

    /// Updates the object's (bl) name on client.
    /// 0095 <id>.L <char name>.24B (ZC_ACK_REQNAME)
    /// 0195 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B (ZC_ACK_REQNAMEALL)
    /// 0A30 <id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B <title id>.L (ZC_ACK_REQNAMEALL2)
    static void clif_mobname_guardian_ack(int fd, struct block_list *bl)
    {
    	nullpo_retv(bl);
    	Assert_retv(bl->type == BL_MOB);
    	const struct mob_data *md = BL_UCCAST(BL_MOB, bl);
    	Assert_retv(md->guardian_data && md->guardian_data->g);
    
    	struct PACKET_ZC_ACK_REQNAMEALL packet = { 0 };
    	packet.packet_id = HEADER_ZC_ACK_REQNAMEALL;
    	packet.gid = bl->id;
    	memcpy(packet.name, md->name, NAME_LENGTH);
    	memcpy(packet.guild_name, md->guardian_data->g->name, NAME_LENGTH);
    	memcpy(packet.position_name, md->guardian_data->castle->castle_name, NAME_LENGTH);
    	clif->send_selforarea(fd, bl, &packet, sizeof(struct PACKET_ZC_ACK_REQNAMEALL));
    }

    it will shows the guild name, castle name etc instead of hp/maxhp

     


     

    this is some quick fix to not show the emprium hp/maxhp with show_mob_info

     src/map/clif.c | 14 ++++++++------
     1 file changed, 8 insertions(+), 6 deletions(-)
    
    diff --git a/src/map/clif.c b/src/map/clif.c
    index a6427b796..9fa2323be 100644
    --- a/src/map/clif.c
    +++ b/src/map/clif.c
    @@ -9728,12 +9728,14 @@ static void clif_mobname_additional_ack(int fd, struct block_list *bl)
     	memcpy(packet.name, md->name, NAME_LENGTH);
     	char mobhp[100];
     	char *str_p = mobhp;
    -	if (battle_config.show_mob_info&4)
    -		str_p += sprintf(str_p, "Lv. %d | ", md->level);
    -	if (battle_config.show_mob_info&1)
    -		str_p += sprintf(str_p, "HP: %u/%u | ", md->status.hp, md->status.max_hp);
    -	if (battle_config.show_mob_info&2)
    -		str_p += sprintf(str_p, "HP: %u%% | ", get_percentage(md->status.hp, md->status.max_hp));
    +	if (md->class_ != MOBID_EMPELIUM) {
    +		if (battle_config.show_mob_info&4)
    +			str_p += sprintf(str_p, "Lv. %d | ", md->level);
    +		if (battle_config.show_mob_info&1)
    +			str_p += sprintf(str_p, "HP: %u/%u | ", md->status.hp, md->status.max_hp);
    +		if (battle_config.show_mob_info&2)
    +			str_p += sprintf(str_p, "HP: %u%% | ", get_percentage(md->status.hp, md->status.max_hp));
    +	}
     	//Even thought mobhp ain't a name, we send it as one so the client
     	//can parse it. [Skotlex]
     	if (str_p != mobhp) {

     

    btw, I don't really call this a bug ... but it's true emperium should belongs to CLASS_GUARDIAN according to aegis ....

    this one ... I don't really have a good idea how to make a correct fix on github, because emperium that belongs to guild doesn't show the information, which is working as intended


  3. On 11/20/2020 at 4:02 AM, keough said:

    I want to request a plugin @itemdestroy just like in EAMOD!

    eamod's `@itemdestroy` doesn't include cards
    so `@itemdestroy 4001` will not destroy the poring card that already slot into the equipment

    the purpose of this mod is just to remove certain ... event related items I guess

     

    .... hmmm ....

    upon reading the code, I don't really think this will work ... let me test

     

    #include "common/hercules.h"
    #include "map/pc.h"
    #include "map/itemdb.h"
    #include "map/storage.h"
    #include "common/nullpo.h"
    #include "plugins/HPMHooking.h"
    #include "common/HPMDataCheck.h"
    
    HPExport struct hplugin_info pinfo = {
    	"itemdestroy",
    	SERVER_TYPE_MAP,
    	"0.1",
    	HPM_VERSION,
    };
    
    ACMD(itemdestroy) {
    	int nameid = atoi(message);
    	if (itemdb->exists(nameid) == 0) {
    		clif->message(fd, "Enter a Valid Item ID. Usage: @itemdestroy <itemid>");
    		return false;
    	}
    	int i;
    	struct map_session_data *psd;
    	struct s_mapiterator *iter = mapit_getallusers();
    	for (psd = BL_UCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); psd = BL_UCAST(BL_PC, mapit->next(iter))) {
    		for (i = 0; i < MAX_INVENTORY; ++i) { // Inventory Removal
    			if (psd->status.inventory[i].nameid != nameid)
    				continue;
    			pc->delitem(psd, i, psd->status.inventory[i].amount, 0, 0, LOG_TYPE_COMMAND);
    		}
    		for (i = 0; i < MAX_CART; ++i) { // Cart Removal
    			if (psd->status.cart[i].nameid != nameid)
    				continue;
    			pc->cart_delitem(psd, i, psd->status.cart[i].amount, 0, LOG_TYPE_COMMAND);
    		}
    		for (i = 0; i < VECTOR_LENGTH(psd->storage.item); ++i) { // Storage Removal
    			struct item *sitem = &VECTOR_INDEX(psd->storage.item, i);
    			nullpo_ret(sitem);
    			if (sitem->nameid == nameid)
    				storage->delitem(psd, i, sitem->amount);
    		}
    		storage->close(psd);
    		if (psd->status.guild_id > 0) { // Guild Storage Removal
    			gstorage->open(sd);
    			struct guild_storage *stor;
    			nullpo_ret(stor=idb_get(gstorage->db, psd->status.guild_id));
    			for (i = 0; i < MAX_GUILD_STORAGE; ++i) {
    				if (stor->items[i].nameid != nameid)
    					continue;
    				gstorage->delitem(psd, stor, i, stor->items[i].amount);
    			}
    			gstorage->close(psd);
    		}
    	}
    	mapit->free(iter);
    	return true;
    }
    
    HPExport void plugin_init(void) {
    	addAtcommand("itemdestroy", itemdestroy);
    }

    yup doesn't work, the guild storage opens up, and there are delay between map-server and char-server when determine the client actually accessing the guild storage or not

     

    in fact, eamod's item destroy doesn't even include guild storage or mail removal

    /*==========================================
    	Item Removal
     *------------------------------------------*/
    void pc_item_remove4all(int nameid, bool char_server)
    {
    	if( char_server )
    		chrif_item_remove4all(nameid);
    	else
    	{
    		struct map_session_data *sd;
    		struct s_mapiterator* iter;
    		int index;
    
    		iter = mapit_getallusers();
    		for( sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); sd = (TBL_PC*)mapit_next(iter) )
    		{
    			for( index = 0; index < MAX_INVENTORY; index++ )
    			{ // Inventory Removal
    				if( sd->status.inventory[index].nameid != nameid )
    					continue;
    				pc_delitem(sd, index, sd->status.inventory[index].amount, 0, 0, LOG_TYPE_COMMAND);
    			}
    
    			for( index = 0; index < MAX_CART; index++ )
    			{ // Cart Removal
    				if( sd->status.cart[index].nameid != nameid )
    					continue;
    				pc_cart_delitem(sd, index, sd->status.cart[index].amount, 0, LOG_TYPE_COMMAND);
    			}
    
    			for( index = 0; index < MAX_STORAGE; index++ )
    			{ // Storage Removal
    				if( sd->status.storage.items[index].nameid != nameid )
    					continue;
    				storage_delitem(sd, index, sd->status.storage.items[index].amount);
    			}
    
    			for( index = 0; index < MAX_EXTRA_STORAGE; index++ )
    			{ // Extra Storage
    				if( sd->status.ext_storage.items[index].nameid != nameid )
    					continue;
    				ext_storage_delitem(sd, index, sd->status.ext_storage.items[index].amount);
    			}
    		}
    		mapit_free(iter);
    	}
    }

     

    this idea is fantastic, only in theory, but doesn't work on live server

    better just run DELETE syntax from MySQL and remove the item when server is offline


  4. On 11/15/2020 at 6:40 AM, astralprojection said:

    is it possible also to modify
    callshop .shop_npc_name$,2; to just show a specific type of item to be sold?

    well yes, almost same concept here
    this is rip from clif.c

    /// Presents list of items, that can be sold to an NPC shop (ZC_PC_SELL_ITEMLIST).
    /// 00c7 <packet len>.W { <index>.W <price>.L <overcharge price>.L }*
    static void clif_selllist(struct map_session_data *sd)
    {
    	int c = 0, val;
    
    	nullpo_retv(sd);
    
    	int fd = sd->fd;
    	WFIFOHEAD(fd, sd->status.inventorySize * 10 + 4);
    	WFIFOW(fd,0)=0xc7;
    	for (int i = 0; i < sd->status.inventorySize; i++)
    	{
    		if( sd->status.inventory[i].nameid > 0 && sd->inventory_data[i] )
    		{
    			if( !itemdb_cansell(&sd->status.inventory[i], pc_get_group_level(sd)) )
    				continue;
    
    			if (sd->status.inventory[i].favorite != 0)
    				continue; // Cannot Sell Favorite item
    
    			if( sd->status.inventory[i].expire_time )
    				continue; // Cannot Sell Rental Items
    
    			if( sd->status.inventory[i].bound && !pc_can_give_bound_items(sd))
    				continue; // Don't allow sale of bound items
    
    			val=sd->inventory_data[i]->value_sell;
    			if( val < 0 )
    				continue;
    			WFIFOW(fd,4+c*10)=i+2;
    			WFIFOL(fd,6+c*10)=val;
    			WFIFOL(fd,10+c*10)=pc->modifysellvalue(sd,val);
    			c++;
    		}
    	}
    	WFIFOW(fd,2)=c*10+4;
    	WFIFOSET(fd,WFIFOW(fd,2));
    }

     


  5. must be caused by `@killmonster` or something like that

    just tested `@killmonster` or `@killmonster2` will trigger the monster label, so ... shouldn't happen this way

    script `*killmonster` or `*killmonsterall` ??
    then there's the problem .....

     

    -	script	Punching Bag	FAKE_NPC,{
    OnInit:
    	.mobid = monster("prontera",158,183, "Punching Bag", BARRICADE, 1, "Punching Bag::OnInit");
    	setunitdata .mobid, UDT_MAXHP, 2000000000;
    OnTimer10000:
    	if (getunittype(.mobid) == -1) end;
    	setunitdata .mobid, UDT_HP, 2000000000;
    	initnpctimer;
    	end;
    }

    I thought the *unitexists script command is useless so I never made a pull request for it

    but in this case ... we really need a console warning to tell that barricade is gone so ....

     

    I also wonder how this barricade can go missing in the first place

     


  6. On 11/19/2020 at 5:12 AM, Daraen said:

    Thanks @AnnieRuru
     

    I have too many error even having put the requested files in my grf. By the way, what is happylife? Any idea where it might come from?

     

    my test server, from the screenshot provided still follow this topic

     

    https://rathena.org/board/topic/106413-kro-full-client-2020-04-09-includes-bgm-rsu/

    so I downloaded kro 20200409

    20200205 hexed client from nemo <-- PACKETVER

     

    client translation use all 3

    zackdreaver, Asheraf, chris


  7. 20200205 client

    screen2020Hercules022.jpg

    3 hours ago, Daraen said:

    thanks for your reply, in that case what does this stuff do in a 2018 client?

    nothing, gravity just put it there

    this feature isn't available on 20190530, but appear on 20200205
    so its somewhere between these date

     

    why gibberish word ? I guess I have outdated translation file


  8. this topic come out at the right time

     

    I'm not sure about debian,

    but I tested CentOS 7 and CentOS 8

     

    CentOS 8 come with mysql 8.0

    https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-centos-8

    and this alone speed up a lot of configuration time

    no need to install mariadb,

    (rathena's guide says need to install mariadb, but I tested CentOS 8 it doesn't need it)

     

    yes CentOS 7 needs to install a lot more stuffs, CentOS 8 just much simpler


  9. 4 hours ago, Psyz said:

    The configuration of the machine they choose or can we feel free to assemble the cloud?

    $300 free credit to spend, all you need is a valid debit/credit card

    once validate, you can start playing with it

    you can create multiple machine on a single project

     

    answer is -> we can create the machine we like within credit limit

    here-> https://github.com/AnnieRuru/customs/blob/master/server hosting/9.png

    just check the credit balance regularly and you understand how Google charge you,

    when the limit almost up, create another gmail account to play with it again

     

    EDIT: I saw your other post about choosing debian, if you are familiar with it then choose boot-disk as debian

     

    OVH seems to ... order a machine and need to pay up front to use them, so yeah different VPS different method

     

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

     

    you can even choose Windows Server Edition 2019 (last one, has desktop interface)

    and I use window's 'Remote Desktop Connection' connect to it

     

    CentOS 8 (and debian etc) cost $15 per month

    Windows server edition with desktop interface (needs 4GB) cost $60 per month

     

    its so obvious Linux option is better


  10. google_cloud.png

    Over the last few days I have been playing with Google Cloud services

    because Google cloud currently offers $300 free credit upon signing up

    yes, FREE $300 credit

    and thus my journey trying to host hercules server on a VPS has begun

     

    all you need is a valid Debit/Credit card number ...

    of course you have to be an adult to try the hosting service ... right ?

     

    1.png

     

     

    oh and, don't worry, you can always cancel it anytime

    36.png

     

    after playing with it, I found the Windows option is too expensive, and thus trying to learn the Linux option

     

    This guide is actually demonstrate by using a trash gmail account that can throw away later

    I don't mind all the credentials are shown in the screenshot, when I click the Open topic button I have deleted this project on Google Cloud

     


     

    Step 1. Download Putty and WinCP

    https://www.putty.org/.

    https://winscp.net/eng/download.php

     

    Step 2. Run Google Cloud

    2.1 login to your Google cloud project

    https://github.com/AnnieRuru/customs/blob/master/server hosting/2.png

     

    2.2 first you need to link your credit card to this google cloud

    https://github.com/AnnieRuru/customs/blob/master/server hosting/3.png.

    https://github.com/AnnieRuru/customs/blob/master/server hosting/4.png

    select the billing option to the debit/credit number you input earlier

    https://github.com/AnnieRuru/customs/blob/master/server hosting/5.png

    this billing information is very important, you need to check this once in a while to stop unwanted services <-- please scroll to the right

     

    2.3 pin these 3

    - billing

    - compute engine

    - VPC network

    https://github.com/AnnieRuru/customs/blob/master/server hosting/6.png

     

    2.4 now time to create a VPS, select Compute Engine

    https://github.com/AnnieRuru/customs/blob/master/server hosting/7.png

    2.4.1

    enter all the necessary information

    1. the Virtual machine name

    2. your nearest location

    3. the spec of the machine

    https://github.com/AnnieRuru/customs/blob/master/server hosting/8.png

     

    PS: I tested the cheapest option, N1 series, f1 micro 614MB memory and E2 micro, 1GB memory

    when compiling hercules later, putty just stop ... I think it run out of memory

    ... hercules should have mention a recommendation needs at least 2GB memory to run

     

    2.4.2

    4. Select Boot Disk as CentOS 8

    https://github.com/AnnieRuru/customs/blob/master/server hosting/9.png

    5. select allow HTTP and HTTPS

    https://github.com/AnnieRuru/customs/blob/master/server hosting/10.png

     

    2.4.3

    6. Click Security tab

    https://github.com/AnnieRuru/customs/blob/master/server hosting/11.png

    needs to 'Enter public SSH key'

     

    run Putty Key Generator and click Generate

    https://github.com/AnnieRuru/customs/blob/master/server hosting/12.png

     

    1. change the 'key comment' as it will become user name

    2. save private key to desktop

    3. copy the field

    https://github.com/AnnieRuru/customs/blob/master/server hosting/13.png

     

    paste into Google cloud

    https://github.com/AnnieRuru/customs/blob/master/server hosting/14.png

     

    2.4.4

    select Networking tab

    https://github.com/AnnieRuru/customs/blob/master/server hosting/15.png

    create a static IP address

    https://github.com/AnnieRuru/customs/blob/master/server hosting/16.png

    choose standard tier

     

    after everything done click [Confirm]

    https://github.com/AnnieRuru/customs/blob/master/server hosting/17.png

    and you get your virtual machine running

    https://github.com/AnnieRuru/customs/blob/master/server hosting/18.png

     

    2.5

    once your server up and running

    run Putty to connect to this server

    https://github.com/AnnieRuru/customs/blob/master/server hosting/19.png

    1. scroll down, expand 'SSH' to select 'Auth',

    2. then load the file you saved earlier by PuttyGen

    https://github.com/AnnieRuru/customs/blob/master/server hosting/20.png
    3. enter the public IP address,

    4. then click open

     

    https://github.com/AnnieRuru/customs/blob/master/server hosting/21.png

    it will prompt you with security alert, just click yes

     

    2.6

    login with your user name

    https://github.com/AnnieRuru/customs/blob/master/server hosting/22.png

     

    The very first command you should run is change the password

    sudo passwd root

    ok Windows Users, don't freak out like me :P

    there are no ******** when you input the password, this is Linux not Windows

    just input normally ... and press Enter key, it works that way

    https://github.com/AnnieRuru/customs/blob/master/server hosting/23.png

    then do the same with your username

    sudo passwd annie

     

    3. update the OS and install all necessary product

     

    3.1 run all these commands

    sudo yum update
    sudo yum install gcc make mysql mysql-devel mysql-server pcre-devel git zlib-devel
    Transaction Summary
    ================================================================================
    Install  89 Packages
    
    Total download size: 108 M
    Installed size: 395 M
    Is this ok [y/N]:

    Press 'Y' key

     

    3.2

    in the meantime, while this might take awhile, try login WinCP

    https://github.com/AnnieRuru/customs/blob/master/server hosting/24.png

    click new session, then click advance

    https://github.com/AnnieRuru/customs/blob/master/server hosting/25.png

    select 'Authentication' and load the Putty Gen file again

    https://github.com/AnnieRuru/customs/blob/master/server hosting/26.png

    just another warning

    https://github.com/AnnieRuru/customs/blob/master/server hosting/27.png

     

     

    3.3 Download Hercules

    git clone https://github.com/HerculesWS/Hercules.git ~/Hercules

     

    4. SQL

     

    4.1 Start SQL service

    sudo systemctl start mysqld.service

     

    4.2 login as root

    mysql -u root -p

    Enter password, just press enter

    default centOS 8 preinstalled MySQL, root has no password

     

    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 10
    Server version: 8.0.21 Source distribution
    
    Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql>

    4.3 create database

    CREATE DATABASE hercules;

    4.4 select hercules database as default

    USE `hercules`;

    4.5 create another user, not recommend to connect as root

    CREATE USER 'annie'@'localhost' IDENTIFIED BY '1234';

    4.6 grant this user privilege

    GRANT SELECT,INSERT,UPDATE,DELETE ON * TO 'annie'@'localhost';

    4.7 then quit

    quit

    it should show like this

    mysql> quit
    Bye
    [annie@centos ~]$

    4.8 goto sql-files directory

    cd /home/annie/Hercules/sql-files/

    and run all these

    mysql -u root -p hercules < main.sql
    mysql -u root -p hercules < logs.sql
    mysql -u root -p hercules < item_db_re.sql
    mysql -u root -p hercules < mob_db_re.sql
    mysql -u root -p hercules < mob_skill_db_re.sql

    it should show like this

    [annie@centos ~]$ cd /home/annie/Hercules/sql-files/
    [annie@centos sql-files]$ mysql -u root -p hercules < main.sql
    Enter password:
    [annie@centos sql-files]$ mysql -u root -p hercules < logs.sql
    Enter password:
    [annie@centos sql-files]$ mysql -u root -p hercules < item_db_re.sql
    Enter password:
    [annie@centos sql-files]$ mysql -u root -p hercules < mob_db_re.sql
    Enter password:
    [annie@centos sql-files]$ mysql -u root -p hercules < mob_skill_db_re.sql
    Enter password:
    [annie@centos sql-files]$

    4.9 go back login mysql and change inter-server connection password from s1/p1 into qwer/asdf

    mysql -u root -p

    and

    UPDATE `hercules`.`login` SET `userid` = 'qwer', `user_pass` = 'asdf' WHERE `account_id` = 1;

     

    5. Compile Hercules

     

    go back to annie/hercules folder

    cd /home/annie/Hercules/

    5.1 type ./configure

    ./configure

     

    OK STOP, many things can go wrong here, I stuck here for a few days and searching on both rathena and hercules forum for answers

    the correct output from putty should be this

    checking mysql.h presence... yes
    checking for mysql.h... yes
    checking whether my_bool is supported (MySQL)... no (converting my_bool to bool)
    checking MySQL library (required)... yes (8.0.21)
    checking PCRE library... checking pcre.h usability... yes
    checking pcre.h presence... yes
    checking for pcre.h... yes
    checking for library containing pcre_study... -lpcre
    checking for doxygen... no
    checking for perl... yes
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating src/common/Makefile
    config.status: creating 3rdparty/mt19937ar/Makefile
    config.status: creating 3rdparty/libconfig/Makefile
    config.status: creating 3rdparty/libbacktrace/Makefile
    config.status: creating 3rdparty/libbacktrace/backtrace-supported.h
    config.status: creating src/char/Makefile
    config.status: creating src/login/Makefile
    config.status: creating src/map/Makefile
    config.status: creating src/plugins/Makefile
    config.status: creating src/test/Makefile
    config.status: creating tools/HPMHookGen/Makefile
    config.status: creating tools/doxygen/Makefile
    [annie@centos Hercules]$

    if it doesn't show config.status: at the end, open a new topic in Linux support

    if it's the same as mine, then can proceed with

     

    5.2 compile hercules

    make sql

    finally compile should show like this

            CC      party.c
            CC      path.c
            CC      pc.c
            CC      pc_groups.c
            CC      pet.c
            CC      quest.c
            CC      refine.c
            CC      rodex.c
            CC      script.c
            CC      searchstore.c
            CC      skill.c
            CC      status.c
            CC      storage.c
            CC      stylist.c
            CC      trade.c
            CC      unit.c
            CC      vending.c
            LD      map-server
    make[1]: Leaving directory '/home/annie/Hercules/src/map'
    building conf/import folder...
    [annie@centos Hercules]$
    

     

    6. configure Hercules

     

    6.1 start hercules by

    ./athena-start start

    https://github.com/AnnieRuru/customs/blob/master/server hosting/28.png

    of course the reason why connect to SQL failed is because haven't configure Hercules so ....

    stop it from running for a moment

    ./athena-start stop

     

    6.2 login to WinCP

    https://github.com/AnnieRuru/customs/blob/master/server hosting/29.png

    ... I will assume you know how to change your public IP address on hercules

    the file you should change are

    • map-server.conf
      - userid: "qwer"
      - passwd: "asdf"
      - map_ip: "35.213.138.42"
      - char_ip: "35.213.138.42"
    • char-server.conf
      - userid: "qwer"
      - passwd: "asdf"
      - login_ip: "35.213.138.42"
      - char_ip: "35.213.138.42"
    • conf\global\sql_connections.conf
      -db_hostname: "localhost"
      - db_port: 3306
      - db_username: "annie"
      - db_password: "1234"
      - db_database: "hercules"
    • conf\network.conf
      .....<let me test this thing again> ....

     

    <--- I will assume everyone reading this guide already know how to host an offline server, if not click here -->

     

    now run ./athena-start start again, and this time map-server couldn't connect to char-server

     

    7. Configure firewall

     

    7.1 run these 3 commands

    sudo firewall-cmd --permanent --add-port 6900/tcp
    sudo firewall-cmd --permanent --add-port 6121/tcp
    sudo firewall-cmd --permanent --add-port 5121/tcp

    7.2 reload the firewall settings

    sudo firewall-cmd --reload

    7.3 go back to Google Cloud,

    https://github.com/AnnieRuru/customs/blob/master/server hosting/30.png

    to create firewall

    https://github.com/AnnieRuru/customs/blob/master/server hosting/31.png

    configure the firewall

    https://github.com/AnnieRuru/customs/blob/master/server hosting/32.png

    2. & 3. configure firewall only to this project

    https://github.com/AnnieRuru/customs/blob/master/server hosting/33.png

     

    4. at 'tcp:' tab, only allow these 3 ports

    https://github.com/AnnieRuru/customs/blob/master/server hosting/34.png

     

    7.4

    run ./athena-start start again.

    then goto https://portchecker.co/ and check your port is open

    https://github.com/AnnieRuru/customs/blob/master/server hosting/35.png

    And Finally go to your client edit data/sclientinfo.xml to the WAN IP and


    VIOLA !! DONE !!

    I can connect my client to google cloud

     

    PS: the port checker website only shows Port 6900 is OPEN. only if fulfill these 3 conditions

    1. enable firewall setting on CentOS

    2. enable firewall setting on Google Cloud

    3. run the emulator by ./athena-start

     


     

    Ok now you can start worry about security issue like adding additional user in CentOS

    https://www.digitalocean.com/community/tutorials/how-to-add-and-delete-users-on-a-centos-7-server

    google cloud doesn't seem to allow login that way -> https://stackoverflow.com/questions/52503453/how-to-login-gcp-console-without-ssh
    and mysql root account password change ...

    ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '1234';

    etc...etc...

    need more research

     


     

    Connect to MySQL in CentOS 8 using Window's MySQL Workbench

     

    1. add another connection

    https://github.com/AnnieRuru/customs/blob/master/server hosting/mysql1.png

     

    2. under 'Connection Method', select 'Standard TCP/IP over SSH'
    https://github.com/AnnieRuru/customs/blob/master/server hosting/mysql2.png

     

    3. configure these fields

    3.1 SSH hostname is the server IP address

    3.2 SSH username is the name you created with PuttyGen

    3.3 SSH keyfile needs a conversion with PuttyGen

    3.4 and Click [Test Connection]

    https://github.com/AnnieRuru/customs/blob/master/server hosting/mysql3.png

     

    4. the SSH keyfile needs to be convert from PuttyGen

    4.1 load existing private key, in this case was 'annie.ppk'

    4.2 click conversion and save as 'annie' without file extension

    https://github.com/AnnieRuru/customs/blob/master/server hosting/mysql4.png

     

    5. if successful it will show like this

    https://github.com/AnnieRuru/customs/blob/master/server hosting/mysql5.png

     

    then you can login into MySQL in CentOS

     

    did I forgot to mention needs to open the port 3306 in CentOS and Google Cloud ? refer back to step 7

     

    Reference: https://stackoverflow.com/questions/21527743/mysql-workbench-version-6-0-8-ssh-authentication-issue

     


     

    After thought :

    Overall I'm very satisfy with Google Cloud service,

    1. free $300 credit to spend

    2. can always register trash gmail account to make the credit infinite
      - of course the IP will always change if you do so

    3. very low latency from Malaysia connect to Singapore - just 30~40ms ping

     

    I haven't try OVH which everybody is recommending, but they doesn't offer immediate free credit for me to test so meh .....

     

    and I notice Hercules's wiki CentOS guide is broken, maybe I'll fix it

    https://github.com/HerculesWS/Hercules/wiki/Installation-(CentOS)

     

    - offtopic -

    over last few days playing with google cloud, when I visit Youtube, all my advertisement become Monday.com etc etc group project stuffs

    google really knows how to collect my data


  11. originate from rathena

     

    Download 1.0

    script

     

     

    Description -> copy paste from rathena forum

    Quote

    Just checking if there is a free script that has these functions?

    Able to input Party name A and Party Name B Manually (For recall)
    Able to recall party A and B, manually (or automatic, as long as party name input is manual)
    Able to start match manually (with gates)
    choose which party is winner + announce (then warps all players back to save)

    maybe my requirements are very detailed. I checked annierurus pt vs pt and it is automated and by pub.
    any close to this is welcome, maybe I can just add the other features.


    by the way I added OnPCUseSkillEvent feature

    Spoiler

    diff

    
     src/map/skill.c | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/src/map/skill.c b/src/map/skill.c
    index f93f5c662..50f64a32c 100644
    --- a/src/map/skill.c
    +++ b/src/map/skill.c
    @@ -97,6 +97,7 @@ static const struct {
     	{ HLIF_HEAL, MH_VOLCANIC_ASH },
     	{ MS_BASH, MER_INVINCIBLEOFF2 },
     	{ EL_CIRCLE_OF_FIRE, EL_STONE_RAIN },
    +	{ 2995, 2995 },
     	{ GD_APPROVAL, GD_DEVELOPMENT },
     	CUSTOM_SKILL_RANGES
     };

    db\re\skill_db.conf

    
    {
    	Id: 2995
    	Name: "Register_Party_Match"
    	Description: "Register_Party_Match"
    	MaxLevel: 3
    	Range: 15
    	SkillType: {
    		Friend: true
    	}
    	Event_Label: "PartyVsParty::OnSelectTeam"
    },

    data\LuaFiles514\Lua Files\skillinfoz\skillid.lub

    
    	Register_Party_Match = 2995

    data\LuaFiles514\Lua Files\skillinfoz\skilldescript.lub

    
    	[SKID.Register_Party_Match] = {
    		"Register Party Match",
    		"^FF0000Note: Remember to hold Shift key!^000000",
    		"MAX Lv : 3",
    		"Lv 1: Register the player as Party A.",
    		"Lv 2: Register the player as Party B.",
    		"Lv 3: Start the Match !! (Can use on Any player)",
    	}

    data\LuaFiles514\Lua Files\skillinfoz\skillinfolist.lub

    
    	[SKID.Register_Party_Match] = {
    		"Register_Party_Match";		
    		SkillName = "Register Party Match",
    		MaxLv = 3,
    		Type = "Quest",
    		SpAmount = { 0 },
    		bSeperateLv = true,
    		AttackRange = { 15 },
    	}

     

    screen2020Hercules015.jpg

    its totally up to you to add this or not, but I found it's very convenient after add them

    having a cursor to immediately select the player I want without typing the name out


  12. 1.6 - plugin

    - fix it run status_calc_pc on every charms pickup and drop

    - fix OnEquipScript doesn't run when player login

    - fix nullpo, it wasn't needed at all

     

    in other words, fix everything, hopefully no more bug or run extra stuffs

    and ... its better to loop player's inventory count rather than run whole status_calc_pc thingy, way more resource friendly


  13. 2.0 - plugin

    - overhaul the way how to give player permanent bonus, now no more using npc label, but using an external file

    - fix `*skill` doesn't work correctly previously

    - `*recalculatestat` no longer using addtimer hack

    - no more spamming "<npc name>::OnPCStatCalcEvent" anymore !!! yes tested !!

     

    as like before, `@reloadscript` command can reload conf\import\OnPCStatCalcEvent.conf file

     


     

    and if you guys didn't know, rAthena removed OnPCStatCalcEvent !!! MUAHAHAHA !!!

    https://github.com/rathena/rathena/commit/b65443d8f564175196d57ef9bc1d000a5661fbdc

    why cause headache ? I just live with it

     

    https://github.com/rathena/rathena/issues/4812

    cast blessing will make OnPCStatCalcEvent bonus disappear ?

    I just tested on version 2.0, no problem :hum:

     


     

    2.1 - plugin

    - add `@reloadonpcstatcalcevent` to safely reload only OnPCStatCalcEvent.conf file without using the destructive `@reloadscript`


  14. ok 1 more try

     

    1.3 - plugin

    - add ITF_ALL flag for 2nd argument expansion

    - allow to use any array of your choice to only show items only allow on that array

     

    and of course this time I setup my own test server on google cloud with centos myself, hopefully in this future no more error like above shows up


  15. I found this in src\map\packet_struct.h

    struct PACKET_ZC_USE_ITEM_ACK {
    	int16 packetType;
    	int16 index;
    #if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
    	uint32 itemId;
    	uint32 AID;
    #elif PACKETVER >= 3
    	uint16 itemId;
    	uint32 AID;
    #endif
    	int16 amount;
    	uint8 result;
    } __attribute__((packed));

    so client version 20181121 below uses `RBUFL(buf, 6)`, anything above use `RBUFL(buf, 8)`

     

    1.0 - plugin

    - introduce type [D], direction packet, and existing Dance/songs move to type `[M]usic`

    - no longer use nested IF-ELSE, use switch statement on the packet header for faster read speed

    - fix [I.]tem type throw nullpo error on 2018 client

    - add Caution as a warning that certain packet filter wont work correctly

     

    and I guess this is finally over

    time to mention everyone that has PM me about this project

    @raPalooza~

    @Azhura

    @freezing1

    @xJhay

    @Kuroyama

    @fiction

    @Skyzone

    @cusco ? <-- from discord

     


  16. 28 minutes ago, Kuroyama said:

    I did try it now Ms. @AnnieRuru. Here's the new error:

     

    On windows compiler:

    image.png.9d91cd547aef3febebeedea8b2395838.png

     

    On CentOS/Linux:

      Reveal hidden contents

     

    image.png.87ff2e8078b5f0a087acec5bd40b917f.png

     

    image.png.fbb209c7b91b4a99ace4093d1c6a2353.png

     

    image.png.4f55c67bffd5b5699ab4b82f5601190c.png

     

    image.png.15c7526510d67698439ab08fd9901576.png

     

     

    then you have to tell which client version you are using,
    this was tested on 2019 RE client

     

    seems like the packet is entirely different


  17. 0.5 - plugin

    - fix linux compile warning `type` not being use

    - change useItemAckType into 0x1c8 ... hopefully no more nullpo ?

    - allow blocking casting animation, save more bandwidth

    - implement [T], [G], [D] type respectively

     

    also, I split the original Land Protector and bard/dancer song out

    Land Protector is under [G] type, Apple of Idun is under [D] type

    Basilica is under [B.] type

     

    type [S.] still has some bug, if being cast directly in front of the player, it doesn't block correctly

    .. very close to finish

     

    @Kuroyama, try again

×
×
  • Create New...

Important Information

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