Consigo te ajudar na primeira:
É o seguinte, eu quero que quando os players morressem voltassem para o lvl inicial que no caso é 150.
E que nao perdessem skill!
Em creaturescripts crie um arquivo chamado lowlevellock.lua e coloque isso:
function onLogin(cid)
if getPlayerLevel(cid) < 150 then
doPlayerAddExperience(cid, (getExperienceForLevel(150) - getPlayerExperience(cid)))
end
return TRUE
end
Depois crie um arquivo chamado startskill.lua (na pasta creaturescripts/scritpts ainda), e coloque isso:
function onLogin(cid)
local playerVoc = getPlayerVocation(cid)
local reqTries = getPlayerRequiredSkillTries
local skillStor = 56364
local gotSkills = getPlayerStorageValue(cid, 56364)
if playerVoc == 5 and gotSkills == -1 then
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,85)))
setPlayerStorageValue(cid, skillStor, 1)
elseif playerVoc == 6 and gotSkills == -1 then
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,85)))
setPlayerStorageValue(cid, skillStor, 1)
elseif playerVoc == 7 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_DISTANCE, reqTries(cid, SKILL_DISTANCE, 110))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 90))
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,10)))
setPlayerStorageValue(cid, skillStor, 1)
elseif playerVoc == 8 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_AXE, reqTries(cid, SKILL_AXE, 110))
doPlayerAddSkillTry(cid, SKILL_SWORD, reqTries(cid, SKILL_SWORD, 110))
doPlayerAddSkillTry(cid, SKILL_CLUB, reqTries(cid, SKILL_CLUB, 110))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 105))
doPlayerAddMagLevel(cid, 8)
setPlayerStorageValue(cid, skillStor, 1)
end
return TRUE
end
Depois em creaturescripts.xml coloque isso:
<event type="login" name="StartSkills" event="script" value="startskills.lua"/>
<event type="login" name="Lowlevellock" event="script" value="lowlevellock.lua"/>
É só isso... Após feito tudo corretamente o level minimo do seu ot será 150, e as skills também terá uma especie de levellock, que vai funcionar assim, o player pega skill 120/119, conforme ele for morrendo ele vai perdendo skills até chegar uma hora q ele n vai perder mais (isso ja foi configurado no script).
_________________________________________________________
Enquanto ao frag system, não tenho exatamente esse que você quer mais tem um bem legal... da uma olhada no spoiler:
Frag System (With Skull)
Como fonuncia funciona?
R.: Bom o script funciona assim:
Quando o player mata um player ele adquire uma frag, quando ele tiver 5 frags (configuravel) ele vai adquirir uma skull (skull amarela, verde, branca, vermelha e preta), as skulls vão variar com o tanto de frags que ele tem. Vamos ao script:
Na pasta mods do seu ot, crie um arquivo chamado Skull System.lua:
<?xml version="1.0" encoding="ISO-8859-1"?>
<mod name="Skull System" version="1.0" author="Skyforever" contact="#####.com" enabled="yes">
<config name="SkullC_func"><![CDATA[
function setSkullColor(cid)
local t = {
[{5,10}] = 1,
[{11,15}] = 2,
[{16,20}] = 3,
[{21,25}] = 4,
[{26,math.huge}] = 5
}
for var, ret in pairs(t) do
if getPlayerFrags(cid) >= var[1] and getPlayerFrags(cid) <= var[2] then
doCreatureSetSkullType(cid, ret)
end
end
end
function getPlayerFrags(cid)
local time = os.time()
local times = {today = (time - 86400), week = (time - (7 * 86400))}
local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC")
if(result:getID() ~= -1) then
repeat
local content = {date = result:getDataInt("date")}
if(content.date > times.today) then
table.insert(contents.day, content)
elseif(content.date > times.week) then
table.insert(contents.week, content)
else
table.insert(contents.month, content)
end
until not result:next()
result:free()
end
local size = {day = table.maxn(contents.day),week = table.maxn(contents.week),month = table.maxn(contents.month)}
return size.day + size.week + size.month
end
]]></config>
<event type="login" name="SkullLogin" event="script"><![CDATA[
domodlib('SkullC_func')
function onLogin(cid)
registerCreatureEvent(cid, "ColorKill")
setSkullColor(cid)
return true
end]]></event>
<event type="kill" name="ColorKill" event="script"><![CDATA[
domodlib('SkullC_func')
function onKill(cid, target)
if isPlayer(cid) and isPlayer(target) then
doCreatureSetSkullType(target, 0)
addEvent(setSkullColor, 100, cid)
end
return true
end]]></event>
</mod>
Está bem simples de configurar:
[{21,25}] = 4, -- [{frags pra adquirir a skull,frags pra sair a skull}] = Skull Type (tipo da skull)
[{26,math.huge}] = 5 - Aki é o mesmo, mas o math.huge funciona como se foce um "or more" (level 26 ou mais), ou seja daí por diante é só essa skull
Depois no config.lua, nakela parte das skulls substitua isso:
___________________________________________________________
dailyFragsToRedSkull = 10
weeklyFragsToRedSkull = 40
monthlyFragsToRedSkull = 90
_______________________________________________________________
Por isso:
_______________________________________________
dailyFragsToBlackSkull = 9999999
weeklyFragsToBlackSkull = 9999999
monthlyFragsToBlackSkull = 9999999
_________________________________________
Desculpe, os spoilers tao bugando... Ta um lixo isso aqui, mais ve se gosta aí..





