Tudo que Bolletox postou
-
Player loga e logo em seguida desloga
@Francisco tibia tenta trocar a funcao isPlayerGhost na lib por essa aqui function isPlayerGhost(cid) if(not isPlayer(cid)) then return false end return getCreatureCondition(cid, CONDITION_GAMEMASTER) end
-
bota de areia
@bpm91 Estranho, eu testei no 8.6 funcionou, acho que sua source nao tem essa função
-
bota de areia
@bpm91 Veja se é assim que voce quer local speedGain = 10000 -- speed que o player irá ganhar local sands = {231,104} -- Id das areias local id_boot = 2643 -- ID da boots function onStepIn(cid, item, position, fromPosition) if(isInArray(sands, item.itemid)) then if getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == id_boot then doChangeSpeed(cid, speedGain) end else return false end return true end function onStepOut(cid, item, position, fromPosition) if getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid ~= id_boot then if (getCreatureSpeed(cid) > getCreatureBaseSpeed(cid)) then doChangeSpeed(cid, -speedGain) end else return false end return true end XML <movevent type="StepIn" itemid="231;104" event="script" value="botaAreia.lua"/> <movevent type="StepOut" itemid="231;104" event="script" value="botaAreia.lua"/> Lembre de adicionar os ids do tile no itemid do XML no StepIn e StepOut.
-
(Resolvido)Teleport que remove storage
@bpm91 Tenta ai function onStepIn(cid, item) local storages = {1991,1992,1993,1994,1995,1996,1997} -- Storages aqui if (isPlayer(cid)) then for i=1,#storages do if (getPlayerStorageValue(cid, storages[i]) >= 1) then setPlayerStorageValue(cid, storages[i], -1) end end end end
-
(Resolvido)Teleport que remove storage
@bpm91 Veja se funciona, não testei Crie arquivo chamado tpStorages.lua em data/moveevents function onStepIn(cid, item) local storages = {1001,1002,1003,1004,1005,1006,1007,1008} -- Storages que serão removidos if isPlayer(cid) then for i = 1, #storages do setPlayerStorageValue(cid, i, 0) end end return true end XML <movevent type="StepIn" actionid="8887" event="script" value="tpStorages.lua"/> Adicione a actionid 8887 no teleport
-
Npc
@Cleiton Felipi Ah esse script é tfs 0.4 nao vai funcionar
-
Npc
@Cleiton Felipi Substitua o código do Waliam.xml por este. <?xml version="1.0" encoding="UTF-8"?> <npc name="Waliam" script="data/npc/scripts/mail.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="128" head="115" body="119" legs="98" feet="114" addons="0"/> <parameters> <parameter key="message_greet" value="Olá |PLAYERNAME|. Eu vendo parcels (15gps), letters (10gps) e labbel(10gps) e também cuido do {banco}. Fale {oferta} ou {banco} caso estiver interessado.." /> <parameter key="module_shop" value="1" /> <parameter key="shop_buyable" value="parcel,2595,15;label,2599,10;letters,2597,10" /> <parameter key="message_farewell" value="Até mais, |PLAYERNAME|!"/> <parameter key="message_sendtrade" value="Aqui esta minha oferta, |PLAYERNAME|"/> </parameters> </npc> Lá em data/npc/scripts você apaga aquele arquivo o mailbank.lua e cria o mail.lua e cola o script de cima neste novo arquivo.
-
ALGUÉM SABE ONDE EU CONSIGO DICE AUTOMÁTICo?
@baiakpro Veja se nao tem nenhum simbolo invalido na linha 1 do script perto do =
-
Npc
@Cleiton Felipi Em data/npc crie um arquivo chamado Waliam.xml cole isso <?xml version="1.0" encoding="UTF-8"?> <npc name="Waliam" script="data/npc/scripts/mailbank.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="128" head="115" body="119" legs="98" feet="114" addons="0"/> <parameters> <parameter key="message_greet" value="Olá |PLAYERNAME|. Eu vendo parcels (15gps), letters (10gps) e labbel(10gps) e também cuido do {banco}. Fale {oferta} ou {banco} caso estiver interessado.." /> <parameter key="module_shop" value="1" /> <parameter key="shop_buyable" value="parcel,2595,15;label,2599,10;letters,2597,10" /> <parameter key="message_farewell" value="Até mais, |PLAYERNAME|!"/> <parameter key="message_sendtrade" value="Aqui esta minha oferta, |PLAYERNAME|"/> </parameters> </npc> Em data/npc/scripts crie um arquivo chamado mailbank.lua cole isso local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local moneyTo = {} local playerTo = {} 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 -- OTServ event handling functions end local function isValidMoney(money) if isNumber(money) == TRUE and money > 0 and money < 999999999 then return TRUE end return FALSE end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, 'help') then npcHandler:say("You can check the {balance} of your bank account, {deposit} money or {withdraw} it. You can also {transfer} money to other characters, provided that they have a vocation.", cid) talkState[cid] = 0 ----------------------------------------------------------------- ---------------------------- Balance ---------------------------- ----------------------------------------------------------------- elseif msgcontains(msg, 'balance') or msgcontains(msg, 'Balance') then npcHandler:say('Your account balance is '..getPlayerBalance(cid)..' gold.', cid) talkState[cid] = 0 ----------------------------------------------------------------- ---------------------------- Help ------------------------------- ----------------------------------------------------------------- elseif msgcontains(msg, 'basic functions') then selfSay('You can check the {balance{ of your bank account, Pdeposit{ money or Pwithdraw{ it. You can also {transfer} money to othercharacters, provided that they have a vocation.', cid) talkState[cid] = 0 elseif msgcontains(msg, 'advanced functions') then selfSay('Renting a house has never been this easy. Simply make a bid for an auction. We will check immediately if you haveenough money.', cid) talkState[cid] = 0 ----------------------------------------------------------------- ---------------------------- Deposit ---------------------------- ----------------------------------------------------------------- elseif msgcontains(msg, 'deposit all') then moneyTo[cid] = getPlayerMoney(cid) if moneyTo[cid] < 1 then selfSay('You don\'t have any money to deposit in you inventory..', cid) talkState[cid] = 0 else selfSay('Would you really like to deposit '..moneyTo[cid]..' gold?', cid) talkState[cid] = 2 end elseif msgcontains(msg, 'deposit') then selfSay("Please tell me how much gold it is you would like to deposit.", cid) talkState[cid] = 1 elseif talkState[cid] == 1 then moneyTo[cid] = tonumber(msg) if isValidMoney(moneyTo[cid]) == TRUE then selfSay('Would you really like to deposit '..moneyTo[cid]..' gold?', cid) talkState[cid] = 2 else selfSay('Is isnt valid amount of gold to deposit.', cid) talkState[cid] = 0 end elseif talkState[cid] == 2 then if msgcontains(msg, 'yes') then if doPlayerDepositMoney(cid, moneyTo[cid], 1) ~= TRUE then selfSay('You do not have enough gold.', cid) else selfSay('Alright, we have added the amount of '..moneyTo[cid]..' gold to your balance. You can withdraw your money anytime you want to. Your account balance is ' .. getPlayerBalance(cid) .. '.', cid) end elseif msgcontains(msg, 'no') then selfSay('As you wish. Is there something else I can do for you?', cid) end talkState[cid] = 0 ----------------------------------------------------------------- ---------------------------- Withdraw --------------------------- ----------------------------------------------------------------- elseif msgcontains(msg, 'withdraw') then selfSay("Please tell me how much gold you would like to withdraw.", cid) talkState[cid] = 6 elseif talkState[cid] == 6 then moneyTo[cid] = tonumber(msg) if isValidMoney(moneyTo[cid]) == TRUE then selfSay('Are you sure you wish to withdraw '..moneyTo[cid]..' gold from your bank account?', cid) talkState[cid] = 7 else selfSay('Is isnt valid amount of gold to withdraw.', cid) talkState[cid] = 0 end elseif talkState[cid] == 7 then if msgcontains(msg, 'yes') then if doPlayerWithdrawMoney(cid, moneyTo[cid]) ~= TRUE then selfSay('There is not enough gold on your account. Your account balance is '..getPlayerBalance(cid)..'. Please tell me the amount of gold coins you would like to withdraw.', cid) else selfSay('Here you are, ' .. moneyTo[cid] .. ' gold. Please let me know if there is something else I can do for you.', cid) talkState[cid] = 0 end elseif msgcontains(msg, 'no') then selfSay('As you wish. Is there something else I can do for you?', cid) talkState[cid] = 0 end ----------------------------------------------------------------- ---------------------------- Transfer --------------------------- ----------------------------------------------------------------- elseif msgcontains(msg, 'transfer') then selfSay("Please tell me the amount of gold you would like to transfer.", cid) talkState[cid] = 11 elseif talkState[cid] == 11 then moneyTo[cid] = tonumber(msg) if isValidMoney(moneyTo[cid]) == TRUE then selfSay('Who would you like transfer '..moneyTo[cid]..' gold to?', cid) talkState[cid] = 12 else selfSay('Is isnt valid amount of gold to transfer.', cid) talkState[cid] = 0 end elseif talkState[cid] == 12 then playerTo[cid] = msg if getCreatureName(cid) == playerTo[cid] then selfSay('Ehm, You want transfer money to yourself? Its impossible!', cid) talkState[cid] = 0 return TRUE end if playerExists(playerTo[cid]) then selfSay('So you would like to transfer ' .. moneyTo[cid] .. ' gold to "' .. playerTo[cid] .. '" ?', cid) talkState[cid] = 13 else selfSay('Player with name "' .. playerTo[cid] .. '" doesnt exist.', cid) talkState[cid] = 0 end elseif talkState[cid] == 13 then if msgcontains(msg, 'yes') then if getPlayerBalance(cid) < moneyTo[cid] then selfSay('You dont have enought money on your bank account.', cid) return TRUE end if doPlayerTransferMoneyTo(cid, playerTo[cid], moneyTo[cid]) ~= TRUE then selfSay('This player does not exist on this world or have no vocation.', cid) else selfSay('You have transferred ' .. moneyTo[cid] .. ' gold to "' .. playerTo[cid] ..' ".', cid) playerTo[cid] = nil end elseif msgcontains(msg, 'no') then selfSay('As you wish. Is there something else I can do for you?', cid) end talkState[cid] = 0 end return TRUE end npcHandler:addModule(FocusModule:new())
-
(Resolvido)Ao invés de Curar, Danificar.
@Vandrow Veja se funciona, eu nao testei local pos={ {x=33036, y=32813, z=9}, {x=33038, y=32813, z=9}, {x=0, y=0, z=0}} function onThink(interval) for _, v in pairs(pos) do doSendMagicEffect(v,13) doSendAnimatedText(v, '', 30) doCombatAreaHealth(cid, 1, v, {1}, -200, -200, 12) end return true end
-
ALGUÉM SABE ONDE EU CONSIGO DICE AUTOMÁTICo?
@victor4312 Ta ai o globalevent <globalevent name="NpcDiceEvent" interval="60" event="script" value="eventDice.lua"/> local horarios = { ["19:47"] = { npc_name = "NpcDice", -- Nome do Npc XML pos_respawn_npc = {x=160,y=53,z=9}, -- Posicao aonde o Npc vai ser criado quando o evento começar pos_create_teleport= {x=157,y=57,z=7,stackpos=2}, -- Posicao do Teleport quando evento começar pos_to_teleport = {x=156,y=56,z=9}, -- Para onde o teleport irá levar time = 2, -- Duracao do evento em minutos msg_start = "O teleport para evento Dice esta aberto!", -- Mensagem quando o evento começar msg_finish = "O Evento Dice acabou!", -- Mensagem quando o evento acabar }, } function onThink(interval, lastExecution) local hours = horarios[os.date("%H:%M")] if hours then doBroadcastMessage(hours.msg_start) if not isCreature(hours.pos_respawn_npc) then doCreateNpc(hours.npc_name, hours.pos_respawn_npc) end doCreateTeleport(1387, hours.pos_to_teleport, hours.pos_create_teleport) doSendMagicEffect(hours.pos_create_teleport, 10) addEvent(function() doBroadcastMessage(hours.msg_finish) local npc = getTopCreature(hours.pos_respawn_npc).uid doRemoveCreature(npc) if getTileItemById(hours.pos_create_teleport, 1387).uid >= 1 then doSendMagicEffect(hours.pos_create_teleport, 10) doRemoveItem(getTileItemById(hours.pos_create_teleport, 1387).uid, 1) end end, 1000 * 60 * hours.time) end return true end
-
ALGUÉM SABE ONDE EU CONSIGO DICE AUTOMÁTICo?
@baiakpro Data/Npc/NpcDice.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="[EVENT] Dice Event" script="data/npc/scripts/DiceScript.lua" walkinterval="0" floorchange="0"> <health now="100" max="100"/> <look type="289" head="114" body="114" legs="91" feet="91" addons="3"/> </npc> Data/Npc/Scripts/DiceScript.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local x = 0 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 local randomDice = { [1] = 5792, [2] = 5793, [3] = 5794, [4] = 5795, [5] = 5796, [6] = 5797 } ----------------Config----------------------| local player_teleport = {x=160,y=54,z=7} -- Posicao para onde o player vai ser teleportado quando perder local rewards = { -- Id dos premios caso o player ganhe 2160, } --------------------------------------------| function creatureSayCallback(cid, type, msg) npcPos = getNpcPos() positionNpc = { NORTH = {x=npcPos.x, y=npcPos.y-2, z=npcPos.z, stackpos = STACKPOS_TOP_CREATURE}, SOUTH = {x=npcPos.x, y=npcPos.y+2, z=npcPos.z, stackpos = STACKPOS_TOP_CREATURE}, WEST = {x=npcPos.x-2, y=npcPos.y, z=npcPos.z, stackpos = STACKPOS_TOP_CREATURE}, EAST = {x=npcPos.x+2, y=npcPos.y, z=npcPos.z, stackpos = STACKPOS_TOP_CREATURE}, } local npc = getNpcCid() local dice_pos = {x=npcPos.x+1,y=npcPos.y,z=npcPos.z, stackpos=1} if getTileThingByPos(dice_pos).itemid == 0 then doCreateItem(5792, dice_pos) end if getThingFromPos(positionNpc.NORTH).uid ~= 0 or getThingFromPos(positionNpc.SOUTH).uid ~= 0 or getThingFromPos(positionNpc.WEST).uid ~= 0 or getThingFromPos(positionNpc.EAST).uid ~= 0 then if msgcontains(msg, '1') or msgcontains(msg, '2') or msgcontains(msg, '3') or msgcontains(msg, '4') or msgcontains(msg, '5') or msgcontains(msg, '6') then local dice_random_number = math.random(1, #randomDice) local dice = randomDice[math.random(1, #randomDice)] if (tonumber(msg) == dice_random_number) then local item_reward = rewards[math.random(1, #rewards)] doSendMagicEffect(dice_pos, CONST_ME_CRAPS) doTransformItem(getThingFromPos(dice_pos).uid, randomDice[dice_random_number]) doCreatureSay(npc, getCreatureName(npc).." rolled a "..dice_random_number.. ".", MESSAGE_STATUS_CONSOLE_ORANGE) doCreatureSay(npc, getCreatureName(npc).." voce ganhou "..getItemNameById(item_reward).. ".", MESSAGE_STATUS_CONSOLE_ORANGE) doPlayerAddItem(cid, item_reward, 1) doTeleportThing(cid, player_teleport) else doCreatureSay(npc, getCreatureName(npc).. " rolled a "..dice_random_number.. ".", MESSAGE_STATUS_CONSOLE_ORANGE) doSendMagicEffect(dice_pos, CONST_ME_CRAPS) doTransformItem(getThingFromPos(dice_pos).uid, randomDice[dice_random_number]) doCreatureSetSpeakType(cid, MESSAGE_STATUS_CONSOLE_ORANGE) doCreatureSay(cid, "Perdi!!! :@") doTeleportThing(cid, player_teleport) end end end x = 0 end function HavePlayer() npcPos = getNpcPos() positionNpc = { NORTH = {x=npcPos.x, y=npcPos.y-2, z=npcPos.z, stackpos = STACKPOS_TOP_CREATURE}, SOUTH = {x=npcPos.x, y=npcPos.y+2, z=npcPos.z, stackpos = STACKPOS_TOP_CREATURE}, WEST = {x=npcPos.x-2, y=npcPos.y, z=npcPos.z, stackpos = STACKPOS_TOP_CREATURE}, EAST = {x=npcPos.x+2, y=npcPos.y, z=npcPos.z, stackpos = STACKPOS_TOP_CREATURE}, } local npc = getNpcCid() local position = {x=npcPos.x, y=npcPos.y-2, z=npcPos.z, stackpos = STACKPOS_TOP_CREATURE} if (x == 0) then if getThingFromPos(positionNpc.NORTH).uid ~= 0 then npcHandler:say("Escolha um numero de 1 a 6, "..getCreatureName(getThingFromPos(positionNpc.NORTH).uid)) doCreatureSetLookDirection(npc, NORTH) x = 1 end if getThingFromPos(positionNpc.SOUTH).uid ~= 0 then npcHandler:say("Escolha um numero de 1 a 6, "..getCreatureName(getThingFromPos(positionNpc.SOUTH).uid)) doCreatureSetLookDirection(npc, SOUTH) x = 1 end if getThingFromPos(positionNpc.WEST).uid ~= 0 then npcHandler:say("Escolha um numero de 1 a 6, "..getCreatureName(getThingFromPos(positionNpc.WEST).uid)) doCreatureSetLookDirection(npc, WEST) x = 1 end if getThingFromPos(positionNpc.EAST).uid ~= 0 then npcHandler:say("Escolha um numero de 1 a 6, "..getCreatureName(getThingFromPos(positionNpc.EAST).uid)) doCreatureSetLookDirection(npc, EAST) x = 1 end end return true end function onThink() if HavePlayer() then return false end npcHandler:onThink() end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
-
[Erro] - alavanca addon
@Master68 Antes disso if player:getStorageValue(10001) == -1 then Coloque isso local player = Player(player)
-
pra quem gosta de desafio ta ai quem consegue fazer ?
@ADM Mayk on BaiakME Deixa ver se entendi vai ter 1 mapa para cada stage de evento e irão iniciar todos na mesma hora, ou vai ser randômico (por tempo) o evento que irá acontecer?
-
(Resolvido)Alavanca e Teleport
@bpm91 Acho que é isso local positionCurrent = {x=32268, y=31856, z=15} -- Posicao para onde o player vai se estiver correto a sequencia local positionFail = {x=32184, y=31940, z=14} -- Posicao que o player vai se estiver errada a combinacao if isPlayer(cid) and getPlayerStorageValue(cid,42501) <= -1 then doTeleportThing(cid, positionCurrent) doSendMagicEffect(getThingPos(cid), 12) setPlayerStorageValue(cid,32901,1) setPlayerStorageValue(cid,42501,1) else doTeleportThing(cid, positionFail) doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You already did this seal.") end return 0 end
-
(Resolvido)Alavanca e Teleport
@bpm91 Veja ai se vai function onStepIn(cid, item, frompos, item2, topos) playerpos = getPlayerPosition(cid) novapos2 = {x = 32216, y = 31833, z = 15} novapos3 = {x = 32217, y = 31840, z = 15} if item.actionid == 9020 and isPlayer(cid) then queststatus = getPlayerStorageValue(cid, 9012) if queststatus == -1 then getThingfromPos(playerpos) setPlayerStorageValue(cid, 9012, 1) doSummonCreature("Warlock", novapos2) doSummonCreature("Warlock", novapos3) end return false end return true end
-
(Resolvido)Alavanca e Teleport
@bpm91 Sim.
-
(Resolvido)Alavanca e Teleport
@bpm91 Veja se agora vai, eu coloquei todos os scripts dos camps em 1 script apenas. Creio que agora vai funcionar. Crie 1 script só chamado bansheeQuest.lua e coloque isso dentro: No XML cole isso lá: Em moveevents crie script chamado fogoAzul.lua: XML em moveevents coloque este:
-
(Resolvido)Alavanca e Teleport
Teste ai pra ver se vai, caso nao for explique um pouco melhor como funciona o script pra eu pensar de outro jeito. Script do fogo apagado function onUse(cid, item, fromPosition, itemEx, toPosition) --FOGO OFF local gatepos = {x=32313, y=31976, z=13, stackpos=1} --Pos do Campfire que nao acende local getgate = getThingfromPos(gatepos) local time = 300 -- 60 = 1min -- Time para acender denovo local f = function(p) doTransformItem(getTileItemById(p, 1946).uid, 1945) doCreateItem(1423,1,gatepos) end if item.itemid == 1945 and item.uid == 43995 and getTileItemById(gatepos, 1423).uid > 0 then doRemoveItem(getTileItemById(gatepos, 1423).uid) doCreateItem(1421, gatepos) doTransformItem(item.uid, item.itemid+1) e = addEvent(f, time * 1000, fromPosition) else if item.itemid == 1946 and item.uid == 43995 and getTileItemById(gatepos, 1421).uid > 0 then doRemoveItem(getTileItemById(gatepos, 1421).uid) doCreateItem(1423, gatepos) doTransformItem(item.uid,item.itemid-1) stopEvent(e) e = 0 end end return 1 end Script do fogo aceso function onUse(cid, item, fromPosition, itemEx, toPosition) --FOGO ON local gatepos = {x=32313, y=31975, z=13, stackpos=1} --Pos do Campfire que Acende local getgate = getThingfromPos(gatepos) local time = 300 -- 60 = 1min -- Time para acender denovo local f = function(p) doTransformItem(getTileItemById(p, 1946).uid, 1945) doCreateItem(1423,1,gatepos) end if item.itemid == 1945 and item.uid == 43994 and getTileItemById(gatepos, 1423).uid > 0 then doRemoveItem(getTileItemById(gatepos, 1423).uid) doCreateItem(1421, gatepos) doTransformItem(item.uid, item.itemid+1) e = addEvent(f, time * 1000, fromPosition) else if item.itemid == 1946 and item.uid == 43994 and getTileItemById(gatepos, 1421).uid > 0 then doRemoveItem(getTileItemById(gatepos, 1421).uid) doCreateItem(1423, gatepos) doTransformItem(item.uid,item.itemid-1) stopEvent(e) e = 0 end end return 1 end Script Fogo Azul function onStepIn(cid, item, fromPosition, toPosition) local positionCurrent = {x=160, y=54, z=7} -- Posicao para onde o player vai se estiver correto a sequencia local positionFail = {x=160,y=54,z=7} -- Posicao que o player vai se estiver errada a combinacao --#--Posicões das alavancas--#-- switch1 = {x=32310, y=31975, z=13, stackpos=1} switch2 = {x=32310, y=31976, z=13, stackpos=1} switch3 = {x=32312, y=31975, z=13, stackpos=1} switch4 = {x=32312, y=31976, z=13, stackpos=1} switch5 = {x=32314, y=31975, z=13, stackpos=1} switch6 = {x=32314, y=31976, z=13, stackpos=1} getswitch1 = getThingfromPos(switch1) getswitch2 = getThingfromPos(switch2) getswitch3 = getThingfromPos(switch3) getswitch4 = getThingfromPos(switch4) getswitch5 = getThingfromPos(switch5) getswitch6 = getThingfromPos(switch6) --#--------------------------#-- if isPlayer(cid) then if getswitch1.itemid == 1946 and getswitch2.itemid == 1946 and getswitch3.itemid == 1946 and getswitch4.itemid == 1946 and getswitch5.itemid == 1945 and getswitch6.itemid == 1945 then doTeleportThing(cid, positionCurrent) doSendMagicEffect(getThingPos(cid), 12) setPlayerStorageValue(cid,10004,1) setPlayerStorageValue(cid, 10004, 1) else doTeleportThing(cid, positionFail) doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You already did this seal.") end end return 0 end
-
adicionar fala a estatua e dano ao usar ela.
Vai ter que criar um monster ou npc pra fazer ele falar
-
NPC para MINING
Opa.. Xml do Npc: <?xml version="1.0"?> <npc name="Miner" script="data/npc/scripts/mining.lua" walkinterval="50000" floorchange="0"> <health now="1000" max="1000"/> <look type="130" head="0" body="10" legs="10" feet="0" addons="0"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|, eu vendo a {pick} para minerar e também compro os {itens} minerados"/> </parameters> </npc> Script do Npc: OBS: Para adicionar mais itens segue o exemplo. (Tem que estar na mesma ordem nas 2 tabelas!) --------CONFIG---------# local goldID = 2148 -- ID do gold local pickID = 2553 -- ID da pick local pick_value = 10 -- Preço da pick local itens = { --[NOME DO ITEM] = QUANTIDADE-- ["Skull"] = 100, ["Diamond"] = 100, ["Gold Nugget"] = 50, ["Worm"] = 30, } local cost_Item = { --[VALOR DO ITEM] = ID DO ITEM [1] = 2229, -- Skull [2] = 2145, -- Diamond [10] = 2157, -- Gold Nugget [3] = 2884, --Worm }
-
(Resolvido)Npc ou item Que muda vocação em piramide - tfs 04
@BilauX Por exemplo se eu tiver com a vocação super e falar com o ultimo que seria o supreme entao vai dar esse erro de callback mais se for em ordem nao vai dar erro. Eu coloquei storages pra parar esse erro
-
(Resolvido)Npc ou item Que muda vocação em piramide - tfs 04
@BilauX Que estranho no meu ta pegando normal, tipo voce tem que ir em ordem na fala com os npc's ex : falar primeiro com super, hyper... se não vai dar esse erro mesmo. Ultima tentativa substitua o seu vocations.xml pelo meu pra ver se vai funciona, crie os 5 npc's e teste
-
(Resolvido)Npc ou item Que muda vocação em piramide - tfs 04
@BilauX
-
(Resolvido)Npc ou item Que muda vocação em piramide - tfs 04
@BilauX Tenta esse <?xml version="1.0" encoding="UTF-8"?> <vocations> <vocation id="0" name="None" description="none" needpremium="0" gaincap="10" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="1" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="3" gainhpamount="50" gainmanaticks="3" gainmanaamount="70" manamultiplier="1.1" attackspeed="150" soulmax="100" gainsoulticks="120" fromvoc="1"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="2" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="3" gainhpamount="50" gainmanaticks="3" gainmanaamount="70" manamultiplier="1.1" attackspeed="150" soulmax="100" gainsoulticks="120" fromvoc="2"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="10" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="60" gainmanaticks="3" gainmanaamount="60" manamultiplier="1.4" attackspeed="150" soulmax="100" gainsoulticks="120" fromvoc="3"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="10" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="70" gainmanaticks="3" gainmanaamount="50" manamultiplier="3.0" attackspeed="150" soulmax="100" gainsoulticks="120" fromvoc="4"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.3" club="1.3" sword="1.3" axe="1.3" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="5" name="Master Sorcerer" description="a master sorcerer" needpremium="1" gaincap="10" gainhp="5" gainmana="33" gainhpticks="3" gainhpamount="150" gainmanaticks="2" gainmanaamount="277" manamultiplier="1.1" attackspeed="150" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="6" name="Elder Druid" description="an elder druid" needpremium="1" gaincap="10" gainhp="5" gainmana="33" gainhpticks="3" gainhpamount="150" gainmanaticks="2" gainmanaamount="277" manamultiplier="1.1" attackspeed="150" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="7" name="Royal Paladin" description="a royal paladin" needpremium="1" gaincap="10" gainhp="15" gainmana="15" gainhpticks="2" gainhpamount="250" gainmanaticks="2" gainmanaamount="250" manamultiplier="1.4" attackspeed="150" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="8" name="Elite Knight" description="an elite knight" needpremium="1" gaincap="10" gainhp="20" gainmana="5" gainhpticks="2" gainhpamount="245" gainmanaticks="2" gainmanaamount="200" manamultiplier="3.0" attackspeed="150" soulmax="210" gainsoulticks="15" fromvoc="4" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="9" name="Super Sorcerer" description="a super sorcerer" needpremium="1" gaincap="10" gainhp="7" gainmana="38" gainhpticks="3" gainhpamount="180" gainmanaticks="2" gainmanaamount="295" manamultiplier="1.2" attackspeed="245" soulmax="210" gainsoulticks="18" fromvoc="9" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="10" name="Super Druid" description="an super druid" needpremium="1" gaincap="10" gainhp="7" gainmana="38" gainhpticks="3" gainhpamount="180" gainmanaticks="2" gainmanaamount="295" manamultiplier="1.2" attackspeed="245" soulmax="210" gainsoulticks="18" fromvoc="10" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="11" name="Super Paladin" description="an super paladin" needpremium="1" gaincap="10" gainhp="20" gainmana="20" gainhpticks="2" gainhpamount="270" gainmanaticks="2" gainmanaamount="265" manamultiplier="1.4" attackspeed="1000" soulmax="210" gainsoulticks="18" fromvoc="11" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.2" shielding="1.2" fishing="1.1" experience="1.0"/> </vocation> <vocation id="12" name="Super Knight" description="a super knight" needpremium="1" gaincap="10" gainhp="22" gainmana="8" gainhpticks="2" gainhpamount="260" gainmanaticks="2" gainmanaamount="210" manamultiplier="3.0" attackspeed="200" soulmax="210" gainsoulticks="18" fromvoc="12" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> </vocations>