-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
-
Conteúdo Similar
-
- 0 respostas
- 1128 visualizações
-
[8.6] AdinOTS | Karmia Map | Autoloot, Daily Rewards, Task System, Raid System, Anti-Bot
Por brungran,
- 0 respostas
- 1176 visualizações
-
otserv 8.x [Original]Global Compacto Completo 8.60 [I'm Back](Links Atualizados) 1 2 3 4 10
Por soldoran,
- 137 respostas
- 78991 visualizações
-
- 0 respostas
- 1785 visualizações
-
- 2 respostas
- 1528 visualizações
-

Pergunta
Kimbly 1
Bem gostaria que alguém muda-se o script do Vodkart (http://www.xtibia.co...ent/page__st__0) uma pequena mudança acho que não dará muito trabalho vou logo ao principal:
_Lib_Battle_Info = {
Reward = {2160,10},
TeamOne = {name = "Black Assassins", storage = 140120, pos = {x=613,y=802,z=7}},
TeamTwo = {name = "Red Barbarians",storage = 140121,pos = {x=631,y=801,z=7}},
storage_count = 180400,
tpPos = {x=158, y=57, z=7},
limit_Time = 10 -- em minutos
}
function resetBattle()
return setGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage, 0) and setGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage, 0)
end
function OpenWallBattle()
local B = {
{1543,{x=622, y=803, z=7, stackpos = 1}},
{1543,{x=622, y=804, z=7, stackpos = 1}},
{1543,{x=622, y=805, z=7, stackpos = 1}},
{1543,{x=622, y=806, z=7, stackpos = 1}}
}
for i = 1, #B do
if getTileItemById(B[2], B[1]).uid == 0 then
doCreateItem(B[1], 1, B[2])
else
doRemoveItem(getThingfromPos(B[2]).uid,1)
end
end
end
function doBroadCastBattle(type,msg)
local players = {}
for _, cid in pairs(getPlayersOnline()) do
if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage) == 1 or getPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage) == 1 then
table.insert(players, cid)
end
end
for i = 1, #players do
doPlayerSendTextMessage(players,type,msg)
end
end
function removeBattleTp()
local t = getTileItemById(_Lib_Battle_Info.tpPos, 1387).uid
return t > 0 and doRemoveItem(t) and doSendMagicEffect(_Lib_Battle_Info.tpPos, CONST_ME_POFF)
end
function getWinnersBattle(storage)
local players,str = {},""
for _, cid in pairs(getPlayersOnline()) do
if getPlayerStorageValue(cid, storage) == 1 then
table.insert(players, cid)
end
end
str = str .. ""..#players.." Player"..(#players > 1 and "s" or "").." from team "..(getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage) == 0 and _Lib_Battle_Info.TeamTwo.name or _Lib_Battle_Info.TeamOne.name).." won the event battlefield, they received a ".._Lib_Battle_Info.Reward[2].." "..getItemNameById(_Lib_Battle_Info.Reward[1]).."!"
for i = 1, #players do
doPlayerAddItem(players, _Lib_Battle_Info.Reward[1], _Lib_Battle_Info.Reward[2])
doRemoveCondition(players, CONDITION_OUTFIT)
doTeleportThing(players, getTownTemplePosition(getPlayerTown(players)))
setPlayerStorageValue(players, storage, -1)
end
resetBattle()
OpenWallBattle()
return doBroadcastMessage(str)
end
function CheckEvent(delay)
if delay > 0 and getGlobalStorageValue(_Lib_Battle_Info.storage_count) > 0 then
doBroadcastMessage("[battleField Event] We are waiting "..getGlobalStorageValue(_Lib_Battle_Info.storage_count).." players to Battlefield starts")
elseif delay == 0 and getGlobalStorageValue(_Lib_Battle_Info.storage_count) > 0 then
local players = {}
for _, cid in pairs(getPlayersOnline()) do
if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage) == 1 or getPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage) == 1 then
table.insert(players, cid)
end
end
for i = 1, #players do
doRemoveCondition(players, CONDITION_OUTFIT)
doTeleportThing(players, getTownTemplePosition(getPlayerTown(players)))
setPlayerStorageValue(players, getPlayerStorageValue(players, _Lib_Battle_Info.TeamOne.storage) == 1 and _Lib_Battle_Info.TeamOne.storage or _Lib_Battle_Info.TeamTwo.storage, -1)
end
doBroadcastMessage("The event cannot be started because not had enough players.")
setGlobalStorageValue(_Lib_Battle_Info.storage_count, 0)
resetBattle()
removeBattleTp()
end
addEvent(CheckEvent, 60000, delay-1)
end
Bem eu gostaria que muda-se aqui olha:
_Lib_Battle_Info = { Reward = {2160,10}, TeamOne = {name = "Black Assassins", storage = 140120, pos = {x=613,y=802,z=7}}, TeamTwo = {name = "Red Barbarians",storage = 140121,pos = {x=631,y=801,z=7}}, storage_count = 180400, tpPos = {x=158, y=57, z=7}, limit_Time = 10 -- em minutos }Nessa parte os jogadores ganhadores do evento ganharam 100k
Eu simplesmente gostaria que ao invés de receber 100k teleporte-se os jogadores ganhadores para um local
{ x = xxxx, y = xxxx, z = xxxx }Eu tenho mais ou menos uma noção de como seria, bem acho que seria mais ou menos isso:
local config = { area1 = {x=0000,y=0000,z=0000}, } oTeleportThing(cid, config.area1)Porém não sei como acrescentar sem danificar o script...
Quem conseguir +Rep é garantido
Link para o comentário
https://xtibia.com/forum/topic/214535-sistema-battlefield-event/Compartilhar em outros sites
3 respostass a esta questão
Posts Recomendados
Arquivado
Este tópico foi arquivado e está fechado para novas respostas.