-
Total de itens
631 -
Registro em
-
Última visita
-
Dias Ganhos
13
Tudo que jhon992 postou
-
Criando Dois Items Com A Mesma Sprite
tópico respondeu ao Spraypaint de jhon992 em Tutoriais para Iniciantes
Bom tutorial, simples mas objetivo. Espero que ajude bastante gente e que seja aprovado logo. Rep+ como incentivo! -
Pelo modo do Mkalo ta funcional sim, só não esta muito detalhado e é preciso um pouco de conhecimento para usar. É só prestar bem atenção e ir seguindo os passos que funciona perfeitamente!
-
action Simples Sistema De Mineração [Diferente]
tópico respondeu ao Leoxtibia de jhon992 em Actions e Talkactions
Ficou bom hem, gostei muito. Parabéns pelo script e espero que venham muitos scripts legais ainda! Além de ser um sistema diferente possibilita aos que pretendem ser scripts um bom aprendizado. Rep+ -
Tu entende um pouco de script né, tão tenta adaptar assim: local position = getCreaturePosition(cid) for i=-1, 1 do for j=-1, 1 do local posEffect = {x=position.x+i,y=position.y+j,z=position.z} doSendMagicEffect(posEffect, 25) for o = 0, 255 do posEffect.stackpos = o local tile = getTileThingByPos(posEffect) if isPlayer(tile.uid) then setPlayerStorageValue(tile.uid, 8096, 1) end end end end
-
Tenta adaptar um script que salve player por player em determinado tempo, dae quando ocorrer o servesalve terá menas coisas para salvar e pode não ocorrer o kick. Mais salvar player por player pode vir a causar lag, tens que testar e vê se funciona legal. Link: http://www.xtibia.com/forum/topic/141846-solucao-para-clone-items/
- 2 respostas
-
- server save
- kick
-
(e 3 mais)
Tags:
-
Na verdade, da pra usar esse sistema feito pelo MatheusMkalo. Link: http://www.xtibia.com/forum/topic/158192-sistema-de-novos-items/
-
Tenta assim, troca essa linha: doSendMagicEffect(getPlayerPosition(cid), effect[i]) Por essas: local position = {x=getPlayerPosition(cid).x+1, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} doSendMagicEffect(position, effect[i])
-
[Ajuda] Avisar Quando Cooldown Da Magia Estiver Pronto.
pergunta respondeu ao digomaciel de jhon992 em Scripts
Não tem código que possibilita isso, o correto é mudar na mão mesmo. -
@Reportado para moverem!
-
[Ajuda] Avisar Quando Cooldown Da Magia Estiver Pronto.
pergunta respondeu ao digomaciel de jhon992 em Scripts
Não entendi oque você quer. -
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid 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 greetCallback(cid) talkState[talkUser] = 0 return true end local diamondsIds = 4351 -- põe o id do diamond local diamondsQuant = 3 -- quantidade que ira remover de diamonds function creatureSayCallback(cid, type, msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, 'bless') then if getPlayerItemCount(cid, diamondsIds) >= diamondsQuant then doPlayerRemoveItem(cid, diamondsIds, diamondsQuant) for i=1, 5 do doPlayerAddBlessing(cid, i) end selfSay("Você recebeu sua bless!", cid) else selfSay("Você precisa de "..diamondsQuant.." diamonds para comprar bless.", cid) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
O script ta meio embaralhado com uns "end" junto de "if" e algumas colocações erradas, então só o indentei. Vê se funfa: local rate = 20 function onUse(cid, item, fromPos, item2, toPos) if not isCreature(item2.uid) then return true end local poke = getCreatureName(item2.uid) if isMonster(item2.uid) then local this = newpokedex[getCreatureName(item2.uid)] local leveltable = getPokemonExperienceTable(getCreatureName(item2.uid)) local myball = 0 if isSummon(item2.uid) then myball = getPlayerSlotItem(getCreatureMaster(item2.uid), 8) end if not getPlayerInfoAboutPokemon(cid, poke).dex then local exp = this.level * rate doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have unlocked "..getCreatureName(item2.uid).." in your pokedex!") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have gained "..exp.." experience points.") doSendMagicEffect(getThingPos(cid), 210) doPlayerAddExperience(cid, exp) doAddPokemonInDexList(cid, poke) else doShowPokedexRegistration(cid, item2, myball, leveltable) end return true end if not isPlayer(item2.uid) then return true end local unlock = 0 for i = 1, #oldpokedex do if getPlayerInfoAboutPokemon(item2.uid, oldpokedex[i][1]).dex then unlock = unlock + 1 end end local str = "" local lnl = 0 local poks = "" local player = getRecorderPlayer(toPos, cid) for x = 1001, 1251 do local y = tonumber(x - 1000) if getPlayerInfoAboutPokemon(player, oldpokedex[y][1]).dex then if isPokemonInOwnList(player, oldpokedex[y][1]) then str = str.."\n["..threeNumbers(y).."] - "..oldpokedex[y][1].." (•)" lnl = lnl + 1 else str = str.."\n["..threeNumbers(y).."] - "..oldpokedex[y][1].."" end else str = str.."\n["..threeNumbers(y).."] - ?" end end if cid == player then doPlayerSendTextMessage(cid, 27, "You can open a pokedex entry by typing \"/dex <name>\". Example: \"/dex Pikachu\".") str = "Pokédex Information:\n\n- Unlocked pokémon species: "..unlock.."\n- Pokémon species that you own: "..lnl.."\n\n(•) means that you have already used that pokémon species.\n\nPokémon Database:\n"..str.."" if string.len(str) <= 8192 then doShowTextDialog(cid, 2382, str) end else doPlayerSendTextMessage(cid, 27, getPlayerName(player).." has unlocked "..unlock.."/251 pokémons already, and has captured "..lnl.." pokemons until now.") end return true end
-
local distanceCombat = createCombatObject() setCombatParam(distanceCombat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(distanceCombat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SPEAR) function getSpellDamage(cid, lv) damage_min = lv * 2 damage_max = lv * 1 if(damage_max < damage_min) then local tmp = damage_max damage_max = damage_min damage_min = tmp end return -damage_min, -damage_max end setCombatCallback(distanceCombat, CALLBACK_PARAM_SKILLVALUE, "getSpellDamage") function onCastSpell(cid, var) local target = getCreatureTarget(cid) local enemypos = getCreaturePosition(target) if isMonster(target) or isCreature(target) then if verificaPos(cid, enemypos, var) == false then doPlayerSendCancel(cid, "Position not valid.") return false else return true end else doPlayerSendCancel(cid, "You need a taget.") return false end end function verificaPos(cid, enemypos, var) local positions = {} local player = getCreaturePosition(cid) for i=-1, 1 do for j=-1, 1 do local position = {x=enemypos.x+i,y=enemypos.y+j,z=enemypos.z} if isWalkable(position) then positions[#positions+1] = position end end end if #positions > 0 then doTeleportThing(cid, positions[math.random(1,#positions)]) doSendMagicEffect(player, 61) return doCombat(cid, distanceCombat, var) else return false end end function isWalkable(pos, creature, pz, proj) -- nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end local creature = getTopCreature(pos) if creature.type > 0 then return false end if getTilePzInfo(pos) and not pz then return false end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end
-
Quando fiz essa spell eu tava iniciando em Lua ainda, então resolvi reformular e dar uma adaptada rapidinho pra ti agora. Vai ficar assim: local tempo = 60 -- tempo em segundos. local effect = {27,28,29} -- effect no player, caso queira apenas 1, basta remover os outros numeros. local ml = 5 -- quantos ira aumentar o skill de ML local skillfist = 5 -- quantos ira aumentar o skill de Fist local skillsword = 5 -- quantos ira aumentar o skill de Sword local skillaxe = 5 -- quantos ira aumentar o skill de Axe local skillclub = 5 -- quantos ira aumentar o skill de Club local skilldistance = 5 -- quantos ira aumentar o skill de Distance local skillshield = 5 -- quantos ira aumentar o skill de Shield local health = 30 -- A cada 1 segundo quantos aumentar de vida local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml) setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, skillfist) setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, skillsword) setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, skillaxe) setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, skilldistance) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield) setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit) setCombatCondition(combat, condition) local condition = createConditionObject(CONDITION_HASTE) setConditionParam(condition, CONDITION_PARAM_SPEED, 250) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE) setCombatCondition(combat, condition) local condition = createConditionObject(CONDITION_REGENERATION) setConditionParam(condition, CONDITION_PARAM_SUBID, 1) setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health) setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000) setCombatCondition(combat, condition) function magicEffect3(tempo2,tempo3,cid) if (isCreature(cid)) then if getPlayerStorageValue(cid, 102053) > 0 and getCreatureCondition(cid, CONDITION_REGENERATION, 1) then for i=1, #effect do doSendMagicEffect(getPlayerPosition(cid), effect[i]) end end end end function onCastSpell(cid, var) if getPlayerStorageValue(cid, 102053) ~= 1 or getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then doCombat(cid, combat, var) tempo2 = 0 while (tempo2 ~= (tempo*1000)) do addEvent(magicEffect3, tempo2, tempo2, tempo*1000, cid) tempo2 = tempo2 + 1000 end setPlayerStorageValue(cid, 102053,1) -- storage verifica transformado, quando = 1 player esta transformado. else doPlayerSendCancel(cid, "Sorry, you are transformed.") end end
-
function onUse(cid, item, fromPosition, itemEx, toPosition) if itemEx.itemid == 2495 then if getCald(cid) >= 1 then removeCald(cid, 1) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'Parabens!') doSendMagicEffect(getPlayerPosition(cid), 27) return true else doPlayerSendCancel(cid, "Voce nao tem carga o suficiente!") end end return true end
-
modifiquei o globalevents todo, subistitui la: local trainerNames = {"Training Monk","Trainer"} -- põe o nome de todo tipo de trainer do seu servidor. local tempo = 10 -- minutos para ser teleportado. function onThink(interval, lastExecution) local online = getPlayersOnline() for i=1,#online do if getPlayerAccess(online[i]) < 4 and (not isPlayerPzLocked(online[i])) and getCreatureName(online[i]) ~= "Account Manager" and getPlayerStorageValue(online[i], 34951) < 0 and (not isInArray(trainerNames, getCreatureName(getCreatureTarget(online[i])))) then if getPlayerStorageValue(online[i] ,9564) == -1 then local numero = math.random(0,99999) doPlayerSendTextMessage(online[i], MESSAGE_STATUS_WARNING, 'Anti-bot system by Antharaz. Seu número de confirmação anti-bot é: '..numero..'. Por favor digite !anthaab XXXXX onde XXXXX é seu número de confirmação.') setPlayerStorageValue(online[i],9564,numero) o = 1 while (o < 3) do addEvent(avisosPlayer, 60000*(tempo/o), online[i]) o = o+1 end end end end return true end function teleportTemple(cid) if isPlayer(cid) then if getPlayerStorageValue(cid,9564) > -1 and setPlayerStorageValue(cid,9565) > -1 then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) setPlayerStorageValue(cid,9565,-1) end end end function avisosPlayer(cid) if isPlayer(cid) then if getPlayerStorageValue(online[i],9565) == -1 then setPlayerStorageValue(online[i],9565,1) doPlayerSendTextMessage(online[i], MESSAGE_STATUS_WARNING, 'Último aviso. Confirme seu número gerado pelo sistema anti-bot pelo comando !bot ou você será teleportado ao templo em 5 minutos.') elseif getPlayerStorageValue(online[i],9565) == 1 then teleportTemple(cid) end end end
-
Troca por isso: local hit = getPlayerLevel(attacker) * 2 doCreatureAddHealth(cid, -hit) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE)
-
O primeiro erro não sei =/ O segundo põe isso no script: doPlayerSendTextMessage(attacker, 12, "You deal "..hit.." damage to a "..getCreatureName(cid)..".")
-
faz assim, ajeitei ali em cima o último substitui o anthhab do globalevents pelo último que postei e vê se funciona, se não funcionar me reporta os erros!
-
@OtheReality - Tenta adaptar essa função no script no lugar do "docreatureaddhealth" local hit = math.random(getPlayerLevel(attacker) * 2,getPlayerLevel(attacker) * 3) doTargetCombatHealth(attacker, cid, COMBAT_HOLYDAMAGE, -hit, -hit, CONST_ME_HOLYDAMAGE) @preier - local vocation = {4,8} local porcentagem = 1 -- 1% function onStatsChange(cid, attacker, type, combat, value) if type == STATSCHANGE_HEALTHLOSS then if isPlayer(attacker) then if isInArray(vocation, getPlayerVocation(attacker)) then doCreatureAddHealth(attacker, getCreatureMaxHealth(attacker)*(porcentagem/100)) end end end return true end function onCombat(cid, target) if isPlayer(cid) then registerCreatureEvent(target, "healthPercent") end return true end
-
http://www.xtibia.com/forum/topic/128885-antha-anti-bot-system/ Tu já era pra ter feito todo o script a tempo...
-
Faz oque eu disse aew e deu. sadhusada Explicando: O sistema é executado no globalevents mais para responder é usado a talkaction. Por isso que tem que modificar a talkaction também. A parte de creaturescripts foi feita pra identificar se tu ta atacando um player ou um monster dae set um determinado storage. E a última modificação no globalevents foi feita pra o script só executar se ele não tiver atacando player.
-
Qual teu sistema vip?
-
Pra mudar o talk de !anthaab pra !bot, basta ir no arquivo data/talkactions/talkactions.xml e procura por: <talkaction words="!anthaab" event="script" value="anthaab.lua"/> sóh trocar por: <talkaction words="!bot" event="script" value="anthaab.lua"/> ------------- Agora pra tirar o outro erro, vai em data/creaturescripts/scripts, cria um arquivo e nomeia para "botTeste" sem as aspas e nele cole: function onCombat(cid, target) if isPlayer(target) then setPlayerStorageValue(cid, 34951, 1) else setPlayerStorageValue(cid, 34951, -1) end return true end No creaturescripts.xml cole a tag: <event type="combat" name="BotTeste" event="script" value="botTeste.lua"/> E no login.lua, antes do último return true põe: registerCreatureEvent(cid, "BotTeste") E troca o anthhab do globalevents por esse: local trainerNames = {"Training Monk","Trainer"} -- põe o nome de todo tipo de trainer do seu servidor. function onThink(interval, lastExecution) for x=1,#getOnlinePlayers() do if getPlayerAccess(getCreatureByName(getOnlinePlayers()[x])) < 4 and (not isPlayerPzLocked(getCreatureByName(getOnlinePlayers()[x]))) and getOnlinePlayers()[x] ~= "Account Manager" and getPlayerStorageValue(cid, 34951) < 0 and (not isInArray(trainerNames, getCreatureName(getCreatureTarget(getOnlinePlayers()[x]))))) then if getPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9564) == -1 then local numero = math.random(0,99999) doPlayerSendTextMessage(getCreatureByName(getOnlinePlayers()[x]), MESSAGE_STATUS_WARNING, 'Anti-bot system by Antharaz. Seu número de confirmação anti-bot é: '..numero..'. Por favor digite !anthaab XXXXX onde XXXXX é seu número de confirmação.') setPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9564,numero) elseif getPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565) == -1 then setPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565,1) doPlayerSendTextMessage(getCreatureByName(getOnlinePlayers()[x]), MESSAGE_STATUS_WARNING, 'Último aviso. Confirme seu número gerado pelo sistema anti-bot pelo comando !anthaab ou você será teleportado ao templo.') elseif getPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565) == 1 then doTeleportThing(getOnlinePlayers()[x], getTownTemplePosition(getPlayerTown(getOnlinePlayers()[x]))) setPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565,-1) end end end return TRUE end
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.