Ir para conteúdo

[Mod]Team War Ajuda!


soldoran

Posts Recomendados

Bom pessoal,to com 2 problemas

to com um mod de team war,completo

mas tem 2 coisas que estao dando

 

é esse mod aqui

os problemas são:que os 2 times estao nascendo na mesma town,taves eu esteja configurando errado

si for isso alguem me explique

a segunda eh sobre o outfit e a cor

quando o player nasce em algum dos team ele tem a cor no char certinha mas na hora de olhar o outfit e as cor elas estao diferentes,eu queria que ficasse igual a que mostra no char as cores e o outfit nascer com qualquer um..

alguem pode me ajudar?

 

 

 

<?xml version="1.0" encoding="UTF-8"?>

<mod name="teamwar" version="1.0" author="Bogart" contact="otland.net" enabled="yes">

<description>

This should teleport all players to a new random town in intervals and add them into a team.

</description>

<config name="config"><![CDATA[

config = {

t1 = "fagarians", -- red team(1) name

t2 = "homosexualsins", -- blue team(2) name

gstg = 7000, -- global storage

tstg1 = 6666, --team 1 storage

tstg2 = 6667, --team 2 storage

access = 3, -- minimum access to bypass teleportation.

temples = {1,2,3} --townids to teleport to.

}

fromPosition = {x = 32000, y = 31600, z = 0} -- north west corner (remember using z= 0 coz players might be on a higher floor)

toPosition = {x = 32600, y = 32700, z = 15} -- south east corner (remember using z= 15 coz players might be on a lower floor)

]]></config>

<event type="login" name="tlog" event="script"><![CDATA[

domodlib('config')

local conditionBlue = createConditionObject(CONDITION_OUTFIT)

setConditionParam(conditionBlue, CONDITION_PARAM_TICKS, 1000 * 1000)

addOutfitCondition(conditionBlue, {lookType = 143, lookHead = 44, lookBody = 44, lookLegs = 44, lookFeet = 44})

local conditionRed = createConditionObject(CONDITION_OUTFIT)

setConditionParam(conditionRed, CONDITION_PARAM_TICKS, 1000 * 1000)

addOutfitCondition(conditionRed, {lookType = 143, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94})

function onLogin(cid)

if getPlayerGroupId(cid) < 3 then

if getGlobalStorageValue(config.gstg) == 1 then

doPlayerSetTown(cid, getGlobalStorageValue(3454))

doTeleportThing(cid, getPlayerMasterPos(cid))

setPlayerStorageValue(cid, config.tstg1, 1)

doAddCondition(cid, conditionRed)

doPlayerSendTextMessage(cid, 22, "You're going to fight for the "..config.t1.." so pew the shit out of the "..config.t2.."")

setGlobalStorageValue(config.gstg, -1)

else

doPlayerSetTown(cid, getGlobalStorageValue(3454)+2)

doTeleportThing(cid, getPlayerMasterPos(cid))

setPlayerStorageValue(cid, config.tstg2, 1)

doAddCondition(cid, conditionBlue)

doPlayerSendTextMessage(cid, 22, "You're going to fight for the "..config.t2.." so pew the shit out of the "..config.t1.."")

setGlobalStorageValue(config.gstg, 1)

end

end

return TRUE

end

]]></event>

<event type="logout" name="tout" event="script"><![CDATA[

domodlib('config')

function onLogout(cid)

if getPlayerStorageValue(cid, config.tstg1) == 1 then

setPlayerStorageValue(cid, config.tstg1, 0)

setGlobalStorageValue(config.gstg, 1)

elseif getPlayerStorageValue(cid, config.tstg2) == 1 then

setPlayerStorageValue(cid, config.tstg1, 0)

setGlobalStorageValue(config.gstg, -1)

end

return true

end

]]></event>

<event type="death" name="tded" event="script"><![CDATA[

domodlib('config')

function onDeath(cid, corpse, killer)

if getPlayerStorageValue(cid, config.tstg1) == 1 then

setPlayerStorageValue(cid, config.tstg1, 0)

setGlobalStorageValue(config.gstg, 1)

elseif getPlayerStorageValue(cid, config.tstg2) == 1 then

setPlayerStorageValue(cid, config.tstg1, 0)

setGlobalStorageValue(config.gstg, -1)

end

return true

end

]]></event>

<event type="combat" name="tcom" event="script"><![CDATA[

domodlib('config')

function onCombat(cid, target)

local t = {

a = getPlayerStorageValue(cid, config.tstg1),

b = getPlayerStorageValue(cid, config.tstg2),

d = getPlayerStorageValue(target, config.tstg2),

f = getPlayerStorageValue(target, config.tstg1)

}

if isPlayer(cid) and isPlayer(target) then

if t.a == 1 and t.f == 1 then

return doPlayerSendCancel(cid, "You cant attack your team.") and false

elseif t.b == 1 and t.d == 1 then

return doPlayerSendCancel(cid, "You cant attack your team.") and false

end

end

return true

end

]]>></event>

<globalevent name="Map Change" interval="1200000" event="script"><![CDATA[

domodlib('config')

function onThink(interval, lastExecution, thinkInterval)

repeat

RDM = math.random(1,#config.temples)

until RDM ~= getGlobalStorageValue(3454) and isInArray(config.temples, RDM)

for _, pid in ipairs(getPlayersOnline()) do

if getPlayerAccess(pid) < config.access and isInRange(getThingPosition(pid), fromPosition, toPosition) then

doPlayerSetTown(pid, config.temples[RDM])

doTeleportThing(pid, (getTownTemplePosition(config.temples[RDM])), false)

doRemoveCondition(pid, CONDITION_INFIGHT)

doCreatureAddHealth(pid, getCreatureMaxHealth(pid))

doCreatureAddMana(pid, (getCreatureMaxMana(pid) - getCreatureMana(pid)))

doBroadcastMessage("Map has been changed to "..getTownName(config.temples[RDM]).."! next map change will be in 20 minutes! have a nice fight!", MESSAGE_STATUS_WARNING)

setGlobalStorageValue(3454, config.temples[RDM])

end

end

return true

end

]]></globalevent>

</mod>

 

Editado por soldoran
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...