-
Posts
283 -
Joined
-
Days Won
10
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by Litro Endemic
-
-
Yes, its possible, I still have old master goddameit mod patch from that can be used as reference, well it need adjustment to be usable.
-
- script kickmap_guild#template -1,{ end; OnInit: .map$ = "prt_fild07"; setmapflag .map$, mf_loadevent; // fallthrough as first check upon script loaded OnTimer5000: // next timer after ini will run on 5 seconds after if (strnpcinfo(2) == "template") { // only this npc with hidden name "template" will do the timer .@gid = getcastledata("prtg_cas01", CD_GUILD_ID); .@num = getmapunits(BL_PC, .map$, .@name$[0]); freeloop(1); for (.@i = 0; .@i < .@num;.@i++) { if (getcharid(2, .@name$[.@i]) == .@gid) // still on the guild? skip it. continue; message .@name$[.@i], "YOU ARE NO LONGER WELCOME HERE, YOU WILL BE WARPED TO WHERE YOU BELONG!!!!"; warp "SavePoint", 0, 0, getcharid(0, .@name$[.@i]); } freeloop(0); initnpctimer; // reinit the timer tick } end; OnAgitStart: OnAgitStart2: OnAgitStart3: if (!agitcheck() && !agitcheck2() && !agitcheck3()) end; .@num = getmapunits(BL_PC, .map$, .@name$[0]); freeloop(1); for (.@i = 0; .@i < .@num;.@i++) { message .@name$[.@i], "Agit event has been started, You will be warped to Save Point"; warp "SavePoint", 0, 0, getcharid(0, .@name$[.@i]); } freeloop(0); end; OnPCLoadMapEvent: if (strcharinfo(3) != .map$) end; if (agitcheck() || agitcheck2() || agitcheck3()) end; .@gid = getcastledata("prtg_cas01", CD_GUILD_ID); if (getcharid(2) != .@gid) { mes "YOU ARE NOT ALLOWED HERE, GO BACK!!!!"; next; warp "SavePoint", 0, 0; } end; }
I am leaving some comment for you there well take a look and improvise as you need.
-
17 hours ago, AinsLord said:
FIXED
it really need this line
else { addtimer (.interval * 1000), strnpcinfo(0)+"::OnPCLoadMapEvent"; }
if i remove that line if the agit event is inactive and guildmember inside the map leaves the guild
that player will stay inside the map
with that line inactive agit and player inside the map will be warped back to savepoint
albeit fixed, 1 timer for each guild member will have many timer as many guild member, well.. you can use 1 timer for all npc and its duplicate, just iterate the town array in main npc, 1 timer for all
well it is just about performance and memory resource that will be used on the timer generated, say there will be 3 town for guild town and each its guild have 72 member 72 * 3 timer if all them on townoh and this take 1 timer slot for it
well you can just ignore this if your host server has huge memory -
the problem is on here
.@num = getmapunits(BL_NPC, .map$, .@name$[0]);
it should be BL_PC coz you are looking for player in that map.
.@num = getmapunits(BL_PC, .map$, .@name$[0]);
i made mistake copy paste-ing from script doc without adjusting what needed fully.
if you look on name that used on getcharid like 'prtf017' that would be npc
- 1
-
you can try this, https://gist.github.com/Litro/afd8799bbcc6384ba324e1bc7cbbb5d0
ugh what is wrong with comment editor, I can't use code block feature
-
1 hour ago, Gidz Cross said:
But when i go back to savepoint then re warp to the same map the player 2 ranking will become 2/2 when my account becomes 1/2.
that because current pvp ranking system has it own point rank logic.
suppose there is 2 player A & B currently in pvp map so the flow should go like..
- player A 5 point, rank 2/2 - player B 5 point, rank 2/2 - player A kill player B - player A 6 (5 + 1) point, rank 1/2 - player B 4 (5 - 1) point, rank 2/2 - player B warp out then goes back - player A 6 point, rank 1/2 - player B 5 point, rank 2/2 - player B kill player A - player B 6 (5 + 1) point, rank 1/2 - player A 4 (5 - 1) point, rank 2/2 - player A warp out then goes back - player B 6 point, rank 1/2 - player A 5 point, rank 2/2
anyway you can debug the code, to see the point acquired by player on map.
/*========================================== * Update PVP rank for sd1 in cmp to sd2 *------------------------------------------*/ static int pc_calc_pvprank_sub(struct block_list *bl,va_list ap) { map_session_data *sd1,*sd2; sd1=(map_session_data *)bl; sd2=va_arg(ap,map_session_data *); if( pc_isinvisible(sd1) || pc_isinvisible(sd2) ) {// cannot register pvp rank for hidden GMs return 0; } + ShowDebug("pc_calc_pvprank_sub: player %s (%d:%d) %d pvp point.\n", sd1->status.name, sd1->status.account_id, sd1->status.char_id, sd1->pvp_point); + if( sd1->pvp_point > sd2->pvp_point ) sd2->pvp_rank++; return 0; } /*========================================== * Calculate new rank beetween all present players (map_foreachinallarea) * and display result *------------------------------------------*/ int pc_calc_pvprank(map_session_data *sd) { int old = sd->pvp_rank; struct map_data *mapdata = map_getmapdata(sd->bl.m); + ShowDebug("pc_calc_pvprank: player %s (%d:%d) %d pvp point.\n", sd->status.name, sd->status.account_id, sd->status.char_id, sd->pvp_point); + sd->pvp_rank=1; map_foreachinmap(pc_calc_pvprank_sub,sd->bl.m,BL_PC,sd); if(old!=sd->pvp_rank || sd->pvp_lastusers!=mapdata->users_pvp) clif_pvpset(sd,sd->pvp_rank,sd->pvp_lastusers=mapdata->users_pvp,0); return sd->pvp_rank; }
though its bit weird pvp rank timer is allocated to each player in map instead run like dynamic mob,
i mean the timer attached to map will run when there is player come to map (clif_parse_LoadEndAck ?)
and stop when there is no one in map.albeit it will send 2 times the rank packet (clif_pvpset) when player come to map and timer executed at same time, but it should be no biggie.
Oh or try use client command "/pvpinfo" in each player client to see current point, since rank is based point.
- 1
-
another amazing works, rep up!
-
use the one by llchrisll
-
You could use "OnInstanceDestroy" event label.
-
CMIW it should be your iteminfo lua or lub file that broken that not having, view id entry.
- 1
-
CMIW, if you want to disable that you should modify the client, iirc I have tried to disable that long time ago but failed, so I took another approach disabling code on that responding to packet send client when player clicking menu on that. You can disable the response of that menu on src/map/clif.cpp "clif_parse_Restart"
Then about "automatically add a 10 secs respawn time after player character has been kill" you can increase the tick in code that used on pc_dead in file src/map/pc.cpp
this code would auto respawn the dead in 1 second (1000), you can alter it to your need.
sd->respawn_tid = add_timer(tick + 1000, pc_respawn_timer, sd->bl.id, 0);
-
On 4/11/2023 at 9:27 AM, Racaae said:
Hi
set .@menu$, ""; for (.@i = 0; .@i < getarraysize(.orbs); .@i++) { .@qty = countitem(.orbs[.@i]); if (.@qty) .@menu$ += getitemname(.orbs[.@i])+" x"+.@qty+":"; else .@menu$ += ":"; } if(.@menu$=="") { mes .npc$; mes "Hmm, you don't seem to have any enchantment orbs."; close; } mes .npc$; mes "Please, select an enchantment from the menu."; next; select(.@menu$); set .@itm, .orbs[@menu-1]; OnInit: setarray .orbs, 4702,4712,4722,4732,4742,4752,4767,4834; end;
well it would skip if(.@menu$=="") since the generated string in variable .@menu$ would be like "::::::::" depending of size of the orbs.
set .@menu$, ""; for (.@i = 0; .@i < getarraysize(.orbs); .@i++) { .@qty = countitem(.orbs[.@i]); if (.@qty) { .@avail = 1; .@menu$ += getitemname(.orbs[.@i])+" x"+.@qty+":"; } else .@menu$ += ":"; } if(!.@avail) { mes .npc$; mes "Hmm, you don't seem to have any enchantment orbs."; close; }
- 1
-
What I see from the script code, when player click the npc it will go run script label OnInit to the end thats why NPC is not responding.
You should move up the label OnTalk section. so it will respond.
Also you should replace addtimer on OnInit label with initnpctimer, from what I see your NPC need is timer that not need to be attached to player.
-
The only easy way with 1 random option group id to all equip dropped by monster is to mod the source
diff --git a/conf/battle/feature.conf b/conf/battle/feature.conf index aa08ec4dd..49f9f64ab 100644 --- a/conf/battle/feature.conf +++ b/conf/battle/feature.conf @@ -175,3 +175,9 @@ feature.stylist: on // If this is allowed the "nosave" mapflag is still being respected // and may prevent players from warping back into the instance. //feature.instance_allow_reconnect: yes + +// Default random option group attached to all equipment +// This random option group id will be attached +// If the original drop entry on mob_db.yml +// Do not have RandomOptionGroup entry on it. +feature.default_randomopt_group: 1111
diff --git a/src/map/battle.cpp b/src/map/battle.cpp index 908d67571..1b6f3f030 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -10476,6 +10476,8 @@ static const struct _battle_data { + { "feature.default_randomopt_group", &battle_config.default_randomopt_group, 0, 0, INT_MAX, }, + #include <custom/battle_config_init.inc> };
diff --git a/src/map/battle.hpp b/src/map/battle.hpp index 015249b5d..5b8b1063b 100644 --- a/src/map/battle.hpp +++ b/src/map/battle.hpp @@ -735,6 +735,8 @@ struct Battle_Config + int default_randomopt_group; + #include <custom/battle_config_struct.inc> };
diff --git a/src/map/mob.cpp b/src/map/mob.cpp index a4e73ea5d..b8bee338b 100644 --- a/src/map/mob.cpp +++ b/src/map/mob.cpp @@ -2124,6 +2124,16 @@ void mob_setdropitem_option(item *item, s_mob_drop *mobdrop) { std::shared_ptr<s_random_opt_group> group = random_option_group.find(mobdrop->randomopt_group); + if (group == nullptr && battle_config.default_randomopt_group) { + if (itemdb_isequip(item->nameid)) { + group = random_option_group.find(battle_config.default_randomopt_group); + if (group == nullptr) { + ShowWarning("Battle setting 'feature.default_randomopt_group' is disabled as random option group with id %d is not exist.\n", battle_config.default_randomopt_group); + battle_config.default_randomopt_group = 0; + } + } + } + if (group != nullptr) { group->apply( *item ); }
-
this was new behaviour on client side and hard coded too, what client date ver you use any way? I forgot from which date client sonic blow behaving this way.
iirc some one asking or requested to patch back to the old behaviour on nemo or warp
- 1
-
try using sudo
-
DELETE FROM `achievement` WHERE `achievement`.`id` >= '400000' AND id <= '4000038';
is it me or there is really wrong number in the loop.
concated value become like this:
lower bound 40000+0 = 400.000, then upper bound 40000+38 = 4.000.038- 1
-
yes its possible, just mod it on src side.
-
yes, use script command changelook
-
it will be good to have open source client completed, CMIW like fimbul winter client and some other that become dead project, well it was extensive project and to much for personal project
-
14 hours ago, LuneR said:
I also tried looking at battle.c, but couldn't find any 'roll chance for status' sort of stuff there.
as you copy with addeffect, you should copy it through, addeffect was applied into enemy in skill.c (? did you use rathena old revision) on function `skill_additional_effect`
-
with rAthena commit ac7292c instance system can do this just set the owner instance to IM_NONE and set the time limit of the instance to unlimited in the instance_db.yml
sample entry in instance_db.yml.
- Id: 777 Name: Payon Clone TimeLimit: 0 IdleTimeOut: 0 Enter: Map: payon X: 150 Y: 150
on the script for instance creation
.@instance_name$ = "Prontera Clone"; .@instance_mode = IM_NONE; instance_create(.@instance_name$, .@instance_mode);
- 1
- 1
-
use infinite tick (-1) as tick in sc_start for the blessing, you will not get that cooldown display.
// This will bestow the effect of Level 10 Blessing for 4 minutes. sc_start SC_BLESSING,240000,10; // This will bestow the effect of Level 10 Blessing forever (infinite duration). sc_start SC_BLESSING,-1,10;
- 1
-
use script command getcharip and create array of ip with permanent global variable, later on to check or set delay data, get the index of ip in array of ip with script command inarray if the ip exist you can check the delay data and set or update the delay data time.
if (getarraysize(.Hunter$) >= .MaxPlayers) { mes "Atualmente a Sala está Cheia. Por favor, tente novamente mais tarde."; close; } .@ip$ = getcharip(); .@size = getarraysize($HuntRoomDelayIP$); if ((.@i = inarray($HuntRoomDelayIP$, .@ip$)) == -1) .@i = .@size; else if ($HuntRoomDelay[.@i] > gettimetick(2)) { set .@last, $HuntRoomDelay[.@i] - gettimetick(2); set .@min, .@last % ( 24 * 3600 ) % 3600 / (60); mes "Esperar por ^FF0000"+.@min+" Minutos^000000."; close; } $HuntRoomDelayIP$[.@i] = .@ip$; $HuntRoomDelay[.@i] = gettimetick(2) + ( .DelayMin * 60 ); set .Hunter$[getarraysize( .Hunter$ )],strcharinfo(0); set #FarmHunt,0; warp .Map$,0,0; end;
Healing item with heal per second.
in Script Requests
Posted
SC_S_LIFEPOTION (EFST_S_LIFEPOTION) desc: Increase HP each interval val1: if < 0 will be percentage. If > 0 is fixed HP heal value val2: Interval per seconds SC_L_LIFEPOTION (EFST_L_LIFEPOTION) desc: Increase HP each interval val1: if < 0 will be percentage. If > 0 is fixed HP heal value val2: Interval per seconds