goddameit 52 Posted January 23, 2014 (edited) Preview : http://bit.ly/Z0ECZx Introduction : You can hire this npc, it will follow you and give you buff. Download : dedicated_npc_3.txt More NPC : First add new npc like this: ,,,duplicate(DedicatedNPCMain)Add new name define into .npc_name$setarray .npc_name$[0],"Dedicated Poring AAA","Dedicated Poring BBB","Dedicated Poring CCC"; Time Set : 60 seconds set getvariableofnpc(.npc_time[@id_use],"DedicatedNPCTimer"),gettimetick(2)+60; Update : 2014/02/27 : http://herc.ws/board/topic/4107-dedicated-npc-v2/?p=27298 http://rathena.org/board/topic/74607-dedicated-npc-v2/?p=244414 2014/01/24 : Rewrite timer and npc runner. Edit : No repairall? >> reply Edited March 2, 2014 by AnnieRuru 2 Mumbles and Hadeszeus reacted to this Quote Share this post Link to post Share on other sites
jaBote 438 Posted January 23, 2014 (edited) Hi. It seems I can't download the NPC for giving it a peek. Could you please solve it? Thanks! Edit: What? Now I go back to the topic and it works? Witchcraft! I'll give it a peek right now. Thanks! Edited January 23, 2014 by jaBote Quote Share this post Link to post Share on other sites
pan 87 Posted January 23, 2014 Great use of unit related commands. The only problem I can see is that there is a limited number of 'servants', maybe using the mercenary system to replace the npc as servant... Or even using a mob as servant, one mob = one npc instance to control it, and then use whisper commands to get buffs and such. Quote Share this post Link to post Share on other sites
Angelmelody 221 Posted January 23, 2014 OnInit: sleep2 1; Isn't there any warning? Quote Share this post Link to post Share on other sites
pan 87 Posted January 24, 2014 No there isn't, sleep2 is an actual function: *sleep {<milliseconds>};*sleep2 {<milliseconds>};*awake "<NPC name>";These commands are used to control the pause of a NPC.sleep and sleep2 will pause the script for the given amount of milliseconds.Awake is used to cancel a sleep. When awake is called on a NPC it will run as if the sleep timer ran out, and thus making the script continue. Sleep and sleep2 basically do the same, but the main difference is that sleep will not keep the rid, while sleep2 does.Examples: // This will pause the script for 10 seconds and ditch the RID // (so no player is attached anymore) sleep 10000; // Pauses the script for 5 seconds, and continue with the RID attached. sleep2 5000; //Cancels any running sleep timers on the NPC 'NPC'. awake "NPC"; Quote Share this post Link to post Share on other sites
Hadeszeus 15 Posted January 24, 2014 Can you make this as a VIP service? Exchange an item before you can hire this npc. Quote Share this post Link to post Share on other sites
goddameit 52 Posted January 24, 2014 (edited) Can you make this as a VIP service? Exchange an item before you can hire this npc. Add what you want at here http://i.imgur.com/w9SetVJ.png Edited January 24, 2014 by goddameit 1 Hadeszeus reacted to this Quote Share this post Link to post Share on other sites
goddameit 52 Posted January 24, 2014 Great use of unit related commands. The only problem I can see is that there is a limited number of 'servants', maybe using the mercenary system to replace the npc as servant... Or even using a mob as servant, one mob = one npc instance to control it, and then use whisper commands to get buffs and such. modify core will be more easy, but I don't want to and need "click for some service", that's why I use npc Quote Share this post Link to post Share on other sites
Hadeszeus 15 Posted January 24, 2014 Can you make this as a VIP service? Exchange an item before you can hire this npc. Add what you want at here http://i.imgur.com/w9SetVJ.png Okay thanks Sir! Though Im not good in scripting but I'll try my best... Quote Share this post Link to post Share on other sites
Brynner 34 Posted January 25, 2014 how to fix this error. [Error]: script_add_str: detected possible use of wrong case in a script. Found'hp', probably meant to be 'Hp' (in 'npccustomAleconROdedicated_npc_2.txt').[Error]: script_add_str: detected possible use of wrong case in a script. Found'maxhp', probably meant to be 'MaxHp' (in 'npccustomAleconROdedicated_npc_2.txt').[Error]: script:op_2num: division by zero detected op=C_DIV i1=0 i2=0[Debug]: Source (NPC): DedicatedNPCTimer (invisible/not on a map) Quote Share this post Link to post Share on other sites
jaBote 438 Posted January 25, 2014 Solve the first two instances of the error first: [Error]: script_add_str: detected possible use of wrong case in a script. Found'hp', probably meant to be 'Hp' (in 'npccustomAleconROdedicated_npc_2.txt').[Error]: script_add_str: detected possible use of wrong case in a script. Found'maxhp', probably meant to be 'MaxHp' (in 'npccustomAleconROdedicated_npc_2.txt'). Then try to see if that 0/0 error is gone. Quote Share this post Link to post Share on other sites
schan 8 Posted January 30, 2014 (edited) Script loads with this error: [Error]: script:op_2num: division by zero detected op=C_DIV i1=0 i2=0[Debug]: Source (NPC): DedicatedNPCTimer (invisible/not on a map) How to fix this error? Edited January 30, 2014 by schan Quote Share this post Link to post Share on other sites
Angelmelody 221 Posted January 31, 2014 (edited) Script loads with this error: [Error]: script:op_2num: division by zero detected op=C_DIV i1=0 i2=0[Debug]: Source (NPC): DedicatedNPCTimer (invisible/not on a map) How to fix this error? find if(maxhp/hp>=4) chage to if(MaxHp/4>=Hp) Edited January 31, 2014 by Angelmelody Quote Share this post Link to post Share on other sites
goddameit 52 Posted February 27, 2014 (edited) Update for http://herc.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 Share this post Link to post Share on other sites
Leecher 1 Posted April 8, 2014 (edited) wew, ive been thinking of this 4 years from now ago. thanks for this /no1 Edited April 8, 2014 by Leecher Quote Share this post Link to post Share on other sites
iskoy.flores 0 Posted July 18, 2014 (edited) EDIT: I was somehow able to make it work by separating the script into two file, one for healer and one for buffer. Again, thanks for the great script! 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; Edited July 21, 2014 by iskoy.flores Quote Share this post Link to post Share on other sites
thrakmarr 0 Posted September 17, 2014 Is there a way to add foodbuffs to this? I'm having a hard time with it. When I click on the npc it freezes me in place and does not add the food buffs. Quote Share this post Link to post Share on other sites