-
Total de itens
1347 -
Registro em
-
Última visita
-
Dias Ganhos
36
Tudo que Oneshot postou
-
Isso deve ser feito no vocations.xml, precisamente nessa linha de cada vocação: <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> Esses são multiplicadores de dano, seja ele físico ou mágico e também de defesa física/mágica. meleeDamage = Dano físico distDamage = Dano físico a distância wandDamage = Dano mágico com wands/rods magDamage = Dano mágico com magias
-
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 function onGreetCallback(cid) npcHandler:say("Olá, ".. getCreatureName(cid) ..". Siga o caminho da esquerda para escolher seu destino.", cid) return false end npcHandler:setCallback(CALLBACK_GREET, onGreetCallback) npcHandler:addModule(FocusModule:new()) <?xml version="1.0" encoding="UTF-8"?> <npc name="NPC" script="nome_do_arquivo.lua" walkinterval="0" floorchange="0"> <health now="100" max="100"/> <look type="128" head="17" body="54" legs="114" feet="0" addons="2"/> </npc>
- 3 respostas
-
- npc de fala
- otserv
-
(e 2 mais)
Tags:
-
Triplicar em que sentido? O número de hits? Se for isso, segue abaixo: local scom1 = createCombatObject() local scom2 = createCombatObject() local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 255) setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE) setCombatFormula(combat1, COMBAT_FORMULA_SKILL, 18, 15, 6.0, -9) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 9) setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE) setCombatFormula(combat2, COMBAT_FORMULA_SKILL, 0, 0, 0.0, 0) arr1 = { {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0} } arr2 = { {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0}, {0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1}, {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0} } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) setCombatArea(scom1, area1) setCombatArea(scom2, area2) function onTargetTile(cid, pos) doCombat(cid,combat1,positionToVariant(pos)) end function onTargetTile2(cid, pos) doCombat(cid,combat2,positionToVariant(pos)) end setCombatCallback(scom1, CALLBACK_PARAM_TARGETTILE, "onTargetTile") setCombatCallback(scom2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2") local function onCastSpell1(parameters) doCombat(parameters.cid, scom1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, scom2, parameters.var) end function onCastSpell(cid, var) local parameters = {cid = cid, var = var} for i = 1, 3 do addEvent(onCastSpell1, 100 * i, parameters) addEvent(onCastSpell2, 200 * i, parameters) end return TRUE end
-
Para que os jogadores não percam nenhum loot ao morrer, abra seu login.lua em data/creaturescripts/scripts e adicione a seguinte linha: doCreatureSetDropLoot(cid, false) Antes de: return true E para que jogadores deem experiência, altere essa linha: rateExperienceFromPlayers = 0 Não coloque um valor absurdo, uma vez que a experiência dada por jogadores mortos já é um valor alto. E altere os valores desses dois parâmetros: minLevelThresholdForKilledPlayer = 0.9 maxLevelThresholdForKilledPlayer = 1.1 Para isso: minLevelThresholdForKilledPlayer = 0 maxLevelThresholdForKilledPlayer = 0
-
data/creaturescripts/scripts/nome_do_arquivo.lua function onAreaCombat(cid, ground, position, aggressive) if aggressive == true and getWorldType() == 1 then return false end return true end data/creaturescripts/scripts/login.lua registerCreatureEvent(cid, "BloquearMagia") data/creaturescripts/creaturescripts.xml <event type="areacombat" name="BloquearMagia" event="script" value="nome_do_arquivo.lua"/>
-
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local parameters = {} local teleports = { ["Random Void"] = {price = 100, position = {x = 0, y = 0, z = 7}} } 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 onCreatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid for name, info in pairs(teleports) do if msgcontains(msg, name) then selfSay("Você quer ir para {".. name .."}?", cid) talkState[talkUser] = 1 parameters[talkUser] = info break end end if talkState[talkUser] == 1 then if msgcontains(msg, "yes") then if doPlayerRemoveMoney(cid, parameters[talkUser].price) then doTeleportThing(cid, parameters[talkUser].position) selfSay("Boa viagem!", cid) else selfSay("Desculpe, você não possui ".. parameters[talkUser].price .." gp para viajar.", cid) talkState[talkUser] = 0 end elseif msgcontains(msg, "no") then selfSay("Tudo bem, volte quando mudar de ideia.", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end end return true end local msg = "Olá, |PLAYERNAME|. Gostaria de viajar? Posso te levar para: " local i = 1 for name, info in pairs(teleports) do msg = msg .." {".. name .."}" .. (i == 1 and "" or ", ") i = i + 1 end npcHandler:setMessage(MESSAGE_GREET, msg) npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, onCreatureSayCallback) npcHandler:addModule(FocusModule:new()) Configure novos locais aqui: local teleports = { ["Random Void"] = {price = 100, position = {x = 0, y = 0, z = 7}} } Sempre colocando vírgula no final da linha, com exceção da última linha. local teleports = { ["Random Void"] = {price = 100, position = {x = 0, y = 0, z = 7}}, ["Terra do Exemplo"] = {price = 777, position = {x = 160, y = 54, z = 7}} }
-
Me lembra um pouco o modo Quarentena do Combat Arms, eu posso fazer, mas levaria um certo tempo.
-
local config = { messages = {"AUSENTE!", "VOLTO JÁ!"}, delay = 10 } local function automessage(cid) if isCreature(cid) then if getCreatureStorage(cid, 101010) == 1 then doCreatureSay(cid, config.messages[math.random(1, #config.messages)], TALKTYPE_ORANGE_1) addEvent(automessage, config.delay * 1000, cid) end end return end function onSay(cid, words, param, channel) if getCreatureStorage(cid, 101010) == -1 then doCreatureSay(cid, config.messages[math.random(1, #config.messages)], TALKTYPE_ORANGE_1) addEvent(automessage, config.delay * 1000, cid) doPlayerSendCancel(cid, "Ausente Ativado") doCreatureSetStorage(cid, 101010, 1) else doPlayerSendCancel(cid, "Ausente Desativado") doCreatureSetStorage(cid, 101010, -1) end return true end
-
pedido Pedido Magic Wall Diferente Em Non Pvp
pergunta respondeu ao KennyConrad de Oneshot em Scripts
Olá, KennyxD Quando você obter uma pedido/dúvida atendido na seção, reporte o tópico clicando em Denunciar e escreva uma mensagem para a moderação, assim ela ficará sabendo do estado do tópico e poderá mover para a seção correta. Sobre o pedido, já que você descobriu como fazer, poderia muito bem partilhar seu conhecimento para com toda comunidade. De qualquer jeito, conheço um modo feito nas sources. Em combat.cpp, procure por: MagicField::onStepInField Dentro do código, procure por e apague: if(isUnstepable() || isBlocking(creature)) { if(!creature->isGhost()) g_game.internalRemoveItem(creature, this, 1); return; } Compile e seja feliz. Reportado. Abraços -
function onSay(cid, words, param) if getCreatureStorage(cid, 15967) < os.time() then return doPlayerPopupFYI(cid, "Apenas VIPs podem recuperar stamina.") end if not doPlayerRemoveItem(cid, 5468, 1) then return doPlayerSendCancel(cid, "Você não possui ".. getItemNameById(5468) ..".") end doPlayerAddStamina(cid, 100000000) doSendMagicEffect(getThingPosition(cd), CONST_ME_HOLYAREA) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você será kickado em 10 segundos para regenerar sua stamina.") addEvent(doRemoveCreature, 10 * 1000, cid, true) return true end
-
Eu criei o sistema para o jogador definir a própria mensagem, digitando !camelo mensagem. A tag que usei para testar foi: <talkaction words="!camelo" event="script" value="nome_do_arquivo.lua"/> Abraços.
-
Você teria que editar seu chat.cpp e adicionar esse recurso.
-
local config = { tile = 407, delay = 8 * 1000 } local function camelo(cid, msg) if not isCreature(cid) then return end if getTileInfo(getThingPosition(cid)).itemid ~= config.tile then return end doCreatureSay(cid, msg, TALKTYPE_ORANGE_1) addEvent(camelo, config.delay, cid, msg) end function onSay(cid, words, param, channel) if param == "" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local position, thing = getThingPosition(cid) thing = getTileInfo(position) if(thing.itemid ~= config.tile) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot use this command here.") end camelo(cid, param) return true end
-
function onStepIn(cid, item, position, fromPosition) if item.actionid == 13700 then local config = { msgDenied = "Você não e vip ,fale com Administrador do Server.", msgWelcome = "Seja Bem Vindo a Area vip." } local toPosition = {x = 0, y = 0, z = 7} if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then doTeleportThing(cid, toPosition, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgDenied) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return TRUE end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgWelcome) end return true end local toPosition = {x = 0, y = 0, z = 7}
-
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 creatureSayCallback(cid, type, msg) local config = { price = 50000, delay = 5 * 60, control = {10555, 10556} } if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid -- Conversa Jogador/NPC if msgcontains(msg, "care") then local p = (config.price % 1000 == 0 and (config.price / 1000) or config.price) if getPlayerStorageValue(cid, config.control[1]) > os.time() then selfSay("Do you want me to take care of your egg for ".. p .." ".. (p == config.price and "" or "k") .."?", cid) else selfSay("Sorry, but I am already caring one of your eggs.", cid) talkState[talkUser] = 1 end elseif msgcontains(msg, "back") then if getPlayerStorageValue(cid, config.control[2]) == 1 then selfSay("Hello, do you came to pick up your egg?", cid) talkState[talkUser] = 2 else selfSay("Sorry, but I am not caring eggs from you.", cid) end elseif msgcontains(msg, "check") then local t = getPlayerStorageValue(cid, config.control[1]) if getPlayerStorageValue(cid, config.control[2]) == -1 then selfSay("Sorry, but I am not caring eggs from you.", cid) else if t < os.time() then selfSay("Yay, your egg has started to hatch, take it.", cid) setPlayerStorageValue(cid, config.control[1], -1) setPlayerStorageValue(cid, config.control[2], -1) else selfSay("I will be caring your egg for more ".. (math.floor((t - os.time()) / 60) > 0 and "".. math.floor((t - os.time()) / 60) .." minutes and" or "") .." ".. (t - os.time()) % 60 .." seconds.", cid) end end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if(doPlayerRemoveItem(cid, 12304, 1) == true) then if doPlayerRemoveMoney(cid, config.price) then setPlayerStorageValue(cid, config.control[1], os.time()+config.delay) selfSay("Okay! Check back soon.", cid) else selfSay("Sorry, you don't have enough money. You need more ".. (config.price - getPlayerMoney(cid)) .." coins.", cid) end else selfSay("I am already taking care of a egg for you.", cid) end elseif msgcontains(msg, "no") then selfSay("Too pricey for you, heh?", cid) elseif talkState[talkUser] == 2 then local x = getPlayerStorageValue(cid, config.control) local t = getPlayerStorageValue(cid, config.control[1]) if msgcontains(msg, "yes") then if x > os.time() then doPlayerAddItem(cid, 4850, 1) doItemSetAttribute(item, "description", "A hatched egg.") selfSay("Take it!", cid) setPlayerStorageValue(cid, control[2], -1) setPlayerStorageValue(cid, control[1], -1) else selfSay("Sorry, but your egg need care for more ".. (math.floor((t - os.time()) / 60) > 0 and "".. math.floor((t - os.time()) / 60) .." minutes and" or "") .." ".. (t - os.time()) % 60 .." seconds.", cid) end end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
O console está acusando a falta de um end para fechar a função onCreatureSayCallback. Verifique o script você mesmo, já que pedaços de script não irão me ajudar a consertar o erro.
-
Se não me engano você pode criar quantos quiser, lembro de um projeto que participei que foram criados ícones para um paínel de magias e os IDs chegaram a 13000 e tantos.
-
Nada contra, mas, meio que uma imagem vale mais que mil palavras: Funciona e você está fazendo algo errado. Abração, cara \o
-
Há só um modo viável de fazer isso, Um creaturescript executado no primeiro login do jogador ao servidor que verifica sua vocação e adiciona skills e maglevel configurados. local config = { [1] = { skills = { [0] = 10, [1] = 10, [2] = 10, [3] = 10, [4] = 10, [5] = 10, [6] = 10 }, maglevel = 0 }, [2] = { skills = { [0] = 10, [1] = 10, [2] = 10, [3] = 10, [4] = 10, [5] = 10, [6] = 10 }, maglevel = 0 }, [3] = { skills = { [0] = 10, [1] = 10, [2] = 10, [3] = 10, [4] = 10, [5] = 10, [6] = 10 }, maglevel = 0 }, [4] = { skills = { [0] = 10, [1] = 10, [2] = 10, [3] = 10, [4] = 10, [5] = 10, [6] = 10 }, maglevel = 0 } } function onLogin(cid) if getCreatureStorage(cid, 909090) ~= -1 then return true end if not config[getPlayerVocation(cid)] then return true end for skill, value in pairs(config[getPlayerVocation(cid)].skills) do doPlayerAddSkill(cid, skill, (value - getPlayerSkillLevel(cid, skill)), true) end doPlayerAddMagLevel(cid, (config[getPlayerVocation(cid)].maglevel - getPlayerMagLevel(cid, true))) doCreatureSetStorage(cid, 909090, 1) return true end Só configurar SKILL_FIRST = 0 SKILL_FIST = SKILL_FIRST SKILL_CLUB = 1 SKILL_SWORD = 2 SKILL_AXE = 3 SKILL_DISTANCE = 4 SKILL_SHIELD = 5 SKILL_FISHING = 6 Abraços.
- 3 respostas
-
- skill inicial
- otserv
-
(e 1 mais)
Tags:
-
Quando você diz SQL, você se refere ao SQLite, não é? Terminado na extensão .s3db? Se sim, basta abrir o seu editor SQLite, aquele com o ícone de uma pena azul serve e executar a seguinte query: DELETE FROM players WHERE lastlogin < strftime("%s", "now") - 20*24*60*60 Isso vai deletar personagens inativos por 20 dias. Se quiser adicionar também uma verificação de level: DELETE FROM players WHERE lastlogin < strftime("%s", "now") - 14*24*60*60 AND level < 30 Deletará personagens inativos por duas semanas e abaixo do level 30.
-
function onStatsChange(cid, attacker, type, combat, value) local status = getCreatureStorage(cid, 999999) if(type == STATSCHANGE_HEALTHLOSS) then if(status < os.time()) then return true end return false end return true end Este é um simples rascunho de um creaturescript que anula qualquer dano no jogador se o valor de um certo storage ser maior que o os.time(). Ou seja em uma magia qualquer, você poderia fazer isso: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) function onCastSpell(cid, var) local status = getCreatureStorage(cid, 999999) if status > os.time() then return doPlayerSendCancel(cid, "O efeito da magia está ativo.") end doCreatureSetStorage(cid, 999999, os.time() + 15) doCombat(cid, combat, var) return true end A magia vai "setar" o storage 15 segundos maior que o os.time(), executado em conjunto com o creaturescript, durante 15 segundos o jogador irá anular qualquer dano. Abraços.
-
Existem vários sistemas VIP no fórum e absolutamente nenhum é do seu agrado? Então está na hora de aprender Lua e começar a programar as coisas que te agradam, não acha? Há varios sistemas VIP que cumprem com suas "exigências": Vip System By Account 1.0 Perfect Vip System 2.0 Esses dois possuem o sistema de tile apenas para VIPs e o comando de adicionar vip apenas para ADMs você mesmo pode fazer mudando o campo access na hora de configurar a talkaction. Abraços.
-
Tem certeza? Colocou o uniqueid 13586 no piso?
-
Estranho, dá algum erro no script? Você está usando o item de ID 8310 como você pediu?
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.