Ir para conteúdo
Entre para seguir isso  
Roku

!stats - Cheque suas estatísticas.

Recommended Posts

Roku    0
Roku

Nome: !stats - Check you status!

Tipo: Talkaction

Autor: Roku

Versão Testada: TFS 8.54

 

Informações Adicionais

Quer ter uma informação completa sobre seu personagem? Por exemplo, voce vê seu level e magic level sem abrir os skills, voce ve premium, sem logar da conta pra ver no character list, voce vê vida, e outras coisas!

______________________________________________________________

Vá em talkactions/scripts e crie um arquivo novo em .lua com o nome de stat e cole isso:

--[[ Script by Roku
2009 - for Otserv Networks]]
function onSay(cid, words, param)
local msg = 'Status of '..getCreatureName(cid)..'\nName: '..getCreatureName(cid)..'\nLevel '..getPlayerLevel(cid)..'\nHealth: '..getCreatureHealth(cid)..'/'..getCreatureMaxHealth(cid)..'\nMana: '..getCreatureMana(cid)..'/'..getCreatureMaxMana(cid)..'\nGold Balance: '..getPlayerBalance(cid)..'\nPremium Days: '..getPlayerPremiumDays(cid)..'\nMagic Level: '..getPlayerMagLevel(cid)..'\nIP: '..getPlayerIp(cid)..'\nFree Cap: '..getPlayerFreeCap(cid)..'.'
if isPlayer(cid) and words == '!stats' then
doPlayerPopupFYI(cid, msg)
return TRUE
end
return TRUE                                                                                                                                                                                                              
end

Feito isso salve o script, e vá em talkactions.xml e adicione esta tag:

<talkaction words="!stats" event="script" value="stat.lua"/>

Agora é so salvar, ligar o server e falar !stats para checar seus status!

statusy.png

 

#Contribuindo com o Tópico:

Esse script foi feito rapidamente, e embora seja facil de escrever é árduo o trabalho de pensar em estatisticas. Ex: mana, vida, etc.

 

Se voce teve alguma ideia para estatistica, poste no topico.

Se simplesmente gostou do script, clique no botão Thanks na diagonal inferior direita do post.

 

#Atualizações:

Adicionado Free Cap (nao consta na imagem.) 18/01/2009

 

Comentário:

Alguem me ajude se possivel, eu tentei fazer com sexo e vocation, mas nao consigo fazer o script retornar no For Your Information um nome, como Male, Female, Sorcerer, etc.

________________________________________________________________

cYa

Roku~

Editado por Roku

Compartilhar este post


Link para o post
Skyen Hasus    21
Skyen Hasus

Legal :)

Seria legal fazer no estilo da Spy Rune, pra ver os stats dos outros (O IP só seria mostrado pra GMs+, claro.)

Movido.

Compartilhar este post


Link para o post
pejuge2    1
pejuge2

Muito legal, parabens, segunda talkaction sua que vejo e de boa qualidade. Quanto mais colaboradores mais o OT Net cresce.

Compartilhar este post


Link para o post
Notorious    1
Notorious

Quando li o titulo achei que era ripping do meu que ta bem guardadinho :coolface:, ainda bem que não é

Muito bom ...

Compartilhar este post


Link para o post
Roku    0
Roku

HEuheuhEUhue

É bem simples, so fiz pra ter um motivo pra usar doPlayerPopupFYI que é muito do mal '-'

Eu e meu irmao (programmer) vamo tenta faze mostrando barra de vida e mana, otras coisas assim.

Ps> alguem sabe como fazer getPlayerSex e isPremium retornar string?

Compartilhar este post


Link para o post
Rei_vegeta    0
Rei_vegeta
Nome: !stats - Check you status!

--

Comentário:

Alguem me ajude se possivel, eu tentei fazer com sexo e vocation, mas nao consigo fazer o script retornar no For Your Information um nome, como Male, Female, Sorcerer, etc.

--

 

 

function onSay(cid, words, param)


local msg = 'Status of '..getCreatureName(cid)..'\nName: '..getCreatureName(cid)..'\nLevel '..getPlayerLevel(cid)..'\nHealth: '..getCreatureHealth(cid)..'/'..getCreatureMaxHealth(cid)..'\nMana: '..getCreatureMana(cid)..'/'..getCreatureMaxMana(cid)..'\nGold Balance: '..getPlayerBalance(cid)..'\nPremium Days: '..getPlayerPremiumDays(cid)..'\nMagic Level: '..getPlayerMagLevel(cid)..'\nIP: '..getPlayerIp(cid)..'\nFree Cap: '..getPlayerFreeCap(cid)..'.'


