
Tudo que Summ postou
-
Segunda promotion VIP e NPC [TFS 1.0]
Tente agora editei la em cima... eu tinha colocado uma "," no final rsrsr
-
Erro <?>
Tenta : local raids = { ["Sunday"] = { ["21:34"] = { name= "Hermes", -- Nome do monstro a ser sumonado pos = {toPos= {x= 649, y= 1021, z= 7}, fromPos= {x= 654, y=1027, z= 7}}, --Vai ser sumonado de toPos e até fromPos quantidade = 5, -- Quantidade a ser sumonada time = 2, -- Se no tempo determinado em time= x, os monstros não forem mortos eles são removidos automaticamente }, ["22:45"] = { name= "Hermes", -- Nome do monstro a ser sumonado pos = {toPos= {x= 649, y= 1021, z= 7}, fromPos= {x= 654, y=1027, z= 7}}, --Vai ser sumonado de toPos e até fromPos quantidade = 5, -- Quantidade a ser sumonada time = 2, -- Se no tempo determinado em time= x, os monstros não forem mortos eles são removidos automaticamente } }, ["Friday"] = { ["13:10"] = { name= "Hermes", -- Nome do monstro a ser sumonado pos = {toPos= {x= 243, y= 293, z= 7}, fromPos= {x= 250, y=293, z= 7}}, --Vai ser sumonado de toPos e até fromPos quantidade = 5, -- Quantidade a ser sumonada time = 2, -- Se no tempo determinado em time= x, os monstros não forem mortos eles são removidos automaticamente }, }, } function doRemoveMonster(toPos, fromPos) for x = toPos.x, fromPos.x do for y = toPos.y , fromPos.y do local creature = getTopCreature({x=x, y= y, z= fromPos.z}).uid; if creature ~= 0 and isMonster(creature) then doRemoveCreature(creature) end end end return true end function onThink(interval, lastExecution) local hours = tostring(os.date("%X")):sub(1, 5) local days = raids[os.date("%A")][hours] local raids_storage = 99997 if days then if getGlobalStorageValue(raids_storage) <= os.time() then doBroadcastMessage("The invasion of " .. days.name .. " started.") pos = {x= math.random(days.pos.toPos.x, days.pos.fromPos.x), y= math.random(days.pos.toPos.y, days.pos.fromPos.y), z= days.pos.fromPos.z} monster = 0; repeat doSummonCreature(days.name, pos) monster = monster + 1 until monster == days.quantidade addEvent(function() doRemoveMonster(days.pos.toPos, days.pos.fromPos) end, days.time*1000*60) setGlobalStorageValue(raids_storage, os.time()+60) end end return true end <globalevent name="Raids" interval="5000" script="raid.lua"/>
-
Segunda promotion VIP e NPC [TFS 1.0]
Cara deixa a storage que tá ... se trocar vai dar problema e pra que tu quer mudar pra essa storage "9999"?
-
[AJUDA] Raids TFS 1.0
tu configurou errado a tabela tb, não tem como dar certo .... posta aqui como tu fez ou como tu vai querer.
-
Se deliciem
-
(Resolvido)NPC de teleport
local position = {x=652, y=1022, z=7}; -- Pra onde vai ser teleportado 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) if not npcHandler:isFocused(cid) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg:lower(), 'teleport') then selfSay('you are sure?', cid) talkState[talkUser] = 1 elseif msgcontains(msg:lower(), 'yes') and talkState[talkUser] == 1 then selfSay('Suma!!', cid) doTeleportThing(cid, position) talkState[talkUser] = 0 elseif msgcontains(msg:lower(), 'no') and talkState[talkUser] == 1 then selfSay('Bye!!', cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) hi/teleport/yes
-
Segunda promotion VIP e NPC [TFS 1.0]
local money = xxxx -- Quanto vai custar local storage = 14542 -- Não mexer local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 local function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end player = Player(cid) if player:getStorageValue(storage) == 1 then npcHandler:say('you have already received the promotion', cid) return true end if msgcontains(msg:lower(), 'promotion') then npcHandler:say('you are sure?', cid) npcHandler.topic[cid] = 1 end if msgcontains(msg:lower, 'yes') and npcHandler.topic[cid] == 1 then if isInArray({5, 6, 7, 8}, player:getVocation()) then if player:getVipDays() >= 1 then if player:removeMoney(money) then npcHandler:say('you just received a new promotion', cid) player:setVocation(player:getVocation() + 4) player:setStorageValue(storage, 1) npcHandler.topic[cid] = 0 else npcHandler:say('you no have money', cid) npcHandler.topic[cid] = 0 end else npcHandler:say('You do not have any vip days.', cid) npcHandler.topic[cid] = 0 end else npcHandler:say('you no have first promotion', cid) npcHandler.topic[cid] = 0 end elseif msgcontains(msg:lower(), 'no') and npcHandler.topic[cid] == 1 then NpcHandler:say('Bye!!', cid) npcHandler.topic[cid] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) em creaturescripts : function onLogin(cid) local storage = 14542; player = Player(cid); if player:getVipDays() == 0 and player:getStorageValue(storage) == 1 then player:setVocation(player:getVocation() - 4) player:setStorageValue(storage, - 1) end return true end
-
{Dúvida} Knight sem limites de ML
Como nosso amigo Bruno disse acima : "Amigo, sobre sua dúvida, Se não está tendo uma limitação, o que determina a forma que o knight vai ganhar skill de magic level são as rates, tanto no geral quando o skill individual da vocação, configurado no vocations.xml Se houver alguma limitação, pode ser feita tando por script quanto por sources." Nunca vi nenhuma limitação, nem em sources, nem nos scripts sobre ml de knight.Tenta subir a rate de magic de level dele no vocations.XML, e veja por si próprio.
-
[AJUDA] Raids TFS 1.0
local raids = { ["Monday"] = { ["21:34"] = { name= "Demon", -- Nome do monstro a ser sumonado pos = {toPos= {x= 649, y= 1021, z= 7}, fromPos= {x= 654, y=1027, z= 7}}, --Vai ser sumonado de toPos e até fromPos quantidade = 5, -- Quantidade a ser sumonada time = 2, -- Se no tempo determinado em time= x, os monstros não forem mortos eles são removidos automaticamente }, ["22:45"] = { name= "Hydra", -- Nome do monstro a ser sumonado pos = {toPos= {x= 649, y= 1021, z= 7}, fromPos= {x= 654, y=1027, z= 7}}, --Vai ser sumonado de toPos e até fromPos quantidade = 5, -- Quantidade a ser sumonada time = 2, -- Se no tempo determinado em time= x, os monstros não forem mortos eles são removidos automaticamente } }, ["Tuesday"] = { ["11:10"] = { name= "Troll", -- Nome do monstro a ser sumonado pos = {toPos= {x= 649, y= 1021, z= 7}, fromPos= {x= 654, y=1027, z= 7}}, --Vai ser sumonado de toPos e até fromPos quantidade = 5, -- Quantidade a ser sumonada time = 2, -- Se no tempo determinado em time= x, os monstros não forem mortos eles são removidos automaticamente }, }, } function doRemoveMonster(toPos, fromPos) for x = toPos.x, fromPos.x do for y = toPos.y , fromPos.y do local creature = getTopCreature({x=x, y= y, z= fromPos.z}).uid; if creature ~= 0 and isMonster(creature) then doRemoveCreature(creature) end end end return true end function onThink(interval) local hours = tostring(os.date("%X")):sub(1, 5); local days = raids[os.date("%A")][hours]; local raids_storage = 99997; if days then if getGlobalStorageValue(raids_storage) <= os.time() then doBroadcastMessage("The invasion of " .. days.name .. " started") pos = {x= math.random(days.pos.toPos.x, days.pos.fromPos.x), y= math.random(days.pos.toPos.y, days.pos.fromPos.y), z= days.pos.fromPos.z}; monster = 0; repeat doSummonCreature(days.name, pos) monster = monster + 1; until monster == days.quantidade; addEvent(function() doRemoveMonster(days.pos.toPos, days.pos.fromPos) end, days.time*1000*60) setGlobalStorageValue(raids_storage, os.time()+60) end end return true end <globalevent name="Raids" interval="10000" script="raids.lua"/>
-
[pedido] Npc adiciona Premium days!
local verf_storage = {xxx, xxx, xxx, xxx}; -- Coloca todas as storage aqui local storage = 97545; local premium_days = 10; 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) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if getPlayerStorageValue(cid, storage) == 1 then selfSay('Você já pegou sua premium!!', cid) return true end if msgcontains(msg:lower(), 'premium') then selfSay('you are sure?', cid) talkState[talkUser] = 1 end if msgcontains(msg:lower(), 'yes') and talkState[talkUser] == 1 then conf_storage = 0 for x = 1, #verf_storage do if getPlayerStorageValue(cid, verf_storage[x]) >= 1 then conf_storage = conf_storage + 1 end end if conf_storage == #verf_storage then doPlayerAddPremiumDays(cid, premium_days) setPlayerStorageValue(cid, storage, 1) selfSay('is Add 10 premium days', cid) talkState[talkUser] = 0 else selfSay('you no have permission!', cid) talkState[talkUser] = 0 end elseif msgcontains(msg:lower(), 'no') and talkState[talkUser] == 1 then selfSay('Bye!!', cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) local verf_storage = {xxx, xxx, xxx, xxx}; -- Coloca todas as storage aqui
-
[Ajuda] Boss com Teleport
Você quer que sumone um bixo em x horário em x lugar e ao matar ele aparece um teleport ? tenta me explicar detalhamente que dps eu faço.
-
[Ajuda] Npc de quest
Não testei npc1 : local config = { storage_new = 74562, -- Não mudar storage = 74561, -- Não mudar remove_item = 7844, -- Item que vai ganhar add_item = XXXX, -- id da espada } 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) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if getPlayerStorageValue(cid, config.storage) == 1 then selfSay('Ok, volte aqui após conversar com o {Nik}.', cid) return true end if getPlayerStorageValue(cid, config.storage) == 3 then selfSay('Obrigado por nos ajudar!!', cid) return true end if getPlayerStorageValue(cid, config.storage) < 1 then if msgcontains(msg:lower(), 'mission') or msgcontains(msg:lower(), 'missao') then selfSay('you are sure', cid) talkState[talkUser] = 1 end if msgcontains(msg:lower(), 'yes') and talkState[talkUser] == 1 then selfSay('Ok, volte aqui após conversar com o {Nik}.', cid) setPlayerStorageValue(cid, storage, 1) talkState[talkUser] = 0 setPlayerStorageValue(cid, config.storage, 1) elseif msgcontains(msg:lower(), 'no') then selfSay('Então volte, quando tiver coragem!!', cid) selfSay('Bye!!', cid) talkState[talkUser] = 0 end end if getPlayerStorageValue(cid, config.storage) == 2 then if msgcontains(msg:lower(), 'filho') then selfSay('diga {espada} para pega-lá', cid) talkState[talkUser] = 0 end if msgcontains(msg:lower(), 'espada') then selfSay('you are sure!!', cid) talkState[talkUser] = 1 end if msgcontains(msg:lower(), 'yes') and talkState[talkUser] == 1 then if doPlayerRemoveItem(cid, config.remove_item, 1) then selfSay('Congratulations!!', cid) doPlayerAddItem(cid, config.add_item, 1) setPlayerStorageValue(cid, config.storage, 3) talkState[talkUser] = 0 else selfSay('você não tem o item...') talkState[talkUser] = 0 end end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) npc2 : local config = { items = {{itemid = 2225, count = 30}, {itemid = 2033, count = 20}, {itemid = 2363, count = 1}, {itemid = 2350, count = 1}}, storage = 74561, -- Não mudar storage_new = 74562 -- Não mudar add_item = 7844, -- Item que vai ganhar } 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) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if getPlayerStorageValue(cid, config.storage) < 1 then selfSay('Não te conheço suma!!', cid) return true end if getPlayerStorageValue(cid, config.storage_new) == 1 then selfSay('Não tenho mais nada a te entregar!!', cid) return true end if msgcontains(msg:lower(), 'pai') then selfSay('Estou precisando de uns itens e se tu me trouxer eu lhe recompensarei... 30 Piece of Iron, 20 Golden Mug, 1 Blood Orb, 1 Sword Hilt.Diga {entregar} se tiver os itens listado.', cid) talkState[talkUser] = 0 end if msgcontains(msg:lower(), 'entregar') then selfSay('you are sure ?', cid) talkState[talkUser] = 1 end if msgcontains(msg:lower(), 'yes') and talkState[talkUser] == 1 then item = 0 for i = 1, #config.items do if getPlayerItemCount(cid, config.items[i].itemid) >= config.items[i].count then item = item + 1 end end if item == #config.items then for x = 1, #config.items do doPlayerRemoveItem(cid, config.items[x].itemid, config.items[x].count) end selfSay('Aqui está sua recompensa', cid) doPlayerAddItem(cid, config.add_item, 1) setPlayerStorageValue(cid, config.storage_new, 1) setPlayerStorageValue(cid, config.storage, 2) talkState[talkUser] = 0 else selfSay('Verifique se você tem todos os items...', cid) talkState[talkUser] = 0 end elseif msgcontains(msg:lower(), 'no') and talkState[talkUser] == 1 then selfSay('Bye!!', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Faço Scripts Para Todos
Não sei se perceberam, mas ele não está mais atendendo pedidos desse tópico ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
agora eo to solteiro
vem ni mim
-
Rentabilizando Seu OTServ
Bastante interessante o conteúdo, pena ter gente que acha que ao abrir um otserv vai ficar rico...
- [Projeto] New Styller
-
[DUVIDA] Spoiler
@Septy Submoderação por membros não é permitida no fórum, tome cuidado, seu post pode ser considerado flood ... peço que na próxima apenas reporte o post em questão e espere algum mod alertá-lo.
-
[Raids] Automaticas
Use esse que eu fiz em outro tópico : [paste]wWSEzjQm[/paste] tag : <globalevent name="Raids" interval="10000" script="raids.lua"/>
-
1º De ABRIL
onde está o rep quando precisamos dele heuehuehueh
- [Tutorial] Quest baseado num labirinto
-
Qual teu nick no LOL ?
leo300 add lá
- Apresentação/ Krono
-
Parse error latestnews.php on line 287
Tente :
-
Pedido [Tibia.com]
Aprende HTML e um pouco de PHP que tu faz aquilo sem maiores dificuldades, na minha assinatura tem link, para aprender...
-
Entrar no portal com level especifico
<movevent type="StepIn" actionid="67777" event="script" value="ARQUIVO.lua"/> Lembre-se de colocar o mesmo action id pelo rme no teleporte.