Ir para conteúdo

bepokemon

Visconde
  • Total de itens

    273
  • Registro em

  • Última visita

  • Dias Ganhos

    4

Tudo que bepokemon postou

  1. Tem que ter registrado nos movements o onEquipe e onDeEquip. Siga alguns exemplos encontrados no movements.xml.
  2. bepokemon

    [Scripts]

    function onLogin(cid) local minLevel = getConfigValue('newPlayerLevel') if getPlayerLevel(cid) < minLevel then repeat local addexp = getExperienceForLevel(getPlayerLevel(cid)+1) doPlayerAddExp(cid, addexp) until getPlayerLevel(cid) >= minLevel end return true end Coloca essa funcao onLogin no seu CreatureScripts.
  3. Qual o problema da sua bag, não entendi então ...
  4. Sim, tudo vai te ajudar um pouco, até mesmo porque vai aprender a logica de programacao. C++ é a base do OTServer. PhP vai te ajudar a desenvolver sites para seu OT. Java pode ser utilizado em alguns extras no seu servidor. E LUA é fácil até de aprender se souber como funciona a programacao, etc ...
  5. Talkaction: function onSay(cid, words, param) if not isPremium(cid) then doPlayerSendCancel(cid, "You don't own a premium account.") return true end local s = getPlayerStorageValue(cid, 12812) setPlayerStorageValue(cid, 12812, s == 1 and 0 or 1) doPlayerSendTextMessage(cid, 25, s == 1 and "Battle mode set to: no-pvp." or "Battle mode set to: pvp.") return true end Tag: <talkaction words="!battlemode" event="script" value="NomeDoArquivo.lua"/> Creaturescripts: --[[ registrar no login.lua essas quatro linhas: if getPlayerStorageValue(cid, 12812) == -1 then setPlayerStorageValue(cid, 12812, 1) end doPlayerSendTextMessage(cid, 25, getPlayerStorageValue(cid, 12812) == 1 and "Battle mode set to: no-pvp." or "Battle mode set to: pvp.") registerCreatureEvent(cid, "BattleMode_Stats") registerCreatureEvent(cid, "BattleMode_Combat") ]]-- function onStatsChange(cid, attacker, type, combat, value) if not isPlayer(attacker) then return true end if getPlayerStorageValue(attacker, 12812) == 0 then return false end return true end function onCombat(cid,target) if getPlayerStorageValue(cid, 12812) == 0 then doPlayerSendCancel(cid, "You may not attack this player.") return false end if getPlayerStorageValue(target, 12812) == 0 then doPlayerSendCancel(target, "You may not attack someone with no-pvp battle mode.") return false end return true end Tags: <event type="statschange" name="BattleMode_Stats" event="script" value="NomeDoArquivo.lua"/> <event type="combat" name="BattleMode_Combat" event="script" value="NomeDoArquivo.lua"/>
  6. Isso era a resposta para a sua pergunta .-. @Topic Porque voce não remove a bag no onLogin()?
  7. Tecnicamente ele só tá tentando fazer o trabalho dele, coitado ..
  8. bepokemon

    Duvida Nas Spells

    Poderia ter usado um pouco a ferramenta de pesquisa, né?
  9. Créditos ao Kaotar pela print. Se puder, adicione ao tópico principal, link: http://img291.imageshack.us/img291/338/raind.jpg
  10. É um monstro e está bem explicado. Oque voce não entendeu?
  11. local config = { removeOnUse = "no", usableOnTarget = "no", -- can be used on target? (fe. healing friend) splashable = "no", realAnimation = "yes", -- make text effect visible only for players in range 3x3 showHealingMsg = "yes", -- By Byerne healthMultiplier = 1.0, manaMultiplier = 1.0 } config.removeOnUse = getBooleanFromString(config.removeOnUse) config.usableOnTarget = getBooleanFromString(config.usableOnTarget) config.splashable = getBooleanFromString(config.splashable) config.realAnimation = getBooleanFromString(config.realAnimation) local POTIONS = { [5468] = {textcolor = COLOR_PURPLE, empty = 7635, splash = 3, health = {40000, 40000}, mana = {40000, 40000}, level = 8, vocations = {1, 2, 3, 4, 9, 10, 11, 12}, vocStr = "paladin, knight, druid, sorcerer"}, -- great spirit potion } local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 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 = getThingPos(item.uid) end doDecayItem(doCreateItem(2016, potion.splash, toPosition)) doTransformItem(item.uid, potion.empty) return TRUE end if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return TRUE end if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) 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 local health = potion.health if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.healthMultiplier))) then return false end local mana = potion.mana if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.manaMultiplier))) then return false end doSendMagicEffect(getThingPos(itemEx.uid), 36) if config.showHealingMsg then doSendAnimatedText(toPosition, math.ceil(math.random(health[1], health[2]), potion.textcolor) end if(not config.realAnimation) then doCreatureSay(itemEx.uid, "Aahhh...", TALKTYPE_ORANGE_1) else for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do if(isPlayer(tid)) then doCreatureSay(itemEx.uid, "Aahhh...", TALKTYPE_ORANGE_1, false, tid) end end end doAddCondition(cid, exhaust) if(not potion.empty or config.removeOnUse) then doRemoveItem(item.uid, 1) return TRUE end doRemoveItem(item.uid, 0) doPlayerAddItem(cid, potion.empty, 0) doSendAnimatedText(getPlayerPosition(cid), 'HALLOW', 4) doPlayerRemoveItem(cid, potion.empty, getPlayerItemCount(cid, potion.empty)) doPlayerAddItem(cid, potion.empty, getPlayerItemCount(cid, potion.empty)) return TRUE end Se quiser pode mudar ali em textcolor = COLOR_PURPLE para outras cores dessa lista: COLOR_BLACK = 0 COLOR_BLUE = 5 COLOR_GREEN = 18 COLOR_TEAL = 35 COLOR_LIGHTGREEN = 66 COLOR_DARKBROWN = 78 COLOR_LIGHTBLUE = 89 COLOR_DARKPURPLE = 112 COLOR_BROWN = 120 COLOR_GREY = 129 COLOR_DARKRED = 144 COLOR_DARKPINK = 152 COLOR_PURPLE = 154 COLOR_DARKORANGE = 156 COLOR_RED = 180 COLOR_PINK = 190 COLOR_ORANGE = 192 COLOR_DARKYELLOW = 205 COLOR_YELLOW = 210 COLOR_WHITE = 215 COLOR_NONE = 255
  12. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, 10) setConditionParam(condition, CONDITION_PARAM_TICKS, 3600000) -- uma hora setCombatCondition(combat, condition) function onCastSpell(cid, var) if exhaustion.check(cid, 23047) == FALSE then doRemoveCondition(cid, CONDITION_ATTRIBUTES) doCombat(cid, combat, var) exhaustion.set(cid, 23047, 1) return true else doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid, 23047).."]") end end
  13. Todas as conditions e outras coisas do genero estao continudas no seu arquivo data/lib/000-constant.lua aqui vai a lista das mesmas (para 8.54):
  14. Voce leu a pergunta dele? Alem de ter rippado um script horrível voce respondeu algo que não tem nada a ver com a dúvida dele.
  15. @Topico Os storages estão certos? @Pergunta Alteracão nas sources.
  16. Entonces. Voce nao pode "cancelar" o fato do player equipar dois items, voce precisaria mesmo editar a source e escolher uma das opcoes: -> Só deixar X vocation usar duas armas. -> Só deixar X storage usar duas armas. -> Só deixar usar como segunda arma Ys items. Já para LUA, caso nenhum dos seus items usem attributos extras (Refine, Slot, etc ...) voce pode remover o item equipado e adicionar otro igual: function onEquip(cid, slot, item) if getPlayerStorageValue(cid, storage) ~= 1 then local itemid, count = item.itemid, item.type > 1 and item.type or 1 doRemoveItem(item.uid, count) doPlayerAddItem(cid, itemid, count) doPlayerSendCancel(cid, "You may not equip this item.") end return true end
  17. Aqui a lista de tipos de mensagem que funcionam nesta funcao. (redundante, não?) MESSAGE_FIRST = 18 MESSAGE_STATUS_CONSOLE_RED = MESSAGE_FIRST MESSAGE_EVENT_ORANGE = 19 MESSAGE_STATUS_CONSOLE_ORANGE = 20 MESSAGE_STATUS_WARNING = 21 MESSAGE_EVENT_ADVANCE = 22 MESSAGE_EVENT_DEFAULT = 23 MESSAGE_STATUS_DEFAULT = 24 MESSAGE_INFO_DESCR = 25 MESSAGE_STATUS_SMALL = 26 MESSAGE_STATUS_CONSOLE_BLUE = 27
  18. If that one did not worked properly, PM so I can make you another one.
  19. Quando fui remover o comentário o do foi junto .. XD function onSay(cid, words, param, channel) local t = string.explode(param, ",") if not t[2] then doPlayerSendCancel(cid, "Command params required.") return true end for _,pid in pairs(getPlayersOnline()) do if pid ~= cid then doPlayerAddItem(pid,t[1],t[2]) doSendMagicEffect(getThingPos(pid), 36) end end doBroadcastMessage(getPlayerName(cid) .. " enviou " .. t[2] .." ".. getItemNameById(t[1]) .. " para todos os players online!") return true end
  20. function onSay(cid, words, param, channel) local t = string.explode(param, ",") if not t[2] then doPlayerSendCancel(cid, "Command params required.") return true end for _,pid in pairs(getPlayersOnline()) do if pid ~= cid then doPlayerAddItem(pid,t[1],t[2]) doSendMagicEffect(getThingPos(pid), 36) end end doBroadcastMessage(getPlayerName(cid) .. " enviou " .. t[2] .." ".. getItemNameById(t[1]) .. " para todos os players online!") return true end
  21. Foi isso que eu pensei. Algo que pudesse ser alterado, apenas uma linha ou então uma própria opcao do site e toda a linguagem fosse alterada.
  22. Perfeito, só não concordei com o uso do portugues como linguagem principal, afinal. Os NPCs, quests e em geral o jogo é em ingles. O site em si só vai ajudar o player a criar um character e desistir. Se precisar de alguma coisa em LUA me avisa ...
  23. Sim, sao coisas fáceis e divertidas. Nhaa, e se gostou, acho que nao cai o dedo dar reputation de vez em quando
  24. Já está no tópico, é porque toda vez que eu edito o tópico o vídeo sai.
  • Quem Está Navegando   0 membros estão online

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