
Solutions
-
Rusherzin's post in (Resolvido)Bau que da um item por dia was marked as the answerComo eu estou com bastante sono e vi que a dúvida era simples, peguei o script lá na otland, olha:
<action uniqueid="3001" script="quests/dailyquest.lua"/> local config = { storage = 45392, exstorage = 40822, days = { ["Monday"] = { {itemid = 8839, count = {1, 3}} }, ["Tuesday"] = { {itemid = 2681, count = {1}}, {itemid = 2682, count = {1}}, {itemid = 2683, count = {1}} }, ["Wednesday"] = { {itemid = 2674, count = {1, 10}}, {itemid = 2675, count = {1, 10}}, {itemid = 2676, count = {1, 10}}, {itemid = 2673, count = {1, 10}} }, ["Thursday"] = { {itemid = 2679, count = {2, 15}}, {itemid = 2680, count = {1, 5}} }, ["Friday"] = { {itemid = 2788, count = {1, 3}} }, ["Saturday"] = { {itemid = 6393, count = {1}} }, ["Sunday"] = { {itemid = 2389, count = {2, 12}}, {itemid = 2690, count = {1, 5}} } } } function onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey) local player = Player(cid) local x = config.days[os.date("%A")] if player:getStorageValue(config.storage) == tonumber(os.date("%w")) and player:getStorageValue(config.exstorage) > os.time() then return player:sendCancelMessage("The chest is empty, come back tomorrow for a new reward.") end local c = math.random(#x) local info, count = ItemType(x[c].itemid), x[c].count[2] and math.random(x[c].count[1], x[c].count[2]) or x[c].count[1] if count > 1 then text = count .. " " .. info:getPluralName() else text = info:getArticle() .. " " .. info:getName() end local itemx = Game.createItem(x[c].itemid, count) if player:addItemEx(itemx) ~= RETURNVALUE_NOERROR then player:getPosition():sendMagicEffect(CONST_ME_POFF) text = "You have found a reward weighing " .. itemx:getWeight() .. " oz. It is too heavy or you have not enough space." else text = "You have received " .. text .. "." player:setStorageValue(config.storage, tonumber(os.date("%w"))) player:setStorageValue(config.exstorage, os.time() + 24*60*60) end player:sendTextMessage(MESSAGE_INFO_DESCR, text) return true end Créditos: Limos
-
Rusherzin's post in (Resolvido)Adicionar/Alterar Atributos, Editar descrição. was marked as the answerAssim:
local desc = getItemInfo(ITEMID).description local newitem = doPlayerAddItem(cid, ID, 1) doItemSetAttribute(newitem, "description", desc.." ".."Nova description")
-
Rusherzin's post in (Resolvido)[PEDIDO] Criar char com foto. was marked as the answerCara, tentei fazer aqui, não sei se deu certo. Sou horrível com html. Já que o spoiler está bugando os códigos comigo, vou mandar link do pastebin. LINK
A imagem precisa estar na paste images com o nome da vocação. Exemplo: sorcerer.png
-
Rusherzin's post in (Resolvido)UPDATE 'table' SET 'old_name' was marked as the answerfunction onLogin(cid) if getPlayerStorageValue(cid, 23112) == -1 then setPlayerStorageValue(cid, 23112, 1) db.executeQuery("UPDATE `players` SET `old_name` = '"..getCreatureName(cid).."' WHERE `old_name` = '' and `name` = '"..getCreatureName(cid).."';") end return true end
-
Rusherzin's post in (Resolvido)Level Por Tabela was marked as the answerEstranho não ter funcionado. Configurou a tabela direitinho? Se sim, usa o script assim para tentarmos diagnosticar o problema:
function onDeath(cid, corpse, killer) local lvltable = { -- min, max, perda {1000, 1099, 50}, {1100, 1199, 60} } local level = getPlayerLevel(cid) print(1) if isPlayer(cid) then print(2) for k, v in pairs(lvltable) do if level >= v[1] and level <= v[2] then print(3) doPlayerAddExp(cid, getExperienceForLevel(level - v[3]) - getPlayerExperience(cid)) end end end return true end Depois que morrer, olha na distro se tem alguma mensagem com 1, 2 ou 3 nela.
-
Rusherzin's post in (Resolvido)Sistema de Vender Vocação Sem item was marked as the answerSim, fazer um separado pode ser uma boa. Só testa essa última aqui, tentei pegar o dado com Int ao invés de String. Mas, se não funcionar e precisares de ajuda para fazer separado, é só pedir.
function onThink(interval, lastExecution, thinkInterval) local result = db.getResult("SELECT * FROM shop_history WHERE `processed` = 0;") if(result:getID() ~= -1) then while(true) do cid = getCreatureByName(tostring(result:getDataString("player"))) product = tonumber(result:getDataInt("product")) itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";") if isPlayer(cid) then local id = tonumber(itemr:getDataInt("item")) local tid = tonumber(result:getDataInt("id")) local count = tonumber(itemr:getDataInt("count")) local tipe = tonumber(itemr:getDataInt("type")) local productn = tostring(itemr:getDataString("name")) local voc = tonumber(itemr:getDataInt("vocation")) local look = tonumber(itemr:getDataInt("looktype")) local outfit = {lookType = look} if isInArray({5,8},tipe) then if(voc == 0) then if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then if isContainer(getPlayerSlotItem(cid, 3).uid) then received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, id,count) if received then doPlayerSendTextMessage(cid,19, "Você Recebeu Uma | "..productn.." | que comprou no Shop, Obrigado e Bom Uso da "..productn.." ") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber o item >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, você não tem cap para receber >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end else doPlayerSendTextMessage(cid,19, "Você Recebeu Uma | "..productn.." | que comprou no Shop, Obrigado e Bom Uso da "..productn.." ") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") doCreatureChangeOutfit(cid, outfit) doPlayerSetVocation(cid, voc) end elseif isInArray({6,7},tipe) then if tipe == 6 then bcap = 8 bid = 1987 elseif tipe == 7 then bcap = 20 bid = 1988 end if isItemRune(id) then count = 1 end if getPlayerFreeCap(cid) >= (getItemWeightById(1987, 1) + getItemWeightById(id,count * bcap)) then local bag = doCreateItemEx(bid, 1) for i = 1,bcap do doAddContainerItem(bag, id, count) end received = doPlayerAddItemEx(getPlayerSlotItem(cid, 3).uid, bag) if received == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space to receive >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end end end itemr:free() if not(result:next()) then break end end result:free() end return true end
-
Rusherzin's post in (Resolvido)[ERRO-"SIMPLES"] ITEM SAY was marked as the answerBom, acho que a parte de mostrar a vida que heala tem a ver com a configuração no config.lua.
showHealingDamage = true Mas essa configuração, aparentemente, só mostra o healing de vida. Então, acho que o único jeito (além de editar nas sources) é botar ali no código algo assim:
doSendAnimatedText(getCreaturePosition(cid), "+"..REG_MANA, COLOR_PURPLE)
-
Rusherzin's post in (Resolvido)Como Criar um Cliente proprio was marked as the answerTutorial 1
Tutorial 2
-
Rusherzin's post in (Resolvido)TILE QUE MUDA DE COR! was marked as the answerNossa, eu copiei o código do post do cara como base e nem notei, tenta assim:
function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end doTransformItem(getThingFromPos(position).uid, 966) return true end function onStepOut(cid, item, position, fromPosition) if not isPlayer(cid) then return true end doTransformItem(getThingFromPos(position).uid, 965) return true end
-
Rusherzin's post in (Resolvido)Item que da premium was marked as the answerfunction onUse(cid, item, frompos, item2, topos) configs = { premydays = 1 -- Dias de premmy que o item dara } if(getTilePzInfo(getCreaturePosition(cid))) then doPlayerAddPremiumDays(cid, configs.premydays) doPlayerSendTextMessage(cid, 25, "Você acabou de receber "..configs.premydays.." dia de VIP.") doRemoveItem(item.uid, 1) doRemoveCreature(cid) else doPlayerSendTextMessage(cid, 25, "Você precisa estar na Protection Zone.") end end
-
Rusherzin's post in (Resolvido)Npc Error (parameter needed) was marked as the answerAcho que sim. O erro deve ser algo parecido com isso:
itemname,500,1,1; ou com isso:
itemname,500; Onde o jeito certo seria: itemname é o nome do item, seguido do preço e da quantidade, respectivamente.
-
Rusherzin's post in (Resolvido)AJUDA COMO CRIAR TABLE / QUERY OU ME AJUDE A DIREITA ESSE ERROR! REP+ was marked as the answerAgora a query que o @Xagah postou, irá resolver..
-
Rusherzin's post in (Resolvido)Não Perde x Level was marked as the answerfunction onPrepareDeath(cid, lastHitKiller, mostDamageKiller) local level = 5000 if isPlayer(cid) and getPlayerLevel(cid) >= level then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doRemoveConditions(cid, false) return false end return true end
-
Rusherzin's post in (Resolvido)Qual Remere's devo utilizar client: 8.60 was marked as the answerJá foi em Preferences e botou a Default Client Version para 8.6?
-
Rusherzin's post in (Resolvido)pedido tabela experiencia para level was marked as the answerSim, é na source. Mais especificamente em player.h.
static uint64_t getExpForLevel(uint32_t lv) { lv--; return ((50ULL * lv * lv * lv) - (150ULL * lv * lv) + (400ULL * lv)) / 3ULL; } -
Rusherzin's post in (Resolvido){Pedido} Por spell no Crystal was marked as the answer<?xml version="1.0" encoding="UTF-8"?> <monster name="Castle Generator" nameDescription="a Castle Generator" race="blood" experience="150000" speed="0" manacost="0"> <health now="1009999" max="1000099"/> <look typeex="9779" head="0" body="100" legs="100" feet="100" corpse="0"/> <targetchange interval="2000" chance="0"/> <strategy attack="0" defense="0"/> <flags> <flag summonable="1"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="1"/> <flag convinceable="1"/> <flag pushable="1"/> <flag canpushitems="0"/> <flag canpushcreatures="0"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="8"/> </flags> <attacks> <attack name="melee" interval="2000" skill="0" attack="0"/> <attack name="ice" interval="1000" chance="25" radius="4" target="1" min="-900" max="-2500"> <attribute key="shootEffect" value="smallice"/> <attribute key="areaEffect" value="iceattack"/> </attack> <attack name="fire" interval="1000" chance="25" radius="4" target="1" min="-900" max="-2500"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="firearea"/> </attack> </attacks> <defenses armor="1" defense="2"/> <immunities> <immunity physical="0"/> <immunity energy="0"/> <immunity fire="0"/> <immunity poison="0"/> <immunity lifedrain="0"/> <immunity paralyze="0"/> <immunity outfit="0"/> <immunity drunk="0"/> <immunity invisible="0"/> </immunities> <voices interval="5000" chance="10"> <voice sentence=""/> </voices> </monster> Créditos ao BloodWalker.
-
Rusherzin's post in (Resolvido)[GESIOR 2012] BUY PACC [NAO GANHA DAYS PREM] was marked as the answerPoste o script do shop.
-
Rusherzin's post in (Resolvido)Erro no Geisor acc was marked as the answerExecuta essa query na aba SQL do seu phpmyadmin.
CREATE TABLE IF NOT EXISTS `bans` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `type` tinyint(1) NOT NULL COMMENT '1 - ip banishment, 2 - namelock, 3 - account banishment, 4 - notation, 5 - deletion', `value` int(10) unsigned NOT NULL COMMENT 'ip address (integer), player guid or account number', `param` int(10) unsigned NOT NULL DEFAULT '4294967295' COMMENT 'used only for ip banishment mask (integer)', `active` tinyint(1) NOT NULL DEFAULT '1', `expires` int(11) NOT NULL, `added` int(10) unsigned NOT NULL, `admin_id` int(10) unsigned NOT NULL DEFAULT '0', `comment` text NOT NULL, `reason` int(10) unsigned NOT NULL DEFAULT '0', `action` int(10) unsigned NOT NULL DEFAULT '0', `statement` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`id`), KEY `type` (`type`,`value`), KEY `active` (`active`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -
Rusherzin's post in (Resolvido)[AJUDA] 2 Scripts de troca de itens was marked as the answerif msgcontains(msg, "change") then selfSay("You want to exchange 100 behemoth claws and 1 skull helmet for a damaged steel helmet?", cid) talkState[talkUser] = 1 elseif msgcontains(msg, "yes") then if talkState[talkUser] == 1 then if getPlayerItemCount(cid, t.item[1]) >= t.item[2] and getPlayerItemCount(cid, t.segitem[1]) >= t.segitem[2] then doPlayerRemoveItem(cid, t.item[1], t.item[2]) doPlayerRemoveItem(cid, t.segitem[1], t.segitem[2]) doPlayerAddItem(cid, t.reward, 1) selfSay("Here it is.", cid) talkState[talkUser] = 0 else selfSay("You don't have 100 behemoth claws and 1 skull helmet.", cid) talkState[talkUser] = 0 end end end
-
Rusherzin's post in (Resolvido)Dúvida sobre phpmyadmin was marked as the answerSim, pode usar um comando:
INSERT INTO `z_shop_offer` (id, points, itemid1, count1, itemid2, count2, offer_type, offer_description, offer_name, pid) VALUES (1, 5, 1234, 1, 0, 0, 'item', 'descricao aqui', 'nomedaoferta', 0); -
Rusherzin's post in (Resolvido)[AJUDA] Bug Mysql ou Database was marked as the answerINSERT INTO `players` VALUES (3, 'Sorcerer Sample', 0, 1, 1, 8, 1, 185, 185, 4200, 68, 114, 78, 58, 128, 0, 0, 0, 35, 35, 0, 2, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, '', 0, 0, ''), (4, 'Druid Sample', 0, 1, 1, 8, 2, 185, 185, 4200, 68, 114, 78, 58, 128, 0, 0, 0, 35, 35, 0, 2, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, '', 0, 0, '');
-
Rusherzin's post in (Resolvido)(HELP) erro na distro was marked as the answerTabela guild_wars
CREATE TABLE IF NOT EXISTS `guild_wars` ( `id` INT, `guild_id` INT NOT NULL, `enemy_id` INT NOT NULL, `begin` BIGINT NOT NULL DEFAULT 0, `end` BIGINT NOT NULL DEFAULT 0, `frags` INT NOT NULL DEFAULT 0, `payment` BIGINT NOT NULL DEFAULT 0, `guild_kills` INT NOT NULL DEFAULT 0, `enemy_kills` INT NOT NULL DEFAULT 0, `status` TINYINT(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id`) ) -
Rusherzin's post in (Resolvido){Ajuda} Error Account manager was marked as the answerSe está em sha1 no config.lua, põe o password do account manager em sha1. Assim:
356a192b7913b04c54574d18c28d46e6395428ab
-
Rusherzin's post in (Resolvido)Erro action was marked as the answerNão testei:
function onUse(cid, pos, item, itemEx, toPosition, fromPosition) local pos = fromPosition local aqui = getPlayerPosition(cid) local vocs = {154, 155, 156, 157, 158, 159, 160, 161, 162, 163} local agua = {4610, 4612, 4611, 4664, 4613, 4666, 4646, 4654, 4609, 4665, 4608, 4625, 4665, 4666, 4645} local parede = {1030, 1029, 1025, 1026, 1027, 1259, 1028, 1032, 1034, 1033, 1536, 1533, 873, 919, 874, 1037, 2700, 2708, 4472, 4475, 4471, 3388, 3373, 3363, 3398, 3408, 3417, 3420, 3407, 3368, 2701, 5130, 6170, 6166, 1596, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 3370, 3371, 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422} local pedra = {874, 919, 873, 2707, 2784, 2778, 3330, 4471, 4475, 4473, 4472, 4474, 4468, 4478, 4469, 4470, 4479, 2703, 2704, 1534, 2739, 3867, 5324, 5316, 5315, 5317, 1600, 1597, 1601} if getDistanceBetween(aqui, toPosition) >= 8 then return doPlayerSendTextMessage(cid, 27, "Está muito longe.") elseif(not(isSightClear(aqui, toPosition, 1))) then return doPlayerSendTextMessage(cid, 27, "Isso é impossivel.") elseif(getTilePzInfo(aqui)) then return doPlayerSendCancel(cid, "Não pode usar a tecnica Deus Dragão em casas ou areas protegidas.") elseif(getTilePzInfo(toPosition)) then return doPlayerSendCancel(cid, "Não pode usar a tecnica Deus Dragão em casas ou areas protegidas.") elseif(isInArray(agua, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em agua") elseif(isInArray(parede, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em paredes") elseif(isInArray(pedra, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em pedras") elseif(not(isInArray(vocs, getPlayerVocation(cid)))) then return doPlayerSendTextMessage(cid, 27, "Desculpe, Apenas Minato pode usar a tecnica Deus Dragão.") end if(doTeleportThing(cid, toPosition, false)) then doSendMagicEffect(toPosition, 84) doCreatureSay(cid, "Shunshin", 19) return doSendDistanceShoot(pos, toPosition, 44) end return doPlayerSendCancel(cid, "Desculpe nao foi possivel.") end -
Rusherzin's post in (Resolvido)[Dúvida] Monstros podem usar as spells dos players? Se sim, como ? was marked as the answerAcho que dá, já tentaram usar o nome da spell no monster?
Ex:
<attack name="Groundshaker" interval="3000" chance="17" length="8" spread="3" min="-150" max="-250"> Não testei, só pensei que pudesse funcionar..