-
Content Count
375 -
Joined
-
Days Won
5
Reputation Activity
-
Legend reacted to meko in PvP Ranking! - Request
here's a rough draft (not tested)
- script PvP Ranking FAKE_NPC,{ OnPCKillEvent: pvp_rank[.this_week] += 3; // raise our own pvp rank dispbottom("You gain 3 points on PvP Rank"); attachrid(killedrid); pvp_rank[.this_week] = max(0, pvp_rank[.this_week] - 3); // decrease their pvp rank dispbottom("You received -3 points penalty on PvP Rank"); end; OnPCLoginEvent: OnClaimReward: .@char = getcharid(CHAR_ID_CHAR); if ($pending_badges[.@char] < 1) { end; } pvp_rank[$last_week] = 0; dispbottom(sprintf("PvP Rank: you obtained %i points this week, putting you at rank %i.", $pending_points[.@char], $pending_rank[.@char] + 1)); dispbottom(sprintf("Reward: %i badges.", $pending_badges[.@char])); getitem(Rok_Star_Badge, $pending_badges[.@char]); $pending_badges[.@char] = 0; $pending_points[.@char] = 0; $pending_rank[.@char] = 0; end; OnInit: .top_len = 10; // we want a top 10 // fallthrough OnSun0001: // every Sunday at 00:01 AM $last_week = .this_week; .this_week = atoi(gettimestr("%y%W", 4)); // YYWW if ($last_week < 1) { end; // this is our first week running this script } .@count = query_sql(sprintf("SELECT c.char_id, c.name, r.value" "FROM `char_reg_num_db` r " "JOIN `char` c ON r.char_id = c.char_id " "WHERE `key`='pvp_rank' AND `index`='%i' " "ORDER BY `value` DESC " "LIMIT " + .top_len + ";", $last_week), .top_char[0], .top_char$[0], .top_points[0]); // store that info so it can be reused throughout the week query_sql(sprintf("DELETE FROM `char_reg_num_db` WHERE `key`='pvp_rank' AND `index` <= %i", $last_week)); // janitor task for (.@i = 0; .@i < .@count; .@i++) { .@badges = (10 * .top_len) - (10 * .@i); // the badges this player won .@char = .top_char[.@i]; .@acc = charid2rid(.@char); $pending_badges[.@char] += .@badges; $pending_points[.@char] = .top_points[.@i]; $pending_rank[.@char] = (.@i + 1); if (.@acc > 0) { addtimer(rand(5000), "PvP Ranking::OnClaimReward", .@acc); } } end; } You'll notice I did +3 and -3 for both killing and being killed; This is on purpose, else someone could just make 2 characters and kill each other to keep getting +1 every time (+3, -2)
To display the top 10 from last week in a npc you'd do something like:
mes("Here's the ranking for last week:"); next(); if (getvariableofnpc(.top_char[0], "PvP Ranking") < 1) { mes("(no ranking available for that week)"); next(); } .@max = getvariableofnpc(.top_len, "PvP Ranking"); for (.@i = 0; .@i < .@max; .@i++) { .@points = getvariableofnpc(.top_points[.@i], "PvP Ranking"); if (.@points < 1) { break; } mes(sprintf("%i. %s — %i points.", .@i + 1, getvariableofnpc(.top_char$[.@i], "PvP Ranking"), .@points)); next(); } -
Legend reacted to Skyline in A friendly reminder to server owners
Greetings everyone!
I just want to tell you guys a friendly reminder. But before that let me give you a background of things:
I am a server owner just like most of you guys, been this way for 3 years now. On my 3rd year of being an admin, I decided to give it all I've got for my community because they deserved the best.
I spent at least $1300 in exclusive custom made items/stuff/monsters and the biggest main town ever with a Colosseum. It was probably one of the greatest maps @Olrox ever made. @Daifuku's logo on our main town stands to be the best there is and we are all proud of it. @Haziel's custom items made us stand out and made us feel unique.
But see, all of these client side things needs to be protected by encryption, right? I knew that before even trying to get these things into order. It is beyond frustrating seeing all your stuff gets stolen by other servers even with encrypted stuff.
Goes to show that GRF Encryption is no longer secure. Now before you say I don't know how to encrypt, trust me, I know.
This is why I wanted to remind you guys, that if you decide to get services for client-side stuff? Before you throw in $$$, always remember this risk.
This risk of getting your shit stolen. Because it sucks.
Trust me you don't want to get into the same position as I am. So as long as there isn't an awesome way to secure, hold your $$$. But if you know the risk and still want to push forward? Get the services of the people below because they are the best.
Good luck out there!
Special thanks to the people who made our stuff, @Daifuku, @Haziel, @Olrox, @Hyvraine.
This ends my reminder/rant.
And for the server who got our stuff, hi BrillianceRO, Andy Chandra.
-
Legend reacted to meko in PvP Ranking! - Request
working on it, I'll post here the script asap, free of charge
-
Legend reacted to Sephus in Herc or Idathena?
IdAthena is an Indonesian localisation of the emulator if I'm not mistaken? Hercules has HULD that supports localisation of scripts, the benefit of which outweighs using any other localised emulator. Because your users will be able to understand your server in their own language, if you support it. Hercules makes this possible.
This among other several reasons why it is far more superior to rA or any other (and I don't mean to put them down but the code speaks for itself).
-
Legend reacted to Yommy in LUB or LUA Files?
you dont have to bother with any compiling, just rename the lua file to lub
the client will read it fine
i would recommend dont diff that "lua before lub" option, because it breaks the saving of configs
-
Legend reacted to bWolfie in @botcheck
File Name: @botcheck
File Submitter: True Zeal
File Submitted: 30 Apr 2017
File Category: Utility
File Name: @botcheck
File Submitter: True Zeal
File Submitted: 30 Apr 2017
File Cateogry: Utility
Description
A useful command for your Game Masters to help monitor problem "bot" maps.
Runs
the @whomap2 command on a list of specified maps. This allows you to
check classes as well as names, which could be useful for quickly
ignoring a character.
Requires configuration for maps you wish to have it run a check on.
Example Configuration:
//--- Sets the list of maps to run @whomap2 on setarray(.map$[0], "amatsu", // Note: Every entry excluding the last one must have a comma! "prontera", "odin_tem03" // Note: Last entry must never have a comma! );
Download
You can "download" this file from its Pastebin location.
Pastebin: https://pastebin.com/yYuFdLHm
Click here to download this file
-
Legend reacted to Kubix in YARL Android application
Hello!
We're working on YARL Android Application (YARL AA)
What YARL AA can do for your players?
List of online in-game friends Chat with in-game friends View friends profile View your profile (last logged time, last ip) Change your profile (Avatars and etc) Also your players can make donations via PayPal / Credit Card / Google Play!
Please write your questions and suggestions!
See ya!
-
Legend reacted to Tokeiburu in RO installer script (Inno Setup) -help me
As the guide in the download page says:
Server name : open RO.iss and change the first line : #define ServerName "YourRO" You changed all the preprocessor lines from #ServerName to #myRO, so that won't work.
-
Legend reacted to PB&JJ in bBonusSkillLevel
Usage:
item script command:
bBonusSkillLevel,x,y; // x = skill_id y = skills level to add Example: (if you use double strafing, cast one that is two levels higher instead)
{ Id: 1715 AegisName: "Arbalest_" Name: "Arbalest" Type: 4 Buy: 48000 Weight: 1000 Atk: 90 Range: 5 Slots: 2 Job: { Archer: true Thief: true Hunter: true Rogue: true Bard: true } Loc: 34 WeaponLv: 3 EquipLv: 33 View: 11 Script: <" bonus bBonusSkillLevel,AC_DOUBLE,2; "> },
Note:
I Couldn't find the proper entry point for skill levels, I figured I should look around in unit.c / clif.c. For now it's overloading battle_calc_attack. if you happen to find any bugs. or skills it doesn't work on (when final skill level <= 10), or if you have any suggestions Please let me know!
-
Legend got a reaction from Like it~* in Plugin errors
For noitem.c, look for this line:
HPExport void plugin_init (void) { addHookPre( "map->flags_init", map_flags_init_pre ); addHookPre( "npc->parse_unknown_mapflag", npc_parse_unknown_mapflag_pre ); addHookPost( "pc->isequip", pc_isequip_post ); addHookPost( "pc->isUseitem", pc_isUseitem_post ); addHookPost( "pc->checkitem", pc_checkitem_post ); } and replace it with:
HPExport void plugin_init (void) { addHookPre( map, flags_init, map_flags_init_pre ); addHookPre( npc, parse_unknown_mapflag, npc_parse_unknown_mapflag_pre ); addHookPost( pc, isequip, pc_isequip_post ); addHookPost( pc, isUseitem, pc_isUseitem_post ); addHookPost( pc, checkitem, pc_checkitem_post ); }
For maintenance.c, look for this line:
addHookPre( "pc->authok", pc_authok_pre ); addHookPre( "clif->pLoadEndAck", clif_parse_LoadEndAck_pre ); replace it with:
addHookPre( pc, authok, pc_authok_pre ); addHookPre( clif, pLoadEndAck, clif_parse_LoadEndAck_pre );
-
-
-
Legend reacted to AnnieRuru in Show error item on pc_bonus2
honestly, status_calc_pc should have split into multiple functions ...
if we have follow the Linux Kernel Coding Style
in my opinion, status_calc_pc_additional function shouldn't even exist ...
parse equipment, should has its own function, parse card, its own function
so we can just post-hook to that function, instead of having a function doing nothing out in the middle of it =/
ok let me try code this bAddMaxWeight, that has been in our repo and turn it as a plugin
#include "common/hercules.h"#include <stdio.h>#include <stdlib.h>#include <string.h>#include "map/pc.h"#include "map/map.h"#include "common/nullpo.h"#include "common/HPMDataCheck.h"HPExport struct hplugin_info pinfo = { "baddweight", SERVER_TYPE_MAP, ">.<", HPM_VERSION,};int SP_ADDWEIGHT = 0;int pc_bonus_pre( struct map_session_data *sd, int *type, int *val ) { nullpo_ret(sd); if ( *type == SP_ADDWEIGHT ) { if ( sd->state.lr_flag != 2 ) { sd->max_weight += *val; hookStop(); } } return 0;}HPExport void plugin_init (void) { SP_ADDWEIGHT = map->get_new_bonus_id(); script->set_constant( "baddweight", SP_ADDWEIGHT, false ); addHookPre( "pc->bonus", pc_bonus_pre );} - script dfbskfh -1,{OnPCStatCalcEvent: bonus baddweight, 10000000;}hmmm ... totally possible,I just noticed there is a map->get_new_bonus_id() in our repo, somebody must have use this stuff before already
so don't have to add whatever function anymore
.
. and for the topic,
I rather say there are 2 problems with it
1. bonus bAddMaxWaight, 1000;
I think the bonus command, the 1st field should always be a constant
this kind of typo makes the script engine read the bAddMaxWaight as a player variable
and currently our script engine 'i' type cannot differentiate integer, constant or player variable
maybe we can add a 'c' type, to enforce a check that field only accept constant
BUILDIN_DEF(bonus,"cv"),however, this is still a run-time check, our script engine still suxbut the script->report_data function will able to print the variable name out
I can pull request this soon
2. and to actually having to print where the error come from, item ? pet ? combo ?
perhaps the run_script function should have an optional field 'flag' and 'line',
so the 'pc_bonus' and 'status_change_start' function can tell where the error come from
this kind of stuffs should be done in the new script engine update though
I kinda lost interest in this, better left this to Haru
-
Legend reacted to Klutz in getmapusers - More options
Lately i been working to switch from eAthena server to Hercules.
with all the new functions Hercules has i started to build new scripts for my npcs.
i found myself searching a lot for lists:
1) Name of people on specific map.
2) Char ID of people on specific map.
3) Account ID of people on specific map.
BUILDIN(getmapusers) { int16 m; int type = 0; int users = 0; struct s_mapiterator* iter; struct map_session_data *sd; const char *str; str = script_getstr(st,2); if( (m=map->mapname2mapid(str))< 0) { script_pushint(st,-1); return true; } if (script_hasdata(st,3)) type = script_getnum(st,3); else{ script_pushint(st,map->list[m].users); return true; } iter = mapit_getallusers(); for (sd = BL_UCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); sd = BL_UCAST(BL_PC, mapit->next(iter))) { if (sd->bl.m == m){ switch (type) { case 1: mapreg->setregstr(reference_uid(script->add_str("$@mapcharname$"), users), sd->status.name); break; case 2: mapreg->setreg(reference_uid(script->add_str("$@mapcharid"), users), sd->status.char_id); break; case 3: mapreg->setreg(reference_uid(script->add_str("$@mapaccountid"), users), sd->status.account_id); break; } users++; } } mapit->free(iter); return true; } BUILDIN_DEF(getmapusers,"s?"),
I was wondering if you want to add it to Hercules as a new feature.
Regards,
Klutx
-
Legend reacted to Ai4rei in Protect grfs
No real way to prevent editing of GRFs, you can only hinder the stupid portion of people doing that.
Either you modify (read "corrupt") the GRF format in a way, that makes common programs fail, and adjust your patcher and client to be able to deal with that. Or you make up your own format and make a patcher for it and add support to the client for it. Or make an edit to the client, that checks the checksums of all files in the grf, when the client is started to make sure the grf is not changed. This takes a few minutes to complete and will get old very quickly (to the players that is). Choose your poison.
Edit:
I got an idea for one theoretical way, that could prevent others from making changes to the GRF, but still allow you to provide patches to it (granted the patcher does not touch the data, but just adds the files as-is, like RO Patcher Lite). This is just a theory, so I will have to make a proof of concept before making further claims~
Edit:
Too easy to workaround for the effort needed.
-
Legend reacted to GmOcean in Introducing the Item Options System
OMG!! Finally an official system to do what I've created through script. Hmm, may pop back in just to release something using this in the future.
-
Legend reacted to Sephus in Refinery UI
kRO had released anew refinery interface for item refinement last year in their 2016-10-* clients.
Source:
A preview of my implementation:
I already have it working on my local Hercules branch. A big thanks to @Asheraf for providing information from kRO. This will be available for Hercules as and when it support the newer clients.
Just thought I'd share the info here
Hope for its release soon!
-
Legend got a reaction from hercules newbie in [Release] babbs event scripts
Thumbs up! Thanks for sharing
-
Legend reacted to Sephus in Introducing the Item Options System
Yes, this will be fixed soon. The correct order is setequipoption(<equip_index>,<slot>,<opt_index>,<value>);
Edit: Fixed in the latest commit.
Addressed in PR#1673 Thank you for the report.
-
Legend reacted to Sephus in Item Option System Demo NPC
So with the release of Item Options System I had created a demo NPC with a small number of options to test the system out or be used as a full fledged NPC.
Configuration
/** * General Configuration */ /* Chance of the enhancement process to fail. (0 - 99 in percent) */ .chance_of_failure = 10; /* Delete the item on failure? (true/false) */ .delete_on_failure = true; /* Required amount of zeny for a try. */ .zeny_requirement = 100; /* Minimum amount of the bonus value. * For negative effects or certain bonuses that require negative values * Maximum possible value is -INT16_MAX) */ .minimum_bonus_amount = -100; // usually used with delay bonus options, although not provided in the script. /* Maximum amount of the bonus value. * Maximum possible value is INT16_MAX */ .maximum_bonus_amount = 100; /* Disable selection of bonus value (true/false) */ .enable_random_bonus = false; /* Item Option Descriptions */ setarray(.options$[0], "Max HP", "Max SP", "STR", "AGI", "VIT", "INT", "DEX", "LUK"); /* Item Option Constants */ setarray(.option_constants[0], VAR_MAXHPAMOUNT, VAR_MAXSPAMOUNT, VAR_STRAMOUNT, VAR_AGIAMOUNT, VAR_VITAMOUNT, VAR_INTAMOUNT, VAR_DEXAMOUNT, VAR_LUKAMOUNT); end;
File v1.0
item_options.txt
Let me know what you think!
Enjoy~!
-
Legend reacted to Sephus in Introducing the Item Options System
Introducing the Item Options System!
Commit
https://github.com/HerculesWS/Hercules/commit/974222a8d3f189083205bf5d330de04a43226ad3
Feature Information
The Item Option System is a feature that was implemented in 2015-02-26 clients, allowing equipments to have up to 5 additional effects similar to cards or enchants. Each equipment is capable of having 5 information bars above the card slot/enchant bar that describes the effect of the option it is infused with.
New Script Commands (The following snippet is available in doc/script_commands.txt.)
*getequipisenableopt(<equipment slot>) This function checks if the equipped item allows the use of bonus options. Returns 1 if allowed, 0 if not. --------------------------------------- *getequippedoptioninfo(<info_type>); This function is to be used with the scripts of contents listed in db/item_options.conf only. Returns the value of the current equipment being parsed. If the equip was not found or the type is invalid, -1 is returned. --------------------------------------- *getequipoptioninfo(<equip_index>,<slot>,<type>); Gets the option information of an equipment. <equipment_index> For a list of equipment indexes see getequipid(). <option_slot> can range from 1 to MAX_ITEM_OPTIONS <type> can be IT_OPT_INDEX (the ID of the option bonus, @see "Id" or "Name" in db/item_options.conf) or IT_OPT_VALUE (the value of the bonus script of the equipment, @see "Script" in db_item_options.conf). returns the value of the slot if exists or -1 for invalid slot, type or slots. --------------------------------------- *setequipoption(<equip_index>,<slot>,<opt_index>,<value>); Set an equipment's option index or value for the specified option slot. <equipment_index> For a list of equipment indexes see getequipid(). <option_slot> can range from 1 to MAX_ITEM_OPTIONS <type> can be IT_OPT_INDEX (the ID of the option bonus, @see "Id" or "Name" in db/item_options.conf) <value> The value of the type to be set. returns 0 if value couldn't be set, 1 on success.
Release Notes
This system allows the infusing of equipments with bonus item options. This feature is constrained to clients of packet versions greater than or equal to 20150226. Item Options and their effects are defined server-side in db/item_options.conf and client side in data/luafiles514/lua files/datainfo/addrandomoptionnametable.lub The ID of the option must tally with the correct index of the description provided in the client side file. IT_OPT_* keys and MAX_ITEM_OPTIONS macro are also exported from the source as constants. If you wish to disable item options for certain (equipment) items, an additional flag `disable_options` has been added to the item sql tables, and as `DisableOptions: true/false (boolean, defaults to false !!for equipments only!!)` to the item_db.conf files. Documentation is provided for script commands. If upgrading, don't forget to run the sql upgrade files!
Credits
A big thanks to all the reviewers that helped make the code closer to perfection. -
Emistry, dastgir, MishimaHaruna, Jedzkie, Ridley8819, Asheraf, 4144.
Style and Script Fixes by Asheraf (https://github.com/Asheraf)
Initial design Idea in rAthena commit.
-
Legend reacted to Ai4rei in RO Credentials (ROCred), v1.10.0 - last updated 2017/12/31
Refreshed to 1.9.3, fixes a potential buffer overflow and outdated URLs.
-
-
Legend reacted to vykimo in Video Animation Cutin
Hi all,
Here my latest preview video of one of my stuff : Video animation In Game
If you noticed in the video, the main advantage of my mod is that you can continue talking with the NPC while watching the video !!
Please, give me feedbacks !
If you like my stuff, don't forget to follow my profile to get informed of new RO stuff I post on forum !
-
Legend reacted to Sephus in Hercules vs rAthena diff checker
Hey all,
So I've worked on a difference checker between the fields of some rAthena and Hercules database files.
This could help people or devs or users do quick lookups for differences.
Key Features
The differences are listed in libconfig format to make things easier for people trying to merge or lookup entries between rAthena and Hercules.
It lists only the differences if any. (Except ID and Name field for quick lookups).
Repository: https://github.com/Smokexyz/Hercules-vs-rAthena
Currently supported files -
db/pre-re/mob_db.conf db/pre-re/item_db.conf db/pre-re/skill_db.conf db/re/mob_db.conf db/re/item_db.conf db/re/skill_db.conf
TODO
Add support for more files. Automate checks and updates to repository.
If you have any suggestions for files or format do let me know.
If you want to report errors, please feel free to open an issue on the repository page.