Ir para conteúdo

Kuro o Shiniga

Colaborador
  • Total de itens

    271
  • Registro em

  • Última visita

  • Dias Ganhos

    12

Tudo que Kuro o Shiniga postou

  1. tempo = 10 -- Tempo de duração da spell em segundos hp = 10000 -- Quanto HP vai healar a cada x segundos function heal(cid) if not isCreature(cid) then return true end if getPlayerStorageValue(cid, 13978) == 1 then doCreatureAddHealth(cid, hp) addEvent(heal, 3000, cid) return true end return true end function onCastSpell(cid, var) setPlayerStorageValue(cid, 13978, 1) doPlayerSetNoMove(cid, true)heal(cid) doSendMagicEffect(getCreaturePosition(cid), 26) addEvent(setPlayerStorageValue, tempo*1000, cid, 13978, -1) addEvent(doPlayerSetNoMove, tempo*1000, cid, false) return true end
  2. com tempo function onUse(cid, item) custo = 1000000 level = 100 monster = "dragon" posmonster = {x=79, y=335, z=7} switchUniqueID = 1912 local cd = { cdtime = 10, --//-- quanto tempo fica sem usar o item str = 69888, } if getPlayerLevel(cid) >= level and getPlayerMoney(cid) >= custo and item.uid == switchUniqueID and getPlayerStorageValue(cid, cd.str) < os.time() then setPlayerStorageValue(cid, cd.str, os.time() + cd.cdtime) doPlayerRemoveMoney(cid, custo) doCreateMonster(monster, posmonster) doSendMagicEffect(getThingPos(cid), 12) doPlayerBroadcastMessage(cid, "Raid Started") elseif getPlayerStorageValue(cid, cd.str) >= os.time() then doPlayerSendCancel(cid, "espere para usar novamente") else doPlayerSendCancel(cid, "voce nao tem level necessario para ativar essa task, ou seu dinheiro nao e suficiente !") doSendMagicEffect(getThingPos(cid), 2) end end
  3. A sim entendi, você quer executar a raid que ja existe em seu servidor por actions correto ?
  4. function onUse(cid, item) custo = 1000000 -- quanto vai custar para usar level = 100 -- level minimo monster = "dragon" -- monstro da raid posmonster = {x=79, y=335, z=7} -- onde o monstro vai aparecer switchUniqueID = 1912 -- uid da alavanca if getPlayerLevel(cid) >= level and getPlayerMoney(cid) >= custo and item.uid == switchUniqueID then doPlayerRemoveMoney(cid, custo) doCreateMonster(monster, posmonster) doSendMagicEffect(getThingPos(cid), 12) doPlayerSendTextMessage(cid, 22, "Raid Started") else doPlayerSendCancel(cid, "voce nao tem level necessario para ativar essa task, ou seu dinheiro nao e suficiente !") doSendMagicEffect(getThingPos(cid), 2) end end
  5. Muito simples saber a quantidade de um item em uma determinada posição, segue o script conforme deseja, trocando 100 pokeballs por 100 great balls : LEMBRANDO QUE O SCRIPT FOI TESTANDO COM AS POKEBALLS EM CIMA DE UM SQM E NÃO DE UM OUTRO ITEM, SE FOR COLOCAR ALGO MUDE A STACKPOS function onUse(cid, item, fromPosition, itemEx, toPosition) pokeball1 = {x=1001, y=1009, z=7, stackpos = 1} -- poss das pokeball idball = 12617 -- id da great ball poke1 = getThingfromPos(pokeball1) switchUniqueID = 1912 -- UID DA ALAVANCA if poke1.itemid == 2394 and item.uid == switchUniqueID and poke1.type == ITEMCOUNT_MAX then doRemoveItem(poke1.uid,100) doSendMagicEffect(getThingPos(cid), 12) doCreateItem(idball, 100, pokeball1) doSendMagicEffect(pokeball1, 12) else doPlayersendTextMessage(cid, 22, "voce precisa de 100 pokeball end end Caso queira uma quantidade diferente de 100 use esse : function onUse(cid, item, fromPosition, itemEx, toPosition) pokeball1 = {x=1001, y=1009, z=7, stackpos = 1} -- poss das pokeball idball = 12617 -- id da great ball quant = 50 -- quantidade de great ball poke1 = getThingfromPos(pokeball1) switchUniqueID = 1912 -- UID DA ALAVANCA NB = 50 -- quantidade de pokeball if poke1.itemid == 2394 and item.uid == switchUniqueID and poke1.type == NB then doRemoveItem(poke1.uid,NB) doSendMagicEffect(getThingPos(cid), 12) doCreateItem(idball, quant, pokeball1) doSendMagicEffect(pokeball1, 12) else doPlayerSendTextMessage(cid, 22, "voce precisa de 50 pokeball") end end
  6. Primeiro 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) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid strBlueFalcon = 189860 -- não mexer strGoldHawk = 189861 -- não mexer strBlackSword = 189862 -- não mexer posBlueFalcon = {x=80, y=348, z=7} -- posição Blue Falcon posGoldHawk = {x=75, y=340, z=7} --- posição gold hawk posBlackSword = {x=84, y=339, z=7} --- posição black sword iditemfalcon = 2160 -- id do item que ganha quando escolhe a companhias falcon iditemhawk = 2160 -- id do item que ganha quando escolhe a companhias hawk iditemsword = 2160 -- id do item que ganha quando escolhe a companhias sword if msgcontains(msg, "mission") then selfSay("Ola aventureiro, tenho 3 companhias que voce pode escolher, (Blue Falcon, Gold Hawk e Black Sword) qual voce deseja?", cid) talkState[talkUser] = 1 elseif msgcontains(msg, "blue falcon") and talkState[talkUser] == 1 and getPlayerStorageValue(cid, strBlueFalcon) < 1 and getPlayerStorageValue(cid, strGoldHawk) < 1 and getPlayerStorageValue(cid, strBlackSword) < 1 then setPlayerStorageValue(cid, strBlueFalcon, 1) doTeleportThing(cid, posBlueFalcon) doSendMagicEffect(getThingPos(cid), 10) doPlayerAddItem(cid, iditemfalcon, 1) selfSay("Que assim seja!", cid) elseif msgcontains(msg, "gold hawk") and talkState[talkUser] == 1 and getPlayerStorageValue(cid, strBlueFalcon) < 1 and getPlayerStorageValue(cid, strGoldHawk) < 1 and getPlayerStorageValue(cid, strBlackSword) < 1 then setPlayerStorageValue(cid, strGoldHawk, 1) doTeleportThing(cid, posGoldHawk) doSendMagicEffect(getThingPos(cid), 10) doPlayerAddItem(cid, iditemhawk, 1) selfSay("Que assim seja!", cid) elseif msgcontains(msg, "black sword") and talkState[talkUser] == 1 and getPlayerStorageValue(cid, strBlueFalcon) < 1 and getPlayerStorageValue(cid, strGoldHawk) < 1 and getPlayerStorageValue(cid, strBlackSword) < 1 then setPlayerStorageValue(cid, strBlackSword, 1) doTeleportThing(cid, posBlackSword) doSendMagicEffect(getThingPos(cid), 10) doPlayerAddItem(cid, iditemsword, 1) selfSay("Que assim seja!", cid) else selfSay("Voce ja escolheu seu destino", cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Segundo 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) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid strBlueFalcon = 189860 -- não mexer strGoldHawk = 189861 -- não mexer strBlackSword = 189862 -- não mexer posBlueFalcon = {x=80, y=348, z=7} -- posição Blue Falcon posGoldHawk = {x=75, y=340, z=7} --- posição gold hawk posBlackSword = {x=84, y=339, z=7} --- posição black sword iditemfalcon = 2160 -- id do item que precisa para companhias falcon iditemhawk = 2160 -- id do item que precisa para companhias hawk iditemsword = 2160 -- id do item que precisa para companhias sword if msgcontains(msg, "mission") and getPlayerStorageValue(cid, strBlueFalcon) == 1 and getPlayerItemCount(cid, iditemfalcon) == 1 then selfSay("voce e da companhia Blue falcon, deseja ir para a ilha?", cid) talkState[talkUser] = 1 elseif msgcontains(msg, "yes") and getPlayerStorageValue(cid, strBlueFalcon) == 1 and talkState[talkUser] == 1 then selfSay("que assim seja", cid) doTeleportThing(cid, posBlueFalcon) doSendMagicEffect(getThingPos(cid), 10) talkState[talkUser] = 0 elseif msgcontains(msg, "mission") and getPlayerStorageValue(cid, strGoldHawk) == 1 and getPlayerItemCount(cid, iditemhawk) == 1 then selfSay("voce e da companhia Gold Hawk, deseja ir para a ilha?", cid) talkState[talkUser] = 1 elseif msgcontains(msg, "yes") and getPlayerStorageValue(cid, strGoldHawk) == 1 and talkState[talkUser] == 1 then selfSay("que assim seja", cid) doTeleportThing(cid, posGoldHawk) doSendMagicEffect(getThingPos(cid), 10) talkState[talkUser] = 0 elseif msgcontains(msg, "mission") and getPlayerStorageValue(cid, strBlackSword) == 1 and getPlayerItemCount(cid, iditemsword) == 1 then selfSay("voce e da companhia Black Sword, deseja ir para a ilha?", cid) talkState[talkUser] = 1 elseif msgcontains(msg, "yes") and getPlayerStorageValue(cid, strBlackSword) == 1 and talkState[talkUser] == 1 then selfSay("que assim seja", cid) doTeleportThing(cid, posBlackSword) doSendMagicEffect(getThingPos(cid), 10) talkState[talkUser] = 0 else selfSay("Preciso que voce tenha o card em maos", cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  7. local config = { level = 120, redo = { status = true, storageValue = 4535 }, { vocations = {1, 5}, itemId = 2505, playerPos = {x=88, y=332, z=7}, newPos = {x=84, y=333, z=7}, itemPos = {x=88, y=333, z=7} }, { vocations = {2, 6}, itemId = 7620, playerPos = {x=87, y=332, z=7}, newPos = {x=84, y=333, z=7}, itemPos = {x=87, y=333, z=7} }, { vocations = {3, 7}, itemId = 5878, playerPos = {x=86, y=332, z=7}, newPos = {x=84, y=333, z=7}, itemPos = {x=86, y=333, z=7} }, { vocations = {4, 8}, itemId = 2150, playerPos = {x=85, y=332, z=7}, newPos = {x=84, y=333, z=7}, itemPos = {x=85, y=333, z=7} } } function onUse(cid) local players = {} local items = {} for _, v in ipairs(config) do outfit = getCreatureOutfit(cid) v.playerPos.stackpos = 253 local player = getThingfromPos(v.playerPos).uid if isPlayer(player) == FALSE then return doPlayerSendCancel(cid, "There are not enough players.") elseif getPlayerLevel(player) < config.level then players.level = true elseif isInArray(v.vocations, getPlayerVocation(player)) == FALSE then players.vocation = true else v.itemPos.stackpos = 1 local item = getThingfromPos(v.itemPos) if item.itemid ~= v.itemId then players.item = true else table.insert(players, player) table.insert(items, item.uid) end end end if getCreatureCondition(cid, CONDITION_DRUNK) and outfit.lookType == 21 then if players.level then doPlayerSendCancel(cid, "All players need to be level " .. config.level .. " or above.") elseif players.vocation then doPlayerSendCancel(cid, "All players must stand on the correct tiles.") elseif players.done then doPlayerSendCancel(cid, "A player in your team has already done this quest.") elseif players.item then doPlayerSendCancel(cid, "All items must be on the correct positions.") else for k, player in ipairs(players) do doSendMagicEffect(getCreaturePosition(player), CONST_ME_POFF) doTeleportThing(player, config[k].newPos) doSendMagicEffect(getCreaturePosition(player), CONST_ME_TELEPORT) end end for _, item in ipairs(items) do doRemoveItem(item) end end end
  8. function onUse(cid) local monster = { ["Dragon"] = {1, 1800} } local cd = { cdtime = 86400, --//-- quanto tempo fica sem usar o item str = 69872, } tempo = 60000*30 --//-- tempo em segundos que o monstro vai ajudar o player summon = getCreatureSummons(cid) for l, m in pairs(monster) do if getPlayerStorageValue(cid, cd.str) < os.time() and summon then setPlayerStorageValue(cid, cd.str, os.time() + cd.cdtime) doConvinceCreature(cid, doSummonCreature(l, getCreaturePosition(cid))) doCreatureSay(cid, "Go!", 1) doSendMagicEffect(getThingPos(cid), 10) break else return doPlayerSendTextMessage(cid, 25, 'You can not use this item unless you wait..') and doSendMagicEffect(getThingPos(cid), 2) end end for _, monster in ipairs(getCreatureSummons(cid)) do addEvent(doRemoveCreature, tempo, monster) end if summon and getPlayerStorageValue(cid, cd.str) >= os.time() or getPlayerStorageValue(cid, cd.str) < os.time() then for n, p in ipairs(summon) do doRemoveCreature(p) end end return true end
  9. Me manda msg e vamos resolver por la, o post ta ficando grande demais, quando solucionar a gente posta aqui
  10. Kuro o Shiniga

    Ajuda script

    O intervalo ta 4500 coloca apenas 4, com 4500 vai demorar para a aparecer os fogos...
  11. Kuro o Shiniga

    Ajuda script

    Aqui funcionou, como você fez?
  12. Eu consegui desenvolver um, porem você vai ter que adicionar esse script nos sqm que fica em volta do teleport que leva o player para a posição X, esse script vai salvar a posição do player antes dele entrar no teleport : function onStepIn(cid, item, position, fromPosition) setPlayerStorageValue(cid, 27278, getThingPosition(cid).x) setPlayerStorageValue(cid, 27279, getThingPosition(cid).y) setPlayerStorageValue(cid, 27280, getThingPosition(cid).z) doSendMagicEffect(getThingPos(cid), 12) end <movevent type="StepIn" actionid="1424" event="script" value="nomedoarquivo.lua"/> Depois você usa esse script como teleporte de saida do local que o player foi enviado : function onStepIn(cid, item, position, fromPosition) local pose = {x=getPlayerStorageValue(cid, 27278), y=getPlayerStorageValue(cid, 27279), z=getPlayerStorageValue(cid, 27280)} doSendMagicEffect(getThingPos(cid), 10) doTeleportThing(cid, pose) return false end <movevent type="StepIn" actionid="1423" event="script" value="nomedoarquivo.lua"/> Foi o único jeito que consegui pensar para desenvolver esse sistema, funciona da maneira que você deseja, porem vai ter que colocar o primeiro script ne todos os SQM que cerca o teleporte que envia o jogador para a POSIÇÃO X.
  13. Kuro o Shiniga

    Ajuda script

    Já esta configurado nas posições que você deseja : function onThink(interval, lastExecution) local posi = { [1] = {x=33371, y=31343, z=5}, [2] = {x=33370, y=31343, z=5}, [3] = {x=33372, y=31335, z=5}, [4] = {x=33371, y=31335, z=5}, [5] = {x=33370, y=31335, z=5}, [6] = {x=33364, y=31333, z=4}, [7] = {x=33365, y=31333, z=4}, [8] = {x=33366, y=31333, z=4}, [9] = {x=33364, y=31331, z=4}, [10] = {x=33365, y=31331, z=4}, [11] = {x=33366, y=31331, z=4}, [12] = {x=33370, y=31341, z=3}, [13] = {x=33371, y=31341, z=3}, [14] = {x=33370, y=31337, z=3}, [15] = {x=33371, y=31337, z=3}, [16] = {x=33370, y=31331, z=3}, [17] = {x=33371, y=31331, z=3}, [18] = {x=33370, y=31329, z=3}, [19] = {x=33371, y=31329, z=3}, [20] = {x=33370, y=31325, z=3}, [21] = {x=33371, y=31325, z=3}, [22] = {x=33370, y=31323, z=3}, [23] = {x=33371, y=31323, z=3}, [24] = {x=33370, y=31319, z=3}, [25] = {x=33371, y=31319, z=3} } danomin = 50 -- dano minimo danomax = 100 -- dano maximo effect = 7 --- efeito for i in ipairs (posi) do doSendMagicEffect(posi[i], effect) doCombatAreaHealth(cid, effect, posi[i], 0, -danomin, -danomax, effect) end end
  14. function onUse(cid, item, frompos, item2, topos) switchUniqueID = 1912 itemum = 2150 itemdoi = 5878 itemtres = 7620 itemquatro = 2505 local outfit = getCreatureOutfit(cid) questlevel = 140 piece1pos = {x=85, y=333, z=7, stackpos=1} getpiece1 = getThingfromPos(piece1pos) piece2pos = {x=86, y=333, z=7, stackpos=1} getpiece2 = getThingfromPos(piece2pos) piece3pos = {x=87, y=333, z=7, stackpos=1} getpiece3 = getThingfromPos(piece3pos) piece4pos = {x=88, y=333, z=7, stackpos=1} getpiece4 = getThingfromPos(piece4pos) player1pos = {x=85, y=332, z=7, stackpos=253} player1 = getThingfromPos(player1pos) player2pos = {x=86, y=332, z=7, stackpos=253} player2 = getThingfromPos(player2pos) player3pos = {x=87, y=332, z=7, stackpos=253} player3 = getThingfromPos(player3pos) player4pos = {x=88, y=332, z=7, stackpos=253} player4 = getThingfromPos(player4pos) knightvoc = getPlayerVocation(player1.uid) paladinvoc = getPlayerVocation(player2.uid) druidvoc = getPlayerVocation(player3.uid) sorcerervoc = getPlayerVocation(player4.uid) nplayer1pos = {x=86, y=3339, z=7} nplayer2pos = {x=87, y=3339, z=7} nplayer3pos = {x=88, y=3339, z=7} nplayer4pos = {x=89, y=3339, z=7} player1level = getPlayerLevel(player1.uid) player2level = getPlayerLevel(player2.uid) player3level = getPlayerLevel(player3.uid) player4level = getPlayerLevel(player4.uid) if knightvoc == 4 or knightvoc == 8 and paladinvoc == 3 or paladinvoc == 7 and druidvoc == 2 or druidvoc == 6 and sorcerervoc == 1 or sorcerervoc == 5 then if player1.itemid == 1 and player2.itemid == 1 and player3.itemid == 1 and player4.itemid == 1 then if player1level >= questlevel and player2level >= questlevel and player3level >= questlevel and player4level >= questlevel then if item.uid == switchUniqueID and getpiece1.itemid == itemum and getpiece2.itemid == itemdoi and getpiece3.itemid == itemtres and getpiece4.itemid == itemquatro and getCreatureCondition(cid, CONDITION_DRUNK) and outfit.lookType == 21 then doSendMagicEffect(player1pos,2) doTeleportThing(player1.uid,nplayer1pos) doTeleportThing(player2.cid,nplayer2pos) doTeleportThing(player3.uid,nplayer3pos) doTeleportThing(player4.uid,nplayer4pos) doSendMagicEffect(nplayer1pos,10) doRemoveItem(getpiece1.uid,1) doSendMagicEffect(player2pos,2) doSendMagicEffect(nplayer2pos,10) doRemoveItem(getpiece2.uid,1) doSendMagicEffect(player3pos,2) doSendMagicEffect(nplayer3pos,10) doRemoveItem(getpiece3.uid,1) doSendMagicEffect(player4pos,2) doSendMagicEffect(nplayer4pos,10) doRemoveItem(getpiece4.uid,1) end else return 0 end end else doPlayerSendCancel(cid,"Sorry, all 4 players must be on right positions.") end return 1 end
  15. Boa tarde, testa ai amigo : function onUse(cid, item, frompos, item2, topos) local outfit = getCreatureOutfit(cid) -- IDS DOS ITENS --- itemidum = 6215 itemiddois = 6216 itemidtres = 6217 itemidquatro = 6218 questlevel = 140 switchUniqueID = 1912 -- unique id da alavanca --- POSS DOS ITENS --- garlicp1 = {x=33143, y=32871, z=9, stackpos=1} garlicp2 = {x=33146, y=32871, z=9, stackpos=1} garlicp3 = {x=33149, y=32871, z=9, stackpos=1} garlicp4 = {x=33152, y=32871, z=9, stackpos=1} --- POSSO PARA ONDE OS PLAYER VAI --- local newposs = {x=33127, y=32490, z=9} --- NÃO MEXER ! -- garlic1 = getThingfromPos(garlicp1) garlic2 = getThingfromPos(garlicp2) garlic3 = getThingfromPos(garlicp3) garlic4 = getThingfromPos(garlicp4) --- POSS DOS PLAYERS player1pos = {x=33145, y=32864, z=9, stackpos=253} player1 = getThingfromPos(player1pos) player2pos = {x=33146, y=32864, z=9, stackpos=253} player2 = getThingfromPos(player2pos) player3pos = {x=33147, y=32864, z=9, stackpos=253} player3 = getThingfromPos(player3pos) player4pos = {x=33148, y=32864, z=9, stackpos=253} player4 = getThingfromPos(player4pos) ---- NÃO MEXA --- knightvoc = getPlayerVocation(player1.uid) sorcvoc = getPlayerVocation(player2.uid) druidvoc = getPlayerVocation(player3.uid) paladinvoc = getPlayerVocation(player4.uid) --- NÃO MEXA --- player1level = getPlayerLevel(player1.uid) player2level = getPlayerLevel(player2.uid) player3level = getPlayerLevel(player3.uid) player4level = getPlayerLevel(player4.uid) if knightvoc == 4 or knightvoc == 8 and paladinvoc == 3 or paladinvoc == 7 and druidvoc == 2 or druidvoc == 6 and sorcvoc == 1 or sorcvoc == 5 then if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then if player1level >= questlevel and player2level >= questlevel and player3level >= questlevel and player4level >= questlevel then if item.uid == switchUniqueID and garlic1.itemid == itemidum and garlic2.itemid == itemiddois and garlic3.itemid == itemidtres and garlic4.itemid == itemidquatro and getCreatureCondition(cid, CONDITION_DRUNK) and outfit.lookType == 21 then doRemoveItem(garlic1.uid,1) doRemoveItem(garlic2.uid,1) doRemoveItem(garlic3.uid,1) doRemoveItem(garlic4.uid,1) doTeleportThing(player1.uid,newposs) doSendMagicEffect(newposs,10) doTeleportThing(player2.uid,newposs) doSendMagicEffect(newposs,10) doTeleportThing(player3.uid,newposs) doSendMagicEffect(newposs,10) doTeleportThing(player4.uid,newposs) doSendMagicEffect(newposs,10) end else return 0 end else doPlayerSendCancel(cid,"Sorry, all players in your team must to be level " .. questlevel .. " drunk and transformed into rats or, all 4 players must be on right positions.") end end return 1 end
  16. É que na verdade testei o script sem unique id e sem alavanca, testei em um item qualquer, acabei esquecendo de mudar, testa ai : function onUse(cid, item, frompos, item2, topos) local outfit = getCreatureOutfit(cid) -- IDS DOS ITENS --- itemidum = 2199 itemiddois = 9931 itemidtres = 5878 itemidquatro = 2503 questlevel = 140 switchUniqueID = 1912 -- unique id da alavanca --- POSS DOS ITENS --- garlicp1 = {x=85, y=333, z=7, stackpos=1} garlicp2 = {x=86, y=333, z=7, stackpos=1} garlicp3 = {x=87, y=333, z=7, stackpos=1} garlicp4 = {x=88, y=333, z=7, stackpos=1} --- POSSO PARA ONDE OS PLAYER VAI --- local newposs = {x=87, y=331, z=7} --- NÃO MEXER ! -- garlic1 = getThingfromPos(garlicp1) garlic2 = getThingfromPos(garlicp2) garlic3 = getThingfromPos(garlicp3) garlic4 = getThingfromPos(garlicp4) --- POSS DOS PLAYERS player1pos = {x=87, y=332, z=7, stackpos=253} player1 = getThingfromPos(player1pos) player2pos = {x=88, y=332, z=7, stackpos=253} player2 = getThingfromPos(player2pos) player3pos = {x=89, y=332, z=7, stackpos=253} player3 = getThingfromPos(player3pos) player4pos = {x=90, y=332, z=7, stackpos=253} player4 = getThingfromPos(player4pos) ---- NÃO MEXA --- knightvoc = getPlayerVocation(player1.uid) sorcvoc = getPlayerVocation(player2.uid) druidvoc = getPlayerVocation(player3.uid) paladinvoc = getPlayerVocation(player4.uid) --- NÃO MEXA --- player1level = getPlayerLevel(player1.uid) player2level = getPlayerLevel(player2.uid) player3level = getPlayerLevel(player3.uid) player4level = getPlayerLevel(player4.uid) if knightvoc == 4 or knightvoc == 8 and paladinvoc == 3 or paladinvoc == 7 and druidvoc == 2 or druidvoc == 6 and sorcvoc == 1 or sorcvoc == 5 then if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then if player1level >= questlevel and player2level >= questlevel and player3level >= questlevel and player4level >= questlevel then if item.uid == switchUniqueID and garlic1.itemid == itemidum and garlic2.itemid == itemiddois and garlic3.itemid == itemidtres and garlic4.itemid == itemidquatro and getCreatureCondition(cid, CONDITION_DRUNK) and outfit.lookType == 21 then doRemoveItem(garlic1.uid,1) doRemoveItem(garlic2.uid,1) doRemoveItem(garlic3.uid,1) doRemoveItem(garlic4.uid,1) doTeleportThing(player1.uid,newposs) doSendMagicEffect(newposs,10) doTeleportThing(player2.uid,newposs) doSendMagicEffect(newposs,10) doTeleportThing(player3.uid,newposs) doSendMagicEffect(newposs,10) doTeleportThing(player4.uid,newposs) doSendMagicEffect(newposs,10) end else return 0 end else doPlayerSendCancel(cid,"Sorry, all players in your team must to be level " .. questlevel .. " drunk and transformed into rats or, all 4 players must be on right positions.") end end return 1 end O uniqueid da alavanca que usei no script é "1912", mas se quiser muda é so mudar ali em "switchUniqueID", o script so vai funcionar se estiver com os 4 jogadores level 140+ um de cada vocação nas posições certas com os itens na poss certa e com utevo res ina "rat e bebados, caso contrario não, acabei de testar aqui e funcionou ^^
  17. function onUse(cid, item, frompos, item2, topos) local outfit = getCreatureOutfit(cid) -- IDS DOS ITENS --- itemidum = 2199 itemiddois = 9931 itemidtres = 5878 itemidquatro = 2503 questlevel = 140 --- POSS DOS ITENS --- garlicp1 = {x=85, y=333, z=7, stackpos=1} garlicp2 = {x=86, y=333, z=7, stackpos=1} garlicp3 = {x=87, y=333, z=7, stackpos=1} garlicp4 = {x=88, y=333, z=7, stackpos=1} --- POSSO PARA ONDE OS PLAYER VAI --- local newposs = {x=87, y=331, z=7} --- NÃO MEXER ! -- garlic1 = getThingfromPos(garlicp1) garlic2 = getThingfromPos(garlicp2) garlic3 = getThingfromPos(garlicp3) garlic4 = getThingfromPos(garlicp4) --- POSS DOS PLAYERS player1pos = {x=87, y=332, z=7, stackpos=253} player1 = getThingfromPos(player1pos) player2pos = {x=88, y=332, z=7, stackpos=253} player2 = getThingfromPos(player2pos) player3pos = {x=89, y=332, z=7, stackpos=253} player3 = getThingfromPos(player3pos) player4pos = {x=90, y=332, z=7, stackpos=253} player4 = getThingfromPos(player4pos) ---- NÃO MEXA --- knightvoc = getPlayerVocation(player1.uid) sorcvoc = getPlayerVocation(player2.uid) druidvoc = getPlayerVocation(player3.uid) paladinvoc = getPlayerVocation(player4.uid) --- NÃO MEXA --- player1level = getPlayerLevel(player1.uid) player2level = getPlayerLevel(player2.uid) player3level = getPlayerLevel(player3.uid) player4level = getPlayerLevel(player4.uid) if knightvoc == 4 or knightvoc == 8 and paladinvoc == 3 or paladinvoc == 7 and druidvoc == 2 or druidvoc == 6 and sorcvoc == 1 or sorcvoc == 5 then if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then if player1level >= questlevel and player2level >= questlevel and player3level >= questlevel and player4level >= questlevel then if item.itemid == 790 and garlic1.itemid == itemidum and garlic2.itemid == itemiddois and garlic3.itemid == itemidtres and garlic4.itemid == itemidquatro and getCreatureCondition(cid, CONDITION_DRUNK) and outfit.lookType == 21 then doRemoveItem(garlic1.uid,1) doRemoveItem(garlic2.uid,1) doRemoveItem(garlic3.uid,1) doRemoveItem(garlic4.uid,1) doTeleportThing(player1.uid,newposs) doSendMagicEffect(newposs,10) doTeleportThing(player2.uid,newposs) doSendMagicEffect(newposs,10) doTeleportThing(player3.uid,newposs) doSendMagicEffect(newposs,10) doTeleportThing(player4.uid,newposs) doSendMagicEffect(newposs,10) end else return 0 end else doPlayerSendCancel(cid,"Sorry, all players in your team must to be level " .. questlevel .. " drunk and transformed into rats or, all 4 players must be on right positions.") end end return 1 end <action itemid="ID_ALAVANCA" event="script" value="NOMEDOARQUIVO.lua"/>
  18. Procure por isso no config lua : idleWarningTime = 14 * 60 * 1000 -- Tempo da msg, no caso aqui esta 14 minutos idleKickTime = 15 * 60 * 1000 -- tempo que vai ser kickado, no caso aqui esta 15 minutos
  19. Script do fogo : function onThink(interval, lastExecution) danomin = 50 -- dano minimo danomax = 100 -- dano maximo effect = 15 -- efeito da explo local positi = {x = 86, y = 339, z = 7, stackpos=2} -- posição do fogo doSendMagicEffect(positi, effect) doCombatAreaHealth(cid, 15, positi, 0, -danomin, -danomax, 15) end <globalevent name="nomedoarquivo" interval="3" event="script" value="nomedoarquivo.lua"/> Script rachadura : function onStepIn(cid, item, position, fromPosition) local poss = {x=1944, y=5511, z=7} -- posição que o player vai cair doTeleportThing(cid, poss) end <movevent type="StepIn" actionid="9952" event="script" value="nomedoarquivo.lua"/> Você adiciona o "9952" na rachadura pelo mapa editor
  20. function onUse(cid, item) if getPlayerStorageValue(cid, 32114) <= 0 and getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 6 then doPlayerSetMagic(cid, 12) doPlayerSendCancel(cid, "You have found a +12 ML.") setPlayerStorageValue(cid, 32114, 1) if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then doPlayerAddSkillTry(cid, 4, 12) doPlayerSendCancel(cid, "You have found +12 of Distance Skills.") setPlayerStorageValue(cid, 32114, 1) else doPlayerAddSkillTry(cid, 0, 12) doPlayerAddSkillTry(cid, 1, 12) doPlayerAddSkillTry(cid, 2, 12) doPlayerAddSkillTry(cid, 3, 12) doPlayerAddSkillTry(cid, 5, 12) doPlayerSendCancel(cid, "You have found +12 of some Skills.") setPlayerStorageValue(cid, 32114, 1) end else return doPlayerSendCancel(cid, "This is empty.") end end Você usou a função " doPlayerSetMagic" para adicionar ML, mas desconheço essa função
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...