-
Content Count
1677 -
Joined
-
Last visited
-
Days Won
245
Reputation Activity
-
AnnieRuru got a reaction from bWolfie in @packetfilter
No more Work in Progress, Please report if there are any bug
Download: 1.0a [Complete]
plugin
What is `@packetfilter` ?
`@packetfilter` is a custom mod originate from eamod
https://github.com/zephyrus-cr/eamod/blob/master/Servers/rAthena/conf/groups.conf#L418-L422
it can actually reduce lag on your live server during woe depends on how many players activate it
it totally depends on the player's side, community effort that every player should together turn on the `@packetfilter` to reduce massive lag during woe
this modification is actually very famous and there are members willingly to pay for it
https://rathena.org/board/topic/121200-packetfilter-battleinfo/
https://rathena.org/board/topic/123203-battleinfo-packetfilter/
https://rathena.org/board/topic/111797-packetfilter-zepyhrus-ramod/
https://rathena.org/board/topic/79995-buy-noactnodelay-partybuff-src-as-it-was-on-pro-ro-or-packetfilter/
this `@packetfilter` is unlike the one you are having, or that is circulating on rathena forum
this one has been written entirely from scratch and added some other flags that the original don't
for example,
`@packetfilter COHM EOHM`
allow block normal chat and emotion from non-related players, pets, homunculus and monsters
but this doesn't block normal chat from party/guild members
a full list of flags are
C = ignore normal Chat, including Dancer's scream, Bard's frost joke, and pet's talk (pet start to talk when intimacy > 900) E = ignore emotion, including monster and pet emotion (but NOT pet performance) I = ignore Item use effect A = ignore normal Attack animation (based on receiving side), your own attack animation are always shown B = Buffing skill animations (based on receiving side), your own casting animation are always shown S = Status effect T = offensive single Target skill/spell animations (based on receiving side), your own casting animation are always shown G = Ground based skills (eg:storm gust), your own casting animation are always shown M = Music dance/songs from Bard/Dancer D = Direction. Recommend filter on Party/Guild type and not enemies. Highly Recommend for supportive type Class. after the Main type, also support additional flags
S = Self P = Party G = Guild B = Battleground C = Clan O = Other players, none of the above H = Homunculus/pets/elementals/mercenary and player's @summon M = Monsters
Why This plugin doesn't block Kaite or Energy Coat ?
2 reasons
No.1 - currently there is a bug with plugin,
struct packet_spawn_unit *p = (struct packet_spawn_unit*)RBUFP(buf, 0); this line will throw error on Linux
so no choice, maybe I'll make a bug report
this bug also has been reported on Dastgir's `@noview`
No.2 - just set p->virtue = 0; isn't really blocking the packet
this goes against the very principle of this plugin, which is NOT send certain packet to the client
OPT3 (including OPT3_KAITE | OPT3_ENERGYCOAT | OPT3_SOULLINK) is part of the idle_unitType, unit_walkingType and spawn_unitType function
and blocking those 3 packet entirely is stupid
in case you don't understand, look under clif_set_unit_walking and clif_set_unit_idle function inside src\map\clif.c file
p.GUID = g_id; p.GEmblemVer = status->get_emblem_id(bl); p.honor = (sd) ? sd->status.manner : 0; // p.virtue = (sc) ? sc->opt3 : 0; <-- change this line p.virtue = 0; p.isPKModeON = (sd && sd->status.karma) ? 1 : 0; p.sex = vd->sex;
Note: about [D]irection type packet
try add a ShowDebug inside clif->send
src/map/clif.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/map/clif.c b/src/map/clif.c index ab3c4422a..9e245f335 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -450,6 +450,7 @@ static bool clif_send(const void *buf, int len, struct block_list *bl, enum send return true; } +ShowDebug("source:%s buf:0x%x send_target:%d\n", (sd != NULL)? sd->status.name : "NULL", RBUFW(buf, 0), type); switch(type) { case ALL_CLIENT: //All player clients. iter = mapit_getallusers(); you will find 0x9c is being send repeatedly on every attack and every skill cast , getting attack etc
this direction update packet isn't just send by Shift-click, but also including all the actions above
this packet is very spam-able and I think can be safely block on party/guild/clan/bg flags
for supportive class, I also think can block all of them since supportive class doesn't need information from enemies
-
AnnieRuru got a reaction from MikZ in Party Match
originate from rathena
Download 1.0
script
Description -> copy paste from rathena forum
by the way I added OnPCUseSkillEvent feature
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
-
AnnieRuru got a reaction from Neffletics in Party Match
originate from rathena
Download 1.0
script
Description -> copy paste from rathena forum
by the way I added OnPCUseSkillEvent feature
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
-
AnnieRuru got a reaction from Neffletics in inventoryselect
Credit to Epoque for the idea
Download : 1.4
plugin
while reading the description,
allow list all the items in your inventory, or only show part of it
with version 1.2 onwards, now can list out only certain types of items
for example inventoryselect(ITF_WEAPON|ITF_ARMOR) only shows equipments available in your inventory
and inventoryselect(ITF_CARD) only shows card available in your inventory
no, don't do stuffs like adding item temporary, player can find ways to dup item
tested with
-
AnnieRuru got a reaction from Neffletics in Ragnarok Online access card
some people actually doesn't believe I've played Ragnarok Online LOL
so I dig up my precious childhood memory storage box, and scan all those access cards
really, its my childhood memory
@Emistry sure have seen them before
EDITING : yeah this IPB forum sucks ...
-
AnnieRuru got a reaction from gidzdlcrz in Party Match
originate from rathena
Download 1.0
script
Description -> copy paste from rathena forum
by the way I added OnPCUseSkillEvent feature
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
-
AnnieRuru got a reaction from gantz in Card Seller A-Z
this is probably one of my famous script, just realize it recently
Download : 1.2
script
History :
originally this was only made for fun
https://rathena.org/board/topic/73478-requesting-card-seller-script/?do=findComment&comment=154507
but then Euphy loves it, so it was added in SVN later,
https://rathena.org/board/topic/89071-development-news/?do=findComment&comment=242965
but then rAthena changed their monster mode
https://github.com/rathena/rathena/commit/55e4df14c2141f291a985c391408a045ec1b25c4#diff-9120180df02487486d9abaddf38f9c49
after this script was reported broken, couldn't use in Hercules anymore
https://github.com/rathena/rathena/issues/2844
so I have to fix this script for use in Hercules
my KRO still not update enough to use Barter system, but this format shouldn't be very far from it
-
AnnieRuru got a reaction from MikZ in How to remove emperium hp job3_arch03
/// 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
-
AnnieRuru got a reaction from o5jees in Lotti Girl
There are MANY variations of Lotti Girl script, even me too, have made several of them
so today I try to gather them all, and make a release with ALL features from all the topics gathered
Download:
script
Feature no.1 -> show the percentage chance
chinese government has a rule that all lottery system must show the percentage chance to the public
hence the script should show the lottery chance in percent
Feature no.2 -> Roll Repeatedly
imagine if you have 500 tickets, and you want to spend them all,
all other scripts available on rathena board will force the player to spend them 1 by 1
this script can roll up to 100 times on the fly, effectively save player's time
Feature no.3 -> Lotti shop
even if you spend a lot of tickets and still getting all the trash items, you still collecting points, and able buy them in Lotti Shop
Feature no.4 -> Lotti ladder
compete with other players and see who has the highest Lotti Rank !
oh and ... HULD compatible == rAthena members can't use this
-
AnnieRuru got a reaction from gidzdlcrz in WoE Castle auto Assign on Guild
there's a reason that I haven't made this script like above did because there is a bug
if setcastledata when the agit is on, the emperium is not change immediately
( its not like *bg_monster_set_team command where the monster allegiance can be change immediately )
and nobody bother to fix this because not many people knows how to write a custom woe castle script (well ... I know though )
99,prontera,Prontera Test Castle,test flag,1 prontera,155,188,5 script reset castles 100,{ if(getgmlevel()!=99) { mes "you are not admin!"; close; } mes "Are you sure reset all castles ?"; if(select("no:yes") == 2 ) { set .@gid,getcharid(2); if(!.@gid) { mes "you haven't joined a guild!"; close; } setarray .@maps$[0],"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05"; setarray .@maps$[5],"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05"; setarray .@maps$[10],"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05"; setarray .@maps$[15],"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05"; setarray .@maps$[20],"prontera"; for( set .@i, 0; .@i <= 20; set .@i, .@i+1 ) setcastledata .@maps$[.@i],1,.@gid; mes "All castles have been set to"+getguildname(.@gid)+"!"; } close; } prontera,152,185,4 script test flag 722,{ dispbottom "========================="; set .@gid, getcastledata( "prontera", 1 ); dispbottom "owner of the castle : "+( ( .@gid )? "["+ getguildname(.@gid) +"]" : "<none>" ); dispbottom "agit check : "+( ( agitcheck() )?"on":"off" ); dispbottom "gvg_castle mapflag : "+( ( getmapflag( strcharinfo(3), mf_gvg_castle )?"on":"off" ) ); dispbottom "========================="; end; OnInit: if ( !agitcheck() ) agitstart; else donpcevent strnpcinfo(0)+"::OnAgitStart"; setmapflag "prontera", mf_gvg_castle; flagemblem getcastledata("prontera",1); end; OnAgitStart: monster "prontera",151,181,"EMPERIUM",1288,1,strnpcinfo(0)+"::OnEmpBreak"; end; OnAgitEnd: killmonster strnpcinfo(4), strnpcinfo(0)+"::OnEmpBreak"; end; OnEmpBreak: announce "The Emperium has fallen", bc_map; setcastledata "prontera", 1, getcharid(2); donpcevent "::OnRecvCastle123"; sleep getbattleflag("gvg_eliminate_time"); monster "prontera",151,181,"EMPERIUM",1288,1,strnpcinfo(0)+"::OnEmpBreak"; end; OnAgitInit: requestguildinfo getcastledata("prontera", 1); OnRecvCastle123: flagemblem getcastledata("prontera",1); end; OnGuildBreak: setcastledata "prontera", 1, 0; donpcevent "::OnRecvCastle123"; end; } after using the castle reset npc, the castle's emperium will still belongs to the original guild,
which even yourself still can hit the emperium
to fix this, the emperium has to be removed and respawn again
the correct script has to donpcevent on the official castle script ...
-
AnnieRuru got a reaction from gidzdlcrz in WoE Castle auto Assign on Guild
this is the correct script
http://upaste.me/8f1311087bf401916
lol, I also found a bug by writing this script
http://herc.ws/oldboard/index.php?app=tracker&showissue=8077
-
AnnieRuru got a reaction from IILeonII in ShowDropEffect
{ Id: 909 AegisName: "Jellopy" Name: "Jellopy" Buy: 6 Weight: 10 BuyingStore: true ShowDropEffect: true DropEffectMode: 2 },
https://github.com/HerculesWS/Hercules/blob/stable/doc/item_db.txt#L374-L381
your client needs to support 0xadd packet, which is 20180418 and above
-
AnnieRuru got a reaction from Anubis in How to remove emperium hp job3_arch03
/// 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
-
AnnieRuru reacted to anacondaq in hosting Hercules on Google Cloud with CentOS 8
@buchachi11 I don't know why you mentioned the RO offline pack here.
But I want to admit that basic principle the same and on Linux and Windows.
If you can set up RO offline on Windows (https://gist.github.com/anacondaq/3eae8e4afb5d3c3880d08b95b2c54b78) the same, you can do on Linux.
What do you need for running the emulator?
operation system where everything will be set up (windows or Linux, even macOS) emulator files cloned by git from Github (git clone https://github.com/HerculesWS/Hercules.git) installed MySQL or MariaDB server on your operation system created databases inside MariaDB or MySQL for main and logs databases from emulator above (stored in /SQL/ folder) You need to create database users who will have access rights to manipulate data (select, insert, update, delete, drop, alter) inside databases. (easy to do with PHPMyAdmin) You need to import database files from the emulator folder (/sql/main.sql, logs.sql) into creating your new databases. Go to the login table and edit s1/q1, go to emulator folder /conf/, and find s1/q1 for login and pass and edit to the same value. find in conf folder MySQL connection configuration data and setup-up users/passwords that you made above for MySQL . You need to install required for complications and running tools for your operating system. (on windows VS Community 2019, on Linux different set of tools + GCC) compile and run, if no errors in running windows -> everything is done properly.
More details you can find in @AnnieRuru guide above.
How to achieve that?
Just install any operating system by using guides on youtube, very, very simple.
And then do what the guide said, do not afraid to do experiments, destroy everything if you broke something, and start again.
P.S. if you do not know what operating system to pick.
Short answer: there are yum and apt-based systems.
They have different structures and experiences but doing the same.
Fedora, OpenSUSE for one type. (yum)
ubuntu, linuxmint for the second type. (apt)
pick any.
-
AnnieRuru got a reaction from Hyroshima in hosting Hercules on Google Cloud with CentOS 8
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 ?
oh and, don't worry, you can always cancel it anytime
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
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
-
AnnieRuru got a reaction from Neffletics in OnPCStatCalcEvent
rathena already has this by default -> https://github.com/rathena/rathena/commit/27a0f3f
someone else has tried to pull request in hercules, -> https://github.com/HerculesWS/Hercules/pull/351
but it was denied, so have to leave this as plugin
UPDATE: rathena has taken out -> https://github.com/rathena/rathena/commit/b65443d8f564175196d57ef9bc1d000a5661fbdc
Download : 2.1
plugin
Tested with:
conf\import\OnPCStatCalcEvent.conf
both `@reloadscript` and `@reloadonpcstatcalcevent` command can reload conf\import\OnPCStatCalcEvent.conf file
`@reloadscript` = reload everything -> cause destruction on live server
`@reloadonpcstatcalcevent` = only reload conf\import\OnPCStatCalcEvent.conf file , combine with `@reloadnpc` command -> not so destructive
script: ( { // give GM permanent bonus ? OnPCStatCalcEvent: <" bonus bVit, 1234; end; "> }, { // for xxx event OnPCStatCalcEvent: <" skill TF_HIDING, 1; end; "> }, { // npc/custom/xxxevent.txt OnPCStatCalcEvent: <" if (@a) { bonus bStr, 1000; skill WZ_ICEWALL, 1; } end; "> }, ) script
prontera,158,185,5 script djk2sfhsd 1_F_MARIA,{ @a ^= 1; mes "hmm..."; recalculatestat(); next; mes "what ?"; @a ^= 1; recalculatestat(); next; mes "maybe..."; @a ^= 1; recalculatestat(); next; mes "probably..."; @a ^= 1; recalculatestat(); next; mes "yeah..."; @a ^= 1; recalculatestat(); close; } yes, this actually works !!
with version 2.0 onwards,
no more spamming <npc name>::OnPCStatCalcEvent !!
and even `*skill` working perfectly fine now
-
AnnieRuru got a reaction from ljsb in hosting Hercules on Google Cloud with CentOS 8
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 ?
oh and, don't worry, you can always cancel it anytime
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
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
-
AnnieRuru got a reaction from Neffletics in @itemdestroy
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
-
AnnieRuru reacted to GmOcean in Scripting Tutorials & Guides
On a passing whim, I've stopped by here and updated the links. A few years late, but better late than never. Good bye for now....
-
AnnieRuru reacted to Huitzilopotchli in Show 1 Regen HP/SP, how to remove it?
Finaly find it, it come from this:
In status.c, status_calc_regen, minimum value is 1, means all job whatever if they have skill or sitting regen bonus, will display this "1" heal regen
if (regen->skill != NULL) { regen->skill->hp = cap_value(regen->skill->hp, 1, INT16_MAX); regen->skill->sp = cap_value(regen->skill->sp, 1, INT16_MAX); } if (regen->sitting != NULL) { regen->sitting->hp = cap_value(regen->sitting->hp, 1, INT16_MAX); regen->sitting->sp = cap_value(regen->sitting->sp, 1, INT16_MAX); } We've change for this and it's work fine
if (regen->skill != NULL) { regen->skill->hp = cap_value(regen->skill->hp, 0, INT16_MAX); regen->skill->sp = cap_value(regen->skill->sp, 0, INT16_MAX); } if (regen->sitting != NULL) { regen->sitting->hp = cap_value(regen->sitting->hp, 0, INT16_MAX); regen->sitting->sp = cap_value(regen->sitting->sp, 0, INT16_MAX); }
-
AnnieRuru got a reaction from MikZ in Dota PVP with Weekly Reward
its either monthly or weekly, no both
if needs both, its still possible but whole system needs to rewrite, not a free script anymore (means I charge for it)
https://github.com/AnnieRuru/Release/blob/master/scripts/PvP %26 GvG/Dota PVP ladder/dota_sql_ladder_3.6_week_reward.txt
-
AnnieRuru got a reaction from MikZ in Promotional Code
1.3 - script
- fix a bug the 'Promotion code has Started' didn't even activate after a server restart
- fix a bug when GM edit the start/expire date field, the announcement didn't update along with it ... should have just disable it when countdown initiated
- fix a bug when GM close a promo code, it doesn't announce a GM has closed it, yet its still make announcement about still can claim promo code
OKies I'm gonna leave this script and go do some other project ...
maybe some other day can come back and rewrite this script entirely with .npc_var only sync with SQL variables so don't have to call query_sql so frequently ...
but as it stands now, this script is 1400 lines, not something to be underestimate
-
AnnieRuru got a reaction from MikZ in Promotional Code
I got 2 rep up for making that grumbling post, that just shows how many members really like this idea
and of course I knew many topics talking about this script again and again and again and again and again and again and again and again and again and again and again and again !!!
so I make one myself and hopefully don't want see people talking about that bug script again !!
What this script does ?
GM generate some sort of gibberish word and promotes it on social media
then players input that gibberish word and able claim the items
honestly I don't really see the point of gibberish word,
I made this script in a drop down menu, players can just select it from the menu and claim it <_<
Download: 1.3
script
here's an example by Philippine RO, from this post
TODO :
1. add coloring to the text
2. HULD compatible ?
3. maybe someday can rewrite this whole damn thing with .npc_var sync with SQL variables so don't have to call query_sql too frequently
-
AnnieRuru got a reaction from MikZ in Dota PVP Ladder
select * from item_db where type = 5 and equip_locations & 4 and view_sprite > 0; yeah my RO knowledge is again outdated, never thought robes can show sprite change
3.6 - script
- fix a missing sprite change from LOOK_ROBE
PS: why the wings on my character is being chop off but the statue is display correctly ? WTF ??
-
AnnieRuru got a reaction from MikZ in Dota PVP with Weekly Reward
@MikZ still need ?
I just wrote a blog about how to send weekly rewards
https://annieruru.blogspot.com/2020/10/how-to-send-weekly-rewards-to-players.html
might as well do this
based on this topic, I assumed you are using hercules ?
and reset the ladder weekly and sent rewards ?
the ladder never stay forever ?
reward sent as mail or a custom SQL table ?