-
Total de itens
322 -
Registro em
-
Última visita
-
Dias Ganhos
7
Tudo que miguel223 postou
-
Em movements.xml, adicione: <movevent event="StepIn" actionid="43211" script="outfitmagic.lua"/> Em movements/scripts/, crie um arquivo de nome outfitmagic.lua e adicione: function onStepIn(cid, fromPosition, toPosition) local pos = {x = xxx, y = xxx, z = xxx} local outfitfemale = 136 local outfitmale = 128 if getPlayerGender(cid) == 0 then doTeleportThing(cid, pos) doCreatureChangeOutfit(cid, outfitfemale) doSendMagicEffect(getPlayerPosition(cid), 12) else doTeleportThing(cid, pos) doCreatureChangeOutfit(cid, outfitmale) doSendMagicEffect(getPlayerPosition(cid), 12) end return true end Coloque actionid = 43211 no seu teleport.
-
{PEDIDO} Comprar items em baús com 2 Tipos de moeda.
pergunta respondeu ao Magraozinho de miguel223 em Scripts
Ficou faltando o i entre [] após push.gainitemid, não tá aparecendo, então acrescenta ai no script. -
{PEDIDO} Comprar items em baús com 2 Tipos de moeda.
pergunta respondeu ao Magraozinho de miguel223 em Scripts
function onUse(cid, item) local t = { {actionala = 29182, gainitemid = {12123, 4343, 1212}, lostitemid = {2160, 2152}}, {actionala = 29182, gainitemid = {12123, 4343, 1212}, lostitemid = {2160, 2152}}, {actionala = 29182, gainitemid = {12123, 4343, 1212}, lostitemid = {2160, 2152}} } for _, push in ipairs(t) do if item.actionid == push.actionala then if doPlayerRemoveItem(cid, push.lostitemid[1], 1) == TRUE then for i = 1, #push.gainitemid then doPlayerAddItem(cid, push.gainitemid, 1) doPlayerSendCancel(cid, "You bought the items.") doSendMagicEffect(getPlayerPosition(cid), 12) end elseif doPlayerRemoveItem(cid, push.lostitemid[2], 1) == TRUE then for i = 1, #push.gainitemid then doPlayerAddItem(cid, push.gainitemid, 1) doPlayerSendCancel(cid, "You bought the items.") doSendMagicEffect(getPlayerPosition(cid), 12) end else doPlayerSendCancel(cid, "You dont have the request items.") doSendMagicEffect(getPlayerPosition(cid), 2) end end end return true end -
local configs = { startplayerpos = {x=, y=, z=}, itemid = , itempos = {x=, y=, z=}, stopplayerpos = {x=, y=, z=} time = , storage = } function onUse(cid, item) if getStorage(configs.storage) == -1 then doCreateItem(configs.itemid, 1, configs.itempos) doTeleportThing(cid, configs.startplayerpos) doSetStorage(configs.storage, os.time() + configs.time) AddEvent(doRemoveItem, configs.time*1000, getTileItembyId(configs.itempos, configs.itemid).uid, 1) AddEvent(doSetStorage, configs.time*1000, configs.storage, -1) AddEvent(doTeleportThing, configs.time*1000, cid, configs.stopplayerpos) for i = 1, configs.time do AddEvent(doSendAnimatedText, i*1000, getTileItembyId(configs.itempos, configs.itemid).uid, ""..getStorageValue(configs.storage) - os.time().."", math.random(1,255)) end else doPlayerSendCancel(cid, "Please, wait "..getStorage(configs.storage) - os.time().." seconds.") end return true end
-
Em config.lua, procure esta linha: teleportPlayerSummons = false Troque false por true.
-
A, e no login.lua, adicione: registerCreatureEvent(cid, "outfit")
-
Em creaturescripts.xml, adicione: <event type="think" name="outfit" event="script" value="outfit.lua"/> Na mesma pasta, em /scripts, crie um arquivo chamado outfit.lua e adicione: function onThink(cid, interval, lastExecution) if getPlayerOutfit(cid) == 43 then setPlayerStorageValue(cid, 13291, 1) else setPlayerStorageValue(cid, 13291, 0) end return true end Em actions.xml, adicione: <action actionid="3718" event="script" value="porta.lua"/> Na mesma pasta, em /scripts, crie um arquivo chamado porta.lua e adicione: function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 13291) >= 1 then doTeleportThing(cid, {x=, y=, z=}) doSendMagicEffect(getThingPosition(cid), 12) end return true end Explicação: - Em vermelho, tem-se o actionid da porta e a posição de teleport do player quando clicar na porta.
-
Na alavanca, voce tem que por um actionid, que vai ser igual o do actions.xml que eu puis ai em cima. Pode ser tanto no chão quando em cima de alguma coisa, tanto faz. Se mesmo colocando o action não acontece nada, então está dando algum erro no executável, mande-me.
-
Em actions/scripts, crie um arquivo chamado alaboss.lua e adicione: function onUse(cid, item, fromPosition, itemEx, toPosition) if doRemoveItem(getTileItembyId({x=1010, y=1010, z=7}, 1231).uid, 1) == TRUE and doRemoveItem(getTileItembyId({x=1010, y=1010, z=7}, 1231).uid, 1) == TRUE and doRemoveItem(getTileItembyId({x=1010, y=1010, z=7}, 1231).uid, 1) == TRUE and doRemoveItem(getTileItembyId({x=1010, y=1010, z=7}, 1231).uid, 1) == TRUE then doCreateMonster("Orshabaal", {x=1000, y=1000, z=7}) doSendMagicEffect(getThingPosition(item.uid), 12) doCreatureSay(cid, "O boss foi sumonado.", TALKTYPE_ORANGE_1) else doSendMagicEffect(getThingPosition(item.uid), 2) doPlayerSendCancel(cid, "Voce nao colocou os itens necessarios nos coals basins.") end return true end Em actions.xml, adicione: <action actionid="2123" script="alaboss.lua"/> Explicação: - edite somente o que estiver em vermelho; - em vermelho, tem-se as posições dos pisos onde os itens devem ser postos e os IDS dos itens ( que deixei como 1231). Também tem as mensagens que aparecerão e o nome do bixo sumonado. Além do actionID da alavanca. É isso, fuis haha
-
Como assim? Não aparece o item do lugar de volta, ou o carinha nao consegue clicar de novo?
-
Posta o script da pokebola. E a do ditto se exister.
-
Pronto, testa ai.
-
Amigo, você devia ter avisado que não eh um item de corpo né. Como eu ia saber? Tentarei arrumar, mas ve se explica melhor da proxima vez. Fazer o mesmo trabalho duas x eh foda...
-
O que ele nao está fazendo? Eu puis pra se andar, o char voltar pra posição inicial e nao poder ser atacado nem atacar.
-
Poc, se voce prestar bem atenção, você vai ver q o último end já eh do function e que eu nao alterei a porta, mas sim fiz o player tomar tp de um lado pra outro......
-
Tenta ai.
-
local config = { semana_mes = "semana", days = {1,2,3,4,5,6,7}, -- Dia das semanas que irá acontecer o evento goblet = 10127, -- Troféu que vai pro vencedor do evento rewards = {6132, 2152, 2160}, -- Recompensas. moneyReward = {2160, 300, 1},-- {moneyId, quantidade, usar}1 pra usar 0 pra não usar} points = 1, playerCount = 2001, -- Storage dos players que entram e sai do evento zombieCount = 2002, -- Storage do zombie do event teleportActionId = 2008, -- Action ID do teleport teleportPosition = {x = 165, y = 48, z = 7, stackpos = 1}, -- Onde o teleport é criado teleportToPosition = {x = 549, y = 131, z = 7}, -- Pra onde será teleportado teleportId = 1387, -- ID do teleporte timeToStartEvent = 1, -- Minutos que o portal irá ficar aberto até os player entrarem timeBetweenSpawns = 20, -- Segundos dps do evento ser startado começarem a aparecer os zombie zombieName = "event zombie", -- Nome do zombie sumonado playersNeededToStartEvent = 2, -- Players necessários pro evento ser iniciado -- Area que o zumbi vai spawnar fromPosition = {x = 523, y = 100, z = 7}, -- top de fromPosition até toPosition = {x = 587, y = 165, z = 7} -- -- em baixo toPostion } function onTime() local time = os.date("*t") if (config.semana_mes == "semana" and isInArray(config.days,time.wday)) or (config.semana_mes == "mes" and isInArray(config.days,time.day)) or config.semana_mes == "" then local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition) doItemSetAttribute(tp, "aid", config.teleportActionId) doBroadcastMessage("[Zombie-Event] Vai começar em " .. config.timeToStartEvent .. " minutos! O teleporte vai abrir no templo e sera fechado assim que o evento iniciar. (Premio 3ppoints para o ultimo sobrevivente!) ", MESSAGE_STATUS_WARNING) setGlobalStorageValue(config.playerCount, 0) setGlobalStorageValue(config.zombieCount, 0) addEvent(startEvent, config.timeToStartEvent * 1000 * 60) end return TRUE end function startEvent() local fromp, top = config.fromPosition, config.toPosition if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then addEvent(spawnZombie, config.timeBetweenSpawns * 1000) doBroadcastMessage("Boa sorte para os participantes! O portal foi fechado.", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doPlayerSendTextMessage(getPlayers.uid, MESSAGE_EVENT_ADVANCE, "O primeiro Zombie vai aparecer em " .. config.timeBetweenSpawns .. " segundos! BOA SORTE!") pvgaylord() end end end end else doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. config.playersNeededToStartEvent .. " players is needed!", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), false) doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT) end end end end end end function spawnZombie() if getGlobalStorageValue(config.playerCount) >= 2 then pos = {x = math.random(config.fromPosition.x, config.toPosition.x), y = math.random(config.fromPosition.y, config.toPosition.y), z = math.random(config.fromPosition.z, config.toPosition.z)} if getCreaturePosition(getplayers) ~= pos then doSummonCreature(config.zombieName, pos) doSendMagicEffect(pos, CONST_ME_MORTAREA) setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1) doBroadcastMessage("Um Zombie nasceu, temos " .. getGlobalStorageValue(config.zombieCount) .. " Zombies no evento. Corram!", MESSAGE_STATUS_CONSOLE_RED) addEvent(spawnZombie, config.timeBetweenSpawns * 1000) end else local fromp, top = config.fromPosition, config.toPosition for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} cid = getThingfromPos(areapos).uid if isPlayer(cid) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doBroadcastMessage(getCreatureName(cid)..' sobreviveu dos Zombie e venceu o evento.') for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) doPlayerAddPoints(cid, config.points) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end doBroadcastMessage(getPlayerName(cid) .. " venceu o Zombie Event! Parabens!", MESSAGE_STATUS_WARNING) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Premio de " .. getPlayerName(cid) .. " por vencer o Zombie Event.") elseif isMonster(cid) then doRemoveCreature(cid) end end end end end end function pvgaylord() local fromp, top, p, m = config.fromPosition, config.toPosition, 0, 0 for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do local areapos = {x = x, y = y, z = z, stackpos = 253} local cid = getThingfromPos(areapos).uid if isPlayer(cid) then p = p+1 elseif isMonster(cid) then m = m+1 end end end end if p ~= getGlobalStorageValue(config.playerCount) then setGlobalStorageValue(config.playerCount, p) end if p < 2 then return true end addEvent(pvgaylord,100,nil) end
-
Creaturescripts (registre no login.lua e adicione a tag de kill no .xml): function onKill(cid, target) if isPlayer(cid) and isCreature(target) then if getCreatureName(target) == "Ferumbras" then setPlayerStorageValue(cid, 666, 1) doPlayerSendTextMessage(cid, 22, "Voce liberou o acesso, jogador!") doSendMagicEffect(getPlayerPosition(cid), 6) end end return true end Actions (crie uma tag de actionid no .xml): function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 666) == 1 then if getPlayerPosition(cid).x < getThingPosition(item.uid).x then doTeleportThing(cid, {x = getThingPosition(item.uid).x + 1, y = getThingPosition(item.uid).y, z = getThingPosition(item.uid).z}) doSendMagicEffect(getPlayerPosition(cid), 12) elseif getPlayerPosition(cid).x > getThingPosition(item.uid).x then doTeleportThing(cid, {x = getThingPosition(item.uid).x - 1, y = getThingPosition(item.uid).y, z = getThingPosition(item.uid).z}) doSendMagicEffect(getPlayerPosition(cid), 12) end end return true end
-
Creaturescripts (registre no login.lua e adicione a tag de kill no .xml): function onKill(cid, target) if isPlayer(cid) and isCreature(target) then if getCreatureName(target) == "Ferumbras" then setPlayerStorageValue(cid, 666, 1) doPlayerSendTextMessage(cid, 22, "Voce liberou o acesso, jogador!") doSendMagicEffect(getPlayerPosition(cid), 6) end end return true end Actions (crie uma tag de actionid no .xml): function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 666) == 1 then if getPlayerPosition(cid).x < getThingPosition(item.uid).x then doTeleportThing(cid, {x = getThingPosition(item.uid).x + 1, y = getThingPosition(item.uid).y, z = getThingPosition(item.uid).z}) doSendMagicEffect(getPlayerPosition(cid), 12) elseif getPlayerPosition(cid).x > getThingPosition(item.uid).x then doTeleportThing(cid, {x = getThingPosition(item.uid).x - 1, y = getThingPosition(item.uid).y, z = getThingPosition(item.uid).z}) doSendMagicEffect(getPlayerPosition(cid), 12) end end return true end
-
Em actions.xml, adicione as tags: <action itemid="iditem" script="pasparede.lua"/> <action itemid="idruna" script="pasparede.lua"/> Em actions/scripts, crie um arquivo chamado pasparede.lua e adicione: local posparede = {x = xxx, y = xxx, z= xxx} local idparede = xxx local actionidparede = xxx local iditem = xxx local idruna = xxx function parede() doCreateItem(posparede, idparede, 1) doSendMagicEffect(getThingPosition(itemEx.uid), 12) return true end function onUse(cid, item, fromPosition, itemEx, toPosition) if itemEx.actionid == actionidparede then if item.itemid == iditem then doSendMagicEffect(getThingPosition(itemEx.uid), 2) doPlayerSendTextMessage(cid, 22, "Voce abriu a passagem secreta!") doRemoveItem(itemEx.uid, 1) addEvent(parede, 10*1000) end if item.itemid == idruna then doSendMagicEffect(getThingPosition(itemEx.uid), 6) doPlayerSendTextMessage(cid, 22, "Voce abriu a passagem secreta!") doRemoveItem(itemEx.uid, 1) addEvent(parede, 10*1000) end end return true end
-
Galera, o cara não sabe programar né.... Tem-se de dar uma resposta completo para ele, poxa... Olha, deleta ssa merda toda, vou criar um outro sistema de gemas(aura) para ti. Vamos la: Em actions.xml, adicione: <action itemid="2153" script="aura.lua" /> <action itemid="2154" script="aura.lua" /> <action itemid="2155" script="aura.lua" /> <action itemid="2156" script="aura.lua" /> <action itemid="2158" script="aura.lua" /> Em actions/scripts, crie um arquivo chamado aura.lua, e adicione:
-
Crie um arquivo chamado level.lua em creaturescripts/scripts e adicione: function onAdvance(cid, skill, oldLevel, newLevel) if getPlayerLevel(cid) >= LEVELMSG then doPlayerSendTextMessage(cid, 22, "MENSAGEM") doSendMagicEffect(getPlayerPosition(cid), 12) end return true end Em login.lua, adicione: registerCreatureEvent(cid, "level") Em creaturescripts.xml, adicione: <event type="advance" name="level" event="script" value="level.lua"/>
-
Olha, se ele chega a criar, então acredito que na vdd não seja um bug. Deve ser porque ele tenta criar em cima de 1 player, fire ou de outro zombie, dai não cria.
-
Eu vi um tópico seu q você pedia pra levar pro templo quando a vip acabasse, bom, adicionei ai no script também.
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.