Tudo que NewAge postou
- [Resolvido] Monstros conseguem nadar
-
[Resolvido] Monstros conseguem nadar
To usando esse scripts pros players poderem nadar, o que acontece é que quando tem um monstro perto do jogador e ele corre pra agua, pra nadar, o monstro vem atras, só que ele fica andando sobre a agua. Queria saber se tem como arrumar isso Movements <movevent type="StepIn" itemid="4632-4643" event="script" value="swimm.lua"/> <movevent type="StepIn" itemid="7943-7954" event="script" value="swimm.lua"/> swimm.lua local outfit = {lookType = 267, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} local BORDERS = { [4632] = {x = 0, y = -2, back = SOUTH}, [4633] = {x = -2, y = 0, back = EAST}, [4634] = {x = 0, y = 2, back = NORTH}, [4635] = {x = 2, y = 0, back = WEST}, [4636] = {x = 2, y = 1, back = WEST}, [4637] = {x = -2, y = 1, back = NORTH}, [4638] = {x = 2, y = -1, back = WEST}, [4639] = {x = -2, y = -1, back = EAST}, [4640] = {x = 2, y = 2, back = WEST}, [4641] = {x = -2, y = 2, back = NORTH}, [4642] = {x = 2, y = -2, back = WEST}, [4643] = {x = -2, y = -2, back = SOUTH}, [7943] = {x = 0, y = -2, back = SOUTH}, [7944] = {x = -2, y = 0, back = EAST}, [7945] = {x = 0, y = 2, back = NORTH}, [7946] = {x = 2, y = 0, back = WEST}, [7947] = {x = 2, y = 1, back = WEST}, [7948] = {x = -2, y = 1, back = NORTH}, [7949] = {x = 2, y = -1, back = WEST}, [7950] = {x = -2, y = -1, back = EAST}, [7951] = {x = 2, y = 2, back = WEST}, [7952] = {x = -2, y = 2, back = NORTH}, [7953] = {x = 2, y = -2, back = WEST}, [7954] = {x = -2, y = -2, back = SOUTH} } BORDERS[4828] = BORDERS[7943] BORDERS[4829] = BORDERS[7946] BORDERS[4830] = BORDERS[7945] BORDERS[4831] = BORDERS[7944] function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if(not isPlayer(cid)) then return true end local border = BORDERS[item.itemid] if(not border) then return false end local pos, newPos = getCreaturePosition(cid), {} newPos = pos newPos.x = pos.x + border.x newPos.y = pos.y + border.y if(hasCondition(cid, CONDITION_OUTFIT) and getCreatureOutfit(cid).lookType == outfit.lookType) then doMoveCreature(cid, border.back) doRemoveCondition(cid, CONDITION_OUTFIT) else if(doTileQueryAdd(cid, pos, 4) ~= RETURNVALUE_NOERROR) then return false end local tmp = getCreaturePosition(cid) doTeleportThing(cid, newPos) if(not isPlayerGhost(cid)) then doSendMagicEffect(tmp, CONST_ME_POFF) doSendMagicEffect(newPos, CONST_ME_WATERSPLASH) end doRemoveConditions(cid, true) doSetCreatureOutfit(cid, outfit, -1) end return true end
- [Resolvido]Erro time event
- [Resolvido]Erro time event
-
[Resolvido]Erro time event
To usando esse script pra fazer um portao, que quando o player puxe a alavanca, ele fique aberto apenas por 10 segundos e depois feche sozinho Script: /actions/gate.lua function onUse(cid, item, toPosition) rock1pos = {x=1352, y=1666, z=5, stackpos=1} -- Posição da Pedra getrock1 = getThingfromPos(rock1pos) UniID = 15231 -- UniqueID que vai ser adicionado na alavanca rockID = 9485 -- ID da pedra if item.uid == UniID and item.itemid == 1945 and getrock1.itemid == rockID then doRemoveItem(getrock1.uid, 1) doTransformItem(item.uid, item.itemid+1) doSendMagicEffect(rock1pos, 2) setPlayerStorageValue(cid, 4005, 2) setPlayerStorageValue(cid, 4006, 1) elseif item.uid == UniID and item.itemid == 1946 then doCreateItem(rockID, 1, rock1pos) doTransformItem(item.uid,item.itemid-1) doSendMagicEffect(rock1pos, 2) return TRUE end addEvent(doCreateItem, rockID, 1, rock1pos, 10*1000) doPlayerSendTextMessage(cid,22,"O Portao fechara daki 10 segundos") return true end Mas ta dando esse erro: In a timer event called from data/gate.lua:OnUse description: Attempt to index a number vallue Stack traceback: [C]: ?
-
Efeito por storage
Ele recebe de um npc local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid --[[ REMEMBER TO SET YOUR STORAGE AS YOURSTORAGE! ]]-- local boromir = 4001 local boromir2 = 4002 local boromir3 = 4003 if (getPlayerStorageValue(cid, 96745) == 1) and msgcontains(msg, 'portao') then npcHandler:say("Você terá que matar um guarda e abrir o portão, acha que consegue?", cid) talkState[talkUser] = 0 elseif (getPlayerStorageValue(cid, 96745) == 1) and msgcontains(msg, 'yes') then setPlayerStorageValue(cid, boromir, 1) setPlayerStorageValue(cid, boromir2, 1) setPlayerStorageValue(cid, boromir3, 1) npcHandler:say("Quando abrir o portão, desça as escadas e vá procurar por Heller, ele lhe dará as próximas instruções.", cid) talkState[talkUser] = 0 else npcHandler:say("Estou muito ferido e não posso mais lutar, você terá que ir sozinho.", cid) talkState[talkUser] = 0 end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Efeito por storage
Eu quero que o efeito saia quando o player receber a storage, só que com esse script o efeito só sai quando o player reloga
-
Efeito por storage
Ele fica por tempo indeterminado, mas continua o mesmo problema, só funciona se o player reloga Tentei trocar onlogin por onthink, mas ai o efeito não aparece
-
Efeito por storage
Eu to usando esse script pra aparecer um efeito pro player que tiver o storage 4001, ele ta funcionando, mas a function ta Onlogin,ou seja, ele só funciona quando o player loga, ai eu queria que o efeito aparecesse logo quando o player recebesse ele, sem precisa relogar e tb por tempo indeterminado, se possivel effect.lua local effect = 55 -- Efeito que vai usar local pos = { x = 1342, y = 1659, z = 5 } local storage = 4001 -- Storage que o player precisa ter function onLogin(cid) if getPlayerStorageValue(cid, storage) == 1 then SendEffect(cid) end return TRUE end function SendEffect(cid) doSendMagicEffect(pos, effect) return TRUE end
-
Sistema de natação
Funcionou perfeitamente, vlw mano rep +
-
Sistema de natação
Eu to usando um sistema de natação, ele funciona certinho, só que na hora do player voltar pra terra ele continua nadando. Alguém sabe como arrumar isso? swimm.lua movements.xml
-
Storage nao funfa
Eu criei um npc de quest que da um storage pro player, ai ativa a quest normalmente, só que se o player voltar e falar denovo com o npc recebe novamente o storage e reinicia a quest. Eu tentei adicionar um storage no firstitems e colocar pro npc checar se o player tem o storage, ele só vai ter quando criar uma conta nova, pq dps que ele abre o bau, o storage é setado pra -1. Só que não ta funcionando, nao sei pq, de vez em quando funciona, outras vezes não. Firstitems: NPC: Quote local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid --[[ REMEMBER TO SET YOUR STORAGE AS YOURSTORAGE! ]]-- local boromir = 4001 local boromir2 = 4002 local boromir3 = 4003 if (getPlayerStorageValue(cid, 96745) == 1) and msgcontains(msg, 'portao') then npcHandler:say("Você terá que matar um guarda e abrir o portão, acha que consegue?", cid) talkState[talkUser] = 0 elseif (getPlayerStorageValue(cid, 96745) == 1) and msgcontains(msg, 'yes') then setPlayerStorageValue(cid, boromir, 1) setPlayerStorageValue(cid, boromir2, 1) setPlayerStorageValue(cid, boromir3, 1) npcHandler:say("Quando abrir o portão, desça as escadas e vá procurar por Heller, ele lhe dará as próximas instruções.", cid) talkState[talkUser] = 0 else npcHandler:say("Estou muito ferido e não posso mais lutar, você terá que ir sozinho.", cid) talkState[talkUser] = 0 end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) E não da erro nenhum no console, o script ta funcionando, só parece que não ta checando corretamente. Alguem sabe o que pode ser e como arrumar? Rep +
-
Bug nas Doors 9.60
continua dando o mesmo erro
-
Bug nas Doors 9.60
Troquei meu servidor pra 9.60 e agora toda vez que tento abrir portas da esse erro no console: Quote [16:29:22.470] [Error - Action Interface] [16:29:22.471] data/actions/scripts/other/doors.lua:onUse [16:29:22.471] Description: [16:29:22.471] data/actions/scripts/other/doors.lua:13: attempt to index global 'DOORS' (a nil value) [16:29:22.472] stack traceback: [16:29:22.472] data/actions/scripts/other/doors.lua:13: in function <data/actio ns/scripts/other/doors.lua:7> Alguém sabe como arrumar?
-
Chave Não Funciona
Não ta funcionando, a key vem com actionid 0 e a porta continua abrindo sem chave e ta dando erro: attempt to call global 'dosetitemattribute' <a nill value> stack traceback
-
Chave Não Funciona
To usando esse script pra pegar a chave com action id junto -- Bau com BoneKey 2016 (By Conde Sapo) -- Exclusivo para ##### -- denunciar se aparecer em outro forum function onUse(cid, item, frompos, item2, topos) queststatus = getPlayerStorageValue(cid,25173) == 1 if queststatus == -1 then chave = doPlayerAddItem(cid,2088,1) doSetItemActionId(chave,5123) doSetItemSpecialDescription(chave,"Chave da sala dos guardas.") doPlayerSendCancel(cid,'Você encontrou a chave da sala dos guardas! Número 5123.') setPlayerStorageValue(cid, 25173, -1) setPlayerStorageValue(cid, 96745, -1) else doPlayerSendCancel(cid,'Você ja pegou a chave.') end return 1 end só que na hora de usar a chave na porta ( id: 1220 ) não funciona, a porta não abre e eu consigo abrir a porta sem a chave, ja botei action id 5123, tentei uniqueid, tentei trocar a porta, nada funciona alguem sabe arrumar? e fica dando esse erro: http://imageshack.us/photo/my-images/401/451232.png/
-
(RESOLVIDO) Mudar City Ao Ser Teleportado
Eu mesmo arrumei o erro, Rep + por ajudar ;]
-
(RESOLVIDO) Mudar City Ao Ser Teleportado
Ta dando um erro: Unexpected symbol near and
-
(RESOLVIDO) Mudar City Ao Ser Teleportado
Vlw, vo testar aqui, jaja digo se funfou
-
(RESOLVIDO) Mudar City Ao Ser Teleportado
o script saiu cheio disso aqui, não da pra entender
-
(RESOLVIDO) Mudar City Ao Ser Teleportado
mas isso ai é só pra 1 cidade?
-
(RESOLVIDO) Mudar City Ao Ser Teleportado
Town 1 x= 1650, y= 1662, z= 5 Town 2 x= 1103, y=1132, z= 7 Town 3 x= 597, y=590, z= 7 Essas são as 3 cidades
-
(RESOLVIDO) Mudar City Ao Ser Teleportado
Queria um script que mudasse a cidade do player quando ele passasse em cima de um piso, ou fosse teleportado por um npc, ou num portal mesmo. Ja vi em alguns ots que vc pode escolher sua cidade passando por cima de um piso, se alguem pudesse me ajudar, ficaria agradecido
-
O que tem de errado no script?
O que há de errado nesse script? Ta dando um erro: Attempt to call a nill value Stack traceback. local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} storage1 = 19231 -------------- Storagevalue function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, "quest") or msgcontains(msg, "mission") then selfSay("Para voce sair eu preciso de 1 "..getItemNameById(itemid)..", You bringing me draconian steel and obsidian lance in exchange for obsidian knife?", cid) talkState[talkUser] == 0 elseif msgcontains(msg, 'yes') then if getPlayerStorageValue(cid,storage1) < 1 then doPlayerAddItem(cid,5908,1) setPlayerStorageValue(cid,storage1,1) selfSay("Adeus.", cid) doTeleportThing(cid, pos) else selfSay("Voce nao possui o item que eu preciso.", cid) end end return TRUE end 0 Quote MultiQuote Editar
-
NPC nao remove itens
O que tem de errado nesse script? ta dando um erro Unexpected symbol near then at line 23 local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local storage1 = 171717 -------------- Storagevalue function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, "quest") or msgcontains(msg, "mission") then selfSay("Para voce sair eu preciso de 1 "..getItemNameById(itemid)..", You bringing me draconian steel and obsidian lance in exchange for obsidian knife?", cid) talkState[cid] = 0 elseif msgcontains(msg, 'yes') then getPlayerStorageValue(cid,storage1) < 1 then if (doPlayerRemoveItem(cid,5889,1) == TRUE and doPlayerRemoveItem(cid,2425,1) == TRUE) then doPlayerAddItem(cid,5908,1) setPlayerStorageValue(cid,storage1,1) selfSay("Adeus.", cid) doTeleportThing(cid, pos) else selfSay("Voce nao possui o item que eu preciso.", cid) end end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())