info
Grupo: Campones
Registrado: 30/09/12
Posts: 4
Reputação: 0
Entao galera.. Peço a ajuda de voces para arrumar os ajustes finais do meu ot war team x team!
É o seguinte, eu quero que quando os players morressem voltassem para o lvl inicial que no caso é 150.
E que nao perdessem skill!
Gostaria de um script que de acordo com a quantidade que o players vai matando apareça um shield no player parecido com akeles do system war.
Exemplo: o player ta fragando, e quando ele chegar a 50 frags apareça akele shield verde, mais quando ele morrer ou deslogar os frags online zera,e o shield sai, mais os frags totais continua!
(Esses shields do system war so valem para os frags online)
50 frags = shield verde
80 frags = shield azul
110 frags+ = shield red
Tambem gostaria de uma ajuda com relaçao as experience da war. por exemplo, quero que cada frag upe somente 1 lvl independente do lvl.-->>
150 mata um 150 = 151
151 mata um 150 = 152
152 mata um 150 = 153
300 mata um 150 = 301
150 mata um 151 = 151
150 mata um 152 = 151
150 mata um 160 = 151
150 mata um 300 = 151
160 mata um 160 = 161
300 mata um 300 = 301
*Nao é necessario que seje 1 lvl inteiro, pode ser 80 % de 1 lvl!
- Tipo galera, todos que atacaram a pessoa que morreu, vao fragar e upar e ganhar 500 gps!
- Eu tambem estou com um problema.. quando a pessoa fraga, envez dela ganhar 5 platinum coins, ela ta ganhando 500 gps.. Isso enchera a backpack mais rapido.. Gostaria que a recompensa fosse em forma de 5 platinum coins e nao 500 gps!
Gostaria também de um script que os players tivessem somente os addons do citizen!
e que sempre que eles morresem ou deslogarem, a outfit e o addon citizen voltasse para o character!
ACREDITO QUE SEJE SOMENTE ISSO PESSOAL... DESCULPE POSTAR TANTOS PROBLEMAS EM UM UNICO TOPICO..MUITO OBRIGADO A TODOS QUE PUDEREM ME AJUDAR..ESTOU PRECISANDO MUITO DE TUDO ISSO... FICAREI ETERNAMENTE GRATO!
Editado Outubro 1 por Marcostroni