Ir para conteúdo

Diiego Liima

Membro
  • Registro em

  • Última visita

Tudo que Diiego Liima postou

  1. qual você esta usando ?
  2. inactiveHouses.lua adicione no globalevents.. <globalevent name="checkhouses" type="startup" event="script" value="inactiveHouses.lua"/>
  3. sim vai adicionando e testando. o você pode pedir para algum programador fazer direto no talkactions.xml e la vc coloca em todas as tags de uso
  4. function onSay(cid, words, param, channel) if(not checkExhausted(cid, 666, 10)) then return true end Adiciona dentro do seu script
  5. baixa na net.. Map Editor Client ID
  6. sim tiver usando map client id, vc tem que converte o Mapa.. para Client ID
  7. -- Diiego Liima local posInicio = {x = 5057, y = 3539, z = 7} --pos inicio da sala local posFim = {x = 5078, y = 3562, z = 7}--pos final inicio da sala local posExitTime = {x = 5064, y = 3519, z = 7}-- pos para onde o player vai sair local function verificaPlayers() for x = posInicio.x, posFim.x do for y = posInicio.y, posFim.y do if isPlayer(getThingFromPos({x = x, y = y, z = posInicio.z, stackpos = 253}).uid) then return 1 end end end end local function verificaBoss() for x = posInicio.x, posFim.x do for y = posInicio.y, posFim.y do if isMonster(getThingFromPos({x = x, y = y, z = posInicio.z, stackpos = 253}).uid) then doRemoveCreature(getThingFromPos({x = x, y = y, z = posInicio.z, stackpos = 253}).uid) end end end end local function removePlayersTime() for x = posInicio.x, posFim.x do for y = posInicio.y, posFim.y do local remove, clean = true, true local pos = {x = x, y = y, z = posInicio.z} local m = getTopCreature(pos).uid if m ~= 0 and isPlayer(m) then doTeleportThing(m, posExitTime) end end end doSendMagicEffect(posExitTime, 10) return true end function onUse(cid, item, frompos, item2, topos) -- Lever Boss if item.aid == 5130 then -- action id da alavanca local playerChecked = false local teleportToRoom = false local stoExhaust = 5534241 -- staorage de segurança para exhaust local stoExhaustPlayer = getPlayerStorageValue(cid, stoExhaust) if stoExhaustPlayer > os.time() then doPlayerSendCancel(cid, "You have to wait " .. stoExhaustPlayer - os.time() .. " seconds to try again.") return true end if verificaPlayers() then doPlayerSendCancel(cid, "There are other players inside the room at the moment.") doSendMagicEffect(topos,2) setPlayerStorageValue(cid, stoExhaust, os.time()+5) return true end local config = { [1] = {pos = {x = 5066, y = 3525, z = 7}}, --posições dos pisos [2] = {pos = {x = 5067, y = 3525, z = 7}}, [3] = {pos = {x = 5068, y = 3525, z = 7}}, [4] = {pos = {x = 5069, y = 3525, z = 7}}, [5] = {pos = {x = 5070, y = 3525, z = 7}}, } local storageTime = 5534240 -- storage de tempo for i, v in pairs(config) do if isPlayer(getTopCreature(config[i].pos).uid) then player = getTopCreature(config[i].pos).uid if getPlayerStorageValue(player, storageTime) > os.time() then time = (getPlayerStorageValue(player, storageTime)-os.time())/60 str = "minutes" if time > 60 then time = time/60 str = "hours" end if player == cid then name = "You" else name = getCreatureName(player) end doPlayerSendCancel(cid, name .. " need to wait more " .. math.floor(time+0.5) .. " " .. str .. " to do again.") doSendMagicEffect(topos,2) return true end if player == cid then playerChecked = true end end end if playerChecked then for i, v in pairs(config) do if isPlayer(getTopCreature(config[i].pos).uid) then player = getTopCreature(config[i].pos).uid doSendMagicEffect(getCreaturePosition(player), 2) doTeleportThing(player, {x = 5067, y = 3546, z = 7}) -- posiçao que player vai cair dentro da sala setPlayerStorageValue(player, storageTime, os.time()+72000) -- 20 horas teleportToRoom = true end end if teleportToRoom then stopEvent(ResetArea) verificaBoss() doSendMagicEffect({x = 5067, y = 3549, z = 7}, 10) -- efeito aonde o boss nasce doCreateMonster("Boss", {x = 5067, y = 3549, z = 7}) -- onde o boss nasce ResetArea = addEvent(function() removePlayersTime() end, 20 * 60 * 1000) -- tempo dentro da sala return false end else doPlayerSendCancel(cid, "Wouldn't you like to go too?") doSendMagicEffect(topos,2) end return true end end
  8. -- Diiego. -- =============== COMBAT VARS =============== -- Areas/Combat for 0ms local combat0_Brush = createCombatObject() setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat0_Brush,createCombatArea({{1, 1, 0, 0, 0, 1, 1}, {1, 1, 0, 0, 0, 1, 1}, {0, 0, 1, 1, 1, 0, 0}, {0, 0, 1, 2, 1, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, {1, 1, 0, 0, 0, 1, 1}, {1, 1, 0, 0, 0, 1, 1}})) function getDmg_Brush(cid, level, maglevel) return (300000)*-1,(310000)*-1 end setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") local dfcombat0_Brush = {CONST_ANI_EXPLOSION,1,1,2,2,3,2,3,3,2,3,1,0,0,1,-1,1,-1,0,-1,-1,0,-1,1,-1,-2,2,-2,3,-3,3,-3,2,-2,-2,-3,-2,-2,-3,-3,-3,2,-2,2,-3,3,-2,3,-3}local combat0_Brush_2 = createCombatObject() setCombatParam(combat0_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_BATS) setCombatParam(combat0_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat0_Brush_2,createCombatArea({{0, 0, 0, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 0, 0, 0}, {0, 1, 1, 0, 0, 0, 1, 1, 0}, {1, 1, 1, 0, 2, 0, 1, 1, 1}, {0, 1, 1, 0, 0, 0, 1, 1, 0}, {0, 0, 0, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 0, 0, 0}})) function getDmg_Brush_2(cid, level, maglevel) return (300000)*-1,(310000)*-1 end setCombatCallback(combat0_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2") local dfcombat0_Brush_2 = {CONST_ANI_WHIRLWINDCLUB,1,2,1,3,0,3,-1,3,-1,2,0,2,-2,1,-3,1,-3,0,-3,-1,-2,-1,-2,0,-4,0,0,4,2,1,3,1,3,0,2,0,2,-1,3,-1,4,0,1,-2,0,-2,-1,-2,-1,-3,0,-3,1,-3,0,-4} -- =============== CORE FUNCTIONS =============== local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part if (isCreature(cid)) then doCombat(cid, c, var) if (dirList ~= nil) then -- Emit distance effects local i = 2; while (i < #dirList) do doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1]) i = i + 2 end end end end function onCastSpell(cid, var) local startPos = getCreaturePosition(cid) RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos) RunPart(combat0_Brush_2,cid,var,dfcombat0_Brush_2,startPos) return true end
  9. ele so vai catar dinheiro. se vc remover as opções de !add ; ue so remover o talk
  10. cd /home/otserv/src make clean make
  11. <instant name="Espiritos do Inferno" words="espiritos do inferno!" lvl="200" mana="8350" selftarget="1" exhaustion="10000" groups="1,10000" icon="87" needlearn="0" event="script" value="attack/magia.lua"> <vocation id="12"/> </instant> local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, true) arr = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 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, 3, 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, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } local area = createCombatArea(arr) setCombatArea(combat, area) function spellCallback(param) if param.count > 0 or math.random(0, 1) == 1 then doSendMagicEffect(param.pos, CONST_ME_MORTAREA) doAreaCombatHealth(param.cid, COMBAT_DEATHDAMAGE, param.pos, 0, -3000, -9000, CONST_ME_EXPLOSIONHIT) end if(param.count < 5) then param.count = param.count + 1 addEvent(spellCallback, math.random(1000, 4000), param) end end function onCastSpell(cid, var) doPlayerSetPzLocked(cid) return doCombat(cid, combat, var) end function onTargetTile(cid, pos) local param = {} param.cid = cid param.pos = pos param.count = 0 spellCallback(param) end setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") function onCastSpell(cid, var) doSetCreatureOutfit(cid,{lookType = 290, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons}, 18 * 1000) return doCombat(cid, combat, var) end
  12. sim vc tera que fazer um sistema de Quiver. na sua source. pra usar com backpack o bolt.
  13. qual bug explica melhor. vc pode por 100 de carga. caso vc quer criar um item com adm com mais cargas. so fazer /i stone skin amulet, 5000
  14. <item id="6529" article="a" name="infernal bolt"> <attribute key="weight" value="4400"/> <attribute key="attack" value="80"/> <attribute key="shootType" value="infernalbolt"/> <attribute key="weaponType" value="distance"/> <attribute key="breakChance" value="0" /> <attribute key="hitChance" value="100"/> <attribute key="range" value="6"/> </item> Você pode usar asim, no caso a infernal bolt n precisarar de bow. ou crossbow se você quer que use com o bow ou crossbow, vocè tem que criar um sistema novo igual da versao 12x Quiver System. ai vc consegue usar o bolts. arrows, dentro de um bag no Slot D0 Escudo
  15. local storage = 18481 -- storage que salva a ultima vez que o player entrou (pra evitar spams) STAMINA_MESSAGE = "Você ganhou 1 minutos de Stamina." STAMINA_TIME = 60 * 2000 STAMINA_EFFECT = 12 STAMINA_ADD = 1 function event(cid) if isPlayer(cid) then doPlayerAddStamina(cid, STAMINA_ADD) doPlayerSendTextMessage(cid, 27, STAMINA_MESSAGE) eventCheck = addEvent(event, STAMINA_TIME, cid) end end function onStepIn(cid, item, position, fromPosition, pos) if isPlayer(cid) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Bem-vindo a área de treino, você receberá 1 de stamina a cada 2 minutos.") eventCheck = addEvent(event, STAMINA_TIME, cid) end return true end function onStepOut(cid, item, position, fromPosition) if isPlayer(cid) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você parou de treinar, agora não está mais regenerando Stamina.") stopEvent(eventCheck) end return true end function onStepIn(cid, item, pos, lastPos, fromPos, toPos, actor) if getPlayerStorageValue(cid, storage) - os.time() <= 0 then fazQualquerCoisa(cid, position) else doTeleportThing(cid, fromPos) doPlayerSendCancel(cid, "You gotta wait a few seconds before you can enter trainning room again") end return true end
  16. -- Stamine Trainer -- <movevent type="StepIn" actionid="22120" event="script" value="stamine_trainer.lua"/> -- <movevent type="StepOut" actionid="22120" event="script" value="stamine_trainer.lua"/> STAMINA_MESSAGE = "Você ganhou 1 minutos de Stamina." STAMINA_TIME = 60 * 2000 STAMINA_EFFECT = 12 STAMINA_ADD = 1 function event(cid) if isPlayer(cid) then doPlayerAddStamina(cid, STAMINA_ADD) doPlayerSendTextMessage(cid, 27, STAMINA_MESSAGE) eventCheck = addEvent(event, STAMINA_TIME, cid) end end function onStepIn(cid, item, position, fromPosition, pos) if isPlayer(cid) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Bem-vindo a área de treino, você receberá 1 de stamina a cada 2 minutos.") eventCheck = addEvent(event, STAMINA_TIME, cid) end return true end function onStepOut(cid, item, position, fromPosition) if isPlayer(cid) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você parou de treinar, agora não está mais regenerando Stamina.") stopEvent(eventCheck) end return true end
  17. Oque vc procura se chama reward system
  18. utilizando mysql ou sqlite?
  19. executou as 3 tabela que te mandei ai.. voce esta usando. mysql ou sqlite?
  20. CREATE TABLE `castle48h_config` ( `guild_id` int(10) NOT NULL, `day` int(11) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO `castle48h_config` (`guild_id`, `day`) VALUES CREATE TABLE `castle_dono` ( `id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `type` varchar(255) NOT NULL, `action` varchar(255) NOT NULL, `param1` varchar(255) NOT NULL, `param2` varchar(255) NOT NULL, `param3` varchar(255) NOT NULL, `param4` varchar(255) NOT NULL, `param5` varchar(255) NOT NULL, `param6` varchar(255) NOT NULL, `param7` varchar(255) NOT NULL, `delete_it` int(2) NOT NULL DEFAULT '1', `guild_id` int(11) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Informação Importante

Confirmação de Termo