Lineage 2 Tower Forum

Full Version: Pluguin Chat command for start and stop Scrypt
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello guys!
I looked around the forum and could not find a pluguin to enable and disable a text command by Scrypt in char party or clan chat. example (start ...stop enables and disables certain Scrypt) ... I believe I've seen something like that here in the forum but I could not find.

Thank you!
    LUA Programming
function OnChatUserMessage(chatType, nick, msg)
 if (chatType == L2ChatType.CHAT_PARTY) then
 Message = string.lower(msg); -- Converts message to lower case letters.
 Message = Message:gsub("^%s*(.-)%s*$", "%1"); -- Trimming message of spaces on start.
 if (Message == "start") then
 ProcessCommand("/scriptStart urscript.lua");
 ShowToClient("Debug","script xy On");
 end;
 if (Message == "stop") then
 ProcessCommand("/scriptStop urscript.lua");
 ShowToClient("Debug","script xy Off");
 end;
 end;
end;

Reference URL's