local msg1 = '\n you are a girl.    \n And your Voc.Name: '..getPlayerVocationName(cid))..'.'
local msg2 = '\n you are a BOY.        \n And your Voc.Name: '..getPlayerVocationName(cid))..'.'
local msg3 = '\n are you GM?         \n And your Voc.Name: '..getPlayerVocationName(cid))..'.'
local msg4 = '\n you are a GM.         \n And your Voc.Name: '..getPlayerVocationName(cid))..'.'
local msg5 = '\n you are a GOD.     \n And your Voc.Name: '..getPlayerVocationName(cid))..'.'


if getPlayerSex(cid) == 0 and words == '!stats' then
doPlayerPopupFYI(cid, msg1)return TRUE

elseif getPlayerSex(cid) == 1 and words == '!stats' then
doPlayerPopupFYI(cid, msg2 )return TRUE

elseif getPlayerSex(cid) >= 1 and words == '!stats' then
doPlayerPopupFYI(cid, msg3 )return TRUE

end


if getPlayerAccess(cid) == 2 and words == '!stats' then
doPlayerPopupFYI(cid, msg4 )return TRUE

elseif getPlayerAccess(cid) >= 3 and words == '!stats' then
doPlayerPopupFYI(cid, msg5 )return TRUE

end


return TRUE                                                                                                                                                                                                              
end

ou se vc prederir.

--[[ Script by Roku
2009 - for Otserv Networks]]


function onSay(cid, words, param)


local msg = 'Status of '..getCreatureName(cid)..'\nName: '..getCreatureName(cid)..'\nLevel '..getPlayerLevel(cid)..'\nHealth: '..getCreatureHealth(cid)..'/'..getCreatureMaxHealth(cid)..'\nMana: '..getCreatureMana(cid)..'/'..getCreatureMaxMana(cid)..'\nGold Balance: '..getPlayerBalance(cid)..'\nPremium Days: '..getPlayerPremiumDays(cid)..'\nMagic Level: '..getPlayerMagLevel(cid)..'\nIP: '..getPlayerIp(cid)..'\nFree Cap: '..getPlayerFreeCap(cid)..'.'


local msg1 = 'Status of '..getCreatureName(cid)..'\nName: '..getCreatureName(cid)..'\nLevel '..getPlayerLevel(cid)..'\nHealth: '..getCreatureHealth(cid)..'/'..getCreatureMaxHealth(cid)..'\nMana: '..getCreatureMana(cid)..'/'..getCreatureMaxMana(cid)..'\nGold Balance: '..getPlayerBalance(cid)..'\nPremium Days: '..getPlayerPremiumDays(cid)..'\nMagic Level: '..getPlayerMagLevel(cid)..'\nIP: '..getPlayerIp(cid)..'\nFree Cap: '..getPlayerFreeCap(cid)..'. \n you are a girl.    \n And your Voc.Name: '..getPlayerVocationName(cid))..'.'
local msg2 = 'Status of '..getCreatureName(cid)..'\nName: '..getCreatureName(cid)..'\nLevel '..getPlayerLevel(cid)..'\nHealth: '..getCreatureHealth(cid)..'/'..getCreatureMaxHealth(cid)..'\nMana: '..getCreatureMana(cid)..'/'..getCreatureMaxMana(cid)..'\nGold Balance: '..getPlayerBalance(cid)..'\nPremium Days: '..getPlayerPremiumDays(cid)..'\nMagic Level: '..getPlayerMagLevel(cid)..'\nIP: '..getPlayerIp(cid)..'\nFree Cap: '..getPlayerFreeCap(cid)..'. \n you are a BOY.        \n And your Voc.Name: '..getPlayerVocationName(cid))..'.'
local msg3 = 'Status of '..getCreatureName(cid)..'\nName: '..getCreatureName(cid)..'\nLevel '..getPlayerLevel(cid)..'\nHealth: '..getCreatureHealth(cid)..'/'..getCreatureMaxHealth(cid)..'\nMana: '..getCreatureMana(cid)..'/'..getCreatureMaxMana(cid)..'\nGold Balance: '..getPlayerBalance(cid)..'\nPremium Days: '..getPlayerPremiumDays(cid)..'\nMagic Level: '..getPlayerMagLevel(cid)..'\nIP: '..getPlayerIp(cid)..'\nFree Cap: '..getPlayerFreeCap(cid)..'. \n are you GM?         \n And your Voc.Name: '..getPlayerVocationName(cid))..'.'
local msg4 = 'Status of '..getCreatureName(cid)..'\nName: '..getCreatureName(cid)..'\nLevel '..getPlayerLevel(cid)..'\nHealth: '..getCreatureHealth(cid)..'/'..getCreatureMaxHealth(cid)..'\nMana: '..getCreatureMana(cid)..'/'..getCreatureMaxMana(cid)..'\nGold Balance: '..getPlayerBalance(cid)..'\nPremium Days: '..getPlayerPremiumDays(cid)..'\nMagic Level: '..getPlayerMagLevel(cid)..'\nIP: '..getPlayerIp(cid)..'\nFree Cap: '..getPlayerFreeCap(cid)..'. \n you are a GM.         \n And your Voc.Name: '..getPlayerVocationName(cid))..'.' 
local msg5 = 'Status of '..getCreatureName(cid)..'\nName: '..getCreatureName(cid)..'\nLevel '..getPlayerLevel(cid)..'\nHealth: '..getCreatureHealth(cid)..'/'..getCreatureMaxHealth(cid)..'\nMana: '..getCreatureMana(cid)..'/'..getCreatureMaxMana(cid)..'\nGold Balance: '..getPlayerBalance(cid)..'\nPremium Days: '..getPlayerPremiumDays(cid)..'\nMagic Level: '..getPlayerMagLevel(cid)..'\nIP: '..getPlayerIp(cid)..'\nFree Cap: '..getPlayerFreeCap(cid)..'. \n you are a GOD.     \n And your Voc.Name: '..getPlayerVocationName(cid))..'.'




