GM Takumirai Posted November 25, 2012 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 592 Reputation: 31 Joined: 11/14/11 Last Seen: July 29, 2015 Share Posted November 25, 2012 thanks God... i just put an setarray Quote Link to comment Share on other sites More sharing options...
KoolKat29 Posted December 4, 2012 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 90 Reputation: 5 Joined: 06/17/12 Last Seen: September 6, 2013 Share Posted December 4, 2012 (edited) Great Job master GOD! I want to use this on my server. question, is there a way to change the npc so it will not be followed by homunculus? XD Thanks and hope that this script wil get even better Is there a way to duplicate them without affecting the other when a player logged off?? Because For example, I have 3 duplicates of the dedi npc, the other player logout, the two other duplicates will also reset to its position without masters. Thanks Edited December 4, 2012 by cataclysmro Quote Link to comment Share on other sites More sharing options...
goddameit Posted December 5, 2012 Group: Members Topic Count: 60 Topics Per Day: 0.01 Content Count: 562 Reputation: 219 Joined: 11/22/11 Last Seen: August 3, 2024 Author Share Posted December 5, 2012 Great Job master GOD! I want to use this on my server. question, is there a way to change the npc so it will not be followed by homunculus? XD Thanks and hope that this script wil get even better Is there a way to duplicate them without affecting the other when a player logged off?? Because For example, I have 3 duplicates of the dedi npc, the other player logout, the two other duplicates will also reset to its position without masters. Thanks in my test, it already will not affect other master. 1 Quote Link to comment Share on other sites More sharing options...
KoolKat29 Posted December 5, 2012 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 90 Reputation: 5 Joined: 06/17/12 Last Seen: September 6, 2013 Share Posted December 5, 2012 So maybe there's something wrong here master goddameit. I added the map array. //Author Goddameit //Version 2012/11/23 //Web http://bit.ly/MDuQ9F - script DedicatedNPCMain -1,{ set .@type,atoi(strnpcinfo(2)); if( getd(".n_"+.@type+"_status") == 0 ) { for(set .@i,1;.@i<=.amount;set .@i,.@i+1) if( getd(".n_"+.@i+"_master") == getcharid(3) ) { end; } mes "Hi, will you hire me?"; next; mes "If you die or log off, you'll have to hire me again."; select("Yes"); set .@type,atoi(strnpcinfo(2)); setd ".n_"+.@type+"_status",1; setd ".n_"+.@type+"_master",getcharid(3); setd ".n_"+.@type+"_time",3599; setd ".n_"+.@type+"_name$",strcharinfo(0); getmapxy(getd(".n_"+.@type+"_origin_map$"),getd(".n_"+.@type+"_origin_x"),getd(".n_"+.@type+"_origin_y"),1,strnpcinfo(0)); initnpctimer; close; }else { set .@type,atoi(strnpcinfo(2)); if( getd(".n_"+.@type+"_master") == getcharid(3) ) { mes "Hi, any problem?"; switch(select("Storage","Repair all","Dismissal")) { case 1: openstorage; close; case 2: repairall; close; case 3: callsub OnEndd; close; } }else { end; } } end; OnPCLogoutevent: callsub OnEndd; end; OnEndd: set .@type,atoi(strnpcinfo(2)); if(getd(".n_"+.@type+"_origin_map$")!="") unitwarp getd(".n_"+.@type+"_unit_id"),getd(".n_"+.@type+"_origin_map$"),getd(".n_"+.@type+"_origin_x"),getd(".n_"+.@type+"_origin_y"); if(isloggedin(getd(".n_"+.@type+"_master"))) message getd(".n_"+.@type+"_name$"),strnpcinfo(1)+" : See you!"; stopnpctimer; setd ".n_"+.@type+"_status",0; setd ".n_"+.@type+"_tmp_time",0; setd ".n_"+.@type+"_master",0; setd ".n_"+.@type+"_time",0; setd ".n_"+.@type+"_name$",""; setd ".n_"+.@type+"_master_map$",""; setd ".n_"+.@type+"_master_x",0; setd ".n_"+.@type+"_master_y",0; setd ".n_"+.@type+"_npc_map$",""; setd ".n_"+.@type+"_npc_x",0; setd ".n_"+.@type+"_npc_y",0; return; OnTimer1000: { set .@type,atoi(strnpcinfo(2)); for(;isloggedin(getd(".n_"+.@type+"_master")) { set .@type,atoi(strnpcinfo(2)); set .@aid,getd(".n_"+.@type+"_master"); if(attachrid(.@aid)) { getmapxy(getd(".n_"+.@type+"_master_map$"),getd(".n_"+.@type+"_master_x"),getd(".n_"+.@type+"_master_y"),0); getmapxy(getd(".n_"+.@type+"_npc_map$"),getd(".n_"+.@type+"_npc_x"),getd(".n_"+.@type+"_npc_y"),1,strnpcinfo(0)); for( .@i = 0; .@i < getarraysize( .maps$ ); .@i++ ) if( getd(".n_"+.@type+"_master_map$") == .maps$[.@i] ){ callsub onendd; break; } if(maxhp/hp>=4) { percentheal 80,80; specialeffect2 312; } if(getd(".n_"+.@type+"_tmp_time") == 0) { sc_start SC_BLESSING,60000,10; specialeffect2 42; sc_start SC_INCREASEAGI,60000,10; specialeffect2 37; sc_start SC_IMPOSITIO,60000,10; specialeffect2 84; sc_start SC_MAGNIFICAT,60000,10; specialeffect2 76; sc_start SC_GLORIA,60000,10; specialeffect2 75; sc_start SC_SUFFRAGIUM,60000,10; specialeffect2 88; sc_start SC_ASSUMPTIO,60000,10; specialeffect2 375; } set .@tmp_time,getd(".n_"+.@type+"_tmp_time"); setd ".n_"+.@type+"_tmp_time",.@tmp_time+1; if( .@tmp_time >= 59 ) setd ".n_"+.@type+"_tmp_time",0; } detachrid; if(!isloggedin(.@aid)) { callsub OnEndd; break; } if( getd(".n_"+.@type+"_master_map$") == ".@maps" ) { callsub OnEndd; break; } set .@map$,getd(".n_"+.@type+"_master_map$"); set .@x,getd(".n_"+.@type+"_master_x"); set .@y,getd(".n_"+.@type+"_master_y"); set .@uid,getd(".n_"+.@type+"_unit_id"); if(distance(getd(".n_"+.@type+"_npc_x"),getd(".n_"+.@type+"_npc_y"),.@x,.@y)>=8||.@map$!=getd(".n_"+.@type+"_npc_map$")) unitwarp .@uid,.@map$,.@x,.@y; else unitwalk .@uid,.@x+rand(-3,3),.@y+rand(-3,3); setd ".n_"+.@type+"_time",getd(".n_"+.@type+"_time")-1; if( getd(".n_"+.@type+"_time") <= 0 ) { callsub OnEndd; break; } sleep2 1000; } } callsub OnEndd; end; OnInit: setd ".n_"+atoi(strnpcinfo(2))+"_unit_id",getnpcid(0); set .amount,.amount+1; setarray .maps$, "pvp_y_8-2", "pvp_y_8-1"; end; } prontera,147,173,4 duplicate(DedicatedNPCMain) Slave#1 1611 prontera,147,171,4 duplicate(DedicatedNPCMain) Slave#2 1611 prontera,147,169,4 duplicate(DedicatedNPCMain) Slave#3 1611 Thank you. Quote Link to comment Share on other sites More sharing options...
goddameit Posted December 5, 2012 Group: Members Topic Count: 60 Topics Per Day: 0.01 Content Count: 562 Reputation: 219 Joined: 11/22/11 Last Seen: August 3, 2024 Author Share Posted December 5, 2012 research it by yourself. or you can delete this script. Quote Link to comment Share on other sites More sharing options...
KoolKat29 Posted December 5, 2012 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 90 Reputation: 5 Joined: 06/17/12 Last Seen: September 6, 2013 Share Posted December 5, 2012 (edited) research it by yourself. or you can delete this script. That's not so friendly. But i wont delete the script and thanks for this great script anyways. Im still your fan! I removed the OnPCLogoutevent: callsub OnEndd; end; And now it's working great! Even without that, logging off or whn the character dies, the npc will be reset and warp back to its position Edited December 9, 2012 by KoolKat29 Quote Link to comment Share on other sites More sharing options...
mrlongshen Posted January 3, 2013 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Share Posted January 3, 2013 i got an error. im using 3ecam. how to fix it ? [Error]: Loading NPC file: npc/custom/myscript/dedicated_npc.txt script error on npc/custom/myscript/dedicated_npc.txt line 139 parse_line: need ';' 134 : } 135 : } 136 : callsub OnEndd; 137 : end; 138 : OnInit: * 139 : setd ".n_"+atoi(strnpcinfo(2))+"_unit_id",getnpcid'('0); 140 : set .amount,.amount+1; 141 : end; 142 : } 143 : Quote Link to comment Share on other sites More sharing options...
goddameit Posted January 4, 2013 Group: Members Topic Count: 60 Topics Per Day: 0.01 Content Count: 562 Reputation: 219 Joined: 11/22/11 Last Seen: August 3, 2024 Author Share Posted January 4, 2013 i got an error. im using 3ecam. how to fix it ? this is rA script command ''getnpcid'' Quote Link to comment Share on other sites More sharing options...
mrlongshen Posted January 4, 2013 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Share Posted January 4, 2013 i got an error. im using 3ecam. how to fix it ? this is rA script command ''getnpcid'' so i cant use it on 3ecam ? Quote Link to comment Share on other sites More sharing options...
goddameit Posted January 4, 2013 Group: Members Topic Count: 60 Topics Per Day: 0.01 Content Count: 562 Reputation: 219 Joined: 11/22/11 Last Seen: August 3, 2024 Author Share Posted January 4, 2013 so i cant use it on 3ecam ? you can add by yourself Quote Link to comment Share on other sites More sharing options...
mrlongshen Posted February 4, 2013 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Share Posted February 4, 2013 thanks God... i just put an setarray where to set in. can u show me .. noobies Quote Link to comment Share on other sites More sharing options...
GM Takumirai Posted February 4, 2013 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 592 Reputation: 31 Joined: 11/14/11 Last Seen: July 29, 2015 Share Posted February 4, 2013 put this code set .@type,atoi(strnpcinfo(2)); attachrid(getd(".n_"+.@type+"_master")); getmapxy(getd(".n_"+.@type+"_master_map$"),getd(".n_"+.@type+"_master_x"),getd(".n_"+.@type+"_master_y"),0); getmapxy(getd(".n_"+.@type+"_npc_map$"),getd(".n_"+.@type+"_npc_x"),getd(".n_"+.@type+"_npc_y"),1,strnpcinfo(0)); { for( .@i = 0; .@i < getarraysize( .map$ ); .@i++ ) if( getd(".n_"+.@type+"_master_map$") == .map$[.@i] ){ callsub onendd; break; } put this in the lower part. OnInit: setd ".n_"+atoi(strnpcinfo(2))+"_unit_id",getnpcid(0); set .amount,.amount+1; setarray .map$, "guild_vs1","0", "guild_vs2","1", "guild_vs3","2", "guild_vs4","3", "guild_vs5","4", "06guild_01","5", "06guild_02","6"; end; } Quote Link to comment Share on other sites More sharing options...
zamorasantos Posted February 4, 2013 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 20 Reputation: 0 Joined: 09/01/12 Last Seen: August 25, 2013 Share Posted February 4, 2013 Good Job i love your work .... by the way is there's a way that you are hiring an NPC which will fight along side with you like a which have there own hp mercenaries and they have the ability to use differend ataking skill to a monster.. Quote Link to comment Share on other sites More sharing options...
xcoms Posted February 25, 2013 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 19 Reputation: 1 Joined: 01/20/13 Last Seen: April 7, 2019 Share Posted February 25, 2013 Hi . I do not understand how to change type , not poring > i wont sword wish how to change? thanks when a player diee NPC is buggy Quote Link to comment Share on other sites More sharing options...
markiez22 Posted March 12, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 126 Reputation: 5 Joined: 10/31/12 Last Seen: June 7, 2023 Share Posted March 12, 2013 how to make NPC rent into 10min???Super Like Script! Quote Link to comment Share on other sites More sharing options...
goddameit Posted March 12, 2013 Group: Members Topic Count: 60 Topics Per Day: 0.01 Content Count: 562 Reputation: 219 Joined: 11/22/11 Last Seen: August 3, 2024 Author Share Posted March 12, 2013 how to make NPC rent into 10min??? Super Like Script! search ''Time Set :'' in #1 Quote Link to comment Share on other sites More sharing options...
GM Takumirai Posted March 18, 2013 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 592 Reputation: 31 Joined: 11/14/11 Last Seen: July 29, 2015 Share Posted March 18, 2013 - problem : when the player die. the dedicated npc stay there and don't follow anymore.. Quote Link to comment Share on other sites More sharing options...
markiez22 Posted March 18, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 126 Reputation: 5 Joined: 10/31/12 Last Seen: June 7, 2023 Share Posted March 18, 2013 yesi try to config like this setd ".n_"+.@type+"_time",10;but not working wen i click the poring after a sec NPC say see you!dump Quote Link to comment Share on other sites More sharing options...
goddameit Posted March 20, 2013 Group: Members Topic Count: 60 Topics Per Day: 0.01 Content Count: 562 Reputation: 219 Joined: 11/22/11 Last Seen: August 3, 2024 Author Share Posted March 20, 2013 - problem : when the player die. the dedicated npc stay there and don't follow anymore.. fixed Quote Link to comment Share on other sites More sharing options...
cmsm94 Posted August 15, 2013 Group: Members Topic Count: 61 Topics Per Day: 0.01 Content Count: 170 Reputation: 5 Joined: 08/11/13 Last Seen: October 18, 2024 Share Posted August 15, 2013 i saw a script just like this please give credits to the owner. Quote Link to comment Share on other sites More sharing options...
goddameit Posted January 23, 2014 Group: Members Topic Count: 60 Topics Per Day: 0.01 Content Count: 562 Reputation: 219 Joined: 11/22/11 Last Seen: August 3, 2024 Author Share Posted January 23, 2014 upload new version Quote Link to comment Share on other sites More sharing options...
yuchinin Posted February 10, 2014 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 120 Reputation: 48 Joined: 07/23/13 Last Seen: August 27, 2021 Share Posted February 10, 2014 After click "dismissal" npc stayed at current location, this make other player hard to find the npc.*Suggestion: Change: if(!.npc_status[.@i]) continue; To: if(!.npc_status[.@i]) {Endd(.@i);continue;} Quote Link to comment Share on other sites More sharing options...
goddameit Posted February 27, 2014 Group: Members Topic Count: 60 Topics Per Day: 0.01 Content Count: 562 Reputation: 219 Joined: 11/22/11 Last Seen: August 3, 2024 Author Share Posted February 27, 2014 (edited) Update for http://hercules.ws/board/topic/4107-dedicated-npc-v2/?p=27298 http://rathena.org/board/topic/74607-dedicated-npc-v2/?p=244414 Edited February 27, 2014 by goddameit Quote Link to comment Share on other sites More sharing options...
franibaflo Posted July 18, 2014 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 1 Reputation: 0 Joined: 07/07/14 Last Seen: July 25, 2014 Share Posted July 18, 2014 I really like your work sir but I think you can make it better. I noticed that when using the heal functionality the npc stops following the character after death and becomes stuck to its last position even if you dismiss it. And even if npc is dismissed, you also still can't hire a new clone since it too seem stuck. Below are some of my observations.... if(MaxHp/Hp>=2) { percentheal 10,0; specialeffect2 312; } set getvariableofnpc(.npc_hprecover[@id_use],"DedicatedNPCTimer"),2; ----> Why must this be set higher than hprecover_delay? Setting it to too high or same as hprecover_delay causes the same error. //NPC follows and respawns successfully but no heal if(.npc_hprecover[.@i]>=.hprecover_delay) .hprecover_delay = 1; .npc_hprecover[.@i] = 0; //NPC heals but stops following after you die and stuck after dismiss if(.npc_hprecover[.@i]>=.hprecover_delay) .hprecover_delay = 1; .npc_hprecover[.@i] = 1 or more; Quote Link to comment Share on other sites More sharing options...
EL Dragon Posted July 25, 2014 Group: Members Topic Count: 86 Topics Per Day: 0.02 Content Count: 591 Reputation: 146 Joined: 06/19/12 Last Seen: December 10, 2016 Share Posted July 25, 2014 you can make the npc random walk on the map ? all duplicate walking radmon on maps and th player must search the Porings for Support Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.