Ir para conteúdo

Featured Replies

Postado

oi gente de novo xD

 

Como vcs ja sabem, eu to com um server 10.76 usando TFS 1.0. Eu nao paro de encontrar problemas, e quando eu nao consigo resolver venho aqui suplicar pela ajuda dos veteranos.

 

Bem... Agora quando um player morre ele nao perde nada NUNCA (item) sem aol, e se ele nao tiver mochila nem bag nem nada q segure item, ele re aparece com uma mochila, como assim!? ainda ganha uma backpack gratis? Alguem me ajuda, por favor... sou noob =(

 

acho que esse eh o script de morte. Estava na pasta "creaturescripts"

 

local deathListEnabled = true

local maxDeathRecords = 5
 
function onDeath(cid, corpse, killer, mostDamage, unjustified, mostDamage_unjustified)
local player = Player(cid)
 
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You are dead.")
if player:getStorageValue(cid, 1101) > 0 then
player:setStorageValue(1101, 0)
end
 
if not deathListEnabled then
return
end
 
local byPlayer = 0
local killerCreature = Creature(killer)
if killerCreature == nil then
killerName = "field item"
else
if killerCreature:isPlayer() then
byPlayer = 1
else
local master = killerCreature:getMaster()
if master and master ~= killerCreature and master:isPlayer() then
killerCreature = master
byPlayer = 1
end
end
killerName = killerCreature:getName()
end
 
local byPlayerMostDamage = 0
if mostDamage == 0 then
mostDamageName = "field item"
else
local mostDamageKiller = Creature(mostDamage)
if mostDamageKiller:isPlayer() then
byPlayerMostDamage = 1
else
local master = mostDamageKiller:getMaster()
if master and master ~= mostDamageKiller and master:isPlayer() then
mostDamageKiller = master
byPlayerMostDamage = 1
end
end
mostDamageName = mostDamageKiller:getName()
end
 
local playerGuid = player:getGuid()
db.query("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `is_player`, `mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified`) VALUES (" .. playerGuid .. ", " .. os.time() .. ", " .. player:getLevel() .. ", " .. db.escapeString(killerName) .. ", " .. byPlayer .. ", " .. db.escapeString(mostDamageName) .. ", " .. byPlayerMostDamage .. ", " .. unjustified .. ", " .. mostDamage_unjustified .. ")")
local resultId = db.storeQuery("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. playerGuid)
 
local deathRecords = 0
local tmpResultId = resultId
while tmpResultId ~= false do
tmpResultId = result.next(resultId)
deathRecords = deathRecords + 1
end
 
if resultId ~= false then
result.free(resultId)
end
 
while deathRecords > maxDeathRecords do
db.query("DELETE FROM `player_deaths` WHERE `player_id` = " .. playerGuid .. " ORDER BY `time` LIMIT 1")
deathRecords = deathRecords - 1
end
 
if byPlayer == 1 then
local playerGuild = player:getGuild()
if playerGuild then
local killerGuild = killerCreature:getGuild()
if playerGuild ~= killerGuild and isInWar(cid, killerCreature) then
local warId = false
resultId = db.storeQuery("SELECT `id` FROM `guild_wars` WHERE `status` = 1 AND ((`guild1` = " .. killerGuild:getId() .. " AND `guild2` = " .. playerGuild:getId() .. ") OR (`guild1` = " .. playerGuild:getId() .. " AND `guild2` = " .. killerGuild:getId() .. "))")
if resultId ~= false then
warId = result.getDataInt(resultId, "id")
result.free(resultId)
end
 
if warId ~= false then
db.query("INSERT INTO `guildwar_kills` (`killer`, `target`, `killerguild`, `targetguild`, `time`, `warid`) VALUES (" .. db.escapeString(killerName) .. ", " .. db.escapeString(player:getName()) .. ", " .. killerGuild:getId() .. ", " .. playerGuild:getId() .. ", " .. os.time() .. ", " .. warId .. ")")
end
end
end
end
end

  • Respostas 15
  • Visualizações 3k
  • Created
  • Última resposta

Top Posters In This Topic

Postado
  • Autor

ok, segue o bagulho que vc pediu

 

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

<creaturescripts>
 
<!-- Secret Service Quest -->
<event type="kill" name="SecretServiceBlackKnight" script="others/blackKnight.lua"/>
 
<!-- Spike Task: Drillworm -->
<event type="kill" name="SpikeDrillworm" script="spike task/drillworm.lua"/>
 
<!-- Thieves Guild Quest -->
<event type="kill" name="ThievesGuildNomad" script="others/nomad.lua"/>
 
<!-- Pythius The Rotten -->
<event type="kill" name="pythiusDead" script="pythius the rotten/pythiusDead.lua" />
 
<!-- Gray Island -->
<event type="kill" name="bossesGrayIsland" script="gray island/bossesgrayisland.lua"/> 
 
<!-- The Elemental Spheres -->
<event type="death" name="ElementalSpheres" script="elemental spheres quest/the_elemental_spheres.lua"/>
<event type="kill" name="ElementalSpheresKill" script="elemental spheres quest/the_elemental_spheres.lua"/>
<event type="login" name="ElementalSpheresLogin" script="elemental spheres quest/the_elemental_spheres.lua"/>
 
<!-- Gnomebase -->
<event type="kill" name="WarzoneTwo" script="gnomebase/warzone2.lua"/>
<event type="kill" name="WarzoneThree" script="gnomebase/warzone3.lua"/>
<event type="kill" name="bossesWarzone" script="gnomebase/bossesWarzone.lua"/> 
 
<!-- Svargrond Arena: Killing a boss -->
<event type="kill" name="SvargrondArenaKill" script="svargrond arena quest/arena_kill.lua"/>
 
<!-- Pharaos: Portal to reward room -->
<event type="kill" name="PharaoKillPortal" script="others/pharaoPortal.lua"/>
 
<!-- In Service Of Yalahar Quest -->
<event type="kill" name="inServiceOfYalaharQuestsDiseased" script="in service of yalahar quest/inServiceOfYalaharQuestsDiseased.lua"/>
<event type="kill" name="inServiceOfYalaharQuestsMorik" script="in service of yalahar quest/inServiceOfYalaharQuestsMorik.lua"/>
<event type="kill" name="inServiceOfYalaharQuestsQuara" script="in service of yalahar quest/inServiceOfYalaharQuestsQuara.lua"/>
 
<!-- Inquisition Quest -->
<event type="kill" name="inquisitionQuestBosses" script="inquisition quest/inquisitionQuestBosses.lua"/>
<event type="kill" name="inquisitionQuestUngreez" script="inquisition quest/inquisitionQuestUngreez.lua"/>
 
<!-- Killing In The Name Of Quest -->
<event type="kill" name="killingInTheNameOfQuestKills" script="killing in the name of quest/killingInTheNameOfQuestKills.lua"/>
<event type="kill" name="TaskCustom" script="killing in the name of quest/taskcustom.lua"/>
 
<!-- Raging Mage Tower -->
<event type="kill" name="Yielothax" script="raging mage tower/yielothax.lua"/>
<event type="kill" name="Energized" script="raging mage tower/energized.lua"/>
<event type="kill" name="Raging" script="raging mage tower/raging.lua"/>
 
<!-- The Masters Voice Quest -->
<event type="kill" name="MastersVoiceServants" script="their master's voice quest/ServantsKill.lua"/>
 
<!-- Wrath of Emperor -->
<event type="kill" name="wrathBoss" script="wrath of the emperor quest/wrathOfTheEmperorQuestBoss.lua"/>
<event type="kill" name="wrathZalamon" script="wrath of the emperor quest/wrathOfTheEmperorQuestZalamon.lua"/>
 
<!-- Others -->
<event type="logout" name="Cast" script="others/cast.lua"/>
<event type="login" name="PlayerLogin" script="others/login.lua"/>
<event type="death" name="PlayerDeath" script="others/playerdeath.lua"/>
<event type="advance" name="AdvanceSave" script="others/advance_save.lua"/>
<event type="advance" name="AdvanceRook" script="others/advance_rook.lua"/>
<event type="advance" name="Recompense" script="others/recompense.lua"/>
<event type="login" name="AddonsMounts" script="others/addons-montarias.lua"/>
<event type="login" name="FirstItems" 
script="others/firstitems.lua"/>
 
</creaturescripts>

Postado
  • Autor

kra, o advance rook nao tem nada a ver...

local config = {

level1 = 8,     
msg1 = "Congratulations! You are ready to leave this island and choose a vocation now. Go see the Oracle over the academy in Rookgaard before you advance to level 10!", 
msgtype = MESSAGE_EVENT_ADVANCE,
}
 
function onAdvance(cid, oldLevel, newLevel)
if getPlayerLevel(cid) >= config.level1 and getPlayerStorageValue(cid,655) ~= 1 then
setPlayerStorageValue(cid,655,1)
doPlayerSendTextMessage(cid, config.msgtype, config.msg1)
end
return TRUE
end

Nao tem nenhuma gambiarra que eu possa fazer pra forçar uma regra de pena de morte?

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.9k

Informação Importante

Confirmação de Termo