Jump to content
Sign in to follow this  
DnA

(help) after player kill other player give items, but if IP same no give item

Recommended Posts

after player kill other player give items, but if IP same no give item, how to make this script?

Edited by DnA

Share this post


Link to post
Share on other sites
Guest

function after_player_kill_player:

if ip(atker) ~= ip(defer) then

--do sthh

end

 

get cha ip using lua-sql dll by wrexor or by using 3rd party app that stores ip data in a txt file, then read it using lua.

Share this post


Link to post
Share on other sites
5 hours ago, V1tor said:

function after_player_kill_player:

if ip(atker) ~= ip(defer) then

--do sthh

end

 

get cha ip using lua-sql dll by wrexor or by using 3rd party app that stores ip data in a txt file, then read it using lua.

this add to function.lua or?

Share this post


Link to post
Share on other sites
On 12/7/2016 at 9:24 PM, V1tor said:

function after_player_kill_player:

if ip(atker) ~= ip(defer) then

--do sthh

end

 

get cha ip using lua-sql dll by wrexor or by using 3rd party app that stores ip data in a txt file, then read it using lua.

 

Share this post


Link to post
Share on other sites

Hello @DnA!

 

The main problem is that we do not have a function which allows to obtain the IP address of the character (role). You have to make it first. There is 2 ways:

1) Patch GameServer.exe // Too hard

2) Use LuaSQL.dll by @Wrexor

 

Then as said above you can put some code in function after_player_kill_player:

if GetChaIP(ATKER) == GetChaIP(DEFER) then
	-- Same IP address
	-- Do not give any award to ATKER
else
	-- Give award to ATKER
end

Where GetChaIP() is function you've made

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, V3ct0r said:

Hello @DnA!

 

The main problem is that we do not have a function which allows to obtain the IP address of the character (role). You have to make it first. There is 2 ways:

1) Patch GameServer.exe // Too hard

2) Use LuaSQL.dll by @Wrexor

 

Then as said above you can put some code in function after_player_kill_player:


if GetChaIP(ATKER) == GetChaIP(DEFER) then
	-- Same IP address
	-- Do not give any award to ATKER
else
	-- Give award to ATKER
end

Where GetChaIP() is function you've made

Okay. but, I do not understand to this. but thanks

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...