Adauga o functie in serverul vostru pe care o folositi in questuri sa trimiteti PM unui jucator.
Exemplu de folosire: Daca un player omoara 10 caini salbatici -> acesta primeste PM ca misiunea e finalizata.
Ma rog, e un exemplu simplu.. in relaitate o puteti folosi pentru lucruri mult mai complexe.
*Link download / Code:-- To send message by default sender name as "System":
pc.send_whisper("Hi there!")
-- To send message by a given sender name:
pc.send_whisper("Biologist", "Biolog cooldown is done, you can submit next item.")
-- To check the success of send:
if pc.send_whisper("Hi there!") then
-- The whisper message has been sent successfully.
else
-- Failed to send the whisper message.
end
Deschidem "game/src/questlua_pc.cpp" si cauta:
Code:
int pc_set_skill_level(lua_State* L)
{
...
}
Acum cautam in functia "RegisterPCFunctionTable":
Code:
{ "set_skill_level", pc_set_skill_level },
Inainte de asta adaugam:
Adauga in fisierul quest_function din usr/game../locale/romania/quest: