Jump to content

Dedicated NPC [v.3]


Recommended Posts


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

Preview :

http://bit.ly/Z0ECZx

Introduction :

You can hire this npc, it will follow you and give you buff.

Download :

dedicated_npc_3.txt

dedicated_npc_2.txt
dedicated_npc.txt
dedicated_npc.txt

More NPC :

 

First add new npc like this:

<map>,<x>,<y>,<facing><tab>duplicate(DedicatedNPCMain)<tab><npc name><tab><sprite id>

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://hercules.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 by goddameit
  • Upvote 8
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  379
  • Reputation:   304
  • Joined:  11/10/11
  • Last Seen:  

Hi goddameit ! :)

Did you test with multiple NPC ? I don't think it will work.

You use "duplicate" and all variables are NPC variables, so all configs are share between NPC, and should be overwrite each time you ask to a new NPC to follow you.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

Hi goddameit ! :)

Did you test with multiple NPC ? I don't think it will work.

You use "duplicate" and all variables are NPC variables, so all configs are share between NPC, and should be overwrite each time you ask to a new NPC to follow you.

seen you are right, fixing.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  206
  • Reputation:   13
  • Joined:  11/20/11
  • Last Seen:  

cool ♥.♥

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

Update :

2012/11/23 - 19:08

1. KeyWorld's report

2. Limit you only can hire one npc.

3. Log out error

Edited by goddameit
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  11/17/12
  • Last Seen:  

How to fix this ?

[Error]: Loading NPC file: npc/custom/dedicated_npc.txt
script error on npc/custom/dedicated_npc.txt line 27
parse_line: expect command, missing function name or calling undeclared func
tion
22 : {
23 : case 1:
24 : openstorage;
25 : close;
26 : case 2:
* 27 : 'r'epairall;
28 : close;
29 : case 3:
30 : callsub OnEndd;
31 : close;
32 : }
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

what the.. nice release.. love this.. changing the npc ID to priest as it follow you like a priest.. nice idea..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

How to fix this ?

[Error]: Loading NPC file: npc/custom/dedicated_npc.txt

script error on npc/custom/dedicated_npc.txt line 27

parse_line: expect command, missing function name or calling undeclared func

tion

22 : {

23 : case 1:

24 : openstorage;

25 : close;

26 : case 2:

* 27 : 'r'epairall;

28 : close;

29 : case 3:

30 : callsub OnEndd;

31 : close;

32 : }

use rA, thx.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  11/17/12
  • Last Seen:  

How to fix this ?

[Error]: Loading NPC file: npc/custom/dedicated_npc.txt

script error on npc/custom/dedicated_npc.txt line 27

parse_line: expect command, missing function name or calling undeclared func

tion

22 : {

23 : case 1:

24 : openstorage;

25 : close;

26 : case 2:

* 27 : 'r'epairall;

28 : close;

29 : case 3:

30 : callsub OnEndd;

31 : close;

32 : }

use rA, thx.

Ohh sorry but still thnx damn my rathena have a error

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

Ohh sorry but still thnx damn my rathena have a error

you can use

atcommand "@repairall";

to replace it

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

@god it seems there was a problem,

- using latest rAthena

- using your script without edit and the latest you release, when i hired the poring it follows me, when i click again the poring to open my storage or any option nothing happens??

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  102
  • Reputation:   1
  • Joined:  11/06/12
  • Last Seen:  

Nice, thank you.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  379
  • Reputation:   304
  • Joined:  11/10/11
  • Last Seen:  

You forget a change:

-    if( .status == 0 )
+    set .@type,atoi(strnpcinfo(2));
+    if( getd(".n_"+.@type+"_status") == 0 )

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

is't correct

if( .status == 0 )
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) )
{

thanks problem solved

Edited by GM Takumirai
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

You forget a change:

- if( .status == 0 )
+ set .@type,atoi(strnpcinfo(2));
+ if( getd(".n_"+.@type+"_status") == 0 )

thx

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  112
  • Topics Per Day:  0.03
  • Content Count:  388
  • Reputation:   4
  • Joined:  05/01/12
  • Last Seen:  

how to make unlimited?o_Oa for everyone can use this?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

how to make unlimited?o_Oa for everyone can use this?

research and think

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   26
  • Joined:  11/20/11
  • Last Seen:  

Ah sir just a little request

can you add this stuffs

Check the Players HP %

Example Can be set the % of HP so the Dedi NPC can heal you up around 1-100%? requires 1 Heal Potion (Item Stacked 50 pcs)

Consume 1 Heal Potion when the Dedi NPC Heals the Player?

when players hp is 40%-50% the Dedi NPC will auto heal the player?

Thanks hahah just a IDEA :))

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

Ah sir just a little request

can you add this stuffs

.....

Thanks hahah just a IDEA :))

				if(maxhp/hp>=4)
			{
				percentheal 15,15;
				specialeffect2 312;
			}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

@god

- how to make the npc will disappear if going inside WOE castle??..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

@god

- how to make the npc will disappear if going inside WOE castle??..

getmapxy(getd(".n_"+.@type+"_master_map$")....;
getmapxy(getd(".n_"+.@type+"_npc_map$")....;
{
add something
}
if(maxhp/hp>=4)
{

something :

if( getd(".n_"+.@type+"_master_map$") == "map name" )
{
   callsub OnEndd;
   break;
}

Edited by goddameit
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

God

if( getd(".n_"+.@type+"_master_map$") == "prt_cas01" )

- how to make it more maps?

Edited by GM Takumirai
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...