Tokei

Members
  • Content Count

    460
  • Avg. Content Per Day

    0
  • Joined

  • Last visited

  • Days Won

    48

Tokei last won the day on October 4

Tokei had the most liked content!

Community Reputation

382 Excellent

About Tokei

  • Rank
    Metaling

Profile Information

  • Gender
    Male
  • Location
    Canada

Recent Profile Visitors

11,277 profile views
  1. The "cps.dll" string is there twice in the client executable, the tool only expects one. So you need to change one of them manually before using the tool, or you can just keep cps.dll as the name of the file.
  2. You are trying to open the file as a GRF, that will cause you errors. You have to open an already existing GRF or make a new one, then add the iteminfo and click on it to decompile it. It's a GRF tool, it's able to read and decompile lub files as a preview feature, but it's not its main purpose.
  3. Updated GRF Editor to version 1.8.3.4: Added support for RSM2 files and the new RSW format. You are missing .net 3.5 and 4.0, most likely.
  4. @AshiHanna When you replace a sprite, you can select multiple files, which will replace multiple sprites.
  5. Heya, As of 1.8.3.3, GRF Editor now has a Dark Theme available. You can choose the theme from Tools > Settings > General > Theme.
  6. Hmm, well you can copy the action with Alt-C and Alt-V. Or you can use Animation > Rotation copy from bottom left to bottom, depending on how you work with the file.
  7. Hmm, I'm not sure I understand what you mean. What do you want to copy to the other actions?
  8. It's just "Mirror": act[0, 0, 0].Mirror = true;
  9. Well, this adds a flat 80 hit to all players and enemies. While yes, it does help with your initial issue, it also makes flee builds a lot less worthwhile (it gives a free Phreeoni card to everyone). If that works out for you, then that's up to you...! Although it seems to me your biggest concern is the flee bonus that the higher level monsters get. Why not simply remove that instead? // Flee stat = status->flee; stat += level + status->agi + (bl->type == BL_MER ? 0 : bl->type == BL_PC ? status->luk / 5 : 0) + 100; //base level + ( every 1 agi = +1 flee ) + (every 5 luk = +1 flee) + 100 status->flee = cap_value(stat, 1, SHRT_MAX); to // Flee stat = status->flee; stat += (bl->type == BL_MOB ? 0 : level) + status->agi + (bl->type == BL_MER ? 0 : bl->type == BL_PC ? status->luk / 5 : 0) + 100; //base level + ( every 1 agi = +1 flee ) + (every 5 luk = +1 flee) + 100 status->flee = cap_value(stat, 1, SHRT_MAX);
  10. Heya, Well, the function that determines whether you hit or miss the target is is_attack_hitting in battle.cpp. This is purely based on the hit vs flee between you and the target though. Mobs with higher levels have more flee because of the formula they use (in status.cpp): // Flee stat = status->flee; stat += level + status->agi + (bl->type == BL_MER ? 0 : bl->type == BL_PC ? status->luk / 5 : 0) + 100; //base level + ( every 1 agi = +1 flee ) + (every 5 luk = +1 flee) + 100 status->flee = cap_value(stat, 1, SHRT_MAX); What you're asking for doesn't really fit well with the current system though.
  11. Heya, This is possible, but it usually means the solution/algoritm you're trying to use is the wrong one to start with. That aside, you can use something similar to: duplicate "prontera", 154, 182, 4, "SourceNPC", "DuplicatedNPC", 77; And you'll have to do the changes below: diff --git a/src/map/npc.hpp b/src/map/npc.hpp index 0ce0c96a0..ffde62587 100644 --- a/src/map/npc.hpp +++ b/src/map/npc.hpp @@ -1219,6 +1219,7 @@ void do_clear_npc(void); void do_final_npc(void); void do_init_npc(void); void npc_event_do_oninit(void); +const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath); int npc_event_do(const char* name); int npc_event_do_id(const char* name, int rid); diff --git a/src/map/script.cpp b/src/map/script.cpp index 604274ecd..9da5d4690 100644 --- a/src/map/script.cpp +++ b/src/map/script.cpp @@ -24548,6 +24548,38 @@ BUILDIN_FUNC(preg_match) { #endif } +BUILDIN_FUNC(duplicate) +{ + const char *map = script_getstr(st,2); + int x = script_getnum(st,3); + int y = script_getnum(st,4); + int dir = script_getnum(st,5); + const char *duplicate_name = script_getstr(st,6); + const char *npc_name = script_getstr(st,7); + char w1[2048], w2[2048], w3[2048], w4[2048], p[2048]; + int view_id = script_getnum(st,8); + struct npc_data* nd = map_id2nd(st->oid); + + if (!nd) { + return SCRIPT_CMD_FAILURE; + } + + sprintf(w1, "%s,%d,%d,%d", map, x, y, dir); + sprintf(w2, "duplicate(%s)", duplicate_name); + sprintf(w3, "%s", npc_name); + + if (script_hasdata(st,9) && script_hasdata(st,10)) { + sprintf(w4, "%d,%d,%d", view_id, script_getnum(st,9), script_getnum(st,10)); + } + else { + sprintf(w4, "%d", view_id); + } + + sprintf(p, "%s\t%s\t%s\t%s", w1, w2, w3, w4); + npc_parse_duplicate(w1,w2,w3,w4, p, p, nd->path); + return SCRIPT_CMD_SUCCESS; +} + /// script command definitions /// for an explanation on args, see add_buildin_func struct script_function buildin_func[] = { @@ -25170,6 +25202,8 @@ struct script_function buildin_func[] = { BUILDIN_DEF(achievement_condition,"i"), BUILDIN_DEF(getvariableofinstance,"ri"), BUILDIN_DEF(convertpcinfo,"vi"), + + BUILDIN_DEF(duplicate,"siiissi??"), #include "../custom/script_def.inc" {NULL,NULL,NULL},
  12. 123.jpg

    Pretty sure the script is right, but either way before i used to be able to test it but all i get is this error 

  13. That means you tried to use the close command when there was no text being displayed (from the mes command). I... don't know what NPC this is, but you'll want to change that "close" for "end" instead.
  14. Heya, The job names are hard-coded in the client executable. You'll have to open an hex editor and then search for "Gunslinger".
  15. Yes, when you "receive" the item in your inventory, the button will display properly because it uses the clif_additem packet. I meant how you receive the item information packet-wise, not the source of where it came from (though that's related of course). As for why 20285 shows up and 20286 doesn't, that is because 20285 has a hat effect and these are not displayed on the client with the feature. You can remove the item from the list by opening hateffectinfo.lub and then removing the ids from effectHatItemTable. It's probably best to keep the button disabled for that one though.