if getPlayerSex(cid) == 0 and words == '!stats' then
doPlayerPopupFYI(cid, msg1)return TRUE

elseif getPlayerSex(cid) == 1 and words == '!stats' then
doPlayerPopupFYI(cid, msg2 )return TRUE

elseif getPlayerSex(cid) >= 1 and words == '!stats' then
doPlayerPopupFYI(cid, msg3 )return TRUE

end


if getPlayerAccess(cid) == 2 and words == '!stats' then
doPlayerPopupFYI(cid, msg4 )return TRUE

elseif getPlayerAccess(cid) >= 3 and words == '!stats' then
doPlayerPopupFYI(cid, msg5 )return TRUE

end


return TRUE                                                                                                                                                                                                              
end

-----------------------------

HEuheuhEUhue

É bem simples, so fiz pra ter um motivo pra usar doPlayerPopupFYI que é muito do mal '-'

Eu e meu irmao (programmer) vamo tenta faze mostrando barra de vida e mana, otras coisas assim.

Ps> alguem sabe como fazer getPlayerSex e isPremium retornar string?

vo tentar mesmo sabendo que nao era isso q vc queria. :'(

e o pior que eu nem sei se fuciona.

Editado por Rei_vegeta
corrigir alguns erros.

Compartilhar este post


Link para o post
Roku    0
Roku

Acho que funciona, mas eu nao queria deixar o script grande...

Eu queria mantar uma variavel local como "Male", e se tivesse sexo de female a variavel seria trocada para "Female"

tipo:

local sex = "unknow"

if getPlayerSex(cid) == 0 then

local sex = "Female"

else

local sex = "Male"

 

Mas eu acho que nao deu. Nem lembro =]

Mas valeu pela ajuda.

Compartilhar este post


Link para o post
pejuge2    1
pejuge2

Bem, editei ele, acho que é isto que queria (inseri value, agora caso param seja o nome de um player retornará seus dados se o access de quem fala for maior que o do padrão):

--[[ Script by Roku 2009 - for Otserv Networks]]
function onSay(cid, words, param)

local value = getPlayerByNameWildcard(param) or cid
local msg = 'Status of '..getCreatureName(value)..'\nLevel '..getPlayerLevel(value)..'\nHealth: '..getCreatureHealth(value)..'/'..getCreatureMaxHealth(value)..'\nMana: '..getCreatureMana(value)..'/'..getCreatureMaxMana(value)..'\nGold Balance: '..getPlayerBalance(value)..'\nPremium Days: '..getPlayerPremiumDays(value)..'\nMagic Level: '..getPlayerMagLevel(value)..'\nIP: '..getPlayerIp(value)..'\nFree Cap: '..getPlayerFreeCap(value).."\nSex: " or nil

  msg = getPlayerSex(value) == 1 and msg == nil and msg.."Male" or msg.."Famale"

  return doPlayerPopupFYI(value, msg)

end

Se não for me desculpe, entendi mal (removi alguns ifs desnecessários).

Compartilhar este post


Link para o post
Roku    0
Roku

Acho que nao é isso...

Todavia, obrigado pela ajuda =]

Compartilhar este post


Link para o post
Pandá s2    0
Pandá s2

Gostei mas fods é que o Cara ver até o IP hehhehehh'

Compartilhar este post


Link para o post
Roku    0
Roku

Isso é no caso para ele ver seu proprio IP, vo fazer esse sugerido pelo skyen com o IP para gms verem dos otros.

cYa

Compartilhar este post


Link para o post
Bruce Wayne    1
Bruce Wayne

bom pra quem tem resolução pequena e tem mts bps, sabe n precisa ficar com skill aberto ;)

Compartilhar este post


Link para o post
Visitante
Este tópico está impedido de receber novos posts.
Entre para seguir isso  
  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×