Ir para conteúdo
  • Cadastre-se

Posts Recomendados

boa tarde, bom, tenho um ot global 8.60 e tenho os sistema war system, utilizo o  TFS REV 3777 version 0_4, meu cast system está normal, não tem error de script do war system, porem do o comando /war invite, guild, frag e não acontece nada, não da error, não invita, nada ! me ajudem !

 

 

talkactions/data/war.lua

function onSay(cid, words, param, channel)
local guild = getPlayerGuildId(cid)
if(not guild or getPlayerGuildLevel(cid) < GUILDLEVEL_LEADER) then
doPlayerSendChannelMessage(cid, "", "You cannot execute this talkaction.", TALKTYPE_CHANNEL_W, 0)
return true
end
 
local t = string.explode(param, ",")
if(not t[2]) then
doPlayerSendChannelMessage(cid, "", "Not enough param(s).", TALKTYPE_CHANNEL_W, 0)
return true
end
 
local enemy = getGuildId(t[2])
if(not enemy) then
doPlayerSendChannelMessage(cid, "", "Guild \"" .. t[2] .. "\" does not exists.", TALKTYPE_CHANNEL_W, 0)
return true
end
 
if(enemy == guild) then
doPlayerSendChannelMessage(cid, "", "You cannot perform war action on your own guild.", TALKTYPE_CHANNEL_W, 0)
return true
end
 
local enemyName, tmp = "", db.getResult("SELECT `name` FROM `guilds` WHERE `id` = " .. enemy)
if(tmp:getID() ~= -1) then
enemyName = tmp:getDataString("name")
tmp:free()
end
 
if(isInArray({"accept", "reject", "cancel"}, t[1])) then
local query = "`guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild
if(t[1] == "cancel") then
query = "`guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy
end
 
tmp = db.getResult("SELECT `id`, `begin`, `end`, `payment` FROM `guild_wars` WHERE " .. query .. " AND `status` = 0")
if(tmp:getID() == -1) then
doPlayerSendChannelMessage(cid, "", "Currently there's no pending invitation for a war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0)
return true
end
 
if(t[1] == "accept") then
local _tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild)
local state = _tmp:getID() < 0 or _tmp:getDataInt("balance") < tmp:getDataInt("payment")
 
_tmp:free()
if(state) then
doPlayerSendChannelMessage(cid, "", "Your guild balance is too low to accept this invitation.", TALKTYPE_CHANNEL_W, 0)
return true
end
 
db.query("UPDATE `guilds` SET `balance` = `balance` - " .. tmp:getDataInt("payment") .. " WHERE `id` = " .. guild)
end
 
query = "UPDATE `guild_wars` SET "
local msg = "accepted " .. enemyName .. " invitation to war."
if(t[1] == "reject") then
query = query .. "`end` = " .. os.time() .. ", `status` = 2"
msg = "rejected " .. enemyName .. " invitation to war."
elseif(t[1] == "cancel") then
query = query .. "`end` = " .. os.time() .. ", `status` = 3"
msg = "canceled invitation to a war with " .. enemyName .. "."
else
query = query .. "`begin` = " .. os.time() .. ", `end` = " .. (tmp:getDataInt("end") > 0 and (os.time() + ((tmp:getDataInt("begin") - tmp:getDataInt("end")) / 86400)) or 0) .. ", `status` = 1"
end
 
query = query .. " WHERE `id` = " .. tmp:getDataInt("id")
if(t[1] == "accept") then
doGuildAddEnemy(guild, enemy, tmp:getDataInt("id"), WAR_GUILD)
doGuildAddEnemy(enemy, guild, tmp:getDataInt("id"), WAR_ENEMY)
end
 
tmp:free()
db.query(query)
doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. msg, MESSAGE_EVENT_ADVANCE)
return true
end
 
