Lineage 2 Tower Forum

Full Version: plugins worng ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
    LUA Programming
function OnChatSystemMessage(id, msg)
 
		if (id == 3292)  then 	
		Command("@abcd");
 
		end;
		end;



hum i don't know why it isn't work Big Grin someone can help me this ?
thnks for read
(07-10-2014 20:07 PM)benbt91 Wrote: [ -> ]
    LUA Programming
function OnChatSystemMessage(id, msg)
 
 if (id == 3292) then 
 Command("@abcd");
 
 end;
 end;



hum i don't know why it isn't work Big Grin someone can help me this ?
thnks for read


There's alot more code involved than what you have when making a plugin. Here is something that will get you started:

    LUA Programming
start = false;
 
function OnCreate()
	this:RegisterCommand("plugin", CommandChatType.CHAT_ALLY, CommandAccessLevel.ACCESS_ME); 
end;
 
function OnCommand_plugin(vCommandChatType, vNick, vCommandParam)
	if(start == false) then
 start = true;
 ShowToClient("GOD", "Plugin is on.")
 else
 start = false;
 ShowToClient("GOD", "Plugin is off.")
 end;
end;
 
 
function OnChatSystemMessage(id, msg) -- this is what you had
 if (id == 3292) then 
 Command("@abcd");
 end;
end;
 
function OnLTick1s()
 if(start == true)
 --this is where you write what you want to do
 end;
end;

maybe its a great help for me... ^^ I try using that--- ^^

U have any way for test a plugin,,, without loguin and crash the game? XD
(07-10-2014 22:43 PM)jonathan915 Wrote: [ -> ]maybe its a great help for me... ^^ I try using that--- ^^

U have any way for test a plugin,,, without loguin and crash the game? XD

No, not that I know of.
I need use a skill when one sysmsg ....

But i cant use command "then Useskill" ...
I use command ("/useshortcut 1 1") -... but not work,
I need use coroutine?? or what is the best way to use a skill when say a systemmsg??

Maybe i can put here my plugin,, i u see what is wrong... ^^
(07-11-2014 01:11 AM)jonathan915 Wrote: [ -> ]I need use a skill when one sysmsg ....

But i cant use command "then Useskill" ...
I use command ("/useshortcut 1 1") -... but not work,
I need use coroutine?? or what is the best way to use a skill when say a systemmsg??

Maybe i can put here my plugin,, i u see what is wrong... ^^


Jonathan, i saw your private message and i tried to private message you back but it says your private messaging is disabled. And also, could you describe your issue a little bit better?

Also Jonathan. I advise you to make your code as a script instead of a plugin because it is easier and WAY faster to troubleshoot. Therefore, once you can verify that your code is working as a script then you can convert it to a plugin.
NO,, im trying make a plugin... i can put here....

Code:
tart = false;

function OnCreate()
    this:RegisterCommand("plugin", CommandChatType.CHAT_ALLY, CommandAccessLevel.ACCESS_ME);
end;

function OnCommand_plugin(vCommandChatType, vNick, vCommandParam)
    if(start == false) then
start = true;
ShowToClient("Sign ","Auto Fish Mode on.");
else
start = false;
ShowToClient("Sign ","Auto Fish Mode off.");
end;
end;


function OnLTick1s()
if(start == true) then --this is where you write what you want to do

function OnChatSystemMessage(id, msg)
    if (id == 1449) then -- bit
      Command("/useshortcut 10 3"); -- Reeling
    end;
end;

function OnChatSystemMessage(id, msg)
    if (id == 1467) or (id == 1464) or (id == 1466) then -- caused o resisi
      Command("/useshortcut 10 3"); -- Reeling
    end;
end;
function OnChatSystemMessage(id, msg)
    if (id == 1468)or(id == 1465) then -- faikl
      Command("/useshortcut 10 4"); -- Pumping
    end;
