| benbt91   VIP Member
 
    
 Posts: 694
 Joined: Mar 2012
 Reputation: 47
 Version: 
1.4.3.143
 
 | 
			| plugins worng ? 
 
				    LUA Programming
	function OnChatSystemMessage(id, msg)
 
		if (id == 3292)  then 	
		Command("@abcd");
 
		end;
		end; 
hum i don't know why it isn't work    someone can help me this ? 
thnks for read
			 |  | 
	| 07-10-2014 20:07 PM |  | 
|  Reputed by : | jonathan915(+1) | 
	
		| jonathan915   Porta
 
  
   Posts: 43
 Joined: Oct 2013
 Reputation: 0
 Version: 
1.4.2.138
 
 | 
			| RE: plugins worng ? 
 
				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   Porta
 
  
   Posts: 43
 Joined: Oct 2013
 Reputation: 0
 Version: 
1.4.2.138
 
 | 
			| RE: plugins worng ? 
 
				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 |  | 
	
		| tophersoccer   Expired VIP Member
 
   
 Posts: 422
 Joined: Aug 2012
 Reputation: 142
 Version: 
1.4.3.143
 
 | 
			| RE: plugins worng ? 
 
				 (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.
			 
				
(This post was last modified: 07-11-2014 02:25 AM by tophersoccer.)
 |  | 
	| 07-11-2014 02:21 AM |  | 
	
		| jonathan915   Porta
 
  
   Posts: 43
 Joined: Oct 2013
 Reputation: 0
 Version: 
1.4.2.138
 
 | 
			|  RE: plugins worng ? 
 
				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....
			
				
(This post was last modified: 07-11-2014 02:32 AM by jonathan915.)
 |  | 
	| 07-11-2014 02:27 AM |  | 
	
		| TheQQmaster   Trolling the Trolls
 
      
   Posts: 1,532
 Joined: Jun 2012
 Reputation: 642
 Version: 
1.4.2.133
 
 | 
			| RE: plugins worng ? 
 
				search id in 
  sysmsg.zip  (Size: 423 bytes / Downloads: 51)
     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;PUSH
 ![[Image: knUu53]](http://goo.gl/knUu53) IF HELPED |  | 
	| 07-11-2014 03:56 AM |  | 
|  Reputed by : | benbt91(+2) ,  jonathan915(+1) ,  diegol(+2) | 
	
		| benbt91   VIP Member
 
    
 Posts: 694
 Joined: Mar 2012
 Reputation: 47
 Version: 
1.4.3.143
 
 | 
			| RE: plugins worng ? 
 
				why i can't donwload system.zip    ... just Loading and Loading    
Ty All for help    
  (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   ! 
i did search right id with log out and log in sysmessage in system    
  (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
  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    hix hix T_T
			
				
(This post was last modified: 07-11-2014 06:23 AM by benbt91.)
 |  | 
	| 07-11-2014 05:18 AM |  |