Author:
Tested on: 0.3.6
This script require it:
http://otland.net/f163/lua-c-ping-lib-ping-getping-cid-storage-121183/
+
http://otland.net/f35/getotsystime-getplayerping-cid-doplayersendping-cid-121182/
If you know what is ping you will understand the nice use of this code ^^
THIS SCRIPT DO NOT CAUSE LAG YOUR SERVER
THIS FUNCTIONS USE AN ALREADY FEATURE IN TIBIA CLIENT AND IN THE SERVER SO IT NOT WILL CAUSE LAG!
Well, player say !ping and after some time he got a response
Add this tag on talkactions.xml
In ping.lua:
Enjoy
---04/03/2011
Lib fixed. Just install it aigan if don't work
http://otland.net/f163/lua-c-ping-lib-ping-getping-cid-storage-121183/
Tested on: 0.3.6
This script require it:
http://otland.net/f163/lua-c-ping-lib-ping-getping-cid-storage-121183/
+
http://otland.net/f35/getotsystime-getplayerping-cid-doplayersendping-cid-121182/
If you know what is ping you will understand the nice use of this code ^^
THIS SCRIPT DO NOT CAUSE LAG YOUR SERVER
THIS FUNCTIONS USE AN ALREADY FEATURE IN TIBIA CLIENT AND IN THE SERVER SO IT NOT WILL CAUSE LAG!
Well, player say !ping and after some time he got a response
Add this tag on talkactions.xml
Code:
<talkaction words="!ping" event="script" value="ping.lua"/>
Code:
function onSay(cid, words, param, channel)
ping.getPing(cid,29894,function(cid,_,ping_)
doPlayerSendTextMessage(cid,25,'Your ping is '..ping_..' ms.')
end)
doPlayerSendTextMessage(cid,25,'Sending an request...')
return true
end
Enjoy
---04/03/2011
Lib fixed. Just install it aigan if don't work
http://otland.net/f163/lua-c-ping-lib-ping-getping-cid-storage-121183/
Last edited: