Xart Irok
Senior User
- Dołączył
- Wrzesień 7, 2008
- Posty
- 2925
- Liczba reakcji
- 410
- Wiek
- 34
Witajcie dawno nic nie pisa?em wam skrypt?w, a teraz mam dla was do?? ciekaw? rzecz, skrypty kt?ry polega na tym ?e gdy jaki? GM si? zaloguje wysy?ana jest wiadomo?? do graczy kt?rzy siedz? na kanale Help ?e dana osoba z stanowiskiem wy?szym ni? Senior Tutor jest zalogowana lub te? w?a?nie si? wylogowa?a, ale mo?na bardzo ?atwo zmieni? kt?ry access ma wy?wietla?, a przechodz?c teraz do skryptu bo wystarczy jego opisu.
Otwieram plik tekstowy i wklejamy zawarto?? kodu.
Nast?pnie zapisujemy skrypty jako Gamemaster.xml w katalogu mods.
Otwieram plik tekstowy i wklejamy zawarto?? kodu.
Kod:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Gamemaster" version="1.3" author="Xart Irok" contact="otland.net" enabled="yes">
<config name="Gamemaster_config"><![CDATA[
local list, group = getChannelUsers(CHANNEL_HELP), 3
]]></config>
<event type="login" name="GamemasterOnline" event="buffer"><![CDATA[
domodlib('Gamemaster_config')
if (getPlayerAccess(cid) >= group) then
if (#list > 0) then
for i = 1, #list do
addEvent(doPlayerSendChannelMessage, 150, list[i], "", getGroupInfo(getPlayerGroupId(cid)).name .." as name ".. getCreatureName(cid) ..", ".. (getPlayerSex(cid) == 0 and "her" or "has") .." login.", TALKTYPE_CHANNEL_O, CHANNEL_HELP)
end
end
end
registerCreatureEvent(cid, "GamemasterOffline")
return true
]]></event>
<event type="logout" name="GamemasterOffline" event="buffer"><![CDATA[
domodlib('Gamemaster_config')
if (getPlayerAccess(cid) >= group) then
if (#list > 0) then
for i = 1, #list do
addEvent(doPlayerSendChannelMessage, 150, list[i], "", getGroupInfo(getPlayerGroupId(cid)).name .." as name ".. getCreatureName(cid) ..", ".. (getPlayerSex(cid) == 0 and "her" or "has") .." logout.", TALKTYPE_CHANNEL_O, CHANNEL_HELP)
end
end
end
return true
]]></event>
</mod>