if(t[1] == "invite") then
local str = ""
tmp = db.getResult("SELECT `guild_id`, `status` FROM `guild_wars` WHERE `guild_id` IN (" .. guild .. "," .. enemy .. ") AND `enemy_id` IN (" .. enemy .. "," .. guild .. ") AND `status` IN (0, 1)")
if(tmp:getID() ~= -1) then
if(tmp:getDataInt("status") == 0) then
if(tmp:getDataInt("guild_id") == guild) then
str = "You have already invited " .. enemyName .. " to war."
else
str = enemyName .. " have already invited you to war."
end
else
str = "You are already on a war with " .. enemyName .. "."
end
 
tmp:free()
end
 
if(str ~= "") then
doPlayerSendChannelMessage(cid, "", str, TALKTYPE_CHANNEL_W, 0)
return true
end
 
local frags = tonumber(t[3])
if(frags ~= nil) then
frags = math.max(10, math.min(1000, frags))
else
frags = 100
end
 
local payment = tonumber(t[4])
if(payment ~= nil) then
payment = math.max(100000, math.min(1000000000, payment))
tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild)
 
local state = tmp:getID() < 0 or tmp:getDataInt("balance") < payment
tmp:free()
if(state) then
doPlayerSendChannelMessage(cid, "", "Your guild balance is too low for such payment.", TALKTYPE_CHANNEL_W, 0)
return true
end
 
db.query("UPDATE `guilds` SET `balance` = `balance` - " .. payment .. " WHERE `id` = " .. guild)
else
payment = 0
end
 
local begining, ending = os.time(), tonumber(t[5])
if(ending ~= nil and ending ~= 0) then
ending = begining + (ending * 86400)
else
ending = 0
end
 
db.query("INSERT INTO `guild_wars` (`guild_id`, `enemy_id`, `begin`, `end`, `frags`, `payment`) VALUES (" .. guild .. ", " .. enemy .. ", " .. begining .. ", " .. ending .. ", " .. frags .. ", " .. payment .. ");")
doBroadcastMessage(getPlayerGuildName(cid) .. " has invited " .. enemyName .. " to war till " .. frags .. " frags.", MESSAGE_EVENT_ADVANCE)
return true
end
 
if(not isInArray({"end", "finish"}, t[1])) then
return false
end
 
