Rank diferenciado. Meio que faz menção aos jogos FPS (como Point Blank ou Warface)... sahsauhsahu
- Fórum
- OTServ
- Recursos
- Scripting
- Mods, funções e outros
- [Creatureevent Mod] Militar Rank mod
KR
[Creatureevent Mod] Militar Rank mod
Por Krono, 11 de abr. de 2015 em Mods, funções e outros
militar rank
creature event
mode
patante rank
script
3
2.7k
info
Grupo: Conde
Registrado: 07/04/15
Posts: 926
Reputação: +335
Gênero: Masculino

11 de abril de 2015 às 20:11
4 meses depois...
info
Grupo: Barão
Registrado: 13/07/15
Posts: 242
Reputação: +56
Char no Tibia: Sekk

16 de agosto de 2015 às 19:19
Desculpa reviver o tópico, mas por favor, como eu vejo o título? Tipo, tem como colocar o titulo pra aparecer no look do player? Assim, da um ar de:
"wow, esse ai eh foda pra crl"
POR FAVOR!
Edit.:
Meu Deus, perdão, agora que percebi que estava dando uns erros no distro, por causa dos acentos nos títulos não serem UTF-8
Está funcionando perfeitamente!
Obrigado!
REP+
Editado Agosto 16 por jvcasarin


info
Grupo: Barão
Registrado: 07/04/15
Posts: 247
Reputação: +128
Sistema que adiciona um Rank Militar de acordo com os Frags do jogador. Ou seja, quanto mais o player mata, maior será o seu rank.
Achei muito legal, pois dá um ar de disputa por patentes dentro do servidor.
Para instalar crie um arquivo dentro da pasta mods do seu servidor como o nome militarrank.xml e cole este script dentro.
<?xml version = "1.0" encoding = "UTF-8"?> <mod name = "Military Ranks" version = "1.0" author = "Teckman" enabled = "yes"> <config name = "ranks"><![CDATA[ titles = { [1] = "Private First Class", [3] = "Specialista", [5] = "Corporal", [10] = "Sargento", [12] = "Staff Sargento", [15] = "Sargento Primeiro", [20] = "Master Sargento", [22] = "Primeriro Sargento", [25] = "Sargent Major", [30] = "Sargento Major Comando", [35] = "Sargento Major Exercito", [38] = "Segundo Tenente", [40] = "Primeiro Tenente", [45] = "Capitão", [48] = "Major", [50] = "Tenente Coronel", [55] = "Coronel", [100] = "General de Brigada", [110] = "General de Divisão", [120] = "Tenente General", [140] = "General", [170] = "General de Exercito" } fragsStorage = 600 ]]></config> <event type = "look" name = "ranksLook" event = "script"><![CDATA[ domodlib("ranks") function onLook(cid, thing, position, lookDistance) if(isPlayer(thing.uid)) then local rank = {rank = "Private", frags = 0} for k, v in pairs(titles) do if(math.max(0, getPlayerStorageValue(thing.uid, fragsStorage)) > k - 1) then if(k - 1 > rank.frags) then rank.rank, rank.frags = v, k - 1 end end end doPlayerSetSpecialDescription(thing.uid, "\n Military rank: " .. rank.rank) end return true end ]]></event> <event type = "kill" name = "ranksKill" event = "script"><![CDATA[ domodlib("ranks") function onKill(cid, target) if(isPlayer(target)) then setPlayerStorageValue(cid, fragsStorage, math.max(0, getPlayerStorageValue(cid, fragsStorage) + 1)) if(titles[getPlayerStorageValue(cid, fragsStorage)]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You advanced to military rank: " .. titles[getPlayerStorageValue(cid, fragsStorage)] .. ". Congratulations " .. titles[getPlayerStorageValue(cid, fragsStorage)] .. "!") end end return true end ]]></event> <event type = "login" name = "ranksLogin" event = "script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "ranksKill") registerCreatureEvent(cid, "ranksLook") return true end ]]></event> </mod>Gostou? Espero que sim!.
credito: Roque