Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/13/23 in Posts

  1. I thought about it, maybe it would be good to add MD_TELEPORTBLOCK, too. Since some mobs tend to teleport. For anyone interested, I also applied the changes mentioned above here for a final version: - script MVP_EVENT FAKE_NPC,{ OnInit: // Mobinfo .mob = 1159; .map$ = "morocc"; .x = 154; .y = 92; .respawn_time = 15; // Respawntime in minutes .percent = 10; // Item drop every x hp percent. // <x, y>.. setarray(.path, 158, 87, 162, 90, 166, 87, 161, 91, 156, 90); // Dropiteminfo .item = 7959; .repetition = 5; // How often the item drops per x hp percent .stack_size = 5; // Stacksize per drop // CONFIG END // .move_count = getarraysize(.path) - 2; OnSpawn: monster(.map$, .x, .y, strmobinfo(1, .mob), .mob, 1); .gid = $@mobid[0]; setunitdata(.gid, UMOB_DMOTION, 0); setunitdata(.gid, UMOB_MODE, MD_CANMOVE | MD_NORANDOMWALK | MD_MVP | MD_KNOCKBACKIMMUNE | MD_STATUSIMMUNE | MD_TELEPORTBLOCK); .curr_pointer = -2; donpcevent("MVP_EVENT::OnDestinationReached"); .@next_drop_percent = 100 - .percent; .@last_hp_percent = 100; freeloop(1); while(unitexists(.gid)) { getunitdata(.gid, .@mvp_data); .@curr_hp_percent = .@mvp_data[UMOB_HP] * 100 / .@mvp_data[UMOB_MAXHP]; if(.@curr_hp_percent == .@last_hp_percent) { sleep(500); continue; } if(.@curr_hp_percent > .@last_hp_percent) .@next_drop_percent = (.@curr_hp_percent / .percent) * .percent; .@last_hp_percent = .@curr_hp_percent; if(.@next_drop_percent >= .@curr_hp_percent) { donpcevent("MVP_EVENT::OnDrop"); .@next_drop_percent -= .percent; } sleep(500); } freeloop(0); sleep(1000 * 60 * .respawn_time); donpcevent("MVP_EVENT::OnSpawn"); end; OnDrop: for(.@i = 0; .@i < .repetition; .@i++) { getunitdata(.gid, .@mvp_data); makeitem(.item, .stack_size, mapid2name(.@mvp_data[UMOB_MAPID]), .@mvp_data[UMOB_X] + rand(-1, 1), .@mvp_data[UMOB_Y] + rand(-1, 1), 1); } end; OnDestinationReached: if(!unitexists(.gid)) end; if(.move_count == .curr_pointer) .curr_pointer = 0; else .curr_pointer += 2; unitwalk(.gid, .path[.curr_pointer], .path[.curr_pointer + 1], "MVP_EVENT::OnDestinationReached"); end; }
    2 points
  2. - script MVP_EVENT FAKE_NPC,{ OnInit: // Mobinfo .mob = 1159; .map$ = "morocc"; .x = 154; .y = 92; .respawn_time = 15; // Respawntime in minutes .percent = 10; // Item drop every x hp percent. // <x, y>.. setarray(.path, 158, 87, 162, 90, 166, 87, 161, 91, 156, 90); // Dropiteminfo .item = 7959; .repetition = 5; // How often the item drops per x hp percent .stack_size = 5; // Stacksize per drop // CONFIG END // .move_count = getarraysize(.path) - 2; OnSpawn: monster(.map$, .x, .y, strmobinfo(1, .mob), .mob, 1); .gid = $@mobid[0]; .curr_pointer = -2; donpcevent("MVP_EVENT::OnDestinationReached"); .@next_drop_percent = 100 - .percent; .@last_hp_percent = 100; freeloop(1); while(unitexists(.gid)) { getunitdata(.gid, .@mvp_data); .@curr_hp_percent = .@mvp_data[UMOB_HP] * 100 / .@mvp_data[UMOB_MAXHP]; if(.@curr_hp_percent == .@last_hp_percent) { sleep(500); continue; } if(.@curr_hp_percent > .@last_hp_percent) .@next_drop_percent = (.@curr_hp_percent / .percent) * .percent; .@last_hp_percent = .@curr_hp_percent; if(.@next_drop_percent >= .@curr_hp_percent) { donpcevent("MVP_EVENT::OnDrop"); .@next_drop_percent -= .percent; } sleep(500); } freeloop(0); sleep(1000 * 60 * .respawn_time); donpcevent("MVP_EVENT::OnSpawn"); end; OnDrop: for(.@i = 0; .@i < .repetition; .@i++) { getunitdata(.gid, .@mvp_data); makeitem(.item, .stack_size, mapid2name(.@mvp_data[UMOB_MAPID]), .@mvp_data[UMOB_X] + rand(-1, 1), .@mvp_data[UMOB_Y] + rand(-1, 1), 1); } end; OnDestinationReached: if(!unitexists(.gid)) end; if(.move_count == .curr_pointer) .curr_pointer = 0; else .curr_pointer += 2; unitwalk(.gid, .path[.curr_pointer], .path[.curr_pointer + 1], "MVP_EVENT::OnDestinationReached"); end; } This will make the mob move and allows configuring how often an item is dropped per percent threshold and how often the item is stacked. The movement is sadly a bit limited. You will have to set several waypoints, for the mob to follow, and the mob will stop permanently when attacked. I didn't find a fix for the problem of stopping, so I will leave it like this. Maybe someone else can help you fix this issue.
    2 points
  3. You use an outdated version of rathena. You need to change: makeitem(.item, .stack_size, mapid2name(.@mvp_data[UMOB_MAPID]), .@mvp_data[UMOB_X] + rand(-1, 1), .@mvp_data[UMOB_Y] + rand(-1, 1), 1); to makeitem(.item, .stack_size, mapid2name(.@mvp_data[UMOB_MAPID]), .@mvp_data[UMOB_X] + rand(-1, 1), .@mvp_data[UMOB_Y] + rand(-1, 1));
    1 point
  4. u can edit the sonic blow actdelay or anything else depends on you.
    1 point
  5. If u don't find another way u can add a check if target has equipped the item and then block Knockback but not for specified skill. Therefore u have to src mod it. https://github.com/rathena/rathena/blob/master/src/map/skill.cpp#L3062 Rynbef~
    1 point
  6. HAHAHAHA bro thank you very very much . It's such a great help. Deeply appreciated it. Now I can update my server. Thanks again, sir!
    1 point
  7. I think he will only disable knockback of Magnum break when the item is equipped. Not for the other 40+ skills. U may need src modification. Rynbef~
    1 point
  8. When you know how to apply the bonus to ignore knockback to an item via the item db what is your problem? I mean, when you put bonus bNoKnockback; in the script section of an item, it automatically enables the effect as long as you have the item equipped and removes it when you unequip the item. So basically what you are asking for is the default behavior? You could also just check an item that applies bonus bNoKnockback; and use it as a reference for your item. For example, this one: - Id: 20730 AegisName: Loyalists_Hood Name: Loyalists Hood Type: Armor Buy: 10 Weight: 200 Defense: 30 Slots: 1 Locations: Garment: true ArmorLevel: 1 EquipLevelMin: 80 Script: | bonus bStr,2; bonus bMaxHPrate,10; bonus bNoKnockback; bonus2 bSubEle,Ele_All,-20;
    1 point
  9. Sorry for my English, I'm using google translator! At the beginning of the year I started "working" on upscaling the ragnarok sprites. The method consists of using a tool to upscale the image and after making some changes in the ACT to play this image into the game. The result made me happy, I like the way it looks... There are people who don't like it and that's okay. From the beginning I faced some problems with the "compatibility" of the sprites, which cause anomalies in the client's HUD, we tried some solutions and, unfortunately, we could not REALLY solve the problem. I came to share with you the solution we adopted, in the future I hope to be able to make this work the way I would like. I'll leave the upscale I made in the game's base classes, so you can see the result better. https://www.mediafire.com/file/9srbjuf2fj7in8o/1-1_Class_MilleniumUpscale.zip/file these are some of the problems we encountered this diff basically removes the display of sprites in skill and equipment tabs this is the solution that was provided by @Secret (thanks for that) A possible solution would be to modify the default display frame from frame 0 to a higher number (frame 200, for example). But this requires knowledge of hex and I don't know how to do it Warp hide sprites.rar For those who have doubts about how to upscale, in this video I teach how I do it, I don't know if it's the best way, but I do it like this.
    1 point
  10. Since everything is hosted locally I was able to resolve this by adding an option in sql.ccp to disable ssl. Sql* Sql_Malloc(void) { Sql* self; CREATE(self, Sql, 1); mysql_init(&self->handle); StringBuf_Init(&self->buf); self->lengths = NULL; self->result = NULL; self->keepalive = INVALID_TIMER; my_bool reconnect = 1; int sslmode = 1; mysql_options(&self->handle, MYSQL_OPT_RECONNECT, &reconnect); mysql_options(&self->handle, MYSQL_OPT_SSL_MODE, &sslmode); return self; }
    1 point
  11. @rans Try to open your "data.grf" with GRF Editor and press "Ctrl+Alt+S". It helped me with opening new GRF in "GRF Tool".
    1 point
×
×
  • Create New...