local status = (t[1] == "end" and 1 or 4)
tmp = db.getResult("SELECT `id` FROM `guild_wars` WHERE `guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy .. " AND `status` = " .. status)
if(tmp:getID() ~= -1) then
local query = "UPDATE `guild_wars` SET `end` = " .. os.time() .. ", `status` = 5 WHERE `id` = " .. tmp:getDataInt("id")
tmp:free()
doGuildRemoveEnemy(guild, enemy)
doGuildRemoveEnemy(enemy, guild)
 
db.query(query)
doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. (status == 4 and "mend fences" or "ended up a war") .. " with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE)
return true
end
 
if(status == 4) then
doPlayerSendChannelMessage(cid, "", "Currently there's no pending war truce from " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0)
return true
end
 
tmp = db.getResult("SELECT `id`, `end` FROM `guild_wars` WHERE `guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild .. " AND `status` = 1")
if(tmp:getID() ~= -1) then
if(tmp:getDataInt("end") > 0) then
tmp:free()
doPlayerSendChannelMessage(cid, "", "You cannot request ending for war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0)
return true
end
 
local query = "UPDATE `guild_wars` SET `status` = 4, `end` = " .. os.time() .. " WHERE `id` = " .. tmp:getDataInt("id")
tmp:free()
 
db.query(query)
doBroadcastMessage(getPlayerGuildName(cid) .. " has signed an armstice declaration on a war with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE)
return true
end
 
doPlayerSendChannelMessage(cid, "", "Currently there's no active war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0)
return true
end

 

Link para o post
Compartilhar em outros sites
  • 3 weeks later...

Altere por esta: 

 

 

-- Feary's WAR LUA

-- Created: 6/13/2014

-- Last Update: 6/13/2014

-- To Do List

--

--

-- includes

include('include/functions.lua')

-- Gear Sets

function get_sets()

--includes

--include('include/autoexec.lua')

include('include/binds.lua')

-- Get WAR Gearsets

include('Gearsets/'..player.name..'/WAR_Gearsets.lua')

-- Define Default Values for Variables

Mode = 0

PDT = 0

MDT = 0

ShadowType = 'None'

GreatAxes = T{'Castigation','Sverga'}

GreatSwords = T{}

end

function file_unload()

clear_binds()

end

function self_command(command)

-- Lock PDT

if command == 'PDT' then

if PDT == 1 then

windower.add_to_chat(121,'PDT Unlocked')

-- make sure other values are set to default

PDT = 0

-- Unlock MDT set and equip Current TP set

MDT = 0

-- Place Me in my previous set.

if player.status == 'Engaged' then

previous_set()

else

equip(sets.idle.Standard)

end

else

-- Make sure other values are set to default

MDT = 0

-- Set PDT set and equip it

PDT = 1

equip(sets.idle.PDT)

windower.add_to_chat(121,'PDT Set Locked')

end

-- Lock MDT

elseif command == 'MDT' then

if MDT == 1 then

-- make sure other values are set to default

PDT = 0

-- Unlock MDT set and equip Current TP set

MDT = 0

windower.add_to_chat(121,'MDT Unlocked')

-- Place Me in my previous set.

if player.status == 'Engaged' then

previous_set()

else

equip(sets.idle.Standard)

end

else

-- make sure other values are set to default

PDT = 0

-- lock MDT set and equip it

MDT = 1

equip(sets.idle.MDT)

windower.add_to_chat(121,'MDT Set Locked')

end

elseif command == 'TP' then

if PDT == 1 or MDT == 1 then

-- Reset to Default

PDT = 0

MDT = 0

-- Place me in previous set

if player.status == 'Engaged' then

previous_set()

else

equip(sets.idle.Standard)

end

else

if Mode >= 2 then

-- Reset to 0

Mode = 0

else

-- Increment by 1

Mode = Mode + 1

end

-- Place me in previous set

if player.status == 'Engaged' then

previous_set()

else

equip(sets.idle.Standard)

end

end

elseif command == 'twilight' then

-- Twilight Helm/Mail logic

if player.equipment.head == 'Twilight Helm' and player.equipment.body == 'Twilight Mail' then

enable('head','body')

if player.status == "Engaged" then

-- equip appropriate set

previous_set()

else

equip(sets.idle.Standard)

end

windower.add_to_chat(121, 'Twilight Unequipped')

else

equip({head="Twilight Helm",body="Twilight Mail"})

end

end

end

-- Gain or lose buffs

function buff_change(buff,g_or_l)

-- Global Status

include('include/status.lua')

end

function status_change(new,old)

if T{'Idle','Resting'}:contains(new) then

if areas.Town:contains(world.zone) then

windower.add_to_chat(121, "Town Gear")

equip(sets.misc.Town)

else

if PDT == 1 then

if buffactive['Weakness'] or player.hpp < 30 then

equip(sets.idle.PDT,{head="Twilight Helm",body="Twilight Mail"})

else

equip(sets.idle.PDT)

end

elseif MDT == 1 then

equip(sets.idle.MDT)

elseif new == "Resting" then

equip(sets.Resting)

else

equip(sets.idle.Standard)

end

end

elseif new == 'Engaged' then

-- Automatically activate Hasso when engaging

if player.sub_job["SAM"] and not buffactive['Hasso'] and not buffactive.Amnesia and not buffactive.Obliviscence and not buffactive.Paralysis and windower.ffxi.get_ability_recasts()[138] < 1 then

windower.send_command('Hasso')

end

-- Engaged Sets

if PDT == 1 then

if buffactive['Weakness'] or player.hpp < 30 then

equip(sets.idle.PDT,{head="Twilight Helm",body="Twilight Mail"})

else

equip(sets.idle.PDT)

end

elseif MDT == 1 then

equip(sets.idle.MDT)

else

-- Equip apporiate sets

previous_set()

end

end

end

function precast(spell,arg)

-- Job Abilities

if spell.type == 'JobAbility' then

if sets.precast.JA[spell.name] then

equip(sets.precast.JA[spell.name])

end

-- Weaponskills

elseif spell.type == 'WeaponSkill' then

if player.status == 'Engaged' then

if player.tp >= 100 then

if spell.target.distance <= 5 then

if buffactive["Mighty Strikes"] then

if sets.precast.WS.MS[spell.name] then

equip(sets.precast.WS.MS[spell.name])

else

equip(sets.precast.WS.MS)

end

else

if Mode == 1 then

if sets.precast.WS.Acc[spell.name] then

equip(sets.precast.WS.Acc[spell.name])

else

if sets.precast.WS[spell.name] then

equip(sets.precast.WS[spell.name])

else

equip(sets.precast.WS)

end

end

else

if sets.precast.WS[spell.name] then

equip(sets.precast.WS[spell.name])

else

equip(sets.precast.WS)

end

end

end

else

cancel_spell()

windower.add_to_chat(121, 'Canceled '..spell.name..'.'..spell.target.name..' is Too Far')

end

else

cancel_spell()

windower.add_to_chat(121, ''..player.tp..'TP is not enough to WS')

end

else

cancel_spell()

windower.add_to_chat(121, 'You must be Engaged to WS')

end

elseif spell.type:endswith('Magic') then

-- Cancel Sneak

if spell.name == 'Sneak' and buffactive.Sneak and spell.target.type == 'SELF' then

windower.ffxi.cancel_buff(71)

cast_delay(0.3)

end

-- Magic spell gear handling(Precast)

elseif spell.type == 'Ninjutsu' then

equip(sets.precast.Fastcast)

if windower.wc_match(spell.name,'Utsusemi*') then

equip(sets.precast.Utsusemi)

end

else

-- Special handling to remove Dancer sub job Sneak effect

if spell.name == 'Spectral Jig' and buffactive.Sneak then

windower.ffxi.cancel_buff(71)

cast_delay(0.3)

elseif windower.wc_match(spell.name,'Curing*') then

equip(sets.misc.Waltz)

elseif windower.wc_match(spell.name,'*Step') then

equip(sets.misc.Steps)

elseif windower.wc_match(spell.name,'*Flourish') then

equip(sets.misc.flourish)

end

end

end

function midcast(spell,arg)

if spell.type == 'Ninjutsu' then

-- Gear change to Damage Taken set when in midcast of Utsusemi

-- Special handling to remove Utsusemi, Sneak, and Stoneskin effects if they are active

if windower.wc_match(spell.name,'Utsusemi*') then

equip(sets.precast.Utsusemi)

if spell.name == 'Utsusemi: Ichi' and ShadowType == 'Ni' then

if buffactive['Copy Image'] then

windower.ffxi.cancel_buff(66)

elseif buffactive['Copy Image (2)'] then

windower.ffxi.cancel_buff(444)

elseif buffactive['Copy Image (3)'] then

windower.ffxi.cancel_buff(445)

elseif buffactive['Copy Image (4+)'] then

windower.ffxi.cancel_buff(446)

end

end

elseif spell.name == 'Monomi: Ichi' or spell.name == 'Sneak' and buffactive.Sneak and spell.target.type == 'SELF' then

windower.ffxi.cancel_buff(71)

end

end

end

function aftercast(spell,arg)

-- Engaged

if player.status == 'Engaged' then

if PDT == 1 then

if buffactive['Weakness'] or player.hpp < 30 then

equip(sets.idle.PDT,{head="Twilight Helm",body="Twilight Mail"})

else

equip(sets.idle.PDT)

end

elseif MDT == 1 then

equip(sets.idle.MDT)

else

previous_set()

end

else

if PDT == 1 then

if buffactive['Weakness'] or player.hpp < 30 then

equip(sets.idle.PDT,{head="Twilight Helm",body="Twilight Mail"})

else

equip(sets.idle.PDT)

end

elseif MDT == 1 then

equip(sets.idle.MDT)

else

equip(sets.idle.Standard)

end

end

-- Changes shadow type variable to allow cancel Copy Image if last cast was Utsusemi: Ni

if spell and spell.name == 'Utsusemi: Ni' then

ShadowType = 'Ni'

elseif spell and spell.name == 'Utsusemi: Ichi' then

ShadowType = 'Ichi'

end

end

function previous_set()

slot_lock()

-- Great Axe

if GreatAxes:contains(player.equipment.main) then

if Mode == 1 then

if buffactive.Ionis and areas.Adoulin:contains(world.area) then

equip(sets.TP.GA.Acc.Ionis)

--windower.add_to_chat(121,'Ionis buffed')

else

equip(sets.TP.GA.Acc)

end

elseif Mode == 2 then

equip(sets.TP.Hybrid)

else

if buffactive.Ionis and areas.Adoulin:contains(world.area) then

equip(sets.TP.GA.Ionis)

--windower.add_to_chat(121,'Ionis buffed')

else

equip(sets.TP.GA)

end

end

elseif GreatSwords:contains(player.equipment.main) then

if Mode == 1 then

equip(sets.TP.GS.Acc)

elseif Mode == 2 then

equip(sets.TP.Hybrid)

else

equip(sets.TP.GS)

end

else

if Mode == 1 then

equip(sets.TP.Acc)

elseif Mode == 2 then

equip(sets.TP.Hybrid)

else

equip(sets.TP)

end

end

end

function slot_lock()

-- Twilight Helm/Mail logic

if player.equipment.head == 'Twilight Helm' and player.equipment.body == 'Twilight Mail' then

disable('head','body')

else

enable('head','body')

end

if player.equipment.left_ear == 'Reraise Earring' then

disable('left_ear')

windower.add_to_chat(8,'Reraise Earring equiped on left ear')

elseif player.equipment.right_ear == 'Reraise Earring' then

disable('right_ear')

windower.add_to_chat(8,'Reraise Earring equiped on right ear')

else

enable('left_ear','right_ear')

end

end

Editado por Mirkaan (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por Jaurez
      .
    • Por Cat
      Em alguns casos, o tibia 8.60 comum não abre de jeito nenhum no map editor, mesmo desmarcando check file signatures e configurando o path corretamente.
       
      Este é o client 8.60 adaptado para o Remere's Map Editor. Resolvi postar já que ele foi removido do site oficial do RME. (ficou apenas a versão para linux lá)
      Se estiver tendo problemas para abrir a versão 8.60, tente utilizar este.
                                                                                                                     
      Baixar o Tibia Client 8.60 que funciona no Remere’s Map Editor
      Essa versão do Tibia 8.60 client resolve o erro unsupported client version ou Could not locate tibia.dat and/or tibia.spr, please navigate to your tibia 8.60 installation folder.
       
      Downloads
      https://tibiaking.com/applications/core/interface/file/attachment.php?id=47333

      Scan: https://www.virustotal.com/gui/file/333e172ac49ba2028db9eb5889994509e7d2de28ebccfa428c04e86defbe15cc
       
    • Por danilo belato
      Fala Galera To Com um problema aki 
       
      quero exporta umas sprites de um server para colocar em outro 
       
      eu clico na sprites ai aparece tds a forma delas do lado de la >>
       
      ai eu clico nela e ponho a opiçao de export mais quando salvo a sprite ela n abri 
       
      aparece isso quando tento vê-la 
       
      visualização não disponível ( no formatos png e bitmap)
       
      Agora no formato idc fala que o paint n pode ler 
       
      me ajudem ae...
    • Por Vitor Bicaleto
      Galera to com o script do addon doll aqui, quando eu digito apenas "!addon" ele aparece assim: Digite novamente, algo está errado!"
      quando digito por exemplo: "!addon citizen" ele não funciona e não da nenhum erro
       
      mesma coisa acontece com o mount doll.. 
    • Por Ayron5
      Substitui uma stone no serve, deu tudo certo fora  esse  erro ajudem  Valendo  Rep+  Grato  

      Erro: data/actions/scripts/boost.lua:557: table index is nil
       [Warning - Event::loadScript] Cannot load script (data/actions/scripts/boost.lua)

      Script:
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo