Ir para conteúdo

Alencar522

Campones
  • Total de itens

    55
  • Registro em

  • Última visita

Tudo que Alencar522 postou

  1. function onStepIn(cid, item, position, fromPosition) local storage = 18597 if getPlayerStorageValue(cid, storage) == -1 then doPlayerSendCancel(cid, "You/'re not a VIP player.") doTeleportThing(cid, fromPosition) doSendMagicEffect(position, 13) else doPlayerSendTextMessage(cid, 27, "Welcome to the VIP Area!") doSendMagicEffect(position, 14) end return true end Se tiver alguma dúvida quanto a funções olhe a lista nesse link: http://www.xtibia.com/forum/topic/228757-tutorial-basico-movements/
  2. Esqueci que era 50% mals ae: function onCastSpell(cid) local tempo = 5 -- tempo em segundos local mana = getCreatureMana(cid)*0.5 -- quanto de mana ira perder local target = getCreatureTarget(cid) local function move(target) -- função para fazer andar novamente doCreatureSetNoMove(target, false) end addEvent(move, tempo*1000, target) doCreatureAddMana(target, -mana) doCreatureSetNoMove(target, true) doPlayerSendTextMessage(target, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao podera se mover por cinco segundos") return true end
  3. Coloca o teu script aí pra ver se tem algo errado.
  4. Se você colocou esse script e já havia um player lá dentro vai dar isso mesmo, tira ele de lá manualmente e testa novamente. Para funcionar o player tem que clicar na porta para ganhar a storage.
  5. Tenta assim: -- Do not remove the credits -- -- [MOVEEVENT] Limite de player por sala -- -- Developed by Rigby -- -- Especially for the Xtibia.com -- function onUse(cid, item, topos) local config = { -- Config -- -- [ACTIONID] = {area = getPlayersInArea(AREA QUE IRA CHECAR (FROMPOS,TOPOS)), amountOfPlayers = QUANTIDADE QUE CABE} [212331] = {area = getPlayersInArea({x = 1030, y = 1020, z = 7}, {x = 1040, y = 1030, z = 7}), amountOfPlayers = 1} -- Config -- } if getPlayerLevel(cid) <= 299 then doPlayerSendCancel(cid, 'Você precisa de nivel 300 ou mais para passar') return true end if getPlayerStorageValue(cid, 1233256) == 1 then doTeleportThing(cid, topos,true) setPlayerStorageValue(cid, 1233256, -1) return true end if config[item.actionid] then if #config[item.actionid].area >= config[item.actionid].amountOfPlayers then return doPlayerSendCancel(cid, 'Ja tem um player, aguarde...') end setPlayerStorageValue(cid, 1233256, 1) doTeleportThing(cid, topos, true) end return true end function getPlayersInArea(fromPos, toPos) -- Function made by Vodkart local players = {} for _, pid in ipairs(getPlayersOnline()) do if isInRange(getPlayerPosition(pid), fromPos, toPos) then table.insert(players, pid) end end return players end
  6. Deu algum erro? Poste o script para ver se há algum erro.
  7. local expextra = 20 -- 20% de exp local storage = 13704 -- coloque sua storage aqui local valor = 1 -- valor da storage, se for por tempo deixe como está function onLogin(cid) if getPlayerStorageValue(cid, 1452369) == 1 then -- verificação para adicionar a xp só uma vez return true end if getPlayerStorageValue(cid, storage) >= valor then doPlayerSetExperienceRate(cid,expextra) doPlayerSendTextMessage(cid,21,"Você ganhou "..expextra.."% de exp por ser vip ") setPlayerStorageValue(cid, 1452369, 1) else doPlayerSendTextMessage(cid,21,"Torna-se vip e ganhe "..expextra.."% de exp") end end
  8. local expextra = 20 -- 20% de exp local storage = 13704 -- coloque sua storage aqui local valor = 1 -- valor da storage, se for por tempo deixe como está function onLogin(cid) if getPlayerStorageValue(cid, 1452369) == 1 then -- verificação para adicionar a xp só uma vez return true end if getPlayerStorageValue(cid, storage) >= valor then setPlayerExtraExpRate(cid, expextra) doPlayerSendTextMessage(cid,21,"Você ganhou "..expextra.."% de exp por ser vip ") setPlayerStorageValue(cid, 1452369, 1) else doPlayerSendTextMessage(cid,21,"Torna-se vip e ganhe "..expextra.."% de exp") end end Tenta ae
  9. Só uma coisa, acho que se você quer adicionar um rate extra deve usar essa função: setPlayerExtraExpRate(cid, expextra) no lugar dessa: doPlayerSetExperienceRate(cid,expextra)
  10. Nas linhas if getPlayerStorageValue(cid, 1452369) == 1 valor then -- verificação para adicionar a xp só uma vez setPlayerStorageValue(cid, 1452369, 1) coloca uma storage que você não usou, creio os não vips não receberão o benefício.
  11. Tenta assim local expextra = 20 -- 20% de exp local storage = 123456 -- coloque sua storage aqui local valor = 1 -- valor da storage, se for por tempo deixe como está function onLogin(cid) if getPlayerStorageValue(cid, 1452369) == 1 valor then -- verificação para adicionar a xp só uma vez return true end if getPlayerStorageValue(cid, storage) >= valor then doPlayerSetExperienceRate(cid,expextra) doPlayerSendTextMessage(cid,21,"Você ganhou "..expextra.."% de exp por ser vip ") setPlayerStorageValue(cid, 1452369, 1) else doPlayerSendTextMessage(cid,21,"Torna-se vip e ganhe "..expextra.."% de exp") end end
  12. local efeito = 20 local min = 100 -- dano minimo local max = 200 -- dano maximo local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_DAMAGE, -min, -min, -max, -max) local xCombat = createCombatObject() setCombatParam(xCombat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) --setCombatParam(combat, COMBAT_PARAM_EFFECT, 73) local condition = createConditionObject(CONDITION_FIRE) setConditionParam(condition, CONDITION_PARAM_DELAYED, 1) addDamageCondition(condition, 4, 2000, -10) addDamageCondition(condition, 6, 2000, -5) setCombatCondition(xCombat, condition) function onUseWeapon(cid, var) doSendMagicEffect({x=getThingPosition(getCreatureTarget(cid)).x+2, y=getThingPosition(getCreatureTarget(cid)).y+0, z=getThingPosition(getCreatureTarget(cid)).z}, efeito) local ret = doCombat(cid, combat, var) if(ret == false) then return false end local target = variantToNumber(var) if(target ~= 0) then -- chance to fire the enemy local chance = math.random(0, 100) if(chance > 90) then ret = doCombat(cid, xCombat, var) end end return ret end Desculpa pela demora, se der algum erro me fala.
  13. Veja se isso lhe ajuda: http://www.xtibia.com/forum/topic/235480-adicionar-exaust/
  14. Ficando assim: function onSay(cid, words, param) local storage = 23564 local tempo = 30 if getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você não pode usar enquanto estiver lutando.") return true end if exhaustion.check(cid, storage) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar esse comando novamente.") return true end pos = {x=1023, y=1016, z=6} doSendMagicEffect(getPlayerPosition(cid),19) doPlayerSendCancel(cid,"Teleportado!") doTeleportThing(cid,pos) exhaustion.set(cid, storage, tempo*60) return true end
  15. Você não apagou um end por engano não?
  16. O que fiz tá como você pediu então, basta alterar essa linha para a posx, y, z certa: doSendMagicEffect({x=getThingPosition(getCreatureTarget(cid)).x+2, y=getThingPosition(getCreatureTarget(cid)).y+0, z=getThingPosition(getCreatureTarget(cid)).z}, efeito)
  17. local efeito = 20 local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0) local xCombat = createCombatObject() setCombatParam(xCombat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) --setCombatParam(combat, COMBAT_PARAM_EFFECT, 73) local condition = createConditionObject(CONDITION_FIRE) setConditionParam(condition, CONDITION_PARAM_DELAYED, 1) addDamageCondition(condition, 4, 2000, -10) addDamageCondition(condition, 6, 2000, -5) setCombatCondition(xCombat, condition) function onUseWeapon(cid, var) local ret = doCombat(cid, combat, var) if(ret == false) then return false end local target = variantToNumber(var) if(target ~= 0) then -- chance to fire the enemy local chance = math.random(0, 100) if(chance > 90) then doSendMagicEffect(getCreaturePosition(getCreatureTarget(cid)), efeito) ret = doCombat(cid, xCombat, var) end end return ret end Se não der me fala a quantos sqm e para que lado o efeito sai com o primeiro script que mandei.
  18. local efeito = 20 local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0) local xCombat = createCombatObject() setCombatParam(xCombat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) --setCombatParam(combat, COMBAT_PARAM_EFFECT, 73) local condition = createConditionObject(CONDITION_FIRE) setConditionParam(condition, CONDITION_PARAM_DELAYED, 1) addDamageCondition(condition, 4, 2000, -10) addDamageCondition(condition, 6, 2000, -5) setCombatCondition(xCombat, condition) function onUseWeapon(cid, var) local ret = doCombat(cid, combat, var) if(ret == false) then return false end local target = variantToNumber(var) if(target ~= 0) then -- chance to fire the enemy local chance = math.random(0, 100) if(chance > 90) then doSendMagicEffect({x=getThingPosition(getCreatureTarget(cid)).x+2, y=getThingPosition(getCreatureTarget(cid)).y+0, z=getThingPosition(getCreatureTarget(cid)).z}, efeito) ret = doCombat(cid, xCombat, var) end end return ret end É isso?
  19. function onDeath(cid) local storage = storageaqui if isPlayer(cid) and getPlayerStorageValue(cid, storage) == 1 then setPlayerStorageValue(cid, storage, -1) end return true end
  20. Pra trocar a outfit tem esses: doSetCreatureOutfit(cid, outfit, time) doCreatureChangeOutfit(cid, outfit)
  21. Não testei Crie um arquivo.lua em data/creaturescripts/scripts e coloque isso: function onDeath(cid) local monster = Monstro -- monstro aqui local effect = 50 -- efeito aqui if isMonster(cid) and getCreatureName(cid) == 'monster' then doSendMagicEffect(getCreaturePosition(cid), effect) end return true end em creaturescripts.xml <event type="death" name="Escolha um nome" event="script" value="arquivo.lua"/> no login.lua: registerCreatureEvent(cid, "Coloque o mesmo nome da tag") Adicione essa tag no monstro: <script> <event name="mesmo nome da tag do xml"/> </script>
  22. Procura isso no seu config.lua e altere para a rate desejada: rateExperienceFromPlayers = 0 Onde achei: http://www.xtibia.com/forum/topic/183549-ajuda-ganhar-experiencia-ao-matar-players/ ----------- http://www.xtibia.com/forum/topic/234392-matar-pk-ou-red-ganha-dinheiro/ Tente procurar mais da próxima. ;D
  23. Achei esse mod aqui no meu servidor, deve servir, basta editar ao seu gosto: <?xml version = "1.0" encoding = "UTF-8"?> <mod name = "Military Ranks" version = "1.0" author = "Teckman" enabled = "yes"> <config name = "ranks"><![CDATA[ titles = { [5] = "Shinobi Agressive", [10] = "Shinobi Killer", [15] = "Shinobi Advanced Killer", [20] = "Shinobi Advanced", [25] = "Shinobi Nukenin Killer", [30] = "Shinobi Almost Killer", [35] = "Shinobi Nukenin", [40] = "Shinobi Renegade Killer", [45] = "Shinobi Almost Killer", [50] = "Shinobi Renegade", [55] = "Akatsuki Novice", [60] = "Akatsuki Member", [65] = "Akatsuki Espion", [70] = "Akatsuki Infiltration", [75] = "Akatsuki Espadashin", [80] = "Akatsuki Agressive", [85] = "Akatsuki Assassin", [90] = "Akatsuki Killer", [95] = "Akatsuki Espadashin Agressive", [100] = "Akatsuki Espion Agressive", [105] = "Akatsuki Scout", [110] = "Akatsuki Leader" } fragsStorage = 600 ]]></config> <event type = "look" name = "ranksLook" event = "script"><![CDATA[ domodlib("ranks") function onLook(cid, thing, position, lookDistance) if(isPlayer(thing.uid)) then local rank = {rank = "Shinobi Passive", frags = 0} for k, v in pairs(titles) do if(math.max(0, getPlayerStorageValue(thing.uid, fragsStorage)) > k - 1) then if(k - 1 > rank.frags) then rank.rank, rank.frags = v, k - 1 end end end doPlayerSetSpecialDescription(thing.uid, "\n Military rank: " .. rank.rank) end return true end ]]></event> <event type = "kill" name = "ranksKill" event = "script"><![CDATA[ domodlib("ranks") function onKill(cid, target) if(isPlayer(target)) then setPlayerStorageValue(cid, fragsStorage, math.max(0, getPlayerStorageValue(cid, fragsStorage) + 1)) if(titles[getPlayerStorageValue(cid, fragsStorage)]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You advanced to military rank: " .. titles[getPlayerStorageValue(cid, fragsStorage)] .. ". Congratulations " .. titles[getPlayerStorageValue(cid, fragsStorage)] .. "!") end end return true end ]]></event> <event type = "login" name = "ranksLogin" event = "script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "ranksKill") registerCreatureEvent(cid, "ranksLook") return true end ]]></event> </mod>
  24. O link para download do servidor está quebrado.
  • Quem Está Navegando   0 membros estão online

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