quinta-feira, 9 de fevereiro de 2012

Sistema de tranformação por comando rider sistem


Rider System por TalkAction

Rider System
by JhonnyMotta


Nome: Rider System por TalkAction
Autor:
Versão: 8.5+
Servidor testado: Alissow
Adicionais:

Bom, eu criei esse talkactions para em vez de ser com um RING, seja apenas por comando para não atrabalhar o player usar outros ring.
Eu fiz ele muito simples, e meu amigo (Junior) pediu para eu por só para PremmyAccount, e achei que ia melhorar o script também!

O que o script realmente faz?
Quando o player digita !rider, troca para o outfist Orc Rider (configuravel)
e almenta a velocidade do player. (sendo que só PremmyAccount usa o comando)
e quando digita !riderback, volta para o outfist que estava usando e remove o Condition. (sendo que só PremmyAccount usa o comando)


Script:

1--> Vai a pasta "data/talkactions/script" e crie 2 arquivos.
o rider.lua e o riderback.lua.

2--> No rider.lua cole isso:

rider.lua
Código:
--Creditos JhonnyMotta--

local outfit = {lookType = 4, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}
local condition = createConditionObject(CONDITION_HASTE)[/font]
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)[/font]
setConditionFormula(condition, 2.5, 0, 3.0, 0)[/font][/left]

function onSay(cid, words, param)
if isPremium(cid) then
doSetCreatureOutfit(cid, outfit, -1)
doAddCondition(cid, condition)[/font]
doSendMagicEffect(getPlayerPosition(cid),12)
else
doPlayerSendTextMessage(cid,22,"Você não é premmy!" )
end
end
[/spoiler]

Feche e salva!

OBS: para mudar o outfist, só mudar o numero no lookType = 4

(lookType 4 = Orc Rider)

3--> No riderback.lua cole isso:

riderback.lua
Código:
--Creditos JhonnyMotta--
function onSay(cid, words, param)
if isPremium(cid) then
doRemoveCondition(cid, CONDITION_OUTFIT)
doRemoveCondition(cid, CONDITION_HASTE)
doSendMagicEffect(getPlayerPosition(cid),67)
else
doPlayerSendTextMessage(cid,22,"Você não é premmy!" )
end
end
[/spoiler]

Feche e salva.

4--> Vá na pasta "data/talkactions" e abra o arquivo talkactions.xml e coloque a tag:

Código:
<talkaction words="!rider" script="rider.lua" />
<talkaction words="!riderback" script="riderback.lua" />
Feche e salva.


Pronto, agora entra no char e use !rider.
Caso for FreeAccount, vai aparecer a msg "Você não é Premmy"
Caso for PremmyAccount, vai add o condition e virar o outfist.


Créditos:

100% Jhonny Motta

saber spells de vocation comando simples


Nome: !spells
Versão: 8.1
Tipo do script: talkactions
Servidor Testado: Em Teste Thyrania 0.2.81
Autor: ♀LэoйªM♀


Isso Galera Os Cara Entrão No Seu Ot e nao sabe o spells que o ot tem
seus problema acabarão chegou !spells para ajudalo 

Thyrania 0.2.81 XML\data\talkactions
<talkaction words="!spells" script="spells.lua"/>
Thyrania 0.2.81 XML\data\talkactions\scripts
function onSay(cid, words, param)
local count = getPlayerInstantSpellCount(cid)
local text = ""
local t = {}
for i = 0, count - 1 do
local spell = getPlayerInstantSpellInfo(cid, i)
if spell.level ~= 0 then
if spell.manapercent > 0 then
spell.mana = spell.manapercent .. "%"
end
table.insert(t, spell)
end
end
table.sort(t, function(a, b) return a.level < b.level end)
local prevLevel = -1
for i, spell in ipairs(t) do
local line = ""
if prevLevel ~= spell.level then
if i ~= 1 then
line = "\n"
end
line = line .. "Spells for Level " .. spell.level .. "\n"
prevLevel = spell.level
end
text = text .. line .. " " .. spell.words .. " - " .. spell.name .. " : " .. spell.mana .. "\n"
end
doShowTextDialog(cid, 2175, text)
return TRUE
end
A Vocation que usa o !spells ela mostra os spells que a vocation tem 


Com Esse codigo ele ajuda a todos so funcinona com PLAYER....

♀LэoйªM♀ é meu RL 

Anti chingo


Proibir Palavrões e Bully

Nome Do Script: Proibir Palavrões e Bully
Tipo: Talkaction
Autor: Kekezito_lhp
Testado em: Tfs 0.4 dev "acretido teve funfiona em todas 8.x+
Ideia: Criei Esse Script Para Proibir Bully e Rasimos No Serv E Proibir Divulgaçao
OBS: Se Você Sube Edita Um pouco se pode ate Proibir Divulgaçao No Seu serv
OBS 2: Esse Script Tirei Algums Chigamentos e Coloquei os mais popular Por Que Nao sei se voce vai entente minha ideia para te criado esse script.

Bom Vamus Começa :

Agora vá até a pasta Scripts dentro da pasta Talkaction, faça um script chamado proibido.lua e coloque isso dentro:
--Script by kekezito_lhp OTNET--
function onSay(cid, words, param)
local time = 10 -- Tempo que ele ficará muted! (em segundos)
doSendAnimatedText(getPlayerPosition(cid), "Hey man, this is forbidden!", 19)
doPlayerSendTextMessage(cid, 23, "Now you are muted for "..time.." seconds!")
doMutePlayer(cid, time*1000)
return TRUE
end

Bom primeiramente já até a pasta data/talkaction, abra o arquivo Talkactions.xml e adicione esta tag:
Código:
<talkaction words="porra;caralho;cu;merda;buceta" event="script" value="proibido.lua"/>

Ateçao Onde Esta Em Vermelho Pode Edita
, Para Coloca Mais palavras proibidas So Adiciona ; antes da palavra

Jail Sistem perfeito


Jail System Perfeito

Titulo: Jail Sistem
Citação:
Nome: Jail Sistem (Sistema De Prisao Perfeito)
.
Versão: (0.1).
Tipo do script: (Talkaction).
Servidor Testado: (The Forgotten Server).
Autor: (Gesior)

Jail System


Este Systema Permite Que Voce Prenda Um Jogador Por Um Determinado Tempo
Por Exemplo /jail "tempo,nome do player
O Player Ficara Determinado Tempo Na Cadeia
Muito Simples E Totalmente Configuravel

Abra a pasta data/Talkactions/script  e adicione isso em um arquivo lua:


Código:
-- Default jail time in seconds --
default_jail = 30
-- The permission you need to jail someone --
grouprequired = 3
-- StorageValue that the player gets --
jailedstoragevalue_time = 1338
jailedstoragevalue_bool = 1339
-- POSIcaO DA CADEIA: --
jailpos = { x = POSX, y = posY, z =posz }
-- POSICAO DO TEMPLO: --
unjailpos = { x = 1029, y = 1005, z =7 }
-- auto kicker, dont edit
jail_list = {}
jail_list_work = 0

function checkJailList(param)
addEvent(checkJailList, 1000, {})
for targetID,player in ipairs(jail_list) do
if isPlayer(player) == TRUE then
if getPlayerStorageValue(player, jailedstoragevalue_time) < os.time() then
doTeleportThing(player, unjailpos, TRUE)
setPlayerStorageValue(player, jailedstoragevalue_time, 0)
setPlayerStorageValue(player, jailedstoragevalue_bool, 0)
table.remove(jail_list,targetID)
doPlayerSendTextMessage(player,MESSAGE_STATUS_CONSOLE_ORANGE,'You were kicked from jail! See you later ')
end
else
table.remove(jail_list,targetID)
end
end
end

function onSay(cid, words, param)
if jail_list_work == 0 then
jail_list_work = addEvent(checkJailList, 1000, {})
end
if param == '' and (words == '!unjail' or words == '/unjail') then
if getPlayerStorageValue(cid, jailedstoragevalue_time) > os.time() then
doPlayerSendTextMessage ( cid, MESSAGE_INFO_DESCR, 'You are jailed until ' .. os.date("%H:%M:%S", getPlayerStorageValue(cid, jailedstoragevalue_time)) .. ' (now is: ' .. os.date("%H:%M:%S", os.time()) .. ').')
else
if getPlayerStorageValue(cid, jailedstoragevalue_bool) == 1 then
table.insert(jail_list,cid)
doPlayerSendTextMessage ( cid, MESSAGE_INFO_DESCR, 'You will be kicked from jail in one second.')
else
doPlayerSendTextMessage ( cid, MESSAGE_INFO_DESCR, 'You are not jailed.')
end
end
return TRUE
end
local jail_time = -1
for word in string.gmatch(tostring(param), "(%w+)") do
if tostring(tonumber(word)) == word then
jail_time = tonumber(word)
end
end
local isplayer = getPlayerByName(param)
if isPlayer(isplayer) ~= TRUE then
isplayer = getPlayerByName(string.sub(param, string.len(jail_time)+1))
if isPlayer(isplayer) ~= TRUE then
isplayer = getPlayerByName(string.sub(param, string.len(jail_time)+2))
if isPlayer(isplayer) ~= TRUE then
isplayer = getPlayerByName(string.sub(param, string.len(jail_time)+3))
end
end
end
if jail_time ~= -1 then
jail_time = jail_time * 60
else
jail_time = default_jail
end
if words == '!jail' or words == '/jail' then
if getPlayerGroupId ( cid ) >= grouprequired then
if isPlayer(isplayer) == TRUE then
doTeleportThing(isplayer, jailpos, TRUE)
setPlayerStorageValue(isplayer, jailedstoragevalue_time, os.time()+jail_time)
setPlayerStorageValue(isplayer, jailedstoragevalue_bool, 1)
table.insert(jail_list,isplayer)
doPlayerSendTextMessage ( cid, MESSAGE_INFO_DESCR, 'You jailed '.. getCreatureName(isplayer) ..' until ' .. os.date("%H:%M:%S", getPlayerStorageValue(isplayer, jailedstoragevalue_time)) .. ' (now is: ' .. os.date("%H:%M:%S", os.time()) .. ').')
doPlayerSendTextMessage ( isplayer, MESSAGE_INFO_DESCR, 'You have been jailed by '.. getCreatureName(cid) ..' until ' .. os.date("%H:%M:%S", getPlayerStorageValue(isplayer, jailedstoragevalue_time)) .. ' (now is: ' .. os.date("%H:%M:%S", os.time()) .. ').')
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Player with this name doesn\'t exist or is offline.")
return FALSE
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have access to unjail other players.")
return FALSE
end
elseif words == '!unjail' or words == '/unjail' then
if getPlayerGroupId ( cid ) >= grouprequired then
if isPlayer(isplayer) == TRUE then
doTeleportThing(isplayer, unjailpos, TRUE)
setPlayerStorageValue(isplayer, jailedstoragevalue_time, 0)
setPlayerStorageValue(isplayer, jailedstoragevalue_bool, 0)
table.remove(jail_list,targetID)
doPlayerSendTextMessage(isplayer,MESSAGE_STATUS_CONSOLE_ORANGE,getCreatureName(cid) .. ' let you go out from jail! See you later')
doPlayerSendTextMessage ( cid, MESSAGE_INFO_DESCR, 'You unjailed '.. getCreatureName(isplayer) ..'.')
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Player with this name doesn\'t exist or is offline.")
return FALSE
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have access to unjail other players.")
return FALSE
end
end
return FALSE
end


Para Usar Basta Dar Os Commands
/jail "Tempo,Nomedoplayer
/unjail "NomeDoPlayer

Creditos:
99% Gessior OTLand
1% RenanCabral Por Postar Na OTNet

Espero Que Gostem E Me Doem OT$ Se Possivel

SO FUNCIONA EM TFS
 

Trade System


  • Nome do Script: Trade System
  • Nome do Autor: PoRaI
  • Servidor Testado: Nenhum ainda :S, não estou em minha casa mas após chegar eu testo.
  • Descrição: Sistema de trade onde você pode adicionar o item em uma seção de market.

O sistema e baseado em um market, você pode anunciar um item é assim possivel... Vender-lo... Crie um arquivo na pasta data/talkaction/scripts, chamado sell.lua e coloque as seguintes informações dentro dele:
Código PHP:
function onSay(cid, words, param) id = getItemIdByName(param) idby = getItemNameById(param) local data = string.explode(param, ",") iddata = getItemIdByName(data[1])

function 
doreturnadd(cid) local directory = "data//trade//tradelist.txt"           local newcontent

local file 
= io.open(directory,"r") local content = file:read(-1) newcontent = string.gsub (content, "end", 'doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "'.. getCreatureName(cid) ..' - '.. data[1] ..' - '.. data[2] ..'")', 1) file:close()
local file = io.open(directory,"w+") file:write(newcontent) file:close(newcontent) onFile("update", directory, "end") end
if tonumber(data[2]) == nil then
doPlayerSendTextMessage
(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Coloque o preço.")
return 
TRUE
end 
if getPlayerStorageValue(cid,4535) == 1 then
doPlayerSendTextMessage
(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce ja colocou um item a venda.")
return 
TRUE
end
    
if(iddata == LUA_ERROR) == TRUE then
doPlayerSendTextMessage
(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Este item não existe.")
return 
TRUE elseif getPlayerItemCount(cid, iddata) <= 0 then
doPlayerSendTextMessage
(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não possui este item.")
return 
TRUE elseif(iddata == LUA_ERROR) == FALSE then
doPlayerSendTextMessage
(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você deixou na lista de vendas sua ".. data[1] .." pelo preço de ".. data[2] .." gold coins.") doPlayerRemoveItem(cid, iddata, 1) setPlayerStorageValue(cid, 4535, 1) setPlayerStorageValue(cid, 4538, getItemIdByName(data[1])) setPlayerStorageValue(cid, 4539, data[2]) doreturnadd(cid)
return 
TRUE
end
end  
em seguinda, na pasta talkactions/scripts novamente... um outro arquivo chamado buy.lua, contendo as seguintes informações:
Código PHP:
function onSay(cid, words, param) pid = getPlayerByName(param)
function 
doreturnadd(cid) local directory = "data//trade//tradelist.txt"           local newcontent

local file 
= io.open(directory,"r") local content = file:read(-1) newcontent = string.gsub (content, 'doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "'.. getCreatureName(pid) ..'', 'REMOVIDO', 1) file:close()
local file = io.open(directory,"w+") file:write(newcontent) file:close(newcontent) onFile("update", directory, 'doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "'.. getCreatureName(pid) ..'') end
if isPlayer(param) then if getPlayerMoney(cid) >= getPlayerStorageValue(pid,4539) then if getPlayerStorageValue(pid,4538) ~= -1 then if getPlayerStorageValue(pid,4535) ~= -1 then
doPlayerRemoveMoney
(cid, getPlayerStorageValue(pid,4539)) doPlayerAddItem(cid, getPlayerStorageValue(pid,4538), 1) doPlayerAddMoney(pid, getPlayerStorageValue(pid,4539)) doPlayerRemoveItem(pid, getPlayerStorageValue(pid,4538), 1) setPlayerStorageValue(pid, 4538, -1) setPlayerStorageValue(pid, 4535, -1)
else 
doPlayerSendCancel(cid,"Ele não está negociando nenhum item.")         end else doPlayerSendCancel(cid,"Ele não está negociando nenhum item.") end else doPlayerSendCancel(cid,"Você não possui dinheiro.") end else doPlayerSendCancel(cid, param .." não está online ou ele não existe.") end
end
[/SPOILER]
vá na pasta data e crie uma pasta chamada '[B]trade[/B]' e dentro dela um arquivo chamado tradelist.txt e dentro dele:
[
SPOILER="tradelist.txt"]function onSay(cid, words, param) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "QUEM VENDE - NOME DO ITEM - PREÇO:") end  
Agora você devera criar uma pasta no diretorio "data/..." com o nome de trade e dentro da pasta trade crie um arquivo chamadotradelist.txt e adicione as seguintes informações:
Código PHP:
function onSay(cid, words, param) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "QUEM VENDE - NOME DO ITEM - PREÇO:") end  
Vá no arquivo, talkactions/talkactions.xml e adicione:
Código PHP:
    <talkaction log="yes" access="0" words="/buy" event="script" value="buy.lua"/>
    <
talkaction log="yes" access="0" words="/sell" event="script" value="sell.lua"/>
    <
talkaction log="yes" access="0" words="/view" event="script" value="data//trade//tradelist.txt"/>  

/report BUG


/report
Autor: Guitar Freak
Co-Autor: Colanus
Ideia: Shawak

Utilização:  Muita gente tem problemas com bugs no mapa e até scripts, quests que não funcionam direito e outras coisas que passam despercebidos. E o pior de tudo é que o bug não reportado fica ali e prejudica ou incomoda os outros players. Com esse script, você pode verificar bugs e até mesmo o que os players estão achando do servidor, dá para fazer diferentes variações desse script.

Explicação:  Esse é uma talkaction que reportará bugs, já enviando o local, nome do player que utilizou o reporte e horário em que foi reportado. Os reportes ficarão em data > logs  em um arquivo chamado Reports.txt

Servidor Testado: 0.4
Não tenho certeza, mas parece que funciona a partir do 0.3+, incluindo 0.3.5

1º) Entre na pasta data > lib e abra o arquivo function.lua e coloque o código a seguir no final.

Código:
function setExhaust(cid, storage)
setPlayerStorageValue(cid, storage, os.time())
end

function isExhausted(cid, storage, exhaust)
local exhaustTime = getPlayerStorageValue(cid, storage)
if exhaustTime == -1 then
return FALSE
end
local isExhausted = os.time() - exhaustTime < exhaust
return isExhausted and TRUE or FALSE
2º) Entre na pasta data > talkactions e abra o arquivo talkactions.xml e coloque o código a seguir abaixo de <talkactions>

Código PHP:
<talkaction log="no" words="/report" event="script" value="textreports.lua"/>  
Obs.: Ele está adaptado para a versão 0.4, verifique a coerência de acordo com os outros talkactions e o adapte o código para servir melhor


3º) Ainda dentro da pasta talkactions, acesse a pasta scripts e copie um arquivo lua qualquer e renomeie para textreports colocando o código abaixo.

