Ir para conteúdo

loreal

Membro
  • Registro em

  • Última visita

Tudo que loreal postou

  1. ainda n amigo
  2. gostaria de que os hits dessa spell n pegar em pz alguém pode ajudar ? local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, TRUE) setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 36) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -5.4, -50, -5.0, 50) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_BLOCKARMOR, TRUE) setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 36) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -5.4, -50, -5.0, 50) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat3, COMBAT_PARAM_BLOCKARMOR, TRUE) setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 36) setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -5.4, -50, -5.0, 50) local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat4, COMBAT_PARAM_BLOCKARMOR, TRUE) setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 36) setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -5.4, -50, -5.0, 50) local combat5 = createCombatObject() setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat5, COMBAT_PARAM_BLOCKARMOR, TRUE) setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 36) setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -5.4, -50, -5.0, 50) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, parameters.combat2, parameters.var) end local function onCastSpell3(parameters) doCombat(parameters.cid, parameters.combat3, parameters.var) end local function onCastSpell4(parameters) doCombat(parameters.cid, parameters.combat4, parameters.var) end local function onCastSpell5(parameters) doCombat(parameters.cid, parameters.combat5, parameters.var) end function onCastSpell(cid, var) local arrows = {7368} -- weaspon que podem ser utilizadas local ammo = isInArray(arrows, getPlayerSlotItem(cid, CONST_SLOT_AMMO).itemid) and getPlayerSlotItem(cid, CONST_SLOT_AMMO) or isInArray(arrows, getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid) and getPlayerSlotItem(cid, CONST_SLOT_LEFT) or isInArray(arrows, getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid) and getPlayerSlotItem(cid, CONST_SLOT_RIGHT) or nil if ammo and doRemoveItem(ammo.uid, 5) then local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5} addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 500, parameters) addEvent(onCastSpell3, 700, parameters) addEvent(onCastSpell4, 900, parameters) addEvent(onCastSpell5, 1000, parameters) return TRUE else doPlayerSendCancel(cid, "Você precisa estar equipado com uma crystal arrow.") return FALSE end end
  3. loreal postou uma resposta no tópico em Suporte Tibia OTServer
    já so foi eu copilar uma source que depois começou dar esse erro. configurações do meu pc System Information ------------------ Time of this report: 11/24/2014, 02:10:35 Machine name: Loreal Operating System: Windows 7 Ultimate 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.140303-2144) Language: Portuguese (Regional Setting: Portuguese) System Manufacturer: System manufacturer System Model: System Product Name BIOS: BIOS Date: 08/08/13 16:50:31 Ver: 04.06.04 Processor: AMD A8-3870 APU with Radeon HD Graphics (4 CPUs), ~3.0GHz Memory: 4096MB RAM Available OS Memory: 4076MB RAM Page File: 7185MB used, 3356MB available Windows Dir: C:\Windows DirectX Version: DirectX 11 DX Setup Parameters: Not found User DPI Setting: 120 DPI (125 percent) System DPI Setting: 96 DPI (100 percent) DWM DPI Scaling: Disabled ------------------------------------------------ Card name: AMD Radeon HD 6670 Manufacturer: Advanced Micro Devices, Inc. Chip type: AMD Radeon Graphics Processor (0x6758) DAC type: Internal DAC(400MHz) Device Key: Enum\PCI\VEN_1002&DEV_6758&SUBSYS_25451458&REV_00 Display Memory: 2797 MB Dedicated Memory: 1015 MB Shared Memory: 1781 MB Current Mode: 1920 x 1080 (32 bit) (60Hz) Monitor Name: Monitor Genérico PnP Monitor Model: IPS224 Monitor Id: GSM58D5 Native Mode: 1920 x 1080(p) (60.000Hz)5 up
  4. loreal postou uma resposta no tópico em Suporte Tibia OTServer
    up
  5. loreal postou uma resposta no tópico em Suporte Tibia OTServer
    troquei pasta logs n deu certo pode me ajudar ?
  6. loreal postou uma resposta no tópico em Suporte Tibia OTServer
    todos executável estão dando esse erro alguém pode me ajudar ? HELP ME
  7. loreal postou uma resposta no tópico em Suporte Tibia OTServer
    queria deixar essa mod para god abrir com comando /war open! <?xml version="1.0" encoding="UTF-8"?> <mod name="Team Event" version="2.0" author="Damadgerz" contact="[email protected]" enabled="yes"> <description> Full auto Team BattleEvent(v2.0) for 0.4 : 1- I currently rescripted this event from scratch again. 2- This version is much more better than the one before, it is more cleaner, clearer and with more options. 3- This version was tested on 0.4 latest one 4626, should work on lower rev too. 4- Removed the npc part it is now based on tp creation. 5- More silent boradcasting for in event progress and no spam, I hope! 6- you now get the options to show event stats on cancel msg area and (to / not to) show left players with names each x interval. 8- Team balancer have been added to only balance count in both teams. 9- Added a countdown option before fight starts. 10- Now starts on a defined time every day </description> <config name="teamSetting"><![CDATA[ --[[Local Config]]-- --//storages inBlue = 9900 inRed = 9901 joiner = 9907 blueKills = 9902 redKills = 9903 eventRecruiting = 9904 eventStarted = 9905 eventTime = 9906 itemToGet = 9908 countItemToGet = 9909 nextExecute = 9910 blueCount = 9911 redCount = 9912 --// Positions teleporterPosition = {x = 997, y = 1177, z = 7} --Place where the event tp will be created waitRoomPlace = {x = 555, y = 291, z = 7} --Place of the waitnig room (the place ppl will wait for team to be full) waitRoomDimensions = { --Enter the start pos[top left sqm] and end pos[bottom right sqm] of waitnig room here startPos = {x = 549, y = 288, z = 7}, endPos = {x = 549, y = 288, z = 7} } eventPlaceDimensions = { --Enter the start pos[top left sqm] and end pos[bottom right sqm] of event place here startPos = {x = 452, y = 280, z = 7}, endPos = {x = 642, y = 410, z = 7} } blueTeamPos = {x = 518, y = 325, z = 7} redTeamPos = {x = 568, y = 354, z = 7} --// General settings recruitTime = 1 -- Time in minutes to gather players to event, will broadcast event started each min minimumPlayersJoins = 2 --If the number of layer joined is less than that then event would be cancelled balanceTeams = true -- This will balance number of players in both teams the extra player will be kicked out of event removeTeleportOnEventEnd = false -- if you want to remove the tp when the event finish set it to true, normally tp will just be diabled eventMaxTime = 50 -- Time in minutes, this is the max time event will be running. After checks are caried winner is declared showEventSats = true -- This is like a timer that is always there about event stats (time,oponents left, teammates left). It appears in the cancel messages place. sendLeftPlayers = true -- Well this will send to all alive players the names& numebr of the oponents left each interval defined down intervalToSendLeftPlayers = 11 -- interval(in seconds) to sendLeftPlayers , must be more than 10 sec countDownOnStart = true -- Well this occurs when players are teleported to their places in the arena , so if this is true it start to count down to the joined players then when count down finish they can start killing each other(event really begins) countDownFrom = 10 -- Starts count down from this number when event start, if above is set true minJoinLevel = 50 -- minimm lvl that can join event rewards = { --Example [%] = { {itemid/name, count} ,..........} count isnt more than 100 [65] = {}, [25] = {}, [10] = {} } --[[ Note : make sure if you edited % that sum should be equal to 100, you can add more % elements to suit your needs also more items if you want in each % [65],[25],[10] -> is the % of this item to be found the rest is clear ,items in each % and it will be chosen randomly]]-- ]]></config> <lib name="teamFunctions"><![CDATA[ domodlib('teamSetting') --[[Conditions don't touch]]-- local bmale = createConditionObject(CONDITION_OUTFIT) setConditionParam(bmale, CONDITION_PARAM_TICKS, -1) addOutfitCondition(bmale, {lookType = math.random(128,134), lookHead = 88, lookBody = 88, lookLegs = 88, lookFeet = 88, lookTypeEx = 0, lookAddons = 3}) local bfemale = createConditionObject(CONDITION_OUTFIT) setConditionParam(bfemale, CONDITION_PARAM_TICKS, -1) addOutfitCondition(bfemale, {lookType = math.random(136,142), lookHead = 88, lookBody = 88, lookLegs = 88, lookFeet = 88, lookTypeEx = 0, lookAddons = 3}) local rmale = createConditionObject(CONDITION_OUTFIT) setConditionParam(rmale, CONDITION_PARAM_TICKS, -1) addOutfitCondition(rmale, {lookType = math.random(128,134), lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94, lookTypeEx = 0, lookAddons = 3}) local rfemale = createConditionObject(CONDITION_OUTFIT) setConditionParam(rfemale, CONDITION_PARAM_TICKS, -1) addOutfitCondition(rfemale, {lookType = math.random(136,142),lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94, lookTypeEx = 0, lookAddons = 3}) local infight = createConditionObject(CONDITION_INFIGHT,-1) --[[Local Config]]-- --[[Functions]]-- -- General info function isFightOn() return getStorage(eventStarted) > 0 end function isRecruitOn() return getStorage(eventRecruiting) > 0 end function getMinJoinLevel() return minJoinLevel end function getJoiners() joiners = {} for _,cid in ipairs(getPlayersOnline()) do if isJoiner(cid) then if isInRecruitArea(cid) or isInFightArea(cid) then table.insert(joiners,cid) end end end return joiners end function getLeftMembersNames(team) str = "Oponents left("..#team..") :" left = "" for k,cid in ipairs(team) do left = (left ..""..(k == 1 and "" or ", ")..""..getCreatureName(cid).."["..getPlayerLevel(cid).."]" ) end str = str .." " .. (left == "" and "none" or left).. "." return str end function disPlayEventStats() if not showEventSats then return false end if getStorage(eventTime) - os.time() <= 0 then return false end left = os.date("%M:%S",(getStorage(eventTime) - os.time())) for _,cid in ipairs(getJoiners()) do oponentsLeft = isBlue(cid) and #getRedMembers() or #getBlueMembers() teamMatesLeft = isBlue(cid) and math.max(0,#getBlueMembers()-1) or math.max(0,#getRedMembers()-1) doPlayerSendCancel(cid,"Time left: ".. left.." || Oponents left: "..oponentsLeft.."/"..oponentCount(cid).." || Team-mates left: "..teamMatesLeft.."/".. math.max(0,matesCount(cid)-1)) end end function doSendLeftPlayers() if not sendLeftPlayers then return false end if intervalToSendLeftPlayers <= 40 then return false end for _,cid in ipairs(getJoiners()) do doPlayerSendTextMessage(cid,MESSAGE_TYPES["orange"],getLeftMembersNames(isRed(cid) and getBlueMembers() or getRedMembers())) end end function getBlueMembers() members = {} for _,cid in ipairs(getPlayersOnline()) do if isBlue(cid) then table.insert(members,cid) end end return members end function getRedMembers() members = {} for _,cid in ipairs(getPlayersOnline()) do if isRed(cid) then table.insert(members,cid) end end return members end -- starting fight function startRecruiting() doSetStorage(eventRecruiting,1) end function startEvent() doSetStorage(eventRecruiting,-1) if removeTeleportOnEventEnd then tp = getTileItemById(teleporterPosition,1387).uid if tp > 0 then doRemoveItem(tp) end end if not balanceTeams() then resetEvent() return false end for _,cid in ipairs(getBlueMembers()) do doTeleportThing(cid,blueTeamPos,false) doSendMagicEffect(getThingPos(cid),10) end setBlueCount(#getBlueMembers()) for _,cid in ipairs(getRedMembers()) do doTeleportThing(cid,redTeamPos,false) doSendMagicEffect(getThingPos(cid),10) end setRedCount(#getRedMembers()) startCountDown() return true end function setBlueCount(count) doSetStorage(blueCount,-1) doSetStorage(blueCount,count) end function oponentCount(cid) return isBlue(cid) and getStorage(redCount) or getStorage(blueCount) end function matesCount(cid) return isBlue(cid) and getStorage(blueCount) or getStorage(redCount) end function setRedCount(count) doSetStorage(redCount,-1) doSetStorage(redCount,count) end function balanceTeams() members = getJoiners() if #members < minimumPlayersJoins then doBroadcastMessage("Team-Evento War was cancelled as only ".. #members .. " players joined.") return false end if (math.mod(#members,2) ~= 0) then kicked = members[#members] clearTeamEventStorages(kicked) doPlayerSendTextMessage(kicked,MESSAGE_TYPES["info"],"Desculpe, voce foi expulso do evento para equilibrar as duas equipes.") end count = 1 for _,cid in ipairs(getJoiners()) do if (math.mod(count,2) ~= 0) then addToBlue(cid) else addToRed(cid) end count = count + 1 end return true end function startCountDown() if(countDownOnStart) then for _,cid in ipairs(getJoiners()) do doCreatureSetNoMove(cid,true) for i = 0,countDownFrom do addEvent(doPlayerSendTextMessage,i*1000, cid, MESSAGE_TYPES["info"], (i == 0 and countDownFrom or countDownFrom-i) ) end end addEvent(startFight,(countDownFrom+1)*1000) else startFight() end end function startFight() doSetStorage(eventStarted,1) for _,cid in ipairs(getJoiners()) do doCreatureSetNoMove(cid,false) doPlayerSendTextMessage(cid,MESSAGE_TYPES["warning"],"EVENTO WAR INICIADO!") end addEvent(endTeamEvent,eventMaxTime*60*1000,"maxTime") doSetStorage(eventTime,os.time()+eventMaxTime*60) end function teleportToWaitRoom(cid) doTeleportThing(cid,waitRoomPlace) doSendMagicEffect(waitRoomPlace,10) if getPlayerGroupId(cid) < 4 then addToJoiners(cid) end doPlayerSendTextMessage(cid,MESSAGE_TYPES["blue"],"Por favor, seja paciente ate inicio do evento!.") return true end -- Modifing teams & checking member states function isBlue(cid) return (getPlayerStorageValue(cid,inBlue) > 0) end function isRed(cid) return (getPlayerStorageValue(cid,inRed) > 0) end function isJoiner(cid) return (getPlayerStorageValue(cid,joiner) > 0) end function addToBlue(cid) setPlayerStorageValue(cid,inBlue,1) doAddCondition(cid, (getPlayerSex(cid) == 1) and bmale or bfemale) doAddCondition(cid,infight) end function addToRed(cid) setPlayerStorageValue(cid,inRed,1) doAddCondition(cid, (getPlayerSex(cid) == 1) and rmale or rfemale) doAddCondition(cid,infight) end function addToJoiners(cid) setPlayerStorageValue(cid,joiner,1) end function removeFromBlue(cid) setPlayerStorageValue(cid,inBlue,-1) end function removeFromRed(cid) setPlayerStorageValue(cid,inRed,-1) end function removeFromjoiners(cid) setPlayerStorageValue(cid,joiner,-1) end function isInRecruitArea(cid) return isInRange(getThingPos(cid),waitRoomDimensions.startPos,waitRoomDimensions.endPos) end function isInFightArea(cid) return isInRange(getThingPos(cid),eventPlaceDimensions.startPos,eventPlaceDimensions.endPos) end function clearTeamEventStorages(cid) if isInRecruitArea(cid) or isInFightArea(cid) then doTeleportThing(cid,getTownTemplePosition(getPlayerTown(cid))) doSendMagicEffect(getThingPos(cid),10) end if isFightOn() then if isJoiner(cid) then if isBlue(cid) then addRedKills() elseif isRed(cid) then addBlueKills() end doPlayerSendTextMessage(cid,MESSAGE_TYPES["orange"],"You have died in Team-Battle Event.") end end removeFromjoiners(cid) removeFromBlue(cid) removeFromRed(cid) doRemoveConditions(cid, false) end function haveUnrecivedReward(cid) return getPlayerStorageValue(cid,itemToGet) > 0 and getPlayerStorageValue(cid,countItemToGet) > 0 end function recieveLateReward(cid) if haveUnrecivedReward(cid) then if not doPlayerAddItem(cid,getPlayerStorageValue(cid,itemToGet),getPlayerStorageValue(cid,countItemToGet),false) then msg = "You need to free some space then relog to take your reward." doPlayerSendTextMessage(cid,MESSAGE_TYPES["warning"],msg) else setPlayerStorageValue(cid,itemToGet,-1) setPlayerStorageValue(cid,countItemToGet,-1) doPlayerSendTextMessage(cid,MESSAGE_TYPES["info"],"You have recieved your reward.") end end end -- Win or lose function thereIsAWinner() if redWon() or blueWon() then return true end return false end function blueWon() return( (#getBlueMembers() > 0 ) and ( #getRedMembers() == 0) ) end function redWon() return( (#getRedMembers() > 0) and (#getBlueMembers() == 0) ) end function isDraw() return #getBlueMembers() == #getRedMembers() end function getWinner() if #getBlueMembers() > #getRedMembers() then return {getBlueMembers(),getRedMembers(),"Blue team won."} elseif #getRedMembers() > #getBlueMembers() then return {getRedMembers(),getBlueMembers(),"Red team won."} else return { {},{},"it was a draw."} end end -- Adding kills function addBlueKills() doSetStorage(blueKills, math.max(1,getStorage(blueKills)+1)) end function addRedKills() doSetStorage(redKills, math.max(1,getStorage(redKills)+1)) end -- Ending event function endTeamEvent(type) if isFightOn() then doSetStorage(eventStarted,-1) doBroadcastMessage("Team-Evento War ended and "..getWinner()[3]) if not isDraw() then win(getWinner()[1],type) lose(getWinner()[2],type) else draw() end end addEvent(resetEvent,2 * 1000) --- tp player to home remove all storages and reset event global storages end function getPercent() rand= math.random(1,100) prev = 0 chosenItem = 0 for k, v in pairs(rewards) do if rand > prev and rand <= k+prev then chosenItem = k break else prev = k+prev end end return chosenItem end function generateReward(cid) percent = getPercent() if percent == 0 then print("Error in the reward item. Please inform Doggynub.") return true end randomizer = rewards[percent][math.random(1,#rewards[percent])] item = not tonumber(randomizer[1]) and getItemIdByName(randomizer[1]) or randomizer[1] count = isItemStackable(item) and math.min(randomizer[2],100) or 1 if item == nil or item == 0 then print("Error in the item format. Please inform Doggynub.") return true end msg = "You have won ".. (count == 1 and "a" or count) .." " .. getItemNameById(item) .. "" .. (count == 1 and "" or "s").."." if not doPlayerAddItem(cid,item,count,false) then msg = msg.. "You need to free some space then relog to take your reward." setPlayerStorageValue(cid,itemToGet,item) setPlayerStorageValue(cid,countItemToGet,count) end doPlayerSendTextMessage(cid,MESSAGE_TYPES["white"],msg) end function generateStatsMessage(cid, type, stats) msg = { ["KO"] = { ["win"] = "Event ended. Your team have won by killing all oponent's team members. You will recieve your reward shortly, check incoming messages.", ["lose"] = "Event ended. Your team have lost as the Oponent team killed all your team's members." }, ["maxTime"] = { ["win"] = "Event max-time finished and your team have won. You will recieve your reward shortly, check incoming messages.", ["lose"] = "Event max-time finished and your team have lost.", ["draw"] = "Event max-time finished and it is a draw.(no team won)" } } doPlayerSendTextMessage(cid,MESSAGE_TYPES["info"],msg[type][stats]) end function win(winners,type) for _,cid in ipairs(winners) do generateStatsMessage(cid, type, "win") generateReward(cid) end end function lose(losers,type) for _,cid in ipairs(losers) do generateStatsMessage(cid, type, "lose") end end function draw() for _,cid in ipairs(getJoiners()) do generateStatsMessage(cid, "maxTime", "draw") end end function resetEvent() doSetStorage(eventRecruiting,-1) doSetStorage(nextExecute,-1) doSetStorage(eventStarted,-1) doSetStorage(eventTime,-1) doSetStorage(blueKills,-1) doSetStorage(redKills,-1) for _,cid in ipairs(getPlayersOnline()) do if isBlue(cid) or isRed(cid) or isJoiner(cid) then clearTeamEventStorages(cid) end end end ]]></lib> <event type="login" name="teambattleLogin" event="script"><![CDATA[ domodlib('teamFunctions') function onLogin(cid) clearTeamEventStorages(cid) recieveLateReward(cid) registerCreatureEvent(cid, "teamEventStats") registerCreatureEvent(cid, "teambattleLogout") registerCreatureEvent(cid, "teambattleCombat") return true end ]]></event> <event type="combat" name="teambattleCombat" event="script"><![CDATA[ domodlib('teamFunctions') function onCombat(cid, target) if isFightOn() then if isBlue(cid) and isBlue(target) then return false end if isRed(cid) and isRed(target) then return false end end return true end ]]></event> <event type="logout" name="teambattleLogout" event="script"><![CDATA[ domodlib('teamFunctions') function onLogout(cid) clearTeamEventStorages(cid) if thereIsAWinner() then endTeamEvent("KO") end return true end ]]></event> <event type="statschange" name="teamEventStats" event="script"><![CDATA[ domodlib('teamFunctions') corpse_ids = { [0] = 3065, -- female [1] = 3058 -- male } function onStatsChange(cid, attacker, type, combat, value) if combat == COMBAT_HEALING then return true end if getCreatureHealth(cid) > value then return true end if isInFightArea(cid) and isFightOn() then if isBlue(cid) or isRed(cid) then corpse = doCreateItem(corpse_ids[getPlayerSex(cid)], 1, getThingPos(cid)) doCreateItem(2016, 2, getThingPos(cid)) clearTeamEventStorages(cid) doItemSetAttribute(corpse, "description", "You recognize "..getCreatureName(cid)..". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".\n[Team-Event kill]") doCreatureAddHealth(cid,getCreatureMaxHealth(cid)) if thereIsAWinner() then endTeamEvent("KO") end return false end end return true end ]]></event> <globalevent name = "teamBattleStart" time="16:04:00" event="script"><![CDATA[ domodlib('teamFunctions') function onTime() resetEvent() if getTileItemById(teleporterPosition,1387).uid < 1 then tp = doCreateItem(1387,1,teleporterPosition) doItemSetAttribute(tp, "aid", 9990) end startRecruiting() for i = 0, recruitTime-1 do addEvent(doBroadcastMessage, i * 60* 1000,"Team-Evento War is recruting players by entering event tp. Fight begins in "..(i == 0 and recruitTime or recruitTime-i).." minutes.",MESSAGE_TYPES["warning"]) end addEvent(startEvent, recruitTime * 60 * 1000) return true end ]]></globalevent> <globalevent name = "teamBattletime" interval="1" event="script"><![CDATA[ domodlib('teamFunctions') function onThink() if isFightOn() then disPlayEventStats() if getStorage(nextExecute) == -1 or getStorage(nextExecute) <= os.time() then doSendLeftPlayers() doSetStorage(nextExecute,os.time()+intervalToSendLeftPlayers) end end return true end ]]></globalevent> <movevent type="StepIn" actionid="9990" event="script"><![CDATA[ domodlib('teamFunctions') function onStepIn(cid, item, position, fromPosition) if not isRecruitOn() then doPlayerSendTextMessage(cid,MESSAGE_TYPES["orange"],"Event isn't currently opened.") doTeleportThing(cid,fromPosition) doSendMagicEffect(fromPosition,2) return true end if getPlayerLevel(cid) < getMinJoinLevel() then doPlayerSendTextMessage(cid,MESSAGE_TYPES["orange"],"Only players of level ".. getMinJoinLevel().. "+ can join this event.") doTeleportThing(cid,fromPosition) return true end teleportToWaitRoom(cid) return true end ]]> </movevent> </mod>
  8. meu ot ta faltando um evento war mais simples possivel , um evento que quando god falar /war on apareça um teleporte que separa time azul e vermelho quando der total de jogadores finalzar! uppp UPP
  9. queria saber como posso para mostrar as mortes dos playes no default
  10. queria um script que quando player clicasse na alavanca mudaria outfit dele aleatoriamente para algum type de monstro.
  11. tava jogando um ot e vi um sistema bem legal em vez de mostra mensagem de loot em verde na tela aprecia no console alguém sabe fazer isso tb?
  12. loreal postou uma resposta no tópico em Suporte Tibia OTServer
    duvida sanada
  13. show de bola! rep+
  14. agora funfo so tem um problema so deu a citizen as outras n ------------------------------------------------------------------------------------------------------------------------------------
  15. deu esse erro
  16. [Error - NpcScript Interface] data/npc/scripts/addons.lua:onCreatureSay Description: data/npc/scripts/addons.lua:29: bad argument #1 to 'maxn' (table expected, got nil) stack traceback: [C]: in function 'maxn' data/npc/scripts/addons.lua:29: in function 'callback' data/npc/lib/npcsystem/npchandler.lua:456: in function 'onCreatureSay' data/npc/scripts/addons.lua:12: in function <data/npc/scripts/addons.lua:12>
  17. dinheiro some mais n aparece as addon eu olhei aqui nas libs que tinha tag doPlayerAddAddons em 050-function.lua olhei na source, unico script que funfa e aquele primeiro que postei quero modificar ele para ficar como fist todas as primeiras addons second para todas segundas..
  18. [Error - LuaInterface::loadFile] data/npc/scripts/addons.lua:50: ')' expected near 'then' deu esse erro amigo
  19. ta bugado eu compro todas primeiras addon dinheiro some mais n da os addon
  20. gostaria de deixar esse script para quando player falar first addon comprar todas primeiras addon por 500k e quando falar second addon comprar todas segundas addon por 1kk alguém ajuda pf? 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 npcHandler:setMessage(MESSAGE_GREET, "Olá |PLAYERNAME|. para ver as addon fale {addons} para comprar primeira addon fale, first mage addon, para compra segunda addon fale second mage addon.") function playerBuyAddonNPC(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if (parameters.confirm ~= true) and (parameters.decline ~= true) then if(getPlayerPremiumDays(cid) == 0) and (parameters.premium == true) then npcHandler:say('Sorry, but this addon is only for premium players!', cid) npcHandler:resetNpc() return true end if (getPlayerStorageValue(cid, parameters.storageID) ~= -1) then npcHandler:say('You already have this addon!', cid) npcHandler:resetNpc() return true end local itemsTable = parameters.items local items_list = '' if table.maxn(itemsTable) > 0 then for i = 1, table.maxn(itemsTable) do local item = itemsTable[i] items_list = items_list .. item[2] .. ' ' .. getItemNameById(item[1]) if i ~= table.maxn(itemsTable) then items_list = items_list .. ', ' end end end local text = '' if (parameters.cost > 0) and table.maxn(parameters.items) then text = items_list .. ' and ' .. parameters.cost .. ' gp' elseif (parameters.cost > 0) then text = parameters.cost .. ' gp' elseif table.maxn(parameters.items) then text = items_list end npcHandler:say('Did you bring me ' .. text .. ' for ' .. keywords[1] .. '?', cid) return true elseif (parameters.confirm == true) then local addonNode = node:getParent() local addoninfo = addonNode:getParameters() local items_number = 0 if table.maxn(addoninfo.items) > 0 then for i = 1, table.maxn(addoninfo.items) do local item = addoninfo.items[i] if (getPlayerItemCount(cid,item[1]) >= item[2]) then items_number = items_number + 1 end end end if(getPlayerMoney(cid) >= addoninfo.cost) and (items_number == table.maxn(addoninfo.items)) then doPlayerRemoveMoney(cid, addoninfo.cost) if table.maxn(addoninfo.items) > 0 then for i = 1, table.maxn(addoninfo.items) do local item = addoninfo.items[i] doPlayerRemoveItem(cid,item[1],item[2]) end end doPlayerAddOutfit(cid, addoninfo.outfit_male, addoninfo.addon) doPlayerAddOutfit(cid, addoninfo.outfit_female, addoninfo.addon) setPlayerStorageValue(cid,addoninfo.storageID,1) npcHandler:say('Here you are.', cid) else npcHandler:say('You do not have needed cash!', cid) end npcHandler:resetNpc() return true elseif (parameters.decline == true) then npcHandler:say('Not interested? Maybe another addon?', cid) npcHandler:resetNpc() return true end return false end local noNode = KeywordNode:new({'no'}, playerBuyAddonNPC, {decline = true}) local yesNode = KeywordNode:new({'yes'}, playerBuyAddonNPC, {confirm = true}) -- citizen (done) local outfit_node = keywordHandler:addKeyword({'first addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, items = {}, outfit_female = 136, outfit_male = 128, addon = 1, storageID = 10001}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second citizen addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 136, outfit_male = 128, addon = 2, storageID = 10002}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- hunter (done) local outfit_node = keywordHandler:addKeyword({'first hunter addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 137, outfit_male = 129, addon = 1, storageID = 10003}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second hunter addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 137, outfit_male = 129, addon = 2, storageID = 10004}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- knight (done) local outfit_node = keywordHandler:addKeyword({'first knight addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 139, outfit_male = 131, addon = 1, storageID = 10005}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second knight addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 139, outfit_male = 131, addon = 2, storageID = 10006}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- mage (done) local outfit_node = keywordHandler:addKeyword({'first mage addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 138, outfit_male = 130, addon = 1, storageID = 10007}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second mage addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 138, outfit_male = 130, addon = 2, storageID = 10008}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- summoner (done) local outfit_node = keywordHandler:addKeyword({'first summoner addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 141, outfit_male = 133, addon = 1, storageID = 10009}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second summoner addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 141, outfit_male = 133, addon = 2, storageID = 10010}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- barbarian (done) local outfit_node = keywordHandler:addKeyword({'first barbarian addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 147, outfit_male = 143, addon = 1, storageID = 10011}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second barbarian addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 147, outfit_male = 143, addon = 2, storageID = 10012}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- druid (done) local outfit_node = keywordHandler:addKeyword({'first druid addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 148, outfit_male = 144, addon = 1, storageID = 10013}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second druid addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 148, outfit_male = 144, addon = 2, storageID = 10014}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- nobleman (done) local outfit_node = keywordHandler:addKeyword({'first nobleman addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, items = {}, outfit_female = 140, outfit_male = 132, addon = 1, storageID = 10015}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second nobleman addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, items = {}, outfit_female = 140, outfit_male = 132, addon = 2, storageID = 10016}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- oriental (done) local outfit_node = keywordHandler:addKeyword({'first oriental addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 150, outfit_male = 146, addon = 1, storageID = 10017}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second oriental addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 150, outfit_male = 146, addon = 2, storageID = 10018}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- warrior (done) local outfit_node = keywordHandler:addKeyword({'first warrior addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 142, outfit_male = 134, addon = 1, storageID = 10019}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second warrior addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 142, outfit_male = 134, addon = 2, storageID = 10020}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- wizard (done) local outfit_node = keywordHandler:addKeyword({'first wizard addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 149, outfit_male = 145, addon = 1, storageID = 10021}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second wizard addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 149, outfit_male = 145, addon = 2, storageID = 10022}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- assassin (done) local outfit_node = keywordHandler:addKeyword({'first assassin addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 156, outfit_male = 152, addon = 1, storageID = 10023}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second assassin addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 156, outfit_male = 152, addon = 2, storageID = 10024}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- beggar (done) local outfit_node = keywordHandler:addKeyword({'first beggar addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 157, outfit_male = 153, addon = 1, storageID = 10025}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second beggar addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 157, outfit_male = 153, addon = 2, storageID = 10026}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- pirate (done) local outfit_node = keywordHandler:addKeyword({'first pirate addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 155, outfit_male = 151, addon = 1, storageID = 10027}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second pirate addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 155, outfit_male = 151, addon = 2, storageID = 10028}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- shaman (done) local outfit_node = keywordHandler:addKeyword({'first shaman addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 158, outfit_male = 154, addon = 1, storageID = 10029}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second shaman addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 158, outfit_male = 154, addon = 2, storageID = 10030}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- norseman (done) local outfit_node = keywordHandler:addKeyword({'first norseman addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 252, outfit_male = 251, addon = 1, storageID = 10031}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second norseman addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 252, outfit_male = 251, addon = 2, storageID = 10032}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- jester (done)(custom) local outfit_node = keywordHandler:addKeyword({'first jester addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 270, outfit_male = 273, addon = 1, storageID = 10033}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second jester addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 270, outfit_male = 273, addon = 2, storageID = 10034}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- demonhunter (done)(custom) local outfit_node = keywordHandler:addKeyword({'first demonhunter addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 288, outfit_male = 289, addon = 1, storageID = 10035}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second demonhunter addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 288, outfit_male = 289, addon = 2, storageID = 10036}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- nightmare (done)(custom) local outfit_node = keywordHandler:addKeyword({'first nightmare addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 269, outfit_male = 268, addon = 1, storageID = 10037}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second nightmare addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 269, outfit_male = 268, addon = 2, storageID = 10038}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- brotherhood (done)(custom) local outfit_node = keywordHandler:addKeyword({'first brotherhood addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 279, outfit_male = 278, addon = 1, storageID = 10039}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second brotherhood addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 279, outfit_male = 278, addon = 2, storageID = 10040}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- yalaharian (done)(custom) local outfit_node = keywordHandler:addKeyword({'first yalaharian addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 324, outfit_male = 325, addon = 1, storageID = 10041}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second yalaharian addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 324, outfit_male = 325, addon = 2, storageID = 10042}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- Warmaster (done)(custom) local outfit_node = keywordHandler:addKeyword({'first warmaster addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 336, outfit_male = 335, addon = 1, storageID = 10043}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second warmaster addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 336, outfit_male = 335, addon = 2, storageID = 10044}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) -- Wayfarer (done)(custom) local outfit_node = keywordHandler:addKeyword({'first Wayfarer addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 366, outfit_male = 367, addon = 1, storageID = 10045}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) local outfit_node = keywordHandler:addKeyword({'second Wayfarer addon'}, playerBuyAddonNPC, {premium = false, cost = 100000, items = {}, outfit_female = 366, outfit_male = 367, addon = 2, storageID = 10046}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) keywordHandler:addKeyword({'addons'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can give you citizen, hunter, knight, mage, nobleman, summoner, warrior, barbarian, druid, wizard, oriental, pirate, assassin, beggar, shaman, norseman, nighmare, jester, yalaharian, brotherhood, warmaster and wayfarer addons.'}) keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To buy the first addon say \'first NAME addon\', for the second addon say \'second NAME addon\'.'}) npcHandler:addModule(FocusModule:new())

Informação Importante

Confirmação de Termo