avastsz2856
New Member
- Joined
- Jul 9, 2017
- Messages
- 15
- Reaction score
- 1
please help me, can anybody of good heart convert me?
Lua:
function onStepIn(cid, item, pos, fromPosition)
local pos = getThingfromPos(cid)
if item.actionid == 16203 then
if not isPlayer(cid) then
return true
end
if getGlobalStorageValue(COH_STATUS) == getPlayerGuildName(cid) then
doSendMagicEffect(getThingfromPos(cid), 14)
doPlayerSendTextMessage(cid, 4, "[CoH] Membros da guild dominante "..getGlobalStorageValue(COH_STATUS).." possuem o privilegio de passar por aqui!")
else
doSendMagicEffect(getThingfromPos(cid), 2)
doTeleportThing(cid, fromPosition, false)
doPlayerSendCancel(cid, "[CoH] Você não pertence á guild dominante "..getGlobalStorageValue(COH_STATUS)..".")
end
return true
end
if item.actionid == 16202 then
if not isPlayer(cid) then
return true
end
if getPlayerGuildLevel(cid) > 0 then
if (getGlobalStorageValue(COH_STATUS) ~= getPlayerGuildName(cid)) then
doPlayerSendTextMessage(cid, 20, "[Castle of Honor] Você e sua guild estão no comando, os antigos donos ["..tostring(getGlobalStorageValue(COH_STATUS)).."] podem se vingar!")
setGlobalStorageValue(COH_PREPARE1, -1)
setGlobalStorageValue(COH_PREPARE2, -1)
setGlobalStorageValue(COH_STATUS, getPlayerGuildName(cid))
doCastleRemoveEnemies()
broadcastMessage("[Castle of Honor] O jogador ["..getCreatureName(cid).."] e sua guild ["..getPlayerGuildName(cid).."] estão agora no comando do castelo. Tente dominar o Castle ou os aceite como governantes!")
end
else
doSendMagicEffect(getThingfromPos(cid), 2)
doTeleportThing(cid, fromPosition, false)
doPlayerSendCancel(cid, "[CoH] Você não possui uma guild.")
end
return true
end
if item.actionid == 16200 then
if not isPlayer(cid) then
return true
end
if getPlayerGuildLevel(cid) > 0 then
doPlayerSendTextMessage(cid, 4, "CoH Invasion Camp!")
if (getGlobalStorageValue(COH_PREPARE1) ~= getPlayerGuildName(cid)) and ((getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid))) then
setGlobalStorageValue(COH_PREPARE1, getPlayerGuildName(cid))
broadcastMessage("[Castle of Honor] Atenção! A guild "..getPlayerGuildName(cid).." está indo em direção ao Castelo. Guild dominante preparem-se!")
end
else
doSendMagicEffect(getThingfromPos(cid), 2)
doTeleportThing(cid, fromPosition, false)
doPlayerSendCancel(cid, "[CoH] Você não possui uma guild.")
return true
end
end
if item.actionid == 16201 then
if not isPlayer(cid) then
return true
end
doPlayerSendTextMessage(cid, 4, "CoH Invasion Castle!")
if (getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid)) then
setGlobalStorageValue(COH_PREPARE2, getPlayerGuildName(cid))
broadcastMessage("[Castle of Honor] Atenção! A guild "..getPlayerGuildName(cid).." está próxima do domínio do Castle. Guild dominanete defenda o Castle para não perde-lo!")
end
end
return true
end
Last edited: