-
Total de itens
2183 -
Registro em
-
Última visita
-
Dias Ganhos
23
Histórico de Reputação
-
SkyLigh recebeu reputação de Crazyskezi em Sistema De Vip
Nao testei aki fiz so pelo debug me diz se foi ou não
Utilize a talkaction desse jeito \/
function onSay(cid, item, position) local days = 30 -- dias que serão adicionados local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 20191) local timenow = os.time() if getPlayerStorageValue(cid, 20191) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end if getPlayerStorageValue(cid,22450) >= 1 then return doPlayerSendCancel(cid,"Você Já é um player Epic") end doPlayerRemoveItem(cid,2137,1) setPlayerStorageValue(cid, 22450, time) local quantity = math.floor((getPlayerStorageValue(cid, 22450) - timenow)/(24 * 60 * 60)) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid,22,"Parabens ! Agorá Você é um Player Epic") doSendMagicEffect(getPlayerPosition(cid),CONST_ME_POFF) return TRUE end
-
SkyLigh deu reputação a SkyDangerous em [Lua] Mega Tutorial De Oop [Avançado]
Lua Orientada a Objetos
Avançado !
Lua é uma linguagem de programação(Sério??) , sua orientação a tabelas, meta tabelas, meta métodos é bem prático e versátil.
* Meta tabelas *
O que é uma meta tabelas?
São tabelas que controla o comportamento de outras estruturas de dados, ela nos permiti alterar o comportamento da tabela. Exemplo, se colocar o código abaixo num interpretador Lua. nome = "Xtibia Forum de Tibia"print(nome:upper())
A saída será:
XTIBIA FORUM DE TIBIA
Porém, da onde saiu esse upper()? Vejamos..
print(getmetatable(nome))
Sua saída será:
table: 0033BE78
Uma meta tabela associado a string !!, vejamos:
print(getmetatable(nome).__index == string)
Sua saída será:
true
ou seja concluímos que a chave __index da meta tabelas é módulo de uma string: como exemplo
nome:upper() == nome.upper(nome) == string.upper(nome)
*Chave __index*
A chave __index da meta tabela pode ser uma tabela ou uma função e indica o que deve acontecer quando houver uma tentativa de leitura de uma chave que a estrutura de dados original não possuía
Se o objeto referenciado pela variável nome(uma string) não possui a chave upper, então quando tentamos acessar esta chave, o sistema procura pela chave na tabela referenciada pela chave __index da meta tabela, que é uma string Caso queiramos que ela retorna um valor da tabela ASCII, podemos utilizar está função
mt = {__index = function (t, k)return k:byte()end}var = setmetatable({b}, mt)print(var)
Vale lembrar que essa chave é importante para orientação a objetos.
* Classes e Construtores *
Em orientação a objeto, classe é um molde para a criação de novos objetos, em Lua,classe em geral é uma meta tabela onde a chave __index aponta para ela própria. Exemplo abaixo:
mt = {}mt.__index = mt
Meta tabelas se torna um molde para as outras tabelas. As tabelas que fazem o uso deste molde são chamadas de instâncias.
As funções de uma classe/instância são chamadas de métodos e sempre recebem implícita ou explicitamente como primeiro argumento a classe ou instância que faz a chamada.
Lua pode chamar um método passando a instância (ou classe) implícita ou explicitamente Exemplo de uma chamada explícita:
login = login.lower(login) Exemplo de uma chamada , passando a instância implicitamente
login = login:lower()
Existe um método especial chamado construtor, que é executado sempre que uma nova instância é criada. Vejamos:
function mt:new(o)o = o or {}return setmetatable(o, self)end
O construtor do código a cima recebe como um argumento uma tabela que servirá de referência para a criação da instância.
O primeiro comando garante que o argumento o é uma tabela, o segundo associa a meta tabela ao objeto, retornando-o.
Como new()é um método de classe, self representa a classe. Se fosse um método de instância, self representaria a instância.
* Outros métodos *
Podemos criar outros métodos. Por exemplo queremos criar um somatório dos elementos números da tabela seja retornado para o método soma() Exemplo
function mt:soma()local s = 0table.foreachi(self, function (i, e)if type(e) == "number" thens = s + eendend)return send
Podemos criar um objeto com alguns valores números e retornar seu somatório:
var = mt:new { 2, 4, 6 }ret = var:soma()print (ret)
Que imprimirá:
12
*Meta Métodos*
Apenas irei citar alguns, caso tenha curiosidade procure sobre.
__add – gerencia operador de adição; __sub – gerencia operador de subtração; __mul – gerencia operador de multiplicação; __div – gerencia operador de divisão; __unm – gerencia operador unário de negação; __eq – gerencia operador de igualdade; __lt – gerencia operadores menor que e igual ou maior; __le – gerencia operadores menor ou igual e maior que; __pow – gerencia operador de potência; __tostring – gerencia conversão para string; __tonumber – gerencia conversão para número.
* Herança *
Queremos outra classe que além de devolver a soma, também devolva o produto, mas sem modificar a classe original.
Para isso herdamos uma nova classe, para isso precisamos instanciar a classe pai normalmente, modificar a instância e usar esta instância como uma nova classe Exemplo
function nmt:produto()local p = 1]table.foreachi(self, function (i, e)if type(e) == "number" thenp = p * eendend)return pendvar = nmt:new { 2, 4, 6 }[size=4]print(var:soma(), var:produto())
Imprimirá:
48
Há outra forma mais avançada de herança, chamada herança múltipla, que acontece quando uma classe é herdeira de mais de uma classe pai.
Fim.
Mega Tutorial OOP em Lua
-
SkyLigh recebeu reputação de endreox em Bonus Lvl Player
Iae galera eu to com um script de bonus no lvl do player Ex : O Player E Lvl 100 ele fala !bonus ele recebera 1kk 100 lvl's e 1 item ! mais so podera usar uma vez então vamos la
em data / talkactions / scripts / renome algum arquivo para bonuslvl.lua
e adicione
function onSay(cid, words) local storage = 5999 -- storage local level = 200 -- quantos levels ele vai receber local level1 = 300 -- que level precisa ser pra usar o comando local money = 100000 -- quanto de grana ele vai receber local item = 8880 -- id do item if getPlayerStorageValue(cid, storage) >= 1 then doPlayerSendTextMessage(cid, 22, "Desculpe voce ja uso o comando") return true elseif getPlayerLevel(cid,level,1) then doPlayerSendTextMessage(cid, 22, "Desculpe voce nao tem level suficiente") return true end doPlayerAddLevel(cid, level) doPlayerAddItem (cid, item, 1) setPlayerStorageValue(cid, storage, 1) doPlayerSendTextMessage(cid, 22, "Voce recebeu 5000 lvl's e um item") return true end
e em talkactions.xml
<talkaction words="!bonus" script="bonuslvl.lua"/>
créditos
Skyligh 90 % ((Postagem e script))
renanvmp 10 % ((Pela Ideia do pedido do script))
-
SkyLigh recebeu reputação de InfinityOts em Exp Ring
so usar o primeiro script que ele posta assim
local rate = 1.5 local drop = 1.5 function onEquip(cid, item, slot) if(item.itemid ~= 7697) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your exp rate + & + monster loot "..((rate - 1)*100).."%.") doPlayerSetExperienceRate(cid, rate) doCreatureSetDropLoot(cid, drop) doTransformItem(item.uid, 7708 ) return true end return true end function onDeEquip(cid, item, slot) if(item.itemid ~= 7708 ) then return true end doPlayerSetExperienceRate(cid, 1.0) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sua experiência extra terminou & e seu loot.") doTransformItem(item.uid, 7697) return true end
dps faz tudo como la pedi
-
SkyLigh recebeu reputação de ThiagoBji em Adicionando Stamina
Iae galera hoje eu venho trazer um script que as vezes e muito necessário em ot's
Como , Funciona Quase Todos Sabem O Que E A Stamina Mais Para Os Que Não Sabe Irei Explicar : Stamina E Uma Forma De Definir A Experiência Do Personagem Ou Player Que Faz Com Que Eles Upem Mais Rápido Ou Mais Devagar Quanto Mais Cheia Estiver A Stamina Significa Que E Rápido E Se Tiver Baixa E Devagar
Então Vamos La
Va Em Data / Talkaction / Scripts / Renome Algum Arquivo Para Stamina E Adicione
function onSay(cid, words, param) local config = { stamina = 10, -- Quantos Minutos O Player Vai Ter De Stamina price = 10000, -- Quanto Vai Ser A Stamina s = 11548, -- Nao Mexa exhau = 600 -- Quantos Segundos Para Usar O Comando Denovo } if getPlayerStorageValue(cid, config.s) <= os.time() then doPlayerSendTextMessage(cid,22,"Desculpe Espere 90 Minutos Para Usar O Comando Novamente") return true elseif not doPlayerRemoveMoney(cid, config.price) then doPlayerSendTextMessage(cid,22,"Você Não Tem Dinheiro Suficiente") return true end doPlayerAddStamina(cid, config.stamina) setPlayerStorageValue(cid, config.s,os.time()+config.exhau) doPlayerSendTextMessage(cid,22,"Você Comprou Stamina Por 10 Minutos") return true end
Em Talkactions.xml
<talkaction words="!stamina" script="stamina.lua"/>
Créditos
Skyligh 100 % (Postagem E Criação)
-
SkyLigh recebeu reputação de GuhPk em Adicionando Stamina
Iae galera hoje eu venho trazer um script que as vezes e muito necessário em ot's
Como , Funciona Quase Todos Sabem O Que E A Stamina Mais Para Os Que Não Sabe Irei Explicar : Stamina E Uma Forma De Definir A Experiência Do Personagem Ou Player Que Faz Com Que Eles Upem Mais Rápido Ou Mais Devagar Quanto Mais Cheia Estiver A Stamina Significa Que E Rápido E Se Tiver Baixa E Devagar
Então Vamos La
Va Em Data / Talkaction / Scripts / Renome Algum Arquivo Para Stamina E Adicione
function onSay(cid, words, param) local config = { stamina = 10, -- Quantos Minutos O Player Vai Ter De Stamina price = 10000, -- Quanto Vai Ser A Stamina s = 11548, -- Nao Mexa exhau = 600 -- Quantos Segundos Para Usar O Comando Denovo } if getPlayerStorageValue(cid, config.s) <= os.time() then doPlayerSendTextMessage(cid,22,"Desculpe Espere 90 Minutos Para Usar O Comando Novamente") return true elseif not doPlayerRemoveMoney(cid, config.price) then doPlayerSendTextMessage(cid,22,"Você Não Tem Dinheiro Suficiente") return true end doPlayerAddStamina(cid, config.stamina) setPlayerStorageValue(cid, config.s,os.time()+config.exhau) doPlayerSendTextMessage(cid,22,"Você Comprou Stamina Por 10 Minutos") return true end
Em Talkactions.xml
<talkaction words="!stamina" script="stamina.lua"/>
Créditos
Skyligh 100 % (Postagem E Criação)
-
SkyLigh deu reputação a MAPPERJO4AO em Show Off# [Mapper Jo4Ao]
Gente postarei imagens de alguns pedaços do mapa que eu tenho, ai comentem , digam se esta bom ou ruim .
------------#-------------------------#--------------------------------------#---------------------------------#-----------
#.
#.
#.
#.
Por inquanto e só.
Att: MAPPER JO4AO
-
SkyLigh recebeu reputação de lugk123 em Sobre Account Manager's
vai no sqlstudio e entra na database do server dps em players / data / account manager / e poem o mouse emcima dele e clika em / for view / e procure por posx e ponha a pos de onde ele nascer e embaixo tem posy & posz e la se completa a pos de onde nascer
-
SkyLigh recebeu reputação de webmasterxd em Help Nesse Erro
tente assim
local msgs = {"use ", ""} function doAlertReady(cid, id, movename, n, cd) function onSay(cid, words, param) if not isCreature(cid) then return true end local myball = getPlayerSlotItem(cid, 8) if myball.itemid > 0 and getItemAttribute(myball.uid, cd) == "cd:"..id.."" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPokeballName(myball.uid).." - "..movename.." (m"..n..") is ready!") return true end local p = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid) if not p or #p <= 0 then return true end for a = 1, #p do if getItemAttribute(p[a], cd) == "cd:"..id.."" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPokeballName(p[a]).." - "..movename.." (m"..n..") is ready!") return true end end end end function onSay(cid, words, param, channel) if param ~= "" then return true end if string.len(words) > 3 then return true end if #getCreatureSummons(cid) == 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need a pokemon to use moves.") return 0 end --alterado v1.5 local mypoke = getCreatureSummons(cid)[1] if getCreatureCondition(cid, CONDITION_EXHAUST) then return true end if getCreatureName(mypoke) == "Evolution" then return true end if getCreatureName(mypoke) == "Ditto" or getCreatureName(mypoke) == "Shiny Ditto" then name = getPlayerStorageValue(mypoke, 1010) --edited else name = getCreatureName(mypoke) end --local name = getCreatureName(mypoke) == "Ditto" and getPlayerStorageValue(mypoke, 1010) or getCreatureName(mypoke) local it = string.sub(words, 2, 3) local move = movestable[name].move1 if getPlayerStorageValue(mypoke, 212123) >= 1 then cdzin = "cm_move"..it.."" else cdzin = "move"..it.."" --alterado v1.5 end if it == "2" then move = movestable[name].move2 elseif it == "3" then move = movestable[name].move3 elseif it == "4" then move = movestable[name].move4 elseif it == "5" then move = movestable[name].move5 elseif it == "6" then move = movestable[name].move6 elseif it == "7" then move = movestable[name].move7 elseif it == "8" then move = movestable[name].move8 elseif it == "9" then move = movestable[name].move9 elseif it == "10" then move = movestable[name].move10 elseif it == "11" then move = movestable[name].move11 elseif it == "12" then move = movestable[name].move12 elseif it == "13" then move = movestable[name].move13 end if not move then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.") return true end if getPlayerLevel(cid) < move.level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need be atleast level "..move.level.." to use this move.") return true end if getCD(getPlayerSlotItem(cid, 8).uid, cdzin) > 0 and getCD(getPlayerSlotItem(cid, 8).uid, cdzin) < (move.cd + 2) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to wait "..getCD(getPlayerSlotItem(cid, 8).uid, cdzin).." seconds to use "..move.name.." again.") return true end if getTileInfo(getThingPos(mypoke)).protection then doPlayerSendCancel(cid, "Your pokemon cannot use moves while in protection zone.") return true end if getPlayerStorageValue(mypoke, 3894) >= 1 then return doPlayerSendCancel(cid, "You can't attack because you is with fear") --alterado v1.3 end --alterado v1.6 if (move.name == "Team Slice" or move.name == "Team Claw") and #getCreatureSummons(cid) < 2 then doPlayerSendCancel(cid, "Your pokemon need be in a team for use this move!") return true end --alterado v1.6 if isCreature(getCreatureTarget(cid)) and isInArray(specialabilities["evasion"], getCreatureName(getCreatureTarget(cid))) and math.random(1, 100) <= 10 then local target = getCreatureTarget(cid) if isCreature(getMasterTarget(target)) then --alterado v1.6 doSendMagicEffect(getThingPos(target), 211) doSendAnimatedText(getThingPos(target), "TOO BAD", 215) doTeleportThing(target, getClosestFreeTile(target, getThingPos(mypoke)), false) doSendMagicEffect(getThingPos(target), 211) doFaceCreature(target, getThingPos(mypoke)) return true --alterado v1.6 end end if move.target == 1 then if not isCreature(getCreatureTarget(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don\'t have any targets.") return 0 end if getCreatureCondition(getCreatureTarget(cid), CONDITION_INVISIBLE) then return 0 end if getCreatureHealth(getCreatureTarget(cid)) <= 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your have already defeated your target.") return 0 end if not isCreature(getCreatureSummons(cid)[1]) then return true end if getDistanceBetween(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid))) > move.dist then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Get closer to the target to use this move.") return 0 end if not isSightClear(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid)), false) then return 0 end end local newid = 0 if isSleeping(mypoke) or isSilence(mypoke) then --alterado v1.5 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't do that right now.") return 0 else newid = setCD(getPlayerSlotItem(cid, 8).uid, cdzin, move.cd) end doCreatureSay(cid, ""..getPokeName(mypoke)..", "..msgs[math.random(#msgs)]..""..move.name.."!", TALKTYPE_SAY) local summons = getCreatureSummons(cid) --alterado v1.6 addEvent(doAlertReady, move.cd * 1000, cid, newid, move.name, it, cdzin) for i = 2, #summons do if isCreature(summons[i]) and getPlayerStorageValue(cid, 637501) >= 1 then docastspell(summons[i], move.name) --alterado v1.6 end end docastspell(mypoke, move.name) doCreatureAddCondition(cid, playerexhaust) if useKpdoDlls then doUpdateCooldowns(cid) end return 0 end
duvida sanada
reportado
-
SkyLigh recebeu reputação de iagomrfoda em Como Dou Rep+ Pra Alguem?
Simples no lado do post tem 2 botões um verde e um vermelho
o verde se você clicar se da rep + para aquele
e o vermelho se você clicar se da rep - mais ele e somente para membros da equipe
duvida sanada
reportado
-
SkyLigh recebeu reputação de Erimyth em Como Criar Uma Vip?
Visite este tópico
http://www.xtibia.com/forum/topic/190384-vip-345-ajudem/page__p__1300218#entry1300218
-
SkyLigh recebeu reputação de Delaks em Teleport Vip Com Outift
Iae Galera do xtibia !
Hoje criei um script de teleport player com uma outift e so se ele for vip podera se teleporta ! e na hora que ele se teleporta ele ficara com uma outift que você escolhe !
Va em data / talkactions / scripts / ponhe o nome de algum arquivo.lua para televip
e adicione isso la dentro
function onUse(cid, item, frompos, item2, topos) local cobrar = "sim" -- Se vai cobrar ou nao local outfit = {lookType = 342} -- Outift que o player ficara local price = 10 -- Quanto vai cobrar se tiver ativado local pos = {x=7, y=7, z=7} -- Pos que o player vai ser teleportado if doSetCreatureOutfit(cid, outfit, time*1000) then doTeleportThing(cid, pos) doPlayerSendTextMessage(cid, 23, "Parabéns Você Foi Teleportado.") return TRUE end if cobrar == "sim" and not doPlayerRemoveMoney(cid,tonumber(price)) then doPlayerSendTextMessage(cid, 23, "Você Nao Tem Dinheiro Suficiente") end return TRUE end
<action itemid="ID DO ITEM QUE VAI DAR USE" script="televip.lua"/>
Então So Isso espero que gostem ! Se gostou + rep se nao for pedir muito
Créditos
Skylight 100 % ( Por Criar )
.
-
-
-
SkyLigh recebeu reputação de Raidou em [Rep+]Quem Ajuda Ganha Rep
function onUse(cid, item) master = getCreatureMaster(cid) local name = "Demon" -- nome entre as aspas if master > 0 then doSummonCreature(name, getPlayerPosition(cid)) setPlayerStorageValue(master, 828282, -1) doPlayerSendTextMessage(master, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce cancelou seu Mac!") doRemoveItem(item.uid,1) end return TRUE end
-
SkyLigh recebeu reputação de Artigo em Teleport Vip Com Outift
Iae Galera do xtibia !
Hoje criei um script de teleport player com uma outift e so se ele for vip podera se teleporta ! e na hora que ele se teleporta ele ficara com uma outift que você escolhe !
Va em data / talkactions / scripts / ponhe o nome de algum arquivo.lua para televip
e adicione isso la dentro
function onUse(cid, item, frompos, item2, topos) local cobrar = "sim" -- Se vai cobrar ou nao local outfit = {lookType = 342} -- Outift que o player ficara local price = 10 -- Quanto vai cobrar se tiver ativado local pos = {x=7, y=7, z=7} -- Pos que o player vai ser teleportado if doSetCreatureOutfit(cid, outfit, time*1000) then doTeleportThing(cid, pos) doPlayerSendTextMessage(cid, 23, "Parabéns Você Foi Teleportado.") return TRUE end if cobrar == "sim" and not doPlayerRemoveMoney(cid,tonumber(price)) then doPlayerSendTextMessage(cid, 23, "Você Nao Tem Dinheiro Suficiente") end return TRUE end
<action itemid="ID DO ITEM QUE VAI DAR USE" script="televip.lua"/>
Então So Isso espero que gostem ! Se gostou + rep se nao for pedir muito
Créditos
Skylight 100 % ( Por Criar )
.
-
SkyLigh recebeu reputação de anusdekenga em Teleport Vip Com Outift
Iae Galera do xtibia !
Hoje criei um script de teleport player com uma outift e so se ele for vip podera se teleporta ! e na hora que ele se teleporta ele ficara com uma outift que você escolhe !
Va em data / talkactions / scripts / ponhe o nome de algum arquivo.lua para televip
e adicione isso la dentro
function onUse(cid, item, frompos, item2, topos) local cobrar = "sim" -- Se vai cobrar ou nao local outfit = {lookType = 342} -- Outift que o player ficara local price = 10 -- Quanto vai cobrar se tiver ativado local pos = {x=7, y=7, z=7} -- Pos que o player vai ser teleportado if doSetCreatureOutfit(cid, outfit, time*1000) then doTeleportThing(cid, pos) doPlayerSendTextMessage(cid, 23, "Parabéns Você Foi Teleportado.") return TRUE end if cobrar == "sim" and not doPlayerRemoveMoney(cid,tonumber(price)) then doPlayerSendTextMessage(cid, 23, "Você Nao Tem Dinheiro Suficiente") end return TRUE end
<action itemid="ID DO ITEM QUE VAI DAR USE" script="televip.lua"/>
Então So Isso espero que gostem ! Se gostou + rep se nao for pedir muito
Créditos
Skylight 100 % ( Por Criar )
.
-
SkyLigh recebeu reputação de skinaa em Teleport Vip Com Outift
Iae Galera do xtibia !
Hoje criei um script de teleport player com uma outift e so se ele for vip podera se teleporta ! e na hora que ele se teleporta ele ficara com uma outift que você escolhe !
Va em data / talkactions / scripts / ponhe o nome de algum arquivo.lua para televip
e adicione isso la dentro
function onUse(cid, item, frompos, item2, topos) local cobrar = "sim" -- Se vai cobrar ou nao local outfit = {lookType = 342} -- Outift que o player ficara local price = 10 -- Quanto vai cobrar se tiver ativado local pos = {x=7, y=7, z=7} -- Pos que o player vai ser teleportado if doSetCreatureOutfit(cid, outfit, time*1000) then doTeleportThing(cid, pos) doPlayerSendTextMessage(cid, 23, "Parabéns Você Foi Teleportado.") return TRUE end if cobrar == "sim" and not doPlayerRemoveMoney(cid,tonumber(price)) then doPlayerSendTextMessage(cid, 23, "Você Nao Tem Dinheiro Suficiente") end return TRUE end
<action itemid="ID DO ITEM QUE VAI DAR USE" script="televip.lua"/>
Então So Isso espero que gostem ! Se gostou + rep se nao for pedir muito
Créditos
Skylight 100 % ( Por Criar )
.
-
SkyLigh recebeu reputação de DarkSiders em Not Drop Loot
Iae galera
hoje venho trazer um script que não dropa loot como um aol so que sem precisar usar amuleto e também não e uma bless
então vamos la
Em data / talkactions / scripts / e renome algum arquivo.lua para loot e adicione
function onSay(cid, words, param) local price = 1000 -- dinheiro que vai custa if getPlayerStorageValue(cid,1254) > 0 or not doPlayerRemoveMoney(cid, price) then doPlayerSendTextMessage(cid, 28, "Você, não tem dinheiro suficiente e/ou já tem Anti Drop.") return true end doPlayerSendTextMessage(cid, 27, "Parabéns você comprou Anti Drop, por " .. price .. " gp's") setPlayerStorageValue(cid, 1254, 1) return true end
talkactions.xml
<talkaction words="!loot" event="script" value="loot.lua"/>
data/creaturescripts/scripts renome algum arquivo pra antidrop e adicione
function onDeath(cid, deathList) if getPlayerStorageValue(cid, 1254) > 0 then setPlayerStorageValue(cid, 1254, 0) doCreatureSetDropLoot(cid, false) end return true end
em creaturescripts.xml
<event type="death" name="noDrop" script="antiDrop.lua"/>
em login.lua
registerCreatureEvent(cid, "noDrop")
Créditos
Skyligh (Por Criar E Pela Ideia E Postar)
Skyforever (Ajudou Em Alguns Erros)
gostou ? rep +
-
SkyLigh recebeu reputação de Joao103 em Quest Que Ganha Vip
então
veja este topico
http://www.xtibia.com/forum/topic/190384-vip-345-ajudem/page__p__1300218#entry1300218
e o nick
http://www.xtibia.com/forum/topic/147361-action-vip-no-nome/
-
SkyLigh recebeu reputação de s2ma em Vip 3,4,5 Ajudem
1 - Passo
Va em data / action / scripts / e o nome da quest
e poem esse script la dentro
function onUse(cid, item, frompos, item2, topos) if item.uid ==7522 then -- Aki e o uniqueid que fica no actions.xml sempre mude se for criar outra queststatus = getPlayerStorageValue(cid,7527) -- Aki Ponhe a mesma storage la de baixo if queststatus == 1 then doPlayerSendTextMessage(cid,22,"Msg de quando ja ter pego a vip e o item.") else doPlayerSendTextMessage(cid,22,"MSG DE QUANDO VIRAR VIP.") doSendMagicEffect(topos,35) coins_uid = doPlayerAddItem(cid,2160,100) -- Id do item que vai adicionar e a quantidade setPlayerStorageValue(cid,7527,1) -- Aki e A Storage da vip so mude aki se vo criar outra vip end return 0 end return 1 end
2 - Pronto Sua Quest De Vip Ja Esta Pronta Agora E Para A Pessoa Poder Passar Pra Vip !
Va em data / movements / scripts / nome do arquivo
e coloke este script la
function onStepIn(cid, item, pos) -- teleports config teleport1 ={x=155, y=52, z=7} -- Aki e a pos pra onde ele vai voltar se nao tiver vip if isPlayer(cid) then if item.actionid == 7527 then -- Aki e akela storage que tinha no actions vip = getPlayerStorageValue(cid,7527) -- Aki Também e akela storage e voce poem ela aki if vip == -1 then doPlayerSendCancel(cid,"Aki E A Msg Se Nao Tiver Vip Que Vai Aparecer ") doTeleportThing(cid,teleport1) else end end end end
e dps em movements.xml
ponhe esta tag la
<movevent type="StepIn" uniqueid="AKI SEMPRE VAI SER O ID DA STORAGE" event="script" value="NOME DO ARQUIVO.lua"/>
Espero que tenho lhe ajudado
vlw.
-
SkyLigh recebeu reputação de ballahalls em Teleport Vip Com Outift
Iae Galera do xtibia !
Hoje criei um script de teleport player com uma outift e so se ele for vip podera se teleporta ! e na hora que ele se teleporta ele ficara com uma outift que você escolhe !
Va em data / talkactions / scripts / ponhe o nome de algum arquivo.lua para televip
e adicione isso la dentro
function onUse(cid, item, frompos, item2, topos) local cobrar = "sim" -- Se vai cobrar ou nao local outfit = {lookType = 342} -- Outift que o player ficara local price = 10 -- Quanto vai cobrar se tiver ativado local pos = {x=7, y=7, z=7} -- Pos que o player vai ser teleportado if doSetCreatureOutfit(cid, outfit, time*1000) then doTeleportThing(cid, pos) doPlayerSendTextMessage(cid, 23, "Parabéns Você Foi Teleportado.") return TRUE end if cobrar == "sim" and not doPlayerRemoveMoney(cid,tonumber(price)) then doPlayerSendTextMessage(cid, 23, "Você Nao Tem Dinheiro Suficiente") end return TRUE end
<action itemid="ID DO ITEM QUE VAI DAR USE" script="televip.lua"/>
Então So Isso espero que gostem ! Se gostou + rep se nao for pedir muito
Créditos
Skylight 100 % ( Por Criar )
.
-
SkyLigh recebeu reputação de bryan390 em Teleport Vip Com Outift
Iae Galera do xtibia !
Hoje criei um script de teleport player com uma outift e so se ele for vip podera se teleporta ! e na hora que ele se teleporta ele ficara com uma outift que você escolhe !
Va em data / talkactions / scripts / ponhe o nome de algum arquivo.lua para televip
e adicione isso la dentro
function onUse(cid, item, frompos, item2, topos) local cobrar = "sim" -- Se vai cobrar ou nao local outfit = {lookType = 342} -- Outift que o player ficara local price = 10 -- Quanto vai cobrar se tiver ativado local pos = {x=7, y=7, z=7} -- Pos que o player vai ser teleportado if doSetCreatureOutfit(cid, outfit, time*1000) then doTeleportThing(cid, pos) doPlayerSendTextMessage(cid, 23, "Parabéns Você Foi Teleportado.") return TRUE end if cobrar == "sim" and not doPlayerRemoveMoney(cid,tonumber(price)) then doPlayerSendTextMessage(cid, 23, "Você Nao Tem Dinheiro Suficiente") end return TRUE end
<action itemid="ID DO ITEM QUE VAI DAR USE" script="televip.lua"/>
Então So Isso espero que gostem ! Se gostou + rep se nao for pedir muito
Créditos
Skylight 100 % ( Por Criar )
.
-
SkyLigh recebeu reputação de GuhPk em Add Premium Por Talk E Action
Iae galera !!
hoje trago um script muito interessante adicionar premium por action ao dar use num item e comprar o item por 1 buyitem
então vamos la
va em data / talkactions / scripts / e ponha o nome de algum arquivo para
premium e ponha isto la dentro
function onSay(cid, words, param) local itens = { ["santa doll"] = {id = 6567, preco = 2000, count = 1 }, ["teddy bear"] = {id = 6568, preco = 1000, count = 1 }, ["jester doll"] = {id = 9663, preco = 500, count = 1 } } local param = string.lower(param) if (param == "lista") then local str = "" str = str .. "itens :\n\n" for name, preco in pairs(itens) do str = str..name.."\n" end str = str .. "" doShowTextDialog(cid, 7529, str) return TRUE end if not itens[param] or param == "" or not param then return doPlayerSendCancel(cid,"Desculpe esse item nao existe") end if itens[param] and doPlayerRemoveMoney(cid,itens[param].preco) then doPlayerAddItem(cid,itens[param].id,itens[param].count) doPlayerSendTextMessage(cid,27,"Parabéns Vc comprou 1 item") end return TRUE end
<talkaction words="!buy" event="script" value="itens.lua"/>
dps em data / actions / scripts / ponha o nome de algum arquivo de premium
e adicionar isto la dentro
--((Script By Skylight Xtibia.com))-- function onUse(cid, item) if doRemoveItem(item.uid, 1) then end if item.itemid == 6567 then doPlayerAddPremiumDays(cid, 30) doPlayerSendTextMessage(cid, 22, "Parabéns Você Recebeu 30 dias de premium") return true end if item.itemid == 6568 then doPlayerAddPremiumDays(cid, 30) doPlayerSendTextMessage(cid, 22, "Parabéns Você Recebeu 15 dias de premium") return true end if item.itemid == 9693 then doPlayerAddPremiumDays(cid, 30) doPlayerSendTextMessage(cid, 22, "Parabéns Você Recebeu 10 dias de premium") end return true end
dps em actions.xml
<action itemid="6567" script="premium.lua"/> <action itemid="6568" script="premium.lua"/> <action itemid="9693" script="premium.lua"/>
Então e so isso espero que gostem e se puder nao custara 1 rep +
Créditos
TnTSlin 30 %(Pelo script do buy)
SkyLigh 70 % (Pelo Script Do Action E A Ideia E Adicionar A Lista no script do buy)
-
SkyLigh recebeu reputação de yurielmo147 em Add Premium Por Talk E Action
Iae galera !!
hoje trago um script muito interessante adicionar premium por action ao dar use num item e comprar o item por 1 buyitem
então vamos la
va em data / talkactions / scripts / e ponha o nome de algum arquivo para
premium e ponha isto la dentro
function onSay(cid, words, param) local itens = { ["santa doll"] = {id = 6567, preco = 2000, count = 1 }, ["teddy bear"] = {id = 6568, preco = 1000, count = 1 }, ["jester doll"] = {id = 9663, preco = 500, count = 1 } } local param = string.lower(param) if (param == "lista") then local str = "" str = str .. "itens :\n\n" for name, preco in pairs(itens) do str = str..name.."\n" end str = str .. "" doShowTextDialog(cid, 7529, str) return TRUE end if not itens[param] or param == "" or not param then return doPlayerSendCancel(cid,"Desculpe esse item nao existe") end if itens[param] and doPlayerRemoveMoney(cid,itens[param].preco) then doPlayerAddItem(cid,itens[param].id,itens[param].count) doPlayerSendTextMessage(cid,27,"Parabéns Vc comprou 1 item") end return TRUE end
<talkaction words="!buy" event="script" value="itens.lua"/>
dps em data / actions / scripts / ponha o nome de algum arquivo de premium
e adicionar isto la dentro
--((Script By Skylight Xtibia.com))-- function onUse(cid, item) if doRemoveItem(item.uid, 1) then end if item.itemid == 6567 then doPlayerAddPremiumDays(cid, 30) doPlayerSendTextMessage(cid, 22, "Parabéns Você Recebeu 30 dias de premium") return true end if item.itemid == 6568 then doPlayerAddPremiumDays(cid, 30) doPlayerSendTextMessage(cid, 22, "Parabéns Você Recebeu 15 dias de premium") return true end if item.itemid == 9693 then doPlayerAddPremiumDays(cid, 30) doPlayerSendTextMessage(cid, 22, "Parabéns Você Recebeu 10 dias de premium") end return true end
dps em actions.xml
<action itemid="6567" script="premium.lua"/> <action itemid="6568" script="premium.lua"/> <action itemid="9693" script="premium.lua"/>
Então e so isso espero que gostem e se puder nao custara 1 rep +
Créditos
TnTSlin 30 %(Pelo script do buy)
SkyLigh 70 % (Pelo Script Do Action E A Ideia E Adicionar A Lista no script do buy)
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.