Ir para conteúdo
  • Cadastre-se

[Resolvido] Pedido 3 Scripts e 1 modificação


Posts Recomendados

1- Esse script abaixo, era pra dar todos addons fulls do OT, porém quando clica, deixa os outifits da cor branca, mais não adiciona os addons.


function onUse(cid, item)

local male = {

lookType = 128,129,130,131,132,133,134,143,144,145,146,151,152,153,154,251,268,273,278,289,325,336,367, -- A Newtype da outfit male

}

local female = {

lookType = 136,137,138,139,140,141,142,147,148,149,150,155,156,157,158,252,269,270,279,288,324,335,366, -- A Newtype da outfit female

}

if getPlayerSex(cid) == 0 then

doCreatureChangeOutfit(cid, female)

else

doCreatureChangeOutfit(cid, male)

end

doRemoveItem(item.uid, 1)

doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE , "Parabéns! Você ganhou uma outfit nova!")

doSendMagicEffect(getCreaturePos(cid), 28)

return true

end

2- Preciso de um Script que ao clicar no item ele ganha uma nova spells, e depois o item some.

3- Um script que ao clicar no item e depois na BP, adiciona 10 slots na Bp e depois o item some.

4- Um script que adiciona 10 charges a mais, se for amulet, ou ring e depois some

(1º) | [8.60] - Galaxy Server - Download

(2º) | [8.60] - Glorious Server - Download

(3º) | [8.60] - Epic Server - Download

Link para o post
Compartilhar em outros sites

1.


local maleOutfits = {325, 278}

local femaleOutfits = {136, 137, 138, 139}


function onUse(cid, item, fromPosition, itemEx, toPosition)

	    for i = 1, (getPlayerSex(cid) == PLAYERSEX_MALE and #maleOutfits or #femaleOutfits) do

			    if (doPlayerAddOutfit(cid, (getPlayerSex(cid) == PLAYERSEX_MALE and maleOutfits[i] or femaleOutfits[i]), 0)) then

					    doPlayerSendTextMessage(cid, 22, "Voce ganhou alguns outfits")

					    doSendMagicEffect(getCreaturePos(cid), 28)

			    end

	    end


	    return doRemoveItem(item.uid) and true

end
2.
local spellName = "Haste"


function onUse(cid, item, fromPosition, itemEx, toPosition)

if not(getPlayerLearnedInstantSpell(cid, spellName)) then

doPlayerLearnInstantSpell(cid, spellName)

return doRemoveItem(item.uid)

end


return doPlayerSendCancel(cid, "Voce ja sabe esta spell.") and true

end

3. Acho que não é possivel

4. Charge ou Duration no ring?

Link para o post
Compartilhar em outros sites

2 script não funcionou, e pra complementar como vou criar uma spell nova, em que so clicando no item vai poder usar? '-'

3- Então, um script pra por nome na bp do cara? Quando ele usa o item, a bp fica assim: Fulando Backpacks

4. Charge, é pra aumentar no aol/ red aol e might ring

(1º) | [8.60] - Galaxy Server - Download

(2º) | [8.60] - Glorious Server - Download

(3º) | [8.60] - Epic Server - Download

Link para o post
Compartilhar em outros sites

2. Pelo oque eu entendi no seu pedido, você queria uma spell que adicionasse uma nova spell ao player, ou seja, aquela spell que ele vai ter que comprar para poder falar.

3. Aqui você vai usar um item na backpack para mudar o nome

local items = {

    [1988] = {name = "%s backpack"},

    [2000] = {name = "%s red backpack"},

}


function onUse(cid, item, fromPosition, itemEx, toPosition)

    local iten = items[itemEx.itemid]


    if not(iten) then

        return doPlayerSendCancel(cid, "Sorry, not possible.")

    end


    return doItemSetAttribute(itemEx.uid, "name", iten.name:format(getCreatureName(cid))) and doRemoveItem(item.uid) and true

end
4. Pode não funcionar!
local items = {

    [2173] = {charge = 1},

    [2197] = {charge = 10},

    [2164] = {charge = 4},

}


function onUse(cid, item, fromPosition, itemEx, toPosition)

    local iten = items[itemEx.itemid]


    if not(iten) then

        return doPlayerSendCancel(cid, "Sorry, not possible.")

    end


    return doItemSetAttribute(itemEx.uid, "charges", iten.charge) and doRemoveItem(item.uid) and true

end

Link para o post
Compartilhar em outros sites

O script 1, quando morre, da esse problema, é como se os addon não estive-se salvos no char depois de usar o item, depois que morre os addons sai e da esse erro no distro:

2zqsjeh.jpg

O script 2 era pra ser assim, quando o usuario usa o item nele, ele ganha uma nova spell, só não sei como vou criar uma spell nos spell.xml pra que só possa usar quem tiver usado o item.

O script 3 funcionou.

Script 4 ele não da erros, só não adiciona as charges.

(1º) | [8.60] - Galaxy Server - Download

(2º) | [8.60] - Glorious Server - Download

(3º) | [8.60] - Epic Server - Download

Link para o post
Compartilhar em outros sites

Kimos, o 1 script agora não adiciona os addons e não some o item. ;x

(1º) | [8.60] - Galaxy Server - Download

(2º) | [8.60] - Glorious Server - Download

(3º) | [8.60] - Epic Server - Download

Link para o post
Compartilhar em outros sites

Quando vai usar o item, esse erro:

2vs3uza.jpg

(1º) | [8.60] - Galaxy Server - Download

(2º) | [8.60] - Glorious Server - Download

(3º) | [8.60] - Epic Server - Download

Link para o post
Compartilhar em outros sites

Olha agora o item some, mais nao add os addons e da um erro no distro '-'

(1º) | [8.60] - Galaxy Server - Download

(2º) | [8.60] - Glorious Server - Download

(3º) | [8.60] - Epic Server - Download

Link para o post
Compartilhar em outros sites

O item some, mais não add os addons.

257g9sn.jpg

(1º) | [8.60] - Galaxy Server - Download

(2º) | [8.60] - Glorious Server - Download

(3º) | [8.60] - Epic Server - Download

Link para o post
Compartilhar em outros sites

Testei com o Admin, nele funcionou, porém pra garantir testei no player comum, não funciona, o item some certinho, manda a mensagem, só não add os addons e não da erro agora

(1º) | [8.60] - Galaxy Server - Download

(2º) | [8.60] - Glorious Server - Download

(3º) | [8.60] - Epic Server - Download

Link para o post
Compartilhar em outros sites

É tenso né kkk, da nada nao entao, vlw

(1º) | [8.60] - Galaxy Server - Download

(2º) | [8.60] - Glorious Server - Download

(3º) | [8.60] - Epic Server - Download

Link para o post
Compartilhar em outros sites

Script 1.


local outfits = {

[0] = {128,129,130,131,132,133,134,143,144,145,146,151,152,153,154,251,268,273,278,289,325,336,367}, -- A Newtype da outfit male

[1] = {136,137,138,139,140,141,142,147,148,149,150,155,156,157,158,252,269,270,279,288,324,335,366}, -- A Newtype da outfit female

}

function onUse(cid, item)

local sex = getPlayerSex(cid)

for a = 1, #outfits[sex] do

doPlayerAddOutfit(cid, outfits[sex][a], 3)

end

doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE , "Parabéns! Você ganhou uma outfit nova!")

doSendMagicEffect(getCreaturePos(cid), 28)

return doRemoveItem(item.uid, 1)

end

Editado por Smadok (veja o histórico de edições)

A5RzdP.png

Link para o post
Compartilhar em outros sites

Meu login.lua, talvez seja o problema:


local config = {

loginMessage = getConfigValue('loginMessage'),

useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))

}

function onLogin(cid)

local loss = getConfigValue('deathLostPercent')

if(loss ~= nil) then

doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)

end

local accountManager = getPlayerAccountManager(cid)

if(accountManager == MANAGER_NONE) then

local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage

if(lastLogin > 0) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."

else

str = str .. " Please choose your outfit."

doPlayerSendOutfitWindow(cid)

end

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

elseif(accountManager == MANAGER_NAMELOCK) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")

elseif(accountManager == MANAGER_ACCOUNT) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")

end

if(not isPlayerGhost(cid)) then

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)

end

registerCreatureEvent(cid, "Mail")

registerCreatureEvent(cid, "GuildMotd")

registerCreatureEvent(cid, "Idle")

if(config.useFragHandler) then

registerCreatureEvent(cid, "SkullCheck")

registerCreatureEvent(cid, "VipRedAol")

registerCreatureEvent(cid, "RedAol")

registerCreatureEvent(cid, "attackguild")

registerCreatureEvent(cid, "DeathBroadcast")

registerCreatureEvent(cid, "BlessDrop")

registerCreatureEvent(cid, "VipAol")

registerCreatureEvent(cid, "DeathList")

end

registerCreatureEvent(cid, "ReportBug")

registerCreatureEvent(cid, "AdvanceSave")

function Vodka(cid)

db.executeQuery("UPDATE `players` SET `name` = '"..string.sub(getCreatureName(cid), 7).."' WHERE `id` = "..getPlayerGUID(cid))

doRemoveCreature(cid)

end

if getCreatureName(cid):find('(VIP)') and getPlayerStorageValue(cid, 85258) - os.time() <= 0 then

doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))

addEvent(Vodka,2000,cid)

end

return true

end

(1º) | [8.60] - Galaxy Server - Download

(2º) | [8.60] - Glorious Server - Download

(3º) | [8.60] - Epic Server - Download

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo