Então um Cara fez um topico sobre esse Event defend-the-generato irei passar o site pra mostra tudo certinho mas a minha duvidada.
Site onde Peguei Esse event : http://www.xtibia.com/forum/topic/201610-defend-the-generator/
Minha duvida e como Que eu ligo o event ? , todos comando não funcionam.
fui entra no meu ot e abri o event com o comando /generator open.Não deu nada certo Nem um comando funciona.
Então essa parte pra que serve :
- tp_pos = {x = 316, y = 132, z = 7, stackpos = 1} -- Posição do teleport (Não altere o stackpos)
- Eu acho que e quando escrever o comando /generator open um teleport nascera Nas Posições x = 316 , 132 ..
- ------------------------------------------------------------------------------------
- <talkaction words="/generator" access="5" event="buffer"><![CDATA[
- domodlib('generator')
- if not param then
- doPlayerSendCancel(cid, 'Incorrect params. Choose if the event will "open", "force" or "reset".') returntrue
- elseif param == "open" then
- if getGlobalStorageValue(stor) ~= -1 or getGlobalStorageValue(stor) > 0 then
- doPlayerSendCancel(cid, "You can't start the event now.") return true
- end
- openTeleport()
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You've opened the Defend The Generator event.") return true
- elseif param == "force" then
- if getGlobalStorageValue(stor) == -1 or getGlobalStorageValue(sstor) >= 1 then
- doPlayerSendCancel(cid, "You can't force the event now.") return true
- end
- setGlobalStorageValue(sstor, 1)
- startEvent()
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You've closed the Defend The Generator event.") return true
- elseif param == "reset" then
- if getGlobalStorageValue(stor) == -1 or getGlobalStorageValue(sstor) == -1 then
- doPlayerSendCancel(cid, "You can't end the event now.") return true
- end
- resetEvent()
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You've reseted the Defend The Generator event.") return true
- end
- return true
- ]]></talkaction>
- ------------------------------------------------------------------------------------
- <action actionid="25177" event="script"><![CDATA[
- domodlib('generator')
- if isDefender(cid) and isGeneratorActived() then
- doPlayerSendCancel(cid, "You cannot deactivate the generator. You are defending it!") return true
- elseif isInvader(cid) and isGeneratorActived() then
- setGlobalStorageValue(gstor, -1)
- broadcastMessage(""..getCreatureName(cid).." [iNVADER] turned OFF the generator! Defenders Team now have "..gtime.." seconds to turn on it again or they will lose!")
- y = addEvent(destroyGenerator, gtime*1000)
- elseif isDefender(cid) and not isGeneratorActived() then
- setGlobalStorageValue(gstor, 1)
- generateSparks()
- broadcastMessage(""..getCreatureName(cid).." [DEFENDER] turned ON the generator!")
- stopEvent(y)
- elseif isInvader(cid) and not isGeneratorActived() then
- doPlayerSendCancel(cid, "The generator is already off!") return true
- end
- doSendAnimatedText(getThingPos(item.uid), getGlobalStorageValue(gstor) == -1 and "Off!" or "On!",math.random(1, 255))
- return true
- ]]></action>
- <movevent type="StepIn" actionid="23590" event="script"><![CDATA[
- domodlib('generator')
- function onStepIn(cid, position, fromPosition)
- if getGlobalStorageValue(stor) == (maxplayers-1) then
- setGlobalStorageValue(sstor, 1)
- startEvent()
- else
- broadcastMessage(""..getCreatureName(cid).." entered in the Defend The Generator Event. There is "..(maxplayers-(getGlobalStorageValue(stor)+1)).." slots remaining.")
- end
- selectPlayerTeam(cid)
- return true
- end
- ]]></movevent>
- <event type="logout" name="GeneratorLogout" event="script"><![CDATA[
- domodlib('generator')
- function onLogout(cid)
- if getPlayerStorageValue(cid, tstor) >= 1 then
- doPlayerSendCancel(cid, "You can't logout when you are in this event!") return false
- end
- return true
- end
- ]]></event>
- <event type="preparedeath" name="GeneratorDeath" event="script"><![CDATA[
- domodlib('generator')
- function onPrepareDeath(cid)
- if isInvader(cid) and getGlobalStorageValue(invstor) > 1 then
- setGlobalStorageValue(invstor, getGlobalStorageValue(invstor)-1)
- broadcastMessage(""..getCreatureName(cid).." [iNVADER] died. "..getGlobalStorageValue(defstor).." Defenders and "..getGlobalStorageValue(invstor).." Invaders left.")
- elseif isInvader(cid) and getGlobalStorageValue(invstor) == 1 then
- for _, wid in ipairs(getPlayersOnline()) do
- if isDefender(wid) then
- if not doPlayerAddItem(wid, prizes[prand].id, prizes[prand].count) then
- local parcel = doCreateItemEx(ITEM_PARCEL)
- doAddContainerItem(parcel, prizes[prand].id, prizes[prand].count)
- doPlayerSendMailByName(getCreatureName(wid), parcel, getPlayerTown(wid))
- doPlayerSendTextMessage(wid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough cap. Your prize was sent to the depot.")
- end
- doPlayerSendTextMessage(wid, MESSAGE_STATUS_CONSOLE_BLUE, "You win "..prizes[prand].count.."x "..getItemNameById(prizes[prand].id)..".")
- end
- end
- broadcastMessage("All the Invaders are dead. Defenders won the Defend The Generator Event!")
- resetEvent()
- elseif isDefender(cid) then
- setGlobalStorageValue(defstor, getGlobalStorageValue(defstor)-1)
- broadcastMessage(""..getCreatureName(cid).." [DEFENDER] died. "..getGlobalStorageValue(defstor).." Defenders and "..getGlobalStorageValue(invstor).." Invaders left.")
- end
- setPlayerStorageValue(cid, tstor, -1)
- doCreatureSetDropLoot(cid, false)
- doPlayerSetLossSkill(cid, 0)
- doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0)
- return true
- end
- ]]></event>
- <event type="combat" name="GeneratorCast" event="script"><![CDATA[
- domodlib('generator')
- function onCombat(cid, target)
- if isPlayer(cid) and isPlayer(target) then
- if isDefender(cid) and isDefender(target) or isInvader(cid) and isInvader(target) then
- doPlayerSendCancel(cid, "You may not attack your team mates.") return false
- end
- end
- return true
- end
- ]]></event>
- </mod>
Mas nada Funcionou os comandos não funciona.
Eu acho que pra funciona normal Teria que instalar cada parte dessa que passei em cada parte.
ali talkactions em data/talkactions
Foi tudo instalado no mods Mas não funciona Nao da pra Iniciar o event Nadaa..
+rep pra quem conseguir ME ajuda.
Observe Instalei Tudo como O site do topico que passei acima diz tudo Certinho igual o site mas não funciona então nãoo adianta fica falando coisas ai que não instalei certo..
Minha instalação foi assim criei um xml no mods , com o nome Defend The Generator.xml
depois configurei todas posições tudo certinho Mas não funciona Pls ajuda ai ..+rep
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
O meu [Defend The Generator.xml] Ficou assim :
---------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Não sei oque Tem de errado Mas ta igual ao Topico : http://www.xtibia.com/forum/topic/201610-defend-the-generator/
+rep para os que ajudam ..xD
UPPPPPPPPPP , UPPPPPPPPPPPPP