This command lets you call up a function NPC. A function NPC can be called from
any script on any map server. Using the 'return' command it will come back to
the place that called it.
Alternately, as of rAthena revision 15979 and 15981, user-defined functions
may be called directly without the use of the 'callfunc' script command.
Calling a function written inside a npc works but when i'm trying to call a function from an other npc it says : buildin_callfunc Function Not found.
Example that works :
gonryun,147,127,6 script testfunction 808,{
function helpme;
function helpme{
mapannounce "gonryun", "Rathena, please help me.", bc_map;
end;
}
helpme;
mes "you send message to Rathena";
end;
}
I am trying to do this on the NPCnumber2 :
gonryun,147,127,6 script testfunction 808,{
function helpme;
function helpme{
mapannounce "gonryun", "Rathena, please help me.", bc_map;
end;
}
helpme;
mes "you send message to Rathena";
end;
}
gonryun,141,127,6 script NPCnumber2 809,{
callfunc "helpme";
end;
}
Question
kilow
Hello,
I'm trying to use callfunc but if the function is written on an other npc it doesn't work.
I read this on wiki
Calling a function written inside a npc works but when i'm trying to call a function from an other npc it says : buildin_callfunc Function Not found.
Example that works :
gonryun,147,127,6 script testfunction 808,{ function helpme; function helpme{ mapannounce "gonryun", "Rathena, please help me.", bc_map; end; } helpme; mes "you send message to Rathena"; end; }
I am trying to do this on the NPCnumber2 :
gonryun,147,127,6 script testfunction 808,{ function helpme; function helpme{ mapannounce "gonryun", "Rathena, please help me.", bc_map; end; } helpme; mes "you send message to Rathena"; end; } gonryun,141,127,6 script NPCnumber2 809,{ callfunc "helpme"; end; }
thank you
Edited by kilowLink to comment
Share on other sites
2 answers to this question
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.