Solutions
-
Dwarfer's post in (Resolvido)Item que teleporta. was marked as the answerEm actions/scripts crie um arquivo:
itemteleport.lua
Em actions.xml, adicione a tag: <action itemid="ID_DO_ITEM" script="itemteleport.lua"/>
-
Dwarfer's post in (Resolvido)Npc que libera passagem de barco was marked as the answerNPC 1
npcquest.lua
NPC 2
npctravel.lua
Edite as falas, posições, nomes, etc, como quiser, apenas coloquei esses para te servir como base.
-
Dwarfer's post in (Resolvido)SCRIPT DE NPC QUE TROCA X ITEM por X item was marked as the answer@Vim Rusha Dá uma olhada:
-
Dwarfer's post in (Resolvido)Sem storage não upa was marked as the answer
-
Dwarfer's post in (Resolvido)Erro na Talk e Action was marked as the answerQue mistureba foi essa que você fez, cara? Você tá confundindo os scripts, pegando parte de um e colocando no outro. Para ESSE sistema que você colocou aí:
-
Dwarfer's post in (Resolvido)Teleportar player automático quando alcançar um certo level! was marked as the answerA mensagem aparece sim, no entanto, no Local Chat. Tinha colocado assim porque já ia aparecer a mensagem que o player avançou de level. Enfim, mensagem branca no meio da tela:
-
Dwarfer's post in (Resolvido)Fiz uma gambiarra no death channel, help was marked as the answer@jNo
Em creaturescripts/scripts:
deathchannel.lua
Registre no login.lua: registerCreatureEvent(cid, "DeathChannel")
Adicione a tag no creaturescripts.xml: <event type="death" name="DeathChannel" event="script" value="deathchannel.lua"/>
-
Dwarfer's post in (Resolvido)Bless Amulet was marked as the answer@FearWar
-
Dwarfer's post in (Resolvido)[PEDIDO] NPC Event was marked as the answer
-
Dwarfer's post in (Resolvido)[PEDIDO] Item que dá Health was marked as the answer
-
Dwarfer's post in (Resolvido)Alterar Script de Respawn Boss was marked as the answer
-
Dwarfer's post in (Resolvido)[Pedido] Tp em 5hrs was marked as the answerCopie um arquivo xml na pasta mods, coloque o código que está no tópico que te passei, salve, renomeie e edite o arquivo conforme seus monstros e posições, seguindo os passos corretamente.
-
Dwarfer's post in (Resolvido)ACESSO A PORTA SELADA POR QUEST was marked as the answerEm actions/scripts crie um arquivo:
chestdoor.lua
Em actions.xml, adicione a tag: <action actionid="ACTION_ID_DO_BAÚ" script="chestdoor.lua" />
Depois é só colocar o actionid da porta igual ao do storage no script acima.
-
Dwarfer's post in (Resolvido)Script de spawn não funcionando was marked as the answerApenas certifique-se de que o o arquivo rashidspawn.lua está realmente na pasta spawn.
-
Dwarfer's post in (Resolvido)Npc Crafting was marked as the answercrafter.lua
Crafter.xml
<?xml version="1.0" encoding="UTF-8"?> <npc name="Crafter" script="crafter.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="66"/> </npc>
Edite as falas e os nomes como queira. Apenas coloquei exemplos para te servir como base.
-
Dwarfer's post in (Resolvido)Modificar Script + Pedido was marked as the answerEm movements/scripts crie um arquivo.lua:
No movements.xml: <movevent type="StepIn" actionid="ACTION_ID_DO_PISO" event="script" value="NOMEDOSEUARQUIVO.lua"/>
-
Dwarfer's post in (Resolvido)Npc que libera passagem was marked as the answerSim, a versão era diferente. Usa assim:
<movevent event="StepIn" actionid="ACTION_ID_DO_PISO" script="tilepermission.lua" />
-
Dwarfer's post in (Resolvido)Templo com base na storage was marked as the answerProvavelmente já exista o arquivo citizen.lua na sua pasta de movements, confira lá.
function onStepIn(cid, item, position, fromPosition) if(item.actionid > 30020 and item.actionid < 30100) then local townId = (item.actionid - 30020) doPlayerSetTown(cid, townId) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are the newest resident of " .. getTownName(townId) .. ".") end return true end <movevent type="StepIn" itemid="1387" event="script" value="citizen.lua"/>
É só colocar o actionid do teleporte igual a 30020 + o id da cidade.
Se venore for id 1, coloca actionid 30021, carlin for id 2, 30022 e por aí vai..
-
Dwarfer's post in (Resolvido)Alerta de Bless was marked as the answerEm creaturescripts/scripts, crie um arquivo:
blessmsg.lua
No login.lua: registerCreatureEvent(cid, "BlessMsg")
No creaturescripts.xml:
<event type="login" name="msgbless" event="script" value="blessmsg.lua"/>
<event type="death" name="BlessMsg" event="script" value="blessmsg.lua"/>
-
Dwarfer's post in (Resolvido)Onlogin Storage Vocation was marked as the answersetPlayerStorageValue(cid, first[getPlayerVocation(cid)]) Falta setar o valor da storage: setPlayerStorageValue(cid, first[getPlayerVocation(cid)], 1)
-
Dwarfer's post in (Resolvido)2 script de potion was marked as the answer@jNo Sim, o exausthed é o mesmo dos potions. Da segunda forma que você colocou aí funcionaria, mas faça assim:
-
Dwarfer's post in (Resolvido)Erro ao mudar automaticamente uma outifit quando logar was marked as the answerfunction onLogin(cid) visual = { [0] = {lookType = 24}, [1] = {lookType = 28}, [6] = {lookType = 31} } local checkvisual = visual[getPlayerVocation(cid)] if not checkvisual then return true end local outfit = getCreatureOutfit(cid) outfit.lookType = checkvisual.lookType doSetCreatureOutfit(cid, outfit, -1) doCreatureSay(cid, "Welcome!", TALKTYPE_ORANGE_1) return true end
-
Dwarfer's post in (Resolvido)Bau De Quest e Porta Que precisa dele was marked as the answerEm actions/scripts crie um arquivo:
baulivro.lua
local bookid = 1111 -- id do livro aqui local info = "Hiho, my name is Dwarfer. Bye!" function onUse(cid, item, fromPosition, itemEx, toPosition) local p = getPlayerPosition(cid) if getPlayerStorageValue(cid, 19056) ~= -1 then doPlayerSendCancel(cid, "You have already done this quest.") doSendMagicEffect(p, CONST_ME_POFF) return true end local book = doPlayerAddItem(cid, bookid, 1) doItemSetAttribute(book, "text", info) setPlayerStorageValue(cid, 19056, 1) return true end
Adicione a tag em actions.xml: <action actionid="ACTION_ID_DO_BAÚ" script="baulivro.lua" />
Caso queira fazer algo maior, dê uma olhada:
Para a porta, crie outro arquivo:
portacheck.lua
function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 19056) == -1 then doPlayerSendCancel(cid, "You don't have the necessary permission to enter.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true end doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, toPosition) return true end
Em actions.xml: <action actionid="ACTION_ID_DO_BAÚ" script="portacheck.lua" />
-
Dwarfer's post in (Resolvido)Script ,Falante. was marked as the answerEm creaturescripts/scripts crie um arquivo:
staffeffect.lua
local t = {access = 3, -- acesso mínimo para sair o efeito text = "STAFF", textcolor = COLOR_ORANGE, effect = CONST_ME_FIREWORK_YELLOW, interval = 10} function onLogin(cid) if getPlayerAccess(cid) >= t.access then SendEffect(cid, t.effect, t.text, t.interval, t.textcolor) end return true end function SendEffect(cid, effect, text, time, color) if isPlayer(cid) then doSendMagicEffect(getPlayerPosition(cid), effect) doSendAnimatedText(getPlayerPosition(cid), text, color) addEvent(SendEffect, time*1000, cid, effect, text, time, color) end return true end
Em creaturescripts.xml, adicione a tag: <event type="login" name="StaffEffect" event="script" value="staffeffect.lua"/>
-
Dwarfer's post in (Resolvido)Ao matar um player ganha item was marked as the answerEm creaturescripts/scripts, crie um arquivo.lua:
local item,count = 2160,1 function onDeath(cid, corpse, deathList) local player = deathList[1] if not isPlayer(player) then return true end if getPlayerIp(cid) ~= getPlayerIp(player) then addEvent(doPlayerAddItem,1,player,item,count) end return true end Em creaturescripts.xml: <event type="death" name="DeathItem" event="script" value="NOMEDOARQUIVO.lua"/>
No login.lua, registre o evento: registerCreatureEvent(cid, "DeathItem")
O npc procura aí que tem.