Ir para conteúdo

MatheusGlad

Conde
  • Total de itens

    528
  • Registro em

  • Última visita

  • Dias Ganhos

    30

Tudo que MatheusGlad postou

  1. if getPlayerItemCount(cid, balls, 2589) <= 6 then A funçao /\ no otscript live nao retorna nada, nil. Portanto vai dar error se tu tenta comparar ela com um numero
  2. Alguem quer me dar uma premmy de presente n?

  3. Comprei 20k e ainda nao chego :'( kkk Jaja chega, eles sao bem serios, ligaram ate pra minha casa pra falar com a minha mae oO
  4. function getUidsInContainer(containeruid) -- By MatheusMkalo local dat = {} for i = 0, (getContainerSize(containeruid)-1) do local item = getContainerItem(containeruid, i) if isContainer(item.uid) then local items = getUidsInContainer(item.uid) for i = 0, #items do table.insert(dat, items[i]) end else table.insert(dat, item.uid) end end return dat end Observaçoes: Nao botei pra pegar o uid das Backpacks ou bags ou qualquer coisa que seja container dentro do container. Os uids vem numa table assim: {70000, 700001} Espero que ajude
  5. Ae sim em. Ficou bunitenho. Caverna Feita pelo Caverna
  6. Faço scripts dificeis por 20k na gamerchants :P (Sério) OBS: 20k na GM eh so 3.82 R$

    1. Mostrar comentários anteriores  %s mais
    2. gabisaoo

      gabisaoo

      Ola deposito 50reais na sua conta por um novo sistema de war se topar add no msn gabisaoo@hotmail.com

    3. gabisaoo

      gabisaoo

      OBS: add no msn q eu te falo como é o sistema

    4. Juninhuhh
  7. O script tem item2 e itemEx, so pode ter um, ou item2, ou itemEx Tenta assim: -- New MF rune******-- function onUse(cid, item, frompos, itemEx, topos) playerpos = {x=topos.x, y=topos.y, z=topos.z, stackpos=253} player = getThingfromPos(playerpos) ml = getPlayerMagLevel(cid) lvl = getPlayerLevel(cid) formula = math.random(((lvl+ml)*2)-(lvl-ml)) if itemEx.itemid == 1 and ml >= 2 then doSendMagicEffect(playerpos,1) doPlayerAddMana(player.uid,formula) doPlayerSay(player.uid,"Yeah Mana For me!",2) if item.type > 1 then doChangeTypeItem(item.uid,item.type-1) else doRemoveItem(item.uid,0) end end if itemEx.itemid == 1 and ml <= 1 then doSendMagicEffect(frompos,2) doPlayerSendCancel(cid,"You dont Have Magic Level to use this rune.") end if itemEx.itemid >= 2 then doPlayerSendCancel(cid,"You can only use this rune in you or in players.") doSendMAgicEffect(frompos,2) end if((not(isSorcerer(itemEx.uid) or isDruid(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 80) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then doCreatureSay(itemEx.uid, "Only sorcerers and druids of level 80 or above may drink this fluid.", TALKTYPE_ORANGE_1) return TRUE end return 1 end
  8. Oi, como vao voces?

  9. Da pra fazer, editando os items e adicionando um novo com o mesmo sprite, ou editando o attack de uma golden armor. Acho que a sessao correta para esse topico seria uma sessao de Duvidas.
  10. MatheusGlad

    Limite De Level

    Vá em data/creaturescripts/scrips, abra o login.lua, procure os registerCreatureEvent e adicione esse junto com eles: registerCreatureEvent(cid, "MaxLevel") Agora na mesma pasta adicione um arquivo.lua com o nome de maxlevel e bote esse script: local maxlevel = 200 function onAdvance(cid, skill, oldLevel, newLevel) if skill == SKILL__LEVEL then if newLevel > maxlevel then doPlayerAddExp(cid, getExperienceForLevel(maxlevel)-getPlayerExperience(cid)) return FALSE end end return TRUE end Depois va em creaturescripts.xml e adicione essa linha: <event type="advance" name="MaxLevel" event="script" value="maxlevel.lua"/>
  11. Aqui nao aconteceu isso nao oO, deve ser algo no seu ot.
  12. No script do exura voce bota isso: data/spells/scripts/healing/light healing.lua: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) local delay = 10 function onCastSpell(cid, var) local minformule = getPlayerMagLevel(cid)*6+getPlayerLevel(cid) local maxformule = getPlayerMagLevel(cid)*7+(getPlayerLevel(cid)*1.5) if os.time()-getPlayerStorageValue(cid, 66697) < delay then doPlayerSendCancel(cid, "Voce precisa esperar " .. delay-(os.time()-getPlayerStorageValue(cid, 66697)) .. " segundos para usar a magia novamente.") else setPlayerStorageValue(cid, 66697, os.time()) doCreatureAddHealth(cid, math.random(minformule, maxformule)) return doCombat(cid, combat, var) end end E agora voce vai na tag e tira o exausted deixando-o 0:
  13. Va em data/talkaction/scripts e adicione um arquivo em formato lua e nomeio de tpromote e bote isso dentro: function onSay(cid, words, param, channel) local configs = { cost = 20000, level = 20 } if isPremium(cid) then if getPlayerLevel(cid) >= configs.level then if getPlayerPromotionLevel(cid) < 1 then if configs.cost <= 0 or doPlayerRemoveMoney(cid, configs.cost) then setPlayerPromotionLevel(cid, 1) else doPlayerSendCancel(cid, "Voce nao tem o dinheiro suficiente que é " .. configs.cost .. " gold coins.") end else doPlayerSendCancel(cid, "Voce ja é promoted.") end else doPlayerSendCancel(cid, "Voce precisa ser level " .. configs.level .. " ou maior para adiquirir a promotion.") end else doPlayerSendCancel(cid, "Voce precisa ser premium account para adiquirir a promotion.") end return TRUE end Depois va em talkaction.xml na pasta talkaction e bote essa linha: <talkaction words="!promotion" event="script" value="tpromote.lua"/> Pronto!
    1. rapido90

      rapido90

      ow vc tem mapa carlin se tiver passa o link ow passa pelo msn Rafhael_cieto@hotmail.com

      (Obs) SEM SER WAR

  14. Manda efeito em area? Function: function doSendMagicEffectInArea(firstpos, area, effect) for i = 1, #area do for s = 1, #area[1] do if area[i][s] ~= 0 then doSendMagicEffect({x=firstpos.x+s-1, y=firstpos.y+i-1, z=firstpos.z}, effect) end end end end Como usar: Voce vai precisar fazer uma area, e declarar a firstpos. Exemplo: A posiçao x,y,z em vermelho corresponde a posiçao ao primeiro "1" na area. A area em azul sera aonde ira mandar effeitos. como no sistema de spells. Oque esta em rosa eh o numero do effect que sera mandado. Flw, gogo aprender script pra fazer o seu sistema de M1.
  15. MatheusGlad

    Scrip De Quest

    Nao, ja ta tudo configurado eh so botar os action id.
  16. MatheusGlad

    Scrip De Quest

    Va em data/actions/scripts e adicione um arquivo.lua com o nome de hellgorak e adicione esse script nele: function teleportDoor(cid, posdoor) local player = getCreaturePosition(cid) local pos = posdoor if player.x == pos.x and player.y > pos.y then doTeleportThing(cid, {x=player.x, y=player.y-2, z=player.z}) elseif player.x == pos.x and player.y < pos.y then doTeleportThing(cid, {x=player.x, y=player.y+2, z=player.z}) elseif player.x < pos.x and player.y == pos.y then doTeleportThing(cid, {x=player.x+2, y=player.y, z=player.z}) elseif player.x > pos.x and player.y == pos.y then doTeleportThing(cid, {x=player.x-2, y=player.y, z=player.z}) else doPlayerSendTextMessage(cid, 25, "Voce precisa estar na frente da porta.") end end function onUse(cid, item, frompos, item2, topos) if item.actionid == 51321 then if getPlayerStorageValue(cid, 66666) <= 0 then setPlayerStorageValue(cid, 66666, 1) doPlayerSendTextMessage(cid, 22, "Voce possuio a 1 parte do espirito de Hellgorak.") else doPlayerSendCancel(cid, "Voce já possui essa parte do Espirito de Hellgorak.") end elseif item.actionid == 51322 then if getPlayerStorageValue(cid, 66666) == 1 then setPlayerStorageValue(cid, 66666, 2) doPlayerSendTextMessage(cid, 22, "Voce possuio a 2 parte do espirito de Hellgorak.") else doPlayerSendCancel(cid, "Voce já possui essa parte do Espirito de Hellgorak.") end elseif item.actionid == 51323 then if getPlayerStorageValue(cid, 66666) == 2 then setPlayerStorageValue(cid, 66666, 3) doPlayerSendTextMessage(cid, 22, "Voce possuio a 3 parte do espirito de Hellgorak.") else doPlayerSendCancel(cid, "Voce já possui essa parte do Espirito de Hellgorak.") end elseif item.actionid == 51324 then if getPlayerStorageValue(cid, 66666) == 3 then setPlayerStorageValue(cid, 66666, 4) doPlayerSendTextMessage(cid, 22, "Voce possuio a 4 parte do espirito de Hellgorak.") else doPlayerSendCancel(cid, "Voce já possui essa parte do Espirito de Hellgorak.") end elseif item.actionid == 51325 then if getPlayerStorageValue(cid, 66666) == 4 then setPlayerStorageValue(cid, 66666, 5) doPlayerSendTextMessage(cid, 22, "Voce possuio a 5 parte do espirito de Hellgorak.") else doPlayerSendCancel(cid, "Voce já possui essa parte do Espirito de Hellgorak.") end elseif item.actionid == 51326 then if getPlayerStorageValue(cid, 66666) == 5 then setPlayerStorageValue(cid, 66666, 6) doPlayerSendTextMessage(cid, 22, "Voce possuio a 6 parte do espirito de Hellgorak.") else doPlayerSendCancel(cid, "Voce já possui essa parte do Espirito de Hellgorak.") end elseif item.actionid == 46211 then if getPlayerStorageValue(cid, 66666) >= 1 then teleportDoor(cid, topos) else doPlayerSendCancel(cid, "Voce precisa da primeira parte do espirito de Hellgorak para passar por esta porta.") end elseif item.actionid == 46212 then if getPlayerStorageValue(cid, 66666) >= 2 then teleportDoor(cid, topos) else doPlayerSendCancel(cid, "Voce precisa da segunda parte do espirito de Hellgorak para passar por esta porta.") end elseif item.actionid == 46213 then if getPlayerStorageValue(cid, 66666) >= 3 then teleportDoor(cid, topos) else doPlayerSendCancel(cid, "Voce precisa da terceira parte do espirito de Hellgorak para passar por esta porta.") end elseif item.actionid == 46214 then if getPlayerStorageValue(cid, 66666) >= 4 then teleportDoor(cid, topos) else doPlayerSendCancel(cid, "Voce precisa da quarta parte do espirito de Hellgorak para passar por esta porta.") end elseif item.actionid == 46215 then if getPlayerStorageValue(cid, 66666) >= 5 then teleportDoor(cid, topos) else doPlayerSendCancel(cid, "Voce precisa da quinta parte do espirito de Hellgorak para passar por esta porta.") end elseif item.actionid == 46216 then if getPlayerStorageValue(cid, 66666) >= 6 then teleportDoor(cid, topos) else doPlayerSendCancel(cid, "Voce precisa da sexta parte do espirito de Hellgorak para passar por esta porta.") end end return TRUE end Depois va em data/actions abra o actions.xml e adicione essa linha: <action actionid="51321-51326;46211-46216" event="script" value="hellgorak.lua" /> Bem agora voce precisa ir no map editor e botar os seguintes ActionsIds:
  17. 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 playerHaveItems(cid, itemid) -- by MatheusMkalo local items = type(itemid) == "table" and itemid or {itemid} for i = 1, #items do if getPlayerItemCount(cid, items[i]) <= 0 then return false end end return true end function doPlayerRemoveItems(cid, itemid, count) -- by MatheusMkalo local items = type(itemid) == "table" and itemid or {itemid} for i = 1, #items do doPlayerRemoveItem(cid, items[i], count ~= nil and count or 1) end return nil end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, "trocar") then if playerHaveItems(cid, {2335, 2336, 2337, 2338, 2339, 2340, 2341}) then doPlayerRemoveItems(cid, {2335, 2336, 2337, 2338, 2339, 2340, 2341}, 1) doPlayerAddItem(cid, 2342, 1) else selfSay("Voce nao tem os items nescessarios para trocar por um novo.") end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Erros bobos, desculpe
  18. function onUse(cid, item, frompos, item2, topos) if isInArray({1,2,5,6}, getPlayerVocation(cid)) then if getPlayerLevel(cid) >= 30 then doPlayerSendTextMessage(cid, 22, "Bem-vindo ao Shrine, onde voce pode encantar suas armas.") doTeleportThing(cid, {x=98, y=43, z=10}) else doPlayerSendCancel(cid, "Apenas players level 30 ou mais podem usar o shrine.") end else doPlayerSendCancel(cid, "Apenas druids e sorcerers podem usar o shrine.") end return TRUE end
  19. function onUse(cid, item, frompos, item2, topos) local poses = { [1] = {x = 1053, y = 1048, z = 7}, [2] = {x = 1043, y = 1048, z = 7}, } doTeleportThing(cid, poses[math.random(1, #poses)]) return TRUE end
  20. function onLogin(cid) local novapos = {x=98, y=11, z=7} -- send player here first log in. local playername = getPlayerName(cid) if getPlayerStorageValue(cid, 18541) <= 0 then doTeleportThing(cid, novapos) doPlayerSendTextMessage(cid, 22,"Welcome to the danger Line " .. playername .. ".") doSendMagicEffect(novapos, 2) setPlayerStorageValue(cid, 18541, 1) else doPlayerSendTextMessage(cid, 22,"Welcome to the danger Line " .. playername .. ".") end return TRUE end
  21. data/npc/scripts/troca7npc.lua: 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 playerHaveItems(cid, itemid) -- by MatheusMkalo local items = type(itemid) == "table" and itemid or {itemid} for i = 1, items do if getPlayerItemCount(cid, items[i]) <= 0 then return false end end return true end function doPlayerRemoveItems(cid, itemid, count) -- by MatheusMkalo local items = type(itemid) == "table" and itemid or {itemid} for i = 1, items do doPlayerRemoveItem(cid, items[i], count ~= nil and count or 1) end return nil end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, "trocar") then if playerHaveItems(cid, {2335, 2336, 2337, 2338, 2339, 2340, 2341}) then doPlayerRemoveItems(cid, {2335, 2336, 2337, 2338, 2339, 2340, 2341}, 1) doPlayerAddItem(cid, 2342, 1) else selfSay("Voce nao tem os items nescessarios para trocar por um novo.") end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) data/npc/Trocador de Items.xml: <?xml version="1.0" encoding="UTF-8"?> <npc name="Trocador" script="troca7npc.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="128" head="17" body="54" legs="114" feet="0" addons="2"/> <parameters> <parameter key="message_greet" value="Ola, diga {trocar} para trocar 7 items por 1."/> </parameters> </npc> Nao testei, se nao funcionar avise.
  22. nao funciona em 8.4 porque nao tem a funçao doSetItemAttribute e a getItemAttribute.
  23. Bem eu tava jogando um ot, ai eu usava potion e adicionava umas 300 mana fluid separadas na minha bp e dava pra eu usar potion de mage em um kina, ai eu fiz um sistema de potion pra nao dar mais esse bug pra postar ai: Vá em data/actions/scripts/liquids, abra o script potions.lua, e mude para esse script: local all = {1,2,3,4,5,7,6,8} -- All Vocations. local potions = { [7620] = {vocations = all, emptypotion = 7636, mana = {70, 130}}, [7589] = {level = 50, vocations = {1, 2, 3, 5, 6, 7}, emptypotion = 7634, mana = {110, 190}}, [7590] = {level = 80, vocations = {1, 2, 5, 6}, emptypotion = 7635, mana = {200, 300}}, [8704] = {vocations = all, emptypotion = 7636, health = {50, 100}}, [7618] = {vocations = all, emptypotion = 7636, health = {100, 200}}, [7588] = {level = 50, vocations = {3, 4, 7, 8}, emptypotion = 7634, health = {200, 400}}, [7591] = {level = 80, vocations = {4, 8}, emptypotion = 7635, health = {500, 700}}, [8473] = {level = 130, vocations = {4, 8}, emptypotion = 7635, health = {800, 1000}}, [8472] = {level = 80, vocations = {3, 7}, emptypotion = 7635, health = {200, 400}, mana = {110, 190}}, } local potionc = "transform" -- Use "transform" to transform into a empty potion, "remove" to remove the potion, "infinty" to infinit potion. function getVocNames(tab) function getVocName(v) return isInArray({1, 5}, v) and "sorcerers" or isInArray({2, 6}, v) and "druids" or isInArray({3,7}, v) and "paladins" or isInArray({4,8}, v) and "knights" or "" end for i = 1, #tab do if not string.find((a == nil and "" or a), getVocName(tab[i])) then a = a and a .. " and " .. getVocName(tab[i]) or getVocName(tab[i]) end end return a end function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) then if getPlayerAccess(cid) >= 4 or isInArray(potions[item.itemid].vocations, getPlayerVocation(itemEx.uid)) and getPlayerLevel(itemEx.uid) >= (potions[item.itemid].level == nil and 0 or potions[item.itemid].level) and getPlayerLevel(cid) >= (potions[item.itemid].level == nil and 0 or potions[item.itemid].level) then if potions[item.itemid].mana then doCreatureAddMana(itemEx.uid, math.random(potions[item.itemid].mana[1], potions[item.itemid].mana[2])) end if potions[item.itemid].health then doCreatureAddHealth(itemEx.uid, math.random(potions[item.itemid].health[1], potions[item.itemid].health[2])) end if potionc == "transform" then if getPlayerItemById(cid, TRUE, potions[item.itemid].emptypotion).uid ~= 0 then if getPlayerItemById(cid, TRUE, potions[item.itemid].emptypotion).type < 100 then doTransformItem(getPlayerItemById(cid, TRUE, potions[item.itemid].emptypotion).uid, potions[item.itemid].emptypotion, getPlayerItemById(cid, TRUE, potions[item.itemid].emptypotion).type+1) doRemoveItem(item.uid, 1) else doPlayerAddItem(cid, potions[item.itemid].emptypotion, 1) doRemoveItem(item.uid, 1) end else doPlayerAddItem(cid, potions[item.itemid].emptypotion, 1) doRemoveItem(item.uid, 1) end elseif potionc == "remove" then doRemoveItem(item.uid, 1) end doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) else return doCreatureSay(itemEx.uid, "Only " .. getVocNames(potions[item.itemid].vocations) .. (potions[item.itemid].level and " of level " .. potions[item.itemid].level .. " or above " or " ") .. "may drink this fluid.", TALKTYPE_ORANGE_1) end end return TRUE end Bem é so isso mesmo, kkk a configuraçao eh bem facilzinha de fazer e voce pode adicionar pra healar mana e health nos potions tranquilo. Nao da rep nao, aperta o botao do Eu recomendo! que eh melhor
  24. Vou pro colegio, to atrasado rairairairia

  • Quem Está Navegando   0 membros estão online

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