Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. if ($eventgid) { [email protected] = getcharid(3, getguildmaster($eventgid)); if ([email protected] && isloggedin([email protected])) { getitem 1080, 10, [email protected]; } }how to make this every guild member instead of guild master only, to recieve prizes at the end of the event
  3. diff --git a/db/soul_link.yml b/db/soul_link.yml --- db/soul_link.yml | 74 ++++++++++++++++++++++++++++++++++++ src/map/script.cpp | 1 + src/map/script_constants.hpp | 17 +++++++++ src/map/status.cpp | 50 ++++++++++++++++++++++++ 4 files changed, 142 insertions(+) create mode 100644 db/soul_link.yml diff --git a/db/soul_link.yml b/db/soul_link.yml new file mode 100644 index 000000000..bdcf72cb0 --- /dev/null +++ b/db/soul_link.yml @@ -0,0 +1,74 @@ +# Custom soul link buffs. +# Author: Secret <[email protected]> +# +# Format +# <SL_ constant>: <YAML string literal with a pair of enclosing bracket for the script> +# +# You can code the script just like an item script. +# +# Use ONLY spaces to indent. +# DONT USE TABS + +# Header: # Metadata for future use +# Version: 1 +# Type: MOD_SECRET_SOUL_LINK +SL_ALCHEMIST: | + { + bonus bStr,1; + } +SL_MONK: | + { + bonus bStr,1; + } +SL_STAR: | + { + bonus bStr,1; + } +SL_SAGE: | + { + bonus bStr,1; + } +SL_CRUSADER: | + { + bonus bStr,1; + } +SL_SUPERNOVICE: | + { + bonus bStr,1; + } +SL_KNIGHT: | + { + bonus bStr,1; + } +SL_WIZARD: | + { + bonus bStr,1; + } +SL_PRIEST: | + { + bonus bStr,1; + } +SL_BARDDANCER: | + { + bonus bStr,1; + } +SL_ROGUE: | + { + bonus bStr,1; + } +SL_ASSASIN: | + { + bonus bStr,1; + } +SL_BLACKSMITH: | + { + bonus bStr,1; + } +SL_HUNTER: | + { + bonus bStr,1; + } +SL_SOULLINKER: | + { + bonus bStr,1; + } + SL_GUNNER: | + { + bonus bMaxHPrate,50; bonus2 bSkillAtk,"GS_DESPERADO",30; + } +SL_NINJA: | + { + bonus bMaxHPrate,50; bonus2 bSkillAtk,"NJ_ISSEN",30; + } diff --git a/src/map/script.cpp b/src/map/script.cpp index e9e10a643..69c9a0ab6 100644 --- a/src/map/script.cpp +++ b/src/map/script.cpp @@ -60,6 +60,7 @@ #include "pc_groups.hpp" #include "pet.hpp" #include "quest.hpp" +#include "status.hpp" #include "storage.hpp" using namespace rathena; diff --git a/src/map/script_constants.hpp b/src/map/script_constants.hpp index 16e405d0e..8e7bf166d 100644 --- a/src/map/script_constants.hpp +++ b/src/map/script_constants.hpp @@ -16,6 +16,23 @@ export_constant(INT_MIN); export_constant(INT_MAX); + /* soul links */ + export_constant(SL_ALCHEMIST); + export_constant(SL_MONK); + export_constant(SL_STAR); + export_constant(SL_SAGE); + export_constant(SL_CRUSADER); + export_constant(SL_SUPERNOVICE); + export_constant(SL_KNIGHT); + export_constant(SL_WIZARD); + export_constant(SL_PRIEST); + export_constant(SL_BARDDANCER); + export_constant(SL_ROGUE); + export_constant(SL_ASSASIN); + export_constant(SL_BLACKSMITH); + export_constant(SL_HUNTER); + export_constant(SL_SOULLINKER); + export_constant(SL_GUNNER); + export_constant(SL_NINJA); + /* server defines */ export_constant(PACKETVER); export_constant(MAX_LEVEL); diff --git a/src/map/status.cpp b/src/map/status.cpp index 84b832e12..2c51d139d 100644 --- a/src/map/status.cpp +++ b/src/map/status.cpp @@ -7,6 +7,7 @@ #include <math.h> #include <stdlib.h> #include <string> +#include <unordered_map> //SKYZONE NOTE: DONOT PUT ON TOP MAKE SURE THIS ALWAYS BELOW OF STRING #include <yaml-cpp/yaml.h> #include "../common/cbasetypes.hpp" @@ -66,6 +67,8 @@ bool running_npc_stat_calc_event; /// Indicate if OnPCStatCalcEvent is running. // We need it for new cards 15 Feb 2005, to check if the combo cards are insrerted into the CURRENT weapon only to avoid cards exploits short current_equip_opt_index; /// Contains random option index of an equipped item. [Secret] +std::unordered_map<int, script_code*> soul_link; + unsigned int SCDisabled[SC_MAX]; ///< List of disabled SC on map zones. [Cydh] sc_type SkillStatusChangeTable[MAX_SKILL]; @@ -4086,6 +4089,13 @@ int status_calc_pc_sub(struct map_session_data* sd, enum e_status_calc_opt opt) current_equip_opt_index = -1; } + if (sd && sc->count && sc->data[SC_SPIRIT]) { + auto spirit = sc->data[SC_SPIRIT]; + if (spirit != nullptr && soul_link.find(spirit->val2) != soul_link.end() && soul_link[spirit->val2] != nullptr) { + run_script(soul_link[spirit->val2], 0, sd->bl.id, 0); + } + } + if (sc->count && sc->data[SC_ITEMSCRIPT]) { struct item_data *data = itemdb_exists(sc->data[SC_ITEMSCRIPT]->val1); if (data && data->script) @@ -15491,6 +15501,45 @@ static bool status_readdb_attrfix(const char *basedir,bool silent) return true; } +void status_read_soullink_db(const char* file_name) { + YAML::Node root; + int count = 0; + try { + root = YAML::LoadFile(file_name); + if (root.IsMap()) { + for (auto node : root) { + struct script_code *code; + std::string key = node.first.as<std::string>(); + int64 constant = 0; + if (key.compare(0, 3, "SL_")) { + ShowWarning("status_read_soullink_db: Expected a constant with SL_ prefix, got %s.\n", key.c_str()); + continue; + } + if (!script_get_constant(key.c_str(), &constant)) { + ShowWarning("status_read_soullink_db: Tried to assign custom buff to nonexistent constant %s.\n", key.c_str()); + continue; + } + if ((code = parse_script(node.second.as<std::string>().c_str(), file_name, node.second.Mark().line, 0)) == NULL) { + ShowWarning("status_read_soullink_db: Invalid or empty script on custom soul link %s.\n", key.c_str()); + continue; + } + if (soul_link[constant] != nullptr) + script_free_code(soul_link[constant]); + soul_link[constant] = code; + count++; + } + } + else { + ShowError("status_read_soullink_db: The file's structure is broken. Root node is not a map.\n"); + } + } + catch (...) { + ShowError("status_read_soullink_db: Cannot load custom soul link buffs from %s.\n", file_name); + } + + ShowInfo("status_read_soullink_db: Done reading %d custom soul links.\n", count); +} /** *CLEAR THE STATUS AFTER DEATH */ +void status_clear_soul_link_db() +{ + for (const auto& entry : soul_link) { + script_free_code(entry.second); + } + soul_link.clear(); +} + /** * Sets defaults in tables and starts read db functions * sv_readdb reads the file, outputting the information line-by-line to @@ -15557,6 +15606,7 @@ int status_readdb(void) size_fix_db.load(); + status_read_soullink_db((char*)"db/soul_link.yml"); return 0; } /** *CLEAR THE STATUS AFTER DEATH */ @@ find void do_final_status(void) { + status_clear_soul_link_db(); //SKYZONE ers_destroy(sc_data_ers); } Read Some Note I put. I saw some error because they don't know the pattern of the script. the script is working on any version you only need is to spot the pattern. I put some added clear the status after death I saw it some of comment how to do it.
  4. Sorry for reviving the topic. I have a question please: How do you reset this for the next month rewards?
  5. Maybe item script didn't goes to converted items? Because effect are based on item scripts.
  6. Here it is data > msgstringtable.txt
  7. Use Chris data 2020 folders. https://github.com/llchrisll/ROenglishRE
  8. I use my npc costume visual..but my effect gone if i convert my upper middle lower to costume.. What is missing? How to fix it? Please Help
  9. can u give me script with top 5 pvp statue place on town?
  10. Not sure where this question falls.. But I just want to correct the sentence of the job manual. It should be: JOB EXP from Monsters will increase 50% for 30mins. It
  11. Remember to have you quest_db.txt under import so the csv2yaml finds it.
  12. TF_DOUBLE doesn't look like it has a status attached, but status changes are how some of the easier aspd boosts work (like "Madness Canceller / Last Stand" for Gunslinger). Since I don't feel like coding in an entirely new status, you could look for this in status.cpp: if ((skill_lv = pc_checkskill(sd,SA_ADVANCEDBOOK)) > 0 && sd->status.weapon == W_BOOK) val += (skill_lv - 1) / 2 + 1; And add this below it: if ((skill_lv = pc_checkskill(sd,TF_DOUBLE)) > 0) val += skill_lv; And then look for this in status.cpp as well: if((skill=pc_checkskill(sd,SA_ADVANCEDBOOK))>0 && sd->status.weapon == W_BOOK) base_status->aspd_rate -= 5*skill; And add this below: if((skill=pc_checkskill(sd,TF_DOUBLE))>0 ) base_status->aspd_rate -= 10*skill; This should add aspd like Sage's "Advanced Book / Study" does, but give a 1% boost instead of the 0.5% boost. - - - - - For TF_MISS, in battle.cpp look for: if(attacker_count >= battle_config.agi_penalty_count) { if (battle_config.agi_penalty_type == 1) flee = (flee * (100 - (attacker_count - (battle_config.agi_penalty_count - 1)) * battle_config.agi_penalty_num)) / 100; else //assume type 2: absolute reduction flee -= (attacker_count - (battle_config.agi_penalty_count - 1)) * battle_config.agi_penalty_num; if(flee < 1) flee = 1; } } And change it to this: if(attacker_count >= (battle_config.agi_penalty_count + pc_checkskill(sd,TF_MISS))) { if (battle_config.agi_penalty_type == 1) flee = (flee * (100 - (attacker_count - ((battle_config.agi_penalty_count + pc_checkskill(sd,TF_MISS)) - 1)) * battle_config.agi_penalty_num)) / 100; else //assume type 2: absolute reduction flee -= (attacker_count - ((battle_config.agi_penalty_count + pc_checkskill(sd,TF_MISS)) - 1)) * battle_config.agi_penalty_num; if(flee < 1) flee = 1; } } That should cause TF_MISS to affect both how many monsters attack you before you take a penalty, and how big the penalty is (if you didn't write it like this, then let's say you have 11 extra monsters attacking and you just passed the TF_MISS bonus protection, instead of suffering a 5% percent flee penalty for 1 extra monster, you would suffer a 55% flee penalty for 11 extra monsters). Of course, I haven't tested these, and I'm a bit newer at coding. Feel free to try them out though. (This is also based off of the version of code that I have, so it might be a bit different on the newer updates.)
  13. Yesterday
  14. The easiest way would be to go into the skill_db (either .yml or .txt, depending on how old your file is) and adding it as not being affected by land protector. Look for the inf3 section. If you want to do it the more difficult way, you could: In skill.cpp, look for this: switch (skill_id) { case SA_LANDPROTECTOR: if( unit->group->skill_id == SA_LANDPROTECTOR ) {//Check for offensive Land Protector to delete both. [Skotlex] (*alive) = 0; skill_delunit(unit); return 1; } //It deletes everything except traps and barriers if ((!(skill_get_inf2(unit->group->skill_id)&(INF2_TRAP)) && !(skill_get_inf3(unit->group->skill_id)&(INF3_NOLP))) || unit->group->skill_id == WZ_FIREPILLAR || unit->group->skill_id == GN_HELLS_PLANT) { if (skill_get_unit_flag(unit->group->skill_id)&UF_RANGEDSINGLEUNIT) { if (unit->val2&UF_RANGEDSINGLEUNIT) skill_delunitgroup(unit->group); } else skill_delunit(unit); return 1; } break; And change it to this: switch (skill_id) { case SA_LANDPROTECTOR: if( unit->group->skill_id == SA_LANDPROTECTOR ) {//Check for offensive Land Protector to delete both. [Skotlex] (*alive) = 0; skill_delunit(unit); return 1; } //It deletes everything except traps and barriers if ((!(skill_get_inf2(unit->group->skill_id)&(INF2_TRAP)) && !(skill_get_inf3(unit->group->skill_id)&(INF3_NOLP))) || unit->group->skill_id == WZ_FIREPILLAR || unit->group->skill_id == NC_STEALTHFIELD || unit->group->skill_id == GN_HELLS_PLANT) { if (skill_get_unit_flag(unit->group->skill_id)&UF_RANGEDSINGLEUNIT) { if (unit->val2&UF_RANGEDSINGLEUNIT) skill_delunitgroup(unit->group); } else skill_delunit(unit); return 1; } break; And also look for this: if( !(skill_get_inf2(group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP)) && !(skill_get_inf3(group->skill_id)&(INF3_NOLP)) && group->skill_id != NC_NEUTRALBARRIER && map_getcell(unit->bl.m, unit->bl.x, unit->bl.y, CELL_CHKLANDPROTECTOR) ) return 0; //AoE skills are ineffective. [Skotlex] And change it to this: if( !(skill_get_inf2(group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP)) && !(skill_get_inf3(group->skill_id)&(INF3_NOLP)) && group->skill_id != NC_NEUTRALBARRIER && group->skill_id != NC_STEALTHFIELD && map_getcell(unit->bl.m, unit->bl.x, unit->bl.y, CELL_CHKLANDPROTECTOR) ) return 0; //AoE skills are ineffective. [Skotlex] I haven't tested the skill.cpp changes to know that they work though. Just a guess.
  15. Module Name: C:\client\2020-04-01bRagexe_patched.exe Time Stamp: 0x00000000 - Thu Jan 1 03:00:00 1970 Exception Type: 0xc0000005 0x0051a330 2020-04-01bRagexe_patched.exe 0x009fae1a 2020-04-01bRagexe_patched.exe 0x009fbf76 2020-04-01bRagexe_patched.exe 0x00992e53 2020-04-01bRagexe_patched.exe 0x005f05b1 2020-04-01bRagexe_patched.exe 0x0054bad8 2020-04-01bRagexe_patched.exe 0x005f8d82 2020-04-01bRagexe_patched.exe 0x005fa705 2020-04-01bRagexe_patched.exe 0x0083e640 2020-04-01bRagexe_patched.exe 0x75d5dfdb USER32.dll 0x75d5502a USER32.dll 0x75d52d8a USER32.dll 0x75d44ed0 USER32.dll 0x0083c7d2 2020-04-01bRagexe_patched.exe 0x00731468 2020-04-01bRagexe_patched.exe 0x007313d8 2020-04-01bRagexe_patched.exe 0x0083f464 2020-04-01bRagexe_patched.exe 0x00a45d06 2020-04-01bRagexe_patched.exe 0x76d0f989 KERNEL32.DLL 0x77c774b4 ntdll.dll 0x77c77484 ntdll.dll eax: 0x0019f19c ebx: 0x1c6761d0 ecx: 0x00000000 edx: 0x00000001 esi: 0x1c6761d0 edi: 0x00000000 ebp: 0x0019f1a8 esp: 0x0019f168 stack 0019f168 - 0019f568 0019F168 : 94 A5 20 A8 A0 EE 9A 20 00 00 00 00 78 60 AD 00 0019F178 : FF FF FF FF F4 F1 19 00 00 AD 9F 00 88 B1 DC 10 0019F188 : A0 EE 9A 20 E8 0C F4 00 00 00 00 00 0F 00 00 00 0019F198 : 94 A5 20 A8 E8 F1 19 00 88 E3 A7 00 FF FF FF FF 0019F1A8 : F4 F1 19 00 1A AE 9F 00 00 00 00 00 C8 A5 20 A8 0019F1B8 : A0 EE 9A 20 00 00 00 00 A0 EE 9A 20 88 F1 19 00 0019F1C8 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0019F1D8 : 00 00 00 00 00 00 00 00 00 00 00 00 C8 A5 20 A8 0019F1E8 : 10 F3 19 00 20 F2 B0 00 FF FF FF FF 1C F3 19 00 0019F1F8 : 76 BF 9F 00 20 A7 20 A8 90 01 00 00 30 02 00 00 0019F208 : B0 1C 6B 20 00 00 00 00 10 F3 19 00 02 00 00 00 0019F218 : C8 F0 9A 20 00 90 8E 20 89 1E BE FF FF FF FF FF 0019F228 : 64 34 00 00 00 00 00 00 0F 00 00 00 00 92 8E 20 0019F238 : 81 1B 29 FF FF FF FF FF 64 34 00 00 00 00 00 00 0019F248 : 0F 00 00 00 00 92 8E 20 E0 C4 99 77 20 75 98 77 0019F258 : 00 00 00 00 00 00 00 00 0F 00 00 00 00 AF C0 FA Launch Info 0141 00A4 00A4 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 Job : Rebellion prontera.rsw 138 175 ro_ 824
  16. Thank you because of you I found this http://nemo.herc.ws/clients/
  17. English Translation Renewal : https://github.com/llchrisll/ROenglishRE Client : https://gitlab.com/4144/Nemo
  18. Good day everyone! I just wanted to ask if how to fix elemental resist healing on woe/gvg? Elemental resist healing is where if your resistance exceeds to 100% on a certain element, that element will heal you when you take damage on it. ex. If you got 110% Wind resist and you got hit by Lightning bolt or anything that is wind element will heal you instead of taking damage. My current situation is it works on PvP but not on GvG. Please help!!!
  19. This is kinda' vague. this is what I get from reading your request. its kind of a recycle thingy.
  20. I'm thinking of returning and help the people of rA. but I need to catch up on things first. I highly appreciated who tries to help. thank you very much from the bottom of my heart. L O N G L I V E rAthena!
  21. this is not part of my custom mod on this script. but anyway what git version you using?
  22. Hello, Could somebody script me an npc like this? Costume Exchanger who can take ANY costume item (head/mid/low/garment) and in return gives you an item for it. The npc scans all costumes in your inventory and in the menu you can select which costume you wanna exchange for a jellopy I would appreciate it! Thanks!
  23. [Error]: Loading NPC file: npc/custom/test.txt script error on npc/custom/test.txt line 317 parse_line: expect command, missing function name or calling undeclared function 312 : getguildmember( [email protected], 1, [email protected] ); 313 : [email protected]_guild = getguildmember( [email protected], 2, [email protected] ); 314 : 315 : if( .Options&4 ){ 316 : [email protected]_cid = getguildmasterid( [email protected] ); * 317 : [email protected] = inarray('.'@cid, [email protected]_cid); 318 : [email protected]_aid = [email protected][[email protected]]; 319 : 320 : cleararray( [email protected], 0, [email protected]_guild ); 321 : cleararray( [email protected], 0, [email protected]_guild ); 322 : [Info]: Done loading '11023' NPCs: -'3090' Warps -'223' Shops -'7709' Scripts -'4014' Spawn sets -'40697' Mobs Cached -'0' Mobs Not Cached [Status]: Event 'OnInit' executed with '1400' NPCs. [Status]: Event 'OnInterIfInit' executed with '0' NPCs. [Error]: npc_event: event not found [WOE_CONTROL::OnMenu] [Error]: npc_event: event not found [WOE_CONTROL::OnMenu]
  24. There are a couple things you could try. My first suggestion would be changing it in the skill_db (used to be a txt file, but I think its a yml for newer users now) so that it goes by enchant/endow element. If you want the base element to stay earth though, then perhaps leave skill_db alone and try going to this section in battle.cpp: if (s_ele == -1) { // pl=-1 : the skill takes the weapon's element s_ele = sstatus->rhw.ele; if(sd && sd->spiritcharm_type != CHARM_TYPE_NONE && sd->spiritcharm >= MAX_SPIRITCHARM) s_ele = sd->spiritcharm_type; // Summoning 10 spiritcharm will endow your weapon } else if (s_ele == -2) //Use status element s_ele = status_get_attack_sc_element(src,status_get_sc(src)); else if (s_ele == -3) //Use random element s_ele = rnd()%ELE_ALL; switch(skill_id) { case LG_SHIELDSPELL: if (skill_lv == 2) s_ele = ELE_HOLY; break; And adding this under the case LG_SHIELDSPELL section (after the break;): case: GN_CRAZYWEED_ATK: if (status_get_attack_sc_element(src,status_get_sc(src)) != NULL || status_get_attack_sc_element(src,status_get_sc(src)) != 0) s_ele = status_get_attack_sc_element(src,status_get_sc(src)); break; Note: I normally just research what has been used in other places of code and guess at what might work. This might work, or it might not, or it might just need some tweaking. Also, this coding won't allow for endowment to neutral element, because it looks like the status_get_attack_sc_element is set to return neutral as the element if no endow is found. You might be able to get around this, but it would take more coding.
  25. Hi i tried this tutorial nut not working. when i go to my localhost 127.0.0.1 this is the error i received. my application.php and server.php i tried. to put this address C:\wamp64\www\FluxCP on BaseURI and /fluxcp. my new username with full priviledge and database below. flux cp location. please anyone help me to create my fluxcp offline. thanks
  1. Load more activity
  • Newsletter

    block_newsletter_signup
    Sign Up
×
×
  • Create New...

Important Information

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