/data/creaturescripts/scripts/nome:
function onJoinChannel(cid, channel, users)
local toPosition = {x = 1, y = 2, z = 3}
if(channel == 5) then
if(not getTileInfo(getThingPos(cid)).protection) then
return doPlayerSendCancel(cid, "Só pode usar em protection zone.")
elseif(getCreatureCondition(cid, CONDITION_INFIGHT)) then
return doPlayerSendCancel(cid, "Só pode usar se não estiver com battle.")
end
doTeleportThing(cid, toPosition)
end
return true
end
creaturescripts.xml
<event type="joinchannel" name="eventJoin" event="script" value="nome.lua"/>
login.lua:
registerCreatureEvent(cid, "eventJoin")
Nunca usei essa função, então não te garanto que funcione.






info
Grupo: Campones
Registrado: 03/05/13
Posts: 53
Reputação: +2
Em Data---Xml---Channels tem isso
<?xml version="1.0" encoding="UTF-8"?>
<channels>
<!-- README:
0 - dynamic, reserved for guilds
1 - always acts as Party channel, only "name" tag available
3 - always acts as Rule Violations channel
9 - acts as Help channel- clientsided message
65535 - DO NOT CHANGE THE ID- only "name", "enabled", "active" and "logged" tags available
-->
<channel id="1" name="Party"/>
<channel id="2" name="Staff" access="3"/>
<channel id="3" name="Rule Violations" logged="yes"/>
<channel id="4" name="Counselor" access="1"/>
<channel id="5" name="Event" logged="yes"/>
<channel id="6" name="Trade" level="8" muted="120" conditionId="2" conditionMessage="You may only place one offer in two minutes.">
<vocation id="1-2"/>
</channel>
<channel id="7" name="Trade-Rookgaard" level="2" muted="120" conditionId="3" conditionMessage="You may only place one offer in two minutes.">
<vocation id="0"/>
</channel>
<channel id="8" name="RL-Chat" level="2"/>
<channel id="9" name="Help" logged="yes"/>
<!-- <channel id="10" name="My Custom Channel"/> -->
<channel id="65535" name="Private Chat Channel"/>
</channels>
Tem como fazer para que quando alguém clica ali no lugar de abrir o channel, teleport para esse local?
y=1987 x=354 z=7
????
Vodkart,
Skymagnun,
Roksas.
Alguém me ajuda.
Darei muitos Rep+