kadevidaloka 2 Postado Julho 30, 2009 Share Postado Julho 30, 2009 bom ja vi em 1 server e queria colocar no meu e o seguinte queria que quando alguem matasse 1 player aparecesse em sua bp 1 morgaroth heart falando Seu nome matou o player tal no nivel tal. queria q so aparecesse o coraçao se matasse players lvl150+ ty Link para o comentário https://xtibia.com/forum/topic/117343-pedidocora%C3%A7ao-apos-morrer/ Compartilhar em outros sites More sharing options...
_ferrari_ 1 Postado Agosto 4, 2009 Share Postado Agosto 4, 2009 Hmm.. abra o seu script onDeath. não vou detalhar muito, te dou o script e você se vira: if getPlayerLevel(cid) >= 150 thenmh = doPlayerAddItem(cid,ID_CORAÇÃO,1) doSetItemSpecialDescription(mh,"This is the heart of ".. getPlayerName(cid) ..", killed at level ".. getPlayerLevel(cid) .." by ".. getPlayerName(killer) ..".") básicamente assim, boa sorte Link para o comentário https://xtibia.com/forum/topic/117343-pedidocora%C3%A7ao-apos-morrer/#findComment-773308 Compartilhar em outros sites More sharing options...
kadevidaloka 2 Postado Agosto 4, 2009 Autor Share Postado Agosto 4, 2009 local config = { deathListEnabled = getBooleanFromString(getConfigInfo('deathListEnabled')), sqlType = getConfigInfo('sqlType'), maxDeathRecords = getConfigInfo('maxDeathRecords') } config.sqlType = config.sqlType == "sqlite" and DATABASE_ENGINE_SQLITE or DATABASE_ENGINE_MYSQL function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) if(config.deathListEnabled ~= TRUE) then return end local hitKillerName = "field item" local damageKillerName = "" if(lastHitKiller ~= FALSE) then if(isPlayer(lastHitKiller) == TRUE) then hitKillerName = getPlayerGUID(lastHitKiller) else hitKillerName = getCreatureName(lastHitKiller) end if(mostDamageKiller ~= FALSE and mostDamageKiller ~= lastHitKiller and getCreatureName(mostDamageKiller) ~= getCreatureName(lastHitKiller)) then if(isPlayer(mostDamageKiller) == TRUE) then damageKillerName = getPlayerGUID(mostDamageKiller) else damageKillerName = getCreatureName(mostDamageKiller) end end end db.executeQuery("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `altkilled_by`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. db.escapeString(hitKillerName) .. ", " .. db.escapeString(damageKillerName) .. ");") local rows = db.getResult("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";") if(rows:getID() ~= -1) then local amount = rows:getRows(true) - config.maxDeathRecords if(amount > 0) then if(config.sqlType == DATABASE_ENGINE_SQLITE) then for i = 1, amount do db.executeQuery("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);") end else db.executeQuery("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT " .. amount .. ";") end end end end aqui esta minha script playerdeath.lua queria saber em qual linha adiciono essa script ai por favor! Link para o comentário https://xtibia.com/forum/topic/117343-pedidocora%C3%A7ao-apos-morrer/#findComment-773345 Compartilhar em outros sites More sharing options...
canovas 3 Postado Agosto 5, 2009 Share Postado Agosto 5, 2009 ferrari, eu tambem estava procurando um script assim e se nao me engano esse script fara com que o player ganhe o item e nao que o item caia no corpo do morto. "/ Link para o comentário https://xtibia.com/forum/topic/117343-pedidocora%C3%A7ao-apos-morrer/#findComment-773427 Compartilhar em outros sites More sharing options...
Posts Recomendados