Jump to content

Litro Endemic

Members
  • Posts

    283
  • Joined

  • Days Won

    10

Everything posted by Litro Endemic

  1. put your sprite file that was causing crash here, maybe somebody intereseted in looking into it
  2. 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...
  3. 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 .@int = 1; .@string_int$ = .@int+""; mes .@int; // warning ? error?? forgot what will pop up by this mes .@string_int$; // ok! mes .@int+""; // ok! OnNPCKilledEvent: .@mobid = killedrid; // using combination? // the original variable should be like ".mob1002_killcount" for Poring. .@data_int = getd(".mob"+.@mobid+"_killcount"); // setting the value into it set getd(".mob"+.@mobid+"_killcount"), .@data_int +1; end;
  4. the project is so huge, why not move it in single file (autopilot.cpp??) instead of put it on unit.cpp ?
  5. you can read it on this thread https://herc.ws/board/topic/1101-4slotted-weapon2slotted-shield/
  6. 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"
  7. 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
  8. 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 .@rate = 5; .@s = (NextBaseExp * .@rate) / 100; getexp2 .@s,0; .@rate = 5; .@s = ((NextBaseExp - BaseExp) * .@rate) / 100; getexp2 .@s,0;
  9. 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; .@inlist = inarray(.moblist[0], killedrid); if (.@inlist == -1) end; .@npcid = getelementofarray(getvariableofnpc(.tombid, "TheTomb"), .@inlist); debugmes "npcid: "+.@npcid; getunitdata(killedgid, .@md); setunitdata(.@npcid, UNPC_MAPID, .@md[UMOB_MAPID]); setunitdata(.@npcid, UNPC_X, .@md[UMOB_X]); setunitdata(.@npcid, UNPC_Y, .@md[UMOB_Y]); setunitdata(.@npcid, UNPC_LOOKDIR, 0); end; OnInit: setarray .moblist[0], 1002, 1003, 1004, 1005; .@moblistsize = getarraysize(.moblist); .@tombcount = getvariableofnpc(.tombcount, "TheTomb"); if (.@moblistsize < .@tombcount) { debugmes "The Tomb count isn't match with the mob count in list"; debugmes "Size of Mob List: "+.@moblistsize+", NPC Tomb Count: "+.@tombcount; 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
  10. did you change the npc name?, you need to adjust it then..
  11. 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; .@inlist = inarray(.moblist[0], killedrid); if (.@inlist == -1) end; .@npcid = getelementofarray(getvariableofnpc(.tombid, "TheTomb"), .@inlist); getunitdata(killedgid, .@md); setunitdata(.@npcid, UNPC_MAPID, .@md[UMOB_MAPID]); setunitdata(.@npcid, UNPC_X, .@md[UMOB_X]); setunitdata(.@npcid, UNPC_Y, .@md[UMOB_Y]); setunitdata(.@npcid, UNPC_LOOKDIR, 0); end; OnInit: setarray .moblist[0], 1002, 1003, 1004, 1005; .@moblistsize = getarraysize(.moblist); .@tombcount = getvariableofnpc(.tombcount, "TheTomb"); if (.@moblistsize < .@tombcount) { debugmes "The Tomb count isn't match with the mob count in list"; debugmes "Size of Mob List: "+.@moblistsize+", NPC Tomb Count: "+.@tombcount; 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
  12. please describe the npc behaviour step by step, i don't really understand what you want anymore....
  13. bleed is because a reason (skill), bleed it self has no duration set, all status effect is based on skill data....
  14. the duration is the respective skill that give effect those status, usually it was in Duration1 or Duration2 on skill_cast_db.txt
  15. 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
  16. 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 .@reward, 4001, 1; setarray .@item, 512; setarray .@amount, 100; break; case 2: setarray .@reward, 4002, 1; setarray .@item, 501, 502, 503; setarray .@amount, 3, 1, 2; break; default: mes "invalid quest."; close; } mes "Quest Requirement(s):"; .@size = getarraysize(.@item); for (.@i = 0; .@i < .@size; .@i++) { mes " > "+.@amount[.@i]+"x "+getitemname(.@item[.@i]); if (countitem(.@item[.@i]) < .@amount[.@i]) .@fail++; } if (!.@fail) { next; if (select("Submit Quest", "Cancel") == 1) { for (.@i = 0; .@i < .@size; .@i++) delitem .@item[.@i], .@amount[.@i]; getitem .@reward[0], .@reward[1]; quest_random = 0; // Set next day limitation to take the quest. quest_random_next = gettime(DT_DAYOFYEAR); } } close; }
  17. 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.
  18. try use skill_castnodex_db.txt file in db folder
  19. 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
  20. is renewal mode activated? if yes disable renewal mode, pre-re give more atk iirc
  21. 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
  22. 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... .@gid = getcharid(3); //.@gid = $@mobid[0]; //.@gid = killerrid; //.@gid = killergid; specialeffect3 EF_HIT1,AREA,.@gid;
  23. 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 .@reward, 4001, 1; setarray .@item, 512; setarray .@amount, 100; break; case 2: setarray .@reward, 4002, 1; setarray .@item, 501, 502, 503; setarray .@amount, 3, 1, 2; break; default: mes "invalid quest."; close; } mes "Quest Requirement(s):"; .@size = getarraysize(.@item); for (.@i = 0; .@i < .@size; .@i++) { mes " > "+.@amount[.@i]+"x "+getitemname(.@item[.@i]); if (countitem(.@item[.@i]) < .@amount[.@i]) .@fail++; } if (!.@fail) { next; if (select("Submit Quest", "Cancel") == 1) { for (.@i = 0; .@i < .@size; .@i++) delitem .@item[.@i], .@amount[.@i]; getitem .@reward[0], .@reward[1]; quest_random = 0; // Set next day limitation to take the quest. quest_random_next = gettime(DT_DAYOFYEAR); } } close; } you can try this
×
×
  • Create New...