SkyLigh
Lorde-
Total de itens
2183 -
Registro em
-
Última visita
-
Dias Ganhos
23
Tudo que SkyLigh postou
-
Olá estou com um problema no meu mapa quando eu o abro ele trava e fica dando, Remeres Map Editor não está respondendo. E trava no 44% ontem eu abri normalmente mais hoje quando fui abrir deu o problema, alguém sabe por que?
-
action help comando carta em talkactions
tópico respondeu ao leandrozera de SkyLigh em Lixeira Pública
se quiser que envie pra todos online e offline utilize function onSay(cid, words, param) local t = param:explode(", ") local pid = getPlayerByName(t[1]) local players = getPlayersOnline() for i=1, #players do if isPlayer(players[i]) then return true end doSetItemText(doPlayerAddItem(pid, 2597), t[2] or "Nothing.") end return true end não testei mais creio vá funcionar. -
Movido para resolvidos.
-
dúvida Stamina chegar a 0, receber uma mensagem
pergunta respondeu ao roriscrave de SkyLigh em Scripts
Movido para resolvidos. -
Fala galera tava sem nada pra fazer e sem net, e foi quando tive uma ideia de um comando de comprar exp parece meio sem sentido mais se você utiliza donate em seu servidor pode ser útil. Vá em data/talkactions/scripts e crie um arquivo.lua chamada buyexp.lua apos isso cole o seguinte código dentro : local config = { item = 2157, --- ID DO ITEM QUE SERA REMOVIDO count = 10, --- QUANTIA DO ITEM QUE SERA REMOVIDO exp = 1000, --- QUANTIA DE EXP QUE VAI SER ADICIONADA efeito = 61 --- ID DO EFEITO AO COMPRAR EXP } function onSay(cid, words, param) if doPlayerRemoveItem(cid,config.item,config.count) == TRUE then doPlayerAddExp(cid, config.exp) doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, "Você recebeu ".. config.exp .." de exp") doSendMagicEffect(getCreaturePosition(cid), config.efeito) else doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, "Desculpe você não tem ".. config.count .." moedas donate para comprar exp") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return true end Apos isso vá em talkactions.xml e adicione a seguinte tag : <talkaction words="!buyexp" event="script" value="buyexp.lua"/> Apos isso seu sistema de comprar exp vai está instalado. Créditos :
-
100 500 1000
-
Novas conquistas
-
Que lindo
-
Em channels.xml, especifique um número para conditionId, como conditionId = "4" e use a talkaction assim function onSay(cid, words, param, channel, condition) if(param == '') then doPlayerSendTextMessage(cid, 21, "explaining the talkaction") return true end local t = string.explode(param, ",") player = getPlayerByName(t[1]) local condition = createConditionObject(CONDITION_MUTED) if(not t[2] or t[2] == '') then doPlayerSendTextMessage(cid, 21, "explaining the talkaction") end if t[2] then time = tonumber(t[2]*1000) -- 10*1000 is 10 seconds. if(isPlayer(player) == TRUE and getPlayerGroupId(cid) > getPlayerGroupId(player) and getPlayerFlagValue(player, PLAYERFLAG_CANNOTBEMUTED) == false) then setConditionParam(condition, CONDITION_PARAM_SUBID, 4) doAddCondition(player, condition) doPlayerSendTextMessage(player, MESSAGE_STATUS_WARNING, "You have been muted by " .. getPlayerName(cid) .. " for " .. t[2] .. " seconds.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(player) .. " has been muted for " .. t[2] .. " seconds.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " is not currently online or cannot be muted.") end end return true end
-
que dlç de projeto <3 parabéns tá ficando foda.
-
resolvido? se possível deixe uma resposta para que possa mover o tópico.
-
não só coloquei o 4 player vou vê o negocio do medal.
-
<?xml version="1.0" encoding="UTF-8"?> <!-- ULTIMATE SURVIVAL - Código feito por Omega / Pedido por vinnevinne Informações: http://www.xtibia.com/forum/topic/221415-ultimate-survival/ --> <mod name="Ultimate Survival" version="1.0" author="Omega" enabled="yes"> <config name="ultimatelib"><![CDATA[ USurvival = { posi = {x=104, y=210, z=7}, posf = {x=115, y=221, z=7}, posc = {x=109, y=215, z=7}, pose = {x=110, y=219, z=7}, waves = { [1] = {monsters = {'dragon', 'dragon lord'}, count = 30, reward = {exp = 0, item = 2148, amount = 1, money = 100}}, [2] = {monsters = {'dragon lord', 'frost dragon'}, count = 6, reward = {exp = 0, item = 2152, amount = 1, money = 1000}}, [3] = {monsters = {'hydra', 'serpent spawn'}, count = 10, reward = {exp = 0, item = 2160, amount = 1, money = 10000}}, }, exhaust = 1 * 24 * 60 * 60, -- Tempo em segundos até poder entrar novamente na arena (1 * 24 * 60 * 60 = 1 dia) final_reward = {item = 2160, amount = 100, exp = 10000, money = 100000}, storage_ex = 607069, storage_wave = 607089, } function isWalkable(pos)-- by Nord / editado por Omega if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false elseif isCreature(getTopCreature(pos).uid) then return false elseif getTileInfo(pos).protection then return false elseif hasProperty(getThingFromPos(pos).uid, 3) or hasProperty(getThingFromPos(pos).uid, 7) then return false end return true end function doSpawnMonsters(monsters, pos, radius, limit) if not pos.x or not pos.y or not pos.z or not type(monsters) == 'table' then return false end local radius = tonumber(radius) if radius > 5 then radius = 5 elseif radius < 2 then radius = 2 end if not limit or limit < 1 then limit = 1 elseif limit > radius ^ 2 then limit = math.floor((radius*1.5) ^ 2) end local k = 0 local tries = 0 repeat for x = pos.x - radius, pos.x + radius do for y = pos.y - radius, pos.y + radius do if isWalkable({x=x, y=y, z=pos.z}) then local monster = monsters[math.random(1, #monsters)] local chance = math.random(1, 100) if k == limit then break elseif chance <= 8 and doCreateMonster(monster, {x=x, y=y, z=pos.z}) then k = k + 1 end end end end tries = tries + 1 until k >= limit or tries >= 500 return k >= limit and true or false end function getPlayersInArea(pos1,pos2) local players = {} if pos1.x and pos1.y and pos2.x and pos2.y and pos1.z == pos2.z then for a = pos1.x, pos2.x do for b = pos1.y,pos2.y do local pos = {x=a,y=b,z=pos1.z} if isPlayer(getTopCreature(pos).uid) then table.insert(players,getTopCreature(pos).uid) end end end return players else return false end end function getMonstersInArea(pos1,pos2) local players = {} if pos1.x and pos1.y and pos2.x and pos2.y and pos1.z == pos2.z then for a = pos1.x, pos2.x do for b = pos1.y,pos2.y do local pos = {x=a,y=b,z=pos1.z} if isMonster(getTopCreature(pos).uid) then table.insert(players,getTopCreature(pos).uid) end end end return players else return false end end function doCleanArena() local monsters = getMonstersInArea(USurvival.posi, USurvival.posf) for _, cid in pairs(monsters) do doRemoveCreature(cid) end end function doStartWave(waveID, cid) if not isCreature(cid) then return false end if USurvival.waves[waveID] then wave = USurvival.waves[waveID] doSpawnMonsters(wave.monsters, USurvival.posc, USurvival.pose, 5, wave.count) doPlayerSendTextMessage(cid, 21, 'Wave '..waveID..' has started! FIGHT!') end end ]]></config> <action actionid="4599" event="script" override="yes"><![CDATA[ domodlib('ultimatelib') function onUse(cid, item) if getPlayerStorageValue(cid, USurvival.storage_ex) <= os.time() then if #getPlayersInArea(USurvival.posi, USurvival.posf) == 0 then doCleanArena() doTeleportThing(cid, USurvival.posc, USurvival.pose,) doPlayerSendTextMessage(cid, 21, 'The Ultimate Survival will Start in 10 seconds! Be ready to face your destiny!') addEvent(doStartWave, 10000, 1, cid) setPlayerStorageValue(cid, USurvival.storage_wave, 1) setPlayerStorageValue(cid, USurvival.storage_ex, os.time() + USurvival.exhaust) if item.itemid % 2 == 1 then doTransformItem(item.uid, item.itemid+1) else doTransformItem(item.uid, item.itemid-1) end else doPlayerSendCancel(cid, 'Someone is already in the arena.') doSendMagicEffect(getThingPos(cid), 2) end else local left = getPlayerStorageValue(cid, USurvival.storage_ex) - os.time() left = {hour = math.floor(left/3600), minutes = math.ceil((left % 3600)/60)} doPlayerSendCancel(cid, 'You have to wait '.. left.hour ..'h and '..left.minutes..'min.') doSendMagicEffect(getThingPos(cid), 2) end return true end ]]></action> <event type="login" name="US Login" event="script"><![CDATA[ domodlib('ultimatelib') function onLogin(cid) registerCreatureEvent(cid,'UltimateSurvival1') registerCreatureEvent(cid,'UltimateSurvival2') if isInArea(getThingPos(cid), USurvival.posi, USurvival.posf) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doSendMagicEffect(getThingPos(cid), 10) end return true end ]]></event> <event type="kill" name="UltimateSurvival1" event="script"><![CDATA[ domodlib('ultimatelib') function onKill(cid, target) if isInArea(getThingPos(cid), USurvival.posi, USurvival.posf) then if #getMonstersInArea(USurvival.posi, USurvival.posf) == 1 then local wave = getPlayerStorageValue(cid, USurvival.storage_wave) if USurvival.waves[wave+1] then setPlayerStorageValue(cid, USurvival.storage_wave, wave + 1) addEvent(doStartWave, 5000, wave + 1, cid) doPlayerSendTextMessage(cid, 22, 'Congratulations! Next wave will start in 5 seconds!') else doPlayerSendTextMessage(cid, 22, 'CONGRATULATIONS! YOU HAVE BEATEN THE ULTIMATE SURVIVAL!') local reward = USurvival.final_reward if reward.item then doPlayerAddItem(cid, reward.item, (reward.amount or 1), false) end if reward.exp then doPlayerAddExp(cid, reward.exp) end if reward.money then doPlayerAddMoney(cid, reward.money) end local medal = doPlayerAddItem(cid, 5785, 1, false) if medal then doItemSetAttribute(medal, 'description', 'This was awarded to '..getCreatureName(cid)..' for completing the Ultimate Survival.') doItemSetAttribute(medal,'name', 'Ultimate Survival Medal') end doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end end end return true end ]]></event> <event type="preparedeath" name="UltimateSurvival2" event="script"><![CDATA[ domodlib('ultimatelib') function onPrepareDeath(cid, killers) if isInArea(getThingPos(cid), USurvival.posi, USurvival.posf) then doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true) doRemoveConditions(cid, false) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerSendTextMessage(cid, 21, 'Too bad, you couldn\'t defeat the Ultimate Survival... Better luck next time.') local reward = USurvival.waves[getPlayerStorageValue(cid, USurvival.storage_wave)].reward if reward.item then doPlayerAddItem(cid, reward.item, reward.amount or 1) end if reward.exp then doPlayerAddExp(cid, reward.exp) end if reward.money then doPlayerAddMoney(cid, reward.money) end return false end return true end ]]></event> </mod>
-
Movido para resolvidos
-
posta o link do tópico do script? por que ta meio desorganizado esse code
-
http://www.xtibia.com/forum/topic/235235-fruit-picking-colheita-de-fruta/
-
Veja este tópico : LINK
-
--[[ PERFECT UPGRADE SYSTEM 2.0 Criado por Oneshot É proibido a venda ou a cópia sem os devidos créditos desse script. ]]-- UpgradeHandler = { levels = { [1] = {90, false, false}, [2] = {80, false, false}, [3] = {70, false, false}, [4] = {60, true, false}, [5] = {40, true, true} }, broadcast = 8, attributes = { ["attack"] = 1, ["defense"] = 1, ["armor"] = 1 }, message = { console = "Trying to refine %s to level +%s with %s%% success rate.", success = "You have upgraded %s to level +%s", fail = "You have failed in upgrade of %s to level +%s", downgrade = "The upgrade level of %s has downgraded to +%s", erase = "The upgrade level of %s has been erased.", maxlevel = "The targeted %s is already on max upgrade level.", notupgradeable = "This item is not upgradeable.", broadcast = "The player %s was successful in upgrading %s to level +%s.\nCongratulations!!", invalidtool = "This is not a valid upgrade tool.", toolrange = "This upgrade tool can only be used in items with level between +%s and +%s" }, tools = { [8306] = {range = {0, 10}, info = {chance = 0, removeable = true}}, [8300] = {range = {0, 10}, info = {chance = 0, removeable = true}} }, isEquipment = function(self) local weaponType = self:getItemWeaponType() return ((weaponType > 0 and weaponType < 7) or self.item.armor ~= 0) end, setItemName = function(self, name) return doItemSetAttribute(self.item.uid, "name", name) end, chance = function(self) local chances = {} chances.upgrade = (self.levels[self.item.level + 1][1] or 100) chances.downgrade = (self.item.level * 5) chances.erase = (self.item.level * 3) return chances end } function UpgradeHandler:new(item) local obj, ret = {} obj.item = {} obj.item.level = 0 obj.item.uid = item.uid for key, value in pairs(getItemInfo(item.itemid)) do obj.item[key] = value end ret = setmetatable(obj, {__index = function(self, index) if _G[index] then return (setmetatable({callback = _G[index]}, {__call = function(self, ...) return self.callback(item.uid, ...) end})) else return UpgradeHandler[index] end end}) if ret:isEquipment() then ret:update() return ret end return false end function UpgradeHandler:update() self.item.level = (tonumber(self:getItemName():match("%+(%d+)")) or 0) end function UpgradeHandler:refine(uid, item) if not self.item then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, self.message.notupgradeable) return "miss" end local tool = self.tools[item.itemid] if(tool == nil) then doPlayerSendTextMessage(uid, MESSAGE_EVENT_DEFAULT, self.message.invalidtool) return "miss" end if(self.item.level > #self.levels) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.maxlevel:format(self.item.name)) return "miss" end if(self.item.level < tool.range[1] or self.item.level >= tool.range[2]) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.toolrange:format(unpack(tool.range))) return "miss" end local chance = (self:chance().upgrade + tool.info.chance) doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, self.message.console:format(self.item.name, (self.item.level + 1), math.min(100, chance))) if(tool.info.removeable == true) then doRemoveItem(item.uid, 1) end if chance * 100 > math.random(1, 10000) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_ORANGE, self.message.success:format(self.item.name, (self.item.level + 1))) if (self.item.level + 1) >= self.broadcast then doBroadcastMessage(self.message.broadcast:format(getCreatureName(uid), self.item.name, (self.item.level + 1))) end self:setItemName((self.item.level > 0 and self:getItemName():gsub("%+(%d+)", "+".. (self.item.level + 1)) or (self:getItemName() .." +1"))) for key, value in pairs(self.attributes) do if getItemAttribute(self.item.uid, key) ~= nil or self.item[key] ~= 0 then doItemSetAttribute(self.item.uid, key, (self.item.level > 0 and getItemAttribute(self.item.uid, key) or self.item[key]) + value) end end return "success" else if item.itemid == 8300 then if self.item.level > 0 then self:setItemName(self:getItemName():gsub("%+(%d+)","")) for key, value in pairs(self.attributes) do if getItemAttribute(self.item.uid, key) ~= nil or self.item[key] ~= 0 then doItemSetAttribute(self.item.uid, key, getItemAttribute(self.item.uid, key) - self.item.level * value) end end end else doRemoveItem(self.item.uid, 1) end doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, item.itemid == 8300 and "Your item level has been reseted." or "You have broken your item while trying to upgrade it.") end end
-
Movido para resolvidos
-
http://www.xtibia.com/forum/topic/232949-tfs-04-new-lottery-system/
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.