Jump to content

Litro Endemic

Members
  • Posts

    255
  • Joined

  • Days Won

    9

Everything posted by Litro Endemic

  1. floating rates script or something like that use setBattleFlag script commands with flag reload set true
  2. of course you will not found it, by default rA didn't has this system. either way if you want to manually create / prepare the duplicate npc, then move it to near player when the player loaded into map with loadmapevent mapflag. or you can use this to be able to duplicate npc on fly, but idk if it still usable in current revision of rA.
  3. if you use new mob db yaml just set flag for skill sacntuary TargetEmperium to true, still it would only heal 1 hp since emperium has mode ignore magic, well if you want sanctuary by pass ignore magic for emperium you will need extra source code mod. - Id: 70 Name: PR_SANCTUARY Description: Sanctuary MaxLevel: 10 Type: Magic TargetType: Ground DamageFlags: NoDamage: true IgnoreDefense: true Range: 9 Hit: Single HitCount: 1 Element: Holy Knockback: 2 CopyFlags: Skill: Plagiarism: true Reproduce: true CastCancel: true CastTime: 4000 Duration1: - Level: 1 Time: 3900 - Level: 2 Time: 6900 - Level: 3 Time: 9900 - Level: 4 Time: 12900 - Level: 5 Time: 15900 - Level: 6 Time: 18900 - Level: 7 Time: 21900 - Level: 8 Time: 24900 - Level: 9 Time: 27900 - Level: 10 Time: 30900 FixedCastTime: 1000 Requires: SpCost: - Level: 1 Amount: 15 - Level: 2 Amount: 18 - Level: 3 Amount: 21 - Level: 4 Amount: 24 - Level: 5 Amount: 27 - Level: 6 Amount: 30 - Level: 7 Amount: 33 - Level: 8 Amount: 36 - Level: 9 Amount: 39 - Level: 10 Amount: 42 ItemCost: - Item: Blue_Gemstone Amount: 1 Unit: Id: Sanctuary Layout: -1 Range: 1 Interval: 1000 Flag: NoOverlap: true PathCheck: true Flags: TargetEmperium: true
  4. can you include examples folder on the release, thank you
  5. its because lhz3 and lord of death has it own kill event, i am not sure there is another monster with it own kill event. you can add donpcevent inside kill event lhz3 boss and lord of death to your own mvp announcer so it can trigger too.
  6. here there is 3 version for the script 1st is npc automatic timer since script loaded. quiz_02,238,379,0 script Auto Warper 112,{ mes "["+ strnpcinfo(0) +"]"; mes "Please stand in front of me to be warped"; close; OnTimer600000: [email protected] = getareausers("quiz_02", 237, 378, 237, 378); if ([email protected] < 1) end; if ([email protected] == 1) warp "quiz_02", 246, 376; else npctalk "Too many people in front of me, only one person will be teleported in next 10 minute."; initnpctimer; end; OnInit: initnpctimer; end; } 2nd is timer started by player when used. quiz_02,238,379,0 script Auto Warper 112,{ mes "["+ strnpcinfo(0) +"]"; if (.user) { [email protected]$ = strcharinfo(0, .user); if ([email protected]$ != "") { mes "Someone is using my service right now, please come again later."; close; } stopnpctimer; .user = 0; } getmapxy([email protected]$, [email protected], [email protected], BL_PC); if ([email protected] != 237 && [email protected] != 378) { mes "Please stand in front of me to be warped."; close; } [email protected] = getareausers("quiz_02", 237, 378, 237, 378); if ([email protected] > 1) { mes "Too many people in front of me, only one person will be teleported in next 10 minute."; close; } .user = getcharid(0); initnpctimer; mes "Please wait for 10 minute to be warped."; close; OnTimer600000: stopnpctimer; [email protected] = getmapxy([email protected]$, [email protected], [email protected], BL_PC, strcharinfo(0, .user)); .user = 0; if ([email protected] != -1 && [email protected]$ = strnpcinfo(4) && [email protected] == 237 && [email protected] == 378) warp "quiz_02", 246, 376, .user; end; } 3rd is using sleep, quiz_02,238,379,0 script Auto Warper 112,{ mes "["+ strnpcinfo(0) +"]"; if (.user) { [email protected]$ = strcharinfo(0, .user); if ([email protected]$ != "") { mes "Someone is using my service right now, please come again later."; close; } .user = 0; } getmapxy([email protected]$, [email protected], [email protected], BL_PC); if ([email protected] != 237 && [email protected] != 378) { mes "Please stand in front of me to be warped."; close; } [email protected] = getareausers("quiz_02", 237, 378, 237, 378); if ([email protected] > 1) { mes "Too many people in front of me, only one person will be teleported in next 10 minute."; close; } .user = getcharid(0); [email protected] = 10 * 60000; mes "Please wait for 10 minute to be warped."; sleep2 [email protected]; close2; .user = 0; warp "quiz_02", 246, 376, .user; end; }
  7. diff --git a/src/map/itemdb.cpp b/src/map/itemdb.cpp index a6777190b..b4ca490dd 100644 --- a/src/map/itemdb.cpp +++ b/src/map/itemdb.cpp @@ -652,6 +652,18 @@ uint64 ItemDatabase::parseBodyNode(const YAML::Node &node) { if (!exists) item->flag.dropEffect = DROPEFFECT_NONE; } + + if (this->nodeExists(flagNode, "NoAutoLoot")) { + bool active; + + if (!this->asBool(flagNode, "NoAutoLoot", active)) + return 0; + + item->flag.noautoloot = active; + } else { + if (!exists) + item->flag.noautoloot = false; + } } else { if (!exists) { item->flag.buyingstore = false; @@ -660,6 +672,7 @@ uint64 ItemDatabase::parseBodyNode(const YAML::Node &node) { item->flag.guid = false; item->flag.bindOnEquip = false; item->flag.broadcast = false; + item->flag.noautoloot = false; if (!(item->flag.delay_consume & DELAYCONSUME_TEMP)) item->flag.delay_consume = DELAYCONSUME_NONE; item->flag.dropEffect = DROPEFFECT_NONE; diff --git a/src/map/itemdb.hpp b/src/map/itemdb.hpp index 108cda7f7..70ff47c17 100644 --- a/src/map/itemdb.hpp +++ b/src/map/itemdb.hpp @@ -877,6 +877,7 @@ struct item_data bool broadcast; ///< Will be broadcasted if someone obtain the item [Cydh] bool bindOnEquip; ///< Set item as bound when equipped e_item_drop_effect dropEffect; ///< Drop Effect Mode + bool noautoloot; } flag; struct {// item stacking limitation uint16 amount; diff --git a/src/map/mob.cpp b/src/map/mob.cpp index 72bec7421..62df797fd 100644 --- a/src/map/mob.cpp +++ b/src/map/mob.cpp @@ -2190,7 +2190,7 @@ static void mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, str sd = map_charid2sd(dlist->first_charid); if( sd == NULL ) sd = map_charid2sd(dlist->second_charid); if( sd == NULL ) sd = map_charid2sd(dlist->third_charid); - test_autoloot = sd + test_autoloot = sd && (itemdb_search(ditem->item_data.nameid))->flag.noautoloot == false && (drop_rate <= sd->state.autoloot || pc_isautolooting(sd, ditem->item_data.nameid)) && (flag?(battle_config.homunculus_autoloot?(battle_config.hom_idle_no_share == 0 || !pc_isidle_hom(sd)):0): (battle_config.idle_no_autoloot == 0 || DIFF_TICK(last_tick, sd->idletime) < battle_config.idle_no_autoloot)); Usage: - Id: 701 AegisName: Ora_Ora Name: Ora Ora Type: Etc Buy: 55000 Weight: 200 Flags: BuyingStore: true NoAutoLoot: true
  8. added item into inventory didn't recalculate stats, you need to recalculate the stats on weight changed
  9. without checking source code it should be map size x*y player if you enable cell stack config, if map size 512*512 and all cell was walkable cell.
  10. Use this update to clear that warning message https://github.com/rathena/rathena/commit/e2f1bca4010b26d9679fec7f249fe82c1a66e6c3#diff-95ec1891d78e6e9ffc6f68a5eb4803079621e9f9c4a2a43ffc9b70e7bedeb7be
  11. <!-- Messages --> <?php if ($message=$session->getMessage()): ?> <p class="message"><?php echo htmlspecialchars($message) ?></p> <?php endif ?> put these code on header of your template.
  12. just edit the item_db.yml to setup the order of file to read, and remove all Script, EquipScript and UnEquipScript from the file of renewal. Footer: Imports: - Path: db/re/item_db.yml - Path: db/pre-re/item_db.yml - Path: db/import/item_db.yml well converting the yml file to sql then nulling all Script, EquipScript and UnEquipScript and then convert back is easier rather than thinking the use of regex, lazy to test the regex.
  13. from the name of command I assume it was to hide the display of used headgear display, so that strange, it supposed to not send the packet of headgear view id to client, so it should render more faster.. and which / whose mod did you use been searching for that only found these 2 for the script is only for self as for source mod / patch from @Patskie didn't cover the other player on area, it only for it own self, there is nothing I understand in there would make fps drop thought
  14. Here you go ~ https://gist.github.com/Litro/37bd40c7fc6374d6952d976cb8652e39
  15. try putting it before this code and don't forget to recompile. // When tick def not set, reduction is the same for both. if(tick_def == -1) tick_def = sc_def;
  16. when calling function either from npc script or item script, how to get the npc id or item id from the caller example function script TestFunc { // Called from npc? [email protected] = getnpcid(0); // not called from npc? maybe from item? if ([email protected]) getitemid(); message strcharinfo(0), "TestFunc called from "[email protected]+", with arg 0 "+getarg(0); return; } // item 501,Red_Potion,Red Potion,0,10,,70,,,,,0xFFFFFFFF,63,2,,,,,,{ TestFunc(1); },{},{} // script TestFunc(2);
  17. kindly ask what is the purpose of this? afaik char server is only responsible for saving data, as for multi map server is for like other game online where the same map channel, it some scenario is like boss poring is killed in map channel a and not yet on the channel b or so
  18. this patcher isn't included repacking into grf's, there is some ready made lib for grf reader ref : - https://github.com/LiamKarlMitchell/node-grf - https://github.com/herenow/grf-extractor
  19. why don't you make permanent spawn mob type? if you need a label, you can attach it on it too
  20. did you tried to remove the Element type said in skill db yml files? # Element: Skill element. (Default: Neutral) ref for old type db txt: imo it should hold the same method, just make it neutral - Id: 2343 Name: SR_GATEOFHELL Description: Gate of Hell MaxLevel: 10 Type: Weapon TargetType: Attack Range: 7 Hit: Multi_Hit HitCount: -7 Element: Neutral CopyFlags: Skill: Reproduce: true CastCancel: true CastTime: - Level: 1 Time: 1000 - Level: 2 Time: 1200 - Level: 3 Time: 1400 - Level: 4 Time: 1600 - Level: 5 Time: 1800 - Level: 6 Time: 2000 - Level: 7 Time: 2200 - Level: 8 Time: 2400 - Level: 9 Time: 2600 - Level: 10 Time: 2800 AfterCastActDelay: - Level: 1 Time: 100 - Level: 2 Time: 200 - Level: 3 Time: 300 - Level: 4 Time: 400 - Level: 5 Time: 500 - Level: 6 Time: 600 - Level: 7 Time: 700 - Level: 8 Time: 800 - Level: 9 Time: 900 - Level: 10 Time: 1000 Requires: SpCost: 100 SpiritSphereCost: 2
  21. for now this type of variable storing is good enough if just only 5, but in my case is not god enough, don't store any in char, accout, map registry if you use it for quest, use custom sql db entry and go query it, well for now this is enough just to get the grasp how it worked... OnNPCKillEvent: [email protected] = killedrid; // get the size of array list [email protected] = getarraysize(kList$); // get the index of killed mob, exist or not? [email protected] = inarray(kList$, getmonsterinfo([email protected], MOB_NAME)); // [email protected] retrun -1 if the mon is not exist in the list // [email protected] return index of mob in array list, array index started from 0 if ([email protected] > -1) { // let's try to increase the mob kill count killmobcount[[email protected]]++; } else { // insert new mobid into the list // use [email protected] variable to set it as last entry in array kList$[[email protected]] = getmonsterinfo([email protected], MOB_NAME); // set the kill count to 1 killmobcount[[email protected]] = 1; } end;
  22. put your sprite file that was causing crash here, maybe somebody intereseted in looking into it
  23. When view other players equipment and select costumes, it makes my client crash. But if im wearing those costumes, and view, no problem at all. It only happen on some costumes and headgears. imo that headgears was some BAH (big ass headgears) type like wing or aura that has so huge place or some bad act file for the sprite, so my advice is scrap those headgear or fix it, how to fix it?? sigh.. just scrap it for easy life...
  24. first you need to read script doc to see how the variable type is composed... there is no #@ as valid prefix for a variable... then, to use integer in string type variable you need to "stringify" it idk if that was the correct term.. examples [email protected] = 1; [email protected]_int$ = [email protected]+""; mes [email protected]; // warning ? error?? forgot what will pop up by this mes [email protected]_int$; // ok! mes [email protected]+""; // ok! OnNPCKilledEvent: [email protected] = killedrid; // using combination? // the original variable should be like ".mob1002_killcount" for Poring. [email protected]_int = getd(".mob"[email protected]+"_killcount"); // setting the value into it set getd(".mob"[email protected]+"_killcount"), [email protected]_int +1; end;
  25. the project is so huge, why not move it in single file (autopilot.cpp??) instead of put it on unit.cpp ?
×
×
  • Create New...

Important Information

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