end;
function OnChatSystemMessage(id, msg)
    if (id == 1469) or (id == 1450) or (id == 1458) or (id == 1451) or (id == 1452) then -- caused
      Command("/useshortcut 10 2"); -- Fishing
    end;
end;

end;
end;

I need use skills,, but UseSkill not work in plugin,, Ans i use Cmmand /shortcut 1 1 ex:.. And put my skills in shortcut bar... i read something about a coroutine... but i dont know how to use that-... PLs givme the way... ^^ thnkz

NOw,, i hv active the PM... sry,, i dont remember that....
search id in [attachment=1829]

    LUA Programming
AlarmStatus = false;
 
CheckSound = GetDir() .. "\\path_to_wav";
 
 
function OnCreate()
	this:RegisterCommand("alarm", CommandChatType.CHAT_ALLY, CommandAccessLevel.ACCESS_ME);
end;
 
 
 
function OnCommand_alarm(vCommandChatType, vNick, vCommandParam)
	if (AlarmStatus == false) then
 AlarmStatus = true;
 ShowToClient("ALARM","Plugin ON");
	else
 AlarmStatus = false;
 ShowToClient("ALARM","Plugin OFF");
	end;
end;
 
 
 
function OnChatSystemMessage(id, msg)
	if (AlarmStatus == true) then
 if id==503 then
 Command('@i am pro');
 PlaySound(CheckSound);
 end;
	end;
end;

why i can't donwload system.zip Sad ... just Loading and Loading Big Grin

Ty All for help Big Grin

(07-11-2014 03:56 AM)TheQQmaster Wrote: [ -> ]search id in

    LUA Programming
AlarmStatus = false;
 
CheckSound = GetDir() .. "\\path_to_wav";
 
 
function OnCreate()
	this:RegisterCommand("alarm", CommandChatType.CHAT_ALLY, CommandAccessLevel.ACCESS_ME);
end;
 
 
 
function OnCommand_alarm(vCommandChatType, vNick, vCommandParam)
	if (AlarmStatus == false) then
 AlarmStatus = true;
 ShowToClient("ALARM","Plugin ON");
	else
 AlarmStatus = false;
 ShowToClient("ALARM","Plugin OFF");
	end;
end;
 
 
 
function OnChatSystemMessage(id, msg)
	if (AlarmStatus == true) then
 if id==503 then
 Command('@i am pro');
 PlaySound(CheckSound);
 end;
	end;
end;


hum it's nothing happens too ! when i try to login or logout char added in friendlist ! him just do nothing Smile!
i did search right id with log out and log in sysmessage in system Sad

(07-10-2014 22:36 PM)tophersoccer Wrote: [ -> ]
(07-10-2014 20:07 PM)benbt91 Wrote: [ -> ]
    LUA Programming
function OnChatSystemMessage(id, msg)
 
 if (id == 3292) then 
 Command("@abcd");
 
 end;
 end;



hum i don't know why it isn't work Big Grin someone can help me this ?
thnks for read


There's alot more code involved than what you have when making a plugin. Here is something that will get you started:

    LUA Programming
start = false;
 
function OnCreate()
	this:RegisterCommand("plugin", CommandChatType.CHAT_ALLY, CommandAccessLevel.ACCESS_ME); 
end;
 
function OnCommand_plugin(vCommandChatType, vNick, vCommandParam)
	if(start == false) then
 start = true;
 ShowToClient("GOD", "Plugin is on.")
 else
 start = false;
 ShowToClient("GOD", "Plugin is off.")
 end;
end;
 
 
function OnChatSystemMessage(id, msg) -- this is what you had
 if (id == 3292) then 
 Command("@abcd");
 end;
end;
 
function OnLTick1s()
 if(start == true) then
 Command("@abcd");
 end;
end;

after use this ... him spam non-stop Big Grin hix hix T_T
it works, yesterday before posted, I tested, but only for party joining, faund id, u just neeed to find correct id, use good editor and all be good
Pages: 1 2
Reference URL's