Jump to content

Litro Endemic

Members
  • Posts

    255
  • Joined

  • Days Won

    9

Everything posted by Litro Endemic

  1. you can read it on this thread https://herc.ws/board/topic/1101-4slotted-weapon2slotted-shield/
  2. short answer: no, because client limitation!, or you can make mod by using vending system, google this word "Selling Refined Item by NPC as Vending List"
  3. i don't really see your direction of script but 2 dimensional array is not supported by script engine, use setd, getd or explode, implode https://lmgtfy.com/?q=rathena+2d+array
  4. According script doc BaseExp - Amount of base experience points. JobExp - Amount of job experience points. NextBaseExp - Amount of base experience points needed to reach the next level. NextJobExp - Amount of job experience points needed to reach the next level. since i didn't test it on game, i am not sure if NextBaseExp is full amount or has been reduced by BaseExp, if not reduced use the first one, if reduced use the 2nd one [email protected] = 5; [email protected] = (NextBaseExp * [email protected]) / 100; getexp2 [email protected],0; [email protected] = 5; [email protected] = ((NextBaseExp - BaseExp) * [email protected]) / 100; getexp2 [email protected],0;
  5. yep, you are right the script crashed my test server, because the duplicate tomb is floating type npc, tested and worked... not entirely like tomb per see, because when the scenario 2 player killing same mob id from the list mob, the npc will move to the last killed mob ex: player a killed poring (1002) on prontera 150 150, then npc will spawned there, then after 10 seconds, player B kill poring (1002) too on prontera 180 180, the npc that spwaned after player A killed poring will move to player B killed poring you need many duplicate npc, to match exact number of your amount spawned mobs, or with src mod will be more easier btw here the tested script - script Main NPC -1,{ end; OnNPCKillEvent: if (.state != 1) end; [email protected] = inarray(.moblist[0], killedrid); if ([email protected] == -1) end; [email protected] = getelementofarray(getvariableofnpc(.tombid, "TheTomb"), [email protected]); debugmes "npcid: "[email protected]; getunitdata(killedgid, [email protected]); setunitdata([email protected], UNPC_MAPID, [email protected][UMOB_MAPID]); setunitdata([email protected], UNPC_X, [email protected][UMOB_X]); setunitdata([email protected], UNPC_Y, [email protected][UMOB_Y]); setunitdata([email protected], UNPC_LOOKDIR, 0); end; OnInit: setarray .moblist[0], 1002, 1003, 1004, 1005; [email protected] = getarraysize(.moblist); [email protected] = getvariableofnpc(.tombcount, "TheTomb"); if ([email protected] < [email protected]) { debugmes "The Tomb count isn't match with the mob count in list"; debugmes "Size of Mob List: "[email protected]+", NPC Tomb Count: "[email protected]; end; } .state = 1; end; } - script TheTomb -1,{ end; OnInit: if (strnpcinfo(2) == "") end; .tombcount++; .tombid[.tombcount-1] = getnpcid(0); end; } prontera,0,0,0 duplicate(TheTomb) Tomb#1 112 prontera,0,0,0 duplicate(TheTomb) Tomb#2 112 prontera,0,0,0 duplicate(TheTomb) Tomb#3 112 prontera,0,0,0 duplicate(TheTomb) Tomb#4 112
  6. did you change the npc name?, you need to adjust it then..
  7. untested script... you can try it and if you encounter error i will help as i can and want. set your list of mob that you want to trigger tomb alike npc in array variable ".moblist" and make duplicate of TheTomb npc as much as ".moblist" count. - script Main NPC -1,{ end; OnNPCKillEvent: if (.state != 1) end; [email protected] = inarray(.moblist[0], killedrid); if ([email protected] == -1) end; [email protected] = getelementofarray(getvariableofnpc(.tombid, "TheTomb"), [email protected]); getunitdata(killedgid, [email protected]); setunitdata([email protected], UNPC_MAPID, [email protected][UMOB_MAPID]); setunitdata([email protected], UNPC_X, [email protected][UMOB_X]); setunitdata([email protected], UNPC_Y, [email protected][UMOB_Y]); setunitdata([email protected], UNPC_LOOKDIR, 0); end; OnInit: setarray .moblist[0], 1002, 1003, 1004, 1005; [email protected] = getarraysize(.moblist); [email protected] = getvariableofnpc(.tombcount, "TheTomb"); if ([email protected] < [email protected]) { debugmes "The Tomb count isn't match with the mob count in list"; debugmes "Size of Mob List: "[email protected]+", NPC Tomb Count: "[email protected]; end; } .state = 1; end; } - script TheTomb -1,{ end; OnInit: if (strnpcinfo(2) == "") end; .tombcount++; .tombid[.tombcount-1] = getnpcid(); end; } - duplicate(TheTomb) Tomb#1 112 - duplicate(TheTomb) Tomb#2 112 - duplicate(TheTomb) Tomb#3 112 - duplicate(TheTomb) Tomb#4 112
  8. please describe the npc behaviour step by step, i don't really understand what you want anymore....
  9. bleed is because a reason (skill), bleed it self has no duration set, all status effect is based on skill data....
  10. the duration is the respective skill that give effect those status, usually it was in Duration1 or Duration2 on skill_cast_db.txt
  11. https://irowiki.org/wiki/Death_Bound, sc->data[SC_DEATHBOUND]->val2 this thing is what make it hurt case SC_DEATHBOUND: val2 = 500 + 100 * val1; break; tips: for overall balancing check out Rytech 3CeAM v1, idk if he remove it on current v2 he kind of having formula that holding off high max level server like yours
  12. you want 24 hours delay or every day reset at 6 AM ? prontera,155,181,5 script Sample 4_F_KAFRA1,{ if (!quest_random) { // today quest has been, completed. if (quest_random_next <= gettime(DT_DAYOFYEAR)) { mes "you have completed today quest, come again tomorrow, thank you!"; close; } // its new day after the last quest submission, but yet 06 am today. if (quest_random_next > gettime(DT_DAYOFYEAR) && gettime(DT_HOUR) < 6) { mes "new quest will be available at 06 AM today"; close; } quest_random = rand(1, 2); mes "You have been assigned with a new quest."; next; } switch(quest_random) { case 1: setarray [email protected], 4001, 1; setarray [email protected], 512; setarray [email protected], 100; break; case 2: setarray [email protected], 4002, 1; setarray [email protected], 501, 502, 503; setarray [email protected], 3, 1, 2; break; default: mes "invalid quest."; close; } mes "Quest Requirement(s):"; [email protected] = getarraysize([email protected]); for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) { mes " > "[email protected][[email protected]]+"x "+getitemname([email protected][[email protected]]); if (countitem([email protected][[email protected]]) < [email protected][[email protected]]) [email protected]++; } if ([email protected]) { next; if (select("Submit Quest", "Cancel") == 1) { for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) delitem [email protected][[email protected]], [email protected][[email protected]]; getitem [email protected][0], [email protected][1]; quest_random = 0; // Set next day limitation to take the quest. quest_random_next = gettime(DT_DAYOFYEAR); } } close; }
  13. lower the multiply number in the formula, this is form server 250 that was configured by me in the past, i forgot how do i calculate it, usually i just put debug info to show the output tick and playing with the stats, to grasp the info needed... case SC_VACUUM_EXTREME: tick_def2 = (sd ? sd->status.str : status_get_base_status(bl)->str) * 36; break; example of debug code case SC_VACUUM_EXTREME: tick_def2 = (sd ? sd->status.str : status_get_base_status(bl)->str) * 36; ShowDebug("SC_VACUUM_EXTREME: tick_def2: %d \n", tick_def2); break; it will appear as debug info on map server console, output value will be in milliseconds. update 1: Additional info, base duration by skill level is in skill_cast_db.txt if you not yet updated to the yaml or latest commit 2453,1000:1500:2000:2500:3000,1000,0,4000:6000:8000:10000:12000,2000,5000,-1 compare it to the info from iro wiki https://irowiki.org/wiki/Extreme_Vacuum formula: base duration - (target base str / 20) at skill level 5: 12 seconds = 12000 ms = 100% base duration, currently max stats is 130, if str is maxed 130 / 20 = 6.5 seconds, the formula in src rathena is converted to the milliseconds as tick measurement which still has the same result: 130 * 50 = 6500 ms (6.5s), now to adjust it to your need do your math here 12000 - (180 * ??) = 0 ms, 12000 - (100 * ??) = 6 s / 6000 ms. well looking at it the need of 180 str and 100 str is not dynamic, so you need switch case or if, better to adjust it to 200 or 90 to get 6s and so, that would get you dynamic formula tick_def2 = (sd ? (cap_value(sd->status.str, 1, 180) * 66 + 120): status_get_base_status(bl)->str * 50); put cap so it wouldn't be overflowed to negative tick... well you can mod it as you please based on this.
  14. try use skill_castnodex_db.txt file in db folder
  15. yes there is, just inverse the atk calc on renewal part since you want only atk stats part but that would give you more headache... or you can try only turn off setting below, to use all pre-re stats calc while enabling renewal feature, /// Renewal stat calculations /// (disable by commenting the line) /// /// Leave this line to enable renewal calculation for increasing status/parameter points #define RENEWAL_STAT
  16. is renewal mode activated? if yes disable renewal mode, pre-re give more atk iirc
  17. for storage is fine, but for autopot with param it will cause problem, did thread starter using autopot command by script or src mod? and i think you got other misunderstanding your request, imo you want to make the autopot (process) will not active in some maps, not the usage of the autopot command, because even the autopot command is disabled in inside map, they can use it outside map, and the process of autopot is being activated and working as usual.. if you use https://github.com/rathena/rathena/blob/master/npc/custom/etc/autopot.txt < this script add the condition check under OnStart Label
  18. you can try this... src\custom\script.inc BUILDIN_FUNC(specialeffect3) { struct block_list *bl = NULL; int id = 0; int type = script_getnum(st,2); enum send_target target = script_hasdata(st,3) ? (send_target)script_getnum(st,3) : AREA; if (script_hasdata(st,4)) { id = script_getnum(st,4); bl = map_id2bl(id); } else { bl = st->rid ? map_id2bl(st->rid) : map_id2bl(st->oid); } if(bl == NULL) return SCRIPT_CMD_SUCCESS; if( type <= EF_NONE || type >= EF_MAX ){ ShowError( "buildin_specialeffect: unsupported effect id %d\n", type ); return SCRIPT_CMD_FAILURE; } if (target == SELF) { TBL_PC *sd; if (script_rid2sd(sd)) clif_specialeffect_single(bl,type,sd->fd); } else { clif_specialeffect(bl, type, target); } return SCRIPT_CMD_SUCCESS; } src\custom\script_def.inc BUILDIN_DEF(specialeffect3,"i??"), usage example // GID examples... [email protected] = getcharid(3); //[email protected] = [email protected][0]; //[email protected] = killerrid; //[email protected] = killergid; specialeffect3 EF_HIT1,AREA,[email protected];
  19. prontera,155,181,5 script Sample 4_F_KAFRA1,{ if (!quest_random) { // quest not taken or completed, check the date and time. if (quest_random_next <= gettime(DT_DAYOFYEAR) && gettime(DT_HOUR) < 6) { mes "you have completed today quest, come again tomorrow, thank you!"; close; } quest_random = rand(1, 2); mes "You have been assigned with a new quest."; next; } switch(quest_random) { case 1: setarray [email protected], 4001, 1; setarray [email protected], 512; setarray [email protected], 100; break; case 2: setarray [email protected], 4002, 1; setarray [email protected], 501, 502, 503; setarray [email protected], 3, 1, 2; break; default: mes "invalid quest."; close; } mes "Quest Requirement(s):"; [email protected] = getarraysize([email protected]); for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) { mes " > "[email protected][[email protected]]+"x "+getitemname([email protected][[email protected]]); if (countitem([email protected][[email protected]]) < [email protected][[email protected]]) [email protected]++; } if ([email protected]) { next; if (select("Submit Quest", "Cancel") == 1) { for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) delitem [email protected][[email protected]], [email protected][[email protected]]; getitem [email protected][0], [email protected][1]; quest_random = 0; // Set next day limitation to take the quest. quest_random_next = gettime(DT_DAYOFYEAR); } } close; } you can try this
  20. isn't this ghost script ? why you didn't use latest one, this is one of popular script beside pvp announcer of miss annie. i can't think the exact reason why it isn't firing the announcement... but looking at the code for(set [email protected], 0; [email protected] < (getarraysize(.PvPMap$) - 1); set [email protected], [email protected] + 1){ say you have 3 map listed, it will only check 2 of 3, so in your case of you only have one map to check so it didn't even do the job because size is 1 -1 = 0, imo it should fall through to the next line of code and the announcer will still come out, but well indeed it strange... try use the latest script or fix / change that line above into for(set [email protected], 0; [email protected] < getarraysize(.PvPMap$); set [email protected], [email protected] + 1){ or add dummy map name for the array of pvpmap, just for the sake of it setarray .PvPMap$, "dummy","guild_vs3"; //List all pvp maps here (Index 0:"All" to enable all maps) ghost script i found in the forum search
  21. this will need extra src, you can take src code of mobsearch or showmobs command, to make it compatible for your use with map name <> mob id match as query, you need to adjust the code for the map name.
  22. it's was showed there "its trying to read what isn't there", well untested code, you can try this one, untested too, but should be ok in : src/map/pc.cpp bool pc_authok(struct map_session_data *sd, uint32 login_id2, time_t expiration_time, int group_id, struct mmo_charstatus *st, bool changing_mapservers) find: // Request all registries (auth is considered completed whence they arrive) intif_request_registry(sd,7); return true; its where the registry loaded, so after this you can take the state of acc protect from registry change: // Request all registries (auth is considered completed whence they arrive) intif_request_registry(sd,7); if( pc_readaccountreg(sd, add_str("#BLOCKPASS")) > 0 ) sd->state.protection_acc = 1; return true;
  23. you need to save the value of protection_acc on somewhere (mysql?) so you didn't lost it when log off or changing character. on pc.cpp void pc_setnewpc(struct map_session_data *sd, uint32 account_id, uint32 char_id, int login_id1, t_tick client_tick, int sex, int fd) { add if( pc_readaccountreg(sd, add_str("#BLOCKPASS")) > 0 ) sd->state.protection_acc = 1; after //Required to prevent homunculus copuing a base speed of 0. sd->battle_status.speed = sd->base_status.speed = DEFAULT_WALK_SPEED; untested...
×
×
  • Create New...

Important Information

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