Ir para conteúdo

Skydangerous

Membro
  • Registro em

  • Última visita

Tudo que Skydangerous postou

  1. Poderia dar um exemplo de bordas que combinassem?
  2. -=-= Quando o player pisar aparecerá (Ver foto a baixo) Instalando Crie um novo arquivo: movements/scripts/mapmarks.lua Cole isso: local config = { storage = 9432, version = 1, marks = { {mark = 5, pos = {x = 166, y = 439, z = 7}, desc = "Main City Temple"}, {mark = 7, pos = {x = 300, y = 200, z = 7}, desc = "NPC with tools!"}, {mark = 1, pos = {x = 666, y = 666, z = 6}} } } local f_addMark = doPlayerAddMapMark if(not f_addMark) then f_addMark = doAddMapMark end function onStepIn(cid, item, position, fromPosition) if(isPlayer(cid) ~= TRUE or getPlayerStorageValue(cid, config.storage) == config.version) then return end for _, m in pairs(config.marks) do f_addMark(cid, m.pos, m.mark, m.desc ~= nil and m.desc or "") end setPlayerStorageValue(cid, config.storage, config.version) return TRUE end Legenda: version = 1 -> Aumente esse valor após a adição de novas marcas, então o jogador pode entrar novamente e receber marcas novo no mapa. mark = X -> Ai será a imagem que aparecerá no mapa (Ver a foto dos ids). pos = {x = X, y = X, z = X} -> Será a posição aonde aparecerá no mapa. desc = "Main City Temple" -> Sera a descrição apos passar o mouse em cima. Depois vá para movements/movements.xml E adicione essa linha: <movevent event="StepIn" actionid="YOUR_ACTION_ID" script="mapmarks.lua"/> Legenda: YOUR_ACTION_ID = Coloque a action que ficará no piso. Segue as lista das opções de imagens que pode existir. Créditos: slawkens
  3. Bom, seria um tutorial de scripting como adicionar e funcionar a 2 promotion. Mas se possivél, mova para uma area mais adequada.
  4. Pronto dei uma edita , irei postar mais conteudos legais no forum. Só aguardar
  5. Bom , existe muitos preguiçosos que não gostam de editar aquelas vocações que existe no seu otserv chamada EPIC , então , eu fiz para você e vou disponibilizar totalmente ! Lembrando é para versões 8.7 , não funfa em outra abaixo ou acima. Segue os passos detalhadamente , e porfavor não seja curioso e apresado leia com atenção para não bugar seu server. 1º Abra a pasta do seu OTSERV e logo em seguida pasta DATA e clica na pasta XML e abra o arquivo chamada VOCATIONS 2º Delete o que está dentro e cole o script. Continuando parte 3 9º Abra pasta ACTIONS e depois em seguida abra pasta SCRIPTS e abra a pasta LIQUIDS , agora abra o arquivo chamado POTIONS , delete tudo e copie o script local config = { removeOnUse = "no", usableOnTarget = "yes", -- can be used on target? (fe. healing friend) splashable = "no", range = -1, realAnimation = "no", -- make text effect visible only for players in range 1x1 multiplier = { health = 1.0, mana = 1.0 } } config.removeOnUse = getBooleanFromString(config.removeOnUse) config.usableOnTarget = getBooleanFromString(config.usableOnTarget) config.splashable = getBooleanFromString(config.splashable) config.realAnimation = getBooleanFromString(config.realAnimation) local POTIONS = { [8704] = {empty = 7636, splash = 42, health = {50, 100}}, -- small health potion [7618] = {empty = 7636, splash = 42, health = {100, 200}}, -- health potion [7588] = {empty = 7634, splash = 42, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8,11,12}, vocStr = "knights , paladins, epic knight , epic paladin"}, -- strong health potion [7591] = {empty = 7635, splash = 42, health = {500, 700}, level = 80, vocations = {4, 8,12}, vocStr = "knights"}, -- great health potion [8473] = {empty = 7635, splash = 42, health = {800, 1000}, level = 130, vocations = {4, 8,12}, vocStr = "knights"}, -- ultimate health potion [7620] = {empty = 7636, splash = 47, mana = {70, 130}}, -- mana potion [7589] = {empty = 7634, splash = 47, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7,9,10,11}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion [7590] = {empty = 7635, splash = 47, mana = {200, 300}, level = 80, vocations = {1, 2, 5, 6,9,10}, vocStr = "sorcerers and druids"}, -- great mana potion [8472] = {empty = 7635, splash = 43, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7,11}, vocStr = "paladins"} -- great spirit potion } local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo(&#39;timeBetweenExActions&#39;) - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) local potion = POTIONS[item.itemid] if(not potion) then return false end if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then if(not config.splashable) then return false end if(toPosition.x == CONTAINER_POSITION) then toPosition = getThingPosition(item.uid) end doDecayItem(doCreateItem(POOL, potion.splash, toPosition)) doRemoveItem(item.uid, 1) if(not potion.empty or config.removeOnUse) then return true end if(fromPosition.x ~= CONTAINER_POSITION) then doCreateItem(potion.empty, fromPosition) else doPlayerAddItem(cid, potion.empty, 1) end return true end if(hasCondition(cid, CONDITION_EXHAUST)) then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return true end if(((potion.level and getPlayerLevel(itemEx.uid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(itemEx.uid)))) and not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) then doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1) return true end if(config.range > 0 and cid ~= itemEx.uid and getDistanceBetween(getThingPosition(cid), getThingPosition(itemEx.uid)) > config.range) then return false end local health = potion.health if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.multiplier.health))) then return false end local mana = potion.mana if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.multiplier.mana))) then return false end doSendMagicEffect(getThingPosition(itemEx.uid), CONST_ME_MAGIC_BLUE) if(not config.realAnimation) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) else for i, tid in ipairs(getSpectators(getThingPosition(itemEx.uid), 1, 1)) do if(isPlayer(tid)) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid) end end end doAddCondition(cid, exhaust) doRemoveItem(item.uid, 1) if(not potion.empty or config.removeOnUse) then return true end if(fromPosition.x ~= CONTAINER_POSITION) then doCreateItem(potion.empty, fromPosition) else doPlayerAddItem(cid, potion.empty, 1) end return true end 9º Pronto , feche e salve 10º Agora vamos liberar o NPC , abra a pasta NPCe em seguida a pasta SCRIPTS e abra o arquivo chamado PROMOTION e cole isso. 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 node1 = keywordHandler:addKeyword({&#39;promot&#39;}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = &#39;I can promote you for 20000 gold coins. Do you want me to promote you?&#39;}) node1:addChildKeyword({&#39;yes&#39;}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, text = &#39;Congratulations! You are now promoted.&#39;}) node1:addChildKeyword({&#39;no&#39;}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = &#39;Alright then, come back when you are ready.&#39;, reset = true}) local node2 = keywordHandler:addKeyword({&#39;epic&#39;}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = &#39;I can epicize you for 200000 gold coins. Do you want me to epicize you?&#39;}) node2:addChildKeyword({&#39;yes&#39;}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 200000, level = 120, promotion = 2, text = &#39;Congratulations! You are now epicized.&#39;}) node2:addChildKeyword({&#39;no&#39;}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = &#39;Alright then, come back when you are ready.&#39;, reset = true}) npcHandler:addModule(FocusModule:new()) 11º Pronto , feche e salve 12º Está 100% configurado , agora e só se divertir , lembre-se edite do seu jeito , você é o cara !
  6. Crie um teleporte em qualquer lugar , em qualquer hora para qualquer lugar do mapa. Util para otserv com eventos ! Modo de usar: /portal X,Y,Z, quantas pessoas podem entrar <?xml version="1.0" encoding="utf-8"?> <mod name="Portal" version="2.0" enabled="yes"> <description> Faz um portal no seu pe , e as pessoas podem entrar ex. /portal x,y,z,quantas pessoas ex. /portal 1000,1000,7,15 </description> <talkaction words="/portal" access="5" event="script"><![CDATA[ function onSay(cid, words, param) param = param.explode(param, ',') if param then teleport = doCreateTeleport(1387, {x=param[1], y=param[2], z=param[3]}, getPlayerPosition(cid)) doItemSetAttribute(teleport, "description", 'The portal may enter '..param[4]..' people left.') doItemSetAttribute(teleport, "aid", 100+param[4]) else doPlayerSendCancel(cid, "You must set param.") end return TRUE end ]]></talkaction> <movement type="StepIn" itemid="9740" event="script"><![CDATA[ function onStepIn(cid, item, position, fromPosition) if item.actionid > 100 then doItemSetAttribute(item.uid, "description", 'The portal may enter '..(item.actionid-101)..' people left.') doItemSetAttribute(item.uid, "aid", item.actionid-1) elseif item.actionid == 100 then doBroadcastMessage("The Portal has ran out of energy and collapsed.", MESSAGE_EVENT_ADVANCE) doSendMagicEffect(position, 2) doRemoveItem(item.uid, 1) end return true end ]]></movement> </mod> Créditos: Ao Scripter, n&#227;o lembro o nome
  7. Critiquem , Elogiem , Opinem

Informação Importante

Confirmação de Termo