Eu tava meio sem tempo pq tava editando meu ot, agr q ele ja ta perfect vo posta uns scripts q eu fiz e achei interessante postar ake:
Nesse tópico vou postar um script mt ultil em otservs q tem bastante eventos automaticos, ou ateh msm eventos por actions, ou outras coisas se preferirem colocar, vou postar um script para que ninguem possa entrar se estiver de mc. Entao neh...vou para de fala e comçar logo, vamo lá !
Em movements/scripts crie um arquivo.lua chamado multi_block e nele coloque isso:
function onStepIn(cid, item, position, fromPosition)
local list = {}
local ips = {}
local players = getPlayersOnline()
for i, pid in ipairs(players) do
local ip = getPlayerIp(pid)
local tmp = table.find(ips, ip)
if(tmp ~= nil) then
if(table.countElements(list, ip) == 0) then
list[players[tmp]] = ip
end
list[pid] = ip
end
table.insert(ips, ip)
end
local db = db.getResult("SELECT `name` FROM `event_mcblock`;")
local ret = ""
if(db:getID() ~= -1) then
repeat
name = result:getDataString("name")
if name == getPlayerName(cid) then
ret = true
end
until not db:next()
db:free()
end
if(table.maxn(list) > 0) then
for pid, ip in pairs(list) do
if getPlayerIp(cid) == ip then
if ret == "" then
doTeleportThing(cid,fromPosition,true)
doPlayerPopupFYI(cid, ' Alert: Events allow one player per IP \nDuplicate IP found for: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'. Please close multi-client.')
else
doPlayerPopupFYI(cid,' You are currently sharing an IP adress with another player online!\n You have been given the privilege to pass, If abused this privilege will be revoked.')
end
return true
end
end
end
return true
end
Agora em movements.xml coloque isso:
<movevent type="StepIn" uniqueid="2102" event="script" value="multi_block.lua"/>
E no seu mapa em todos os pisos q vc escolher para o player nao usar mc, clique 2x e em Unique ID coloque: 2102.
Comentem ae galera, lembrando q ainda vou postar mts outros scripts q eu fiz =]]