Código:
-- Créditos --
-- Referencias: Shawak & Colandus.
-- Modificações: Guitar Freak.

local level = 8 -- Level mínimo para reportar.
local minimum = 3 -- Número mínimo de caracteres por reporte.
local maximum = 85 -- Número máximo de caracteres por reporte.

local useExhaust = true -- True se você quiser usar exhaustion.
local storageValue = 8000 -- Número para registrar a exaustão. Pode-se usar outro qualquer valor.
local exhaustTime = 15 -- Tempo entre cada reporte (15 = 15 segundos).

function onSay(cid, words, param, channel)

local getVoc = getPlayerVocationName(cid)
local position = getCreaturePosition(cid)

if getPlayerLevel(cid) < level then
doPlayerSendTextMessage(cid,20,"Report Manager:")
doPlayerSendTextMessage(cid,18,"You need to be at least level "..level.." to send a report.")

elseif (useExhaust and isExhausted(cid, storageValue, exhaustTime) == TRUE) then
doPlayerSendTextMessage(cid,20,"Report Manager:")
doPlayerSendTextMessage(cid,18,"Sorry, you need to wait "..exhaustTime.." seconds before sending another report.")

elseif param:len() < minimum then
doPlayerSendTextMessage(cid,20,"Report Manager:")
doPlayerSendTextMessage(cid,18,"Sorry, you need to enter atleast " .. minimum .. " characters to send in a report.")

elseif param:len() > maximum then
doPlayerSendTextMessage(cid,20,"Report Manager:")
doPlayerSendTextMessage(cid,18,"Sorry, you can only write max. " .. maximum .. " characters per report.")

else
Log = io.open(getDataDir().."logs/Reports.txt", "a+")
Log:write("Sent: "..os.date("%A %I:%M:%S %p.").."\n")
Log:write("From position: X = "..position.x.." | Y = "..position.y.." | Z = "..position.z.."\n")
Log:write(""..getPlayerName(cid).." ["..getPlayerLevel(cid).."] ("..getVoc.."): "..param.."\n\n")
Log:close()
doPlayerSendTextMessage(cid,20,"Report Manager:")
doPlayerSendTextMessage(cid,27,"You have successfully sent your report. Thanks for your support.")
setExhaust(cid, storageValue)
end
return TRUE
end
Agora é muito simples, basta dizer /report mensagem e a mensagem será reportada. 

Obs.: Se você quiser adicionar as aspas do /report ", coloque o code
Código:
filter="quotation"
após "words" no xml. A mensagem será reportada dessa maneira /report " mensagem.


A mensagem ficará nesse estilo
Sent: Saturday 03:27:10 PM.
From position: X = 158 | Y = 51 | Z = 7
Player1 [30] (Knight): Hi there is a map bug in temple, please fix..

Agora, com um pequeno globalevent como esse, com o nome report.lua dentro de scripts:

Código:
function onThink(interval, lastExecution)
MENSAGEM = {
"Agora contamos com o sistema de reportar, onde o nome do que reporta, local e horário são automaticamente informados. Apenas fale /report e digite sua mensagem como por ex.: /report um erro no mapa aqui. "
}
doBroadcastMessage(MENSAGEM, 22)
return TRUE
end
E adicionando isso no xml:

Código PHP:
<globalevent name="report" interval="950000" script="report.lua"/>  
E os seus players serão alertados sobre o novo script.