Ir para conteúdo
Close

REFORMULAMOS A SEÇÃO DE CLASSIFICADOS! - Crie grátis os seus anúncios de procura e oferta de serviços e produtos relacionados ao OTServ! - Acesse através do nosso menu ou clique aqui e confira já!

buchal

Membro
  • Total de itens

    19
  • Registro em

  • Última visita

Sobre buchal

  • Rank
    Padeiro

Últimos Visitantes

O bloco dos últimos visitantes está desativado e não está sendo visualizado por outros usuários.

  1. local config = { ["Monstro1"] = (l = 1, h = 99), ["Monstro2"] = (l = 100, h = 199), ["Monstro3"] = (l = 200, h = 999) } local config = { ["Monstro1"] = {l = 1, h = 99}, ["Monstro2"] = {l = 100, h = 199}, ["Monstro3"] = {l = 200, h = 999} }
  2. $skills = $SQL->query('SELECT * FROM players WHERE deleted = 0 AND group_id < '.$config['site']['players_group_id_block'].' AND account_id != 1 ORDER BY level DESC LIMIT 5'); || V $skills = $SQL->query("SELECT * FROM players WHERE deleted = 0 AND group_id NOT IN('4','5','6') AND account_id != 1 ORDER BY level DESC LIMIT 5");
  3. $orderby = 'name'; if(isset($_REQUEST['order'])) { if($_REQUEST['order']== 'level') $orderby = 'level'; elseif($_REQUEST['order'] == 'vocation') $orderby = 'vocation'; } $players_online_data = $SQL->query('SELECT ' . $SQL->tableName('accounts') . '.' . $SQL->fieldName('flag') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('name') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('vocation') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('promotion') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('level') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('skull') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('looktype') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('lookaddons') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('lookhead') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('lookbody') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('looklegs') . ', ' . $SQL->tableName('players') . '.' . $SQL->fieldName('lookfeet') . ' FROM ' . $SQL->tableName('accounts') . ', ' . $SQL->tableName('players') . ' WHERE ' . $SQL->tableName('players') . '.' . $SQL->fieldName('world_id') . ' = ' . $SQL->quote($world_id) . ' AND ' . $SQL->tableName('players') . '.' . $SQL->fieldName('online') . ' = ' . $SQL->quote(1) . ' AND ' . $SQL->tableName('accounts') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('players') . '.' . $SQL->fieldName('account_id') . ' ORDER BY ' . $SQL->fieldName($orderby))->fetchAll();
  4. buchal

    Normal Pet System

    Como converter para ser capaz de capturar o corpo morto monstro? Agora ele funciona de modo que a captura do ser vivo. http://wklej.org/id/3029295/ http://wklej.org/id/3029296/ http://wklej.org/id/3029297/
  5. buchal

    Gesior AAC Sms shop

    ?? @up up É sobre isso. AQUI
  6. buchal

    Gesior AAC Sms shop

    Eu estou procurando e eu não posso encontrá-lo. Tem alguém?
  7. buchal

    Normal Task Commands

    Eu tenho um script: <config name="talkactionTask_conf"><![CDATA[ canGetOnlyOneTime = false task = { ['rotworm'] = {storage = 9999, beginStorageValue = 1, finishStorageValue = 2, count = 100, requiedLevelToReward = 99999999, rewards = {} } mainStorage = X function isSummon(cid) if(not isCreature(cid)) then return false end return getCreatureMaster(cid) ~= cid end function checkInfoAboutTask(tableTask) local message = '' for i = 1, #tableTask/2 do local rewardType, rewardCount = tableTask[i*2-1], tableTask[i*2] if rewardType == 'item' and type(rewardCount) == 'table' then for item = 1, #rewardCount/2 do local rewardItemId, rewardItemCount = rewardCount[item*2-1], rewardCount[item*2] message = message .. ('* ' .. rewardItemCount .. 'x ' .. getItemNameById(rewardItemId)) .. '\n' end else message = message .. ((rewardType == 'item' and '* ' .. getItemNameById(rewardCount)) or (rewardType == 'exp' and '* ' .. rewardCount .. ' Experience ') or (rewardType == 'cash' and '* ' .. rewardCount .. ' Money ') or (rewardType == 'smsPoints' and '* ' .. rewardCount .. ' Sms points ')) .. '\n' end end return message end function doAddExp(cid, amount) return doSendAnimatedText(getThingPos(cid), amount, COLOR_WHITE) and doPlayerAddExperience(cid, amount) or false end ]]></config> <talkaction words="!task" event="script"><![CDATA[ domodlib('talkactionTask_conf') function onSay(cid, words, param, channel) local taskMenu, message = task[param:lower()], '' if taskMenu and (taskMenu.potionTask and getCreatureStorage(cid, taskMenu.storage) == -1 or getCreatureStorage(cid, mainStorage) < 1) then if(canGetOnlyOneTime and getCreatureStorage(cid, taskMenu.storage) > 0) or taskMenu.potionTask and getCreatureStorage(cid, taskMenu.storage) > taskMenu.count then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Already you have made this task!') end if taskMenu.potionTask and getCreatureStorage(cid, taskMenu.storage) > -1 then return true else doCreatureSetStorage(cid, mainStorage, taskMenu.beginStorageValue) end doCreatureSetStorage(cid, taskMenu.storage, 0) return doPlayerPopupFYI(cid, 'The decision taken, your task is to '..(taskMenu.potionTask and 'use' or 'kill')..' - ' .. taskMenu.count.. ' ' ..param:lower().. (taskMenu.count > 1 and 's' or '') .. '\nRewards which you receive for finishing this task:\n' .. checkInfoAboutTask(taskMenu.rewards) .. (taskMenu.potionTask and '' or 'If you want to abort the current job enough that you use the command "!task cancel".\n')..'If you want to know about the current job simply use the command "!task info"\nIf you wish to receive a prize for the job simply use the command !task reward\nHave Fun ^^') elseif isInArray({'cancel', 'delete', 'abort'}, param:lower()) and getCreatureStorage(cid, mainStorage) > 0 then for _, v in pairs(task) do if not v.potionTask and getCreatureStorage(cid, v.storage) >= 0 then doCreatureSetStorage(cid, mainStorage, -1) doCreatureSetStorage(cid, v.storage, -1) return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You canceled the current task.') end end elseif isInArray({'reward', 'end', 'finish'}, param:lower()) then local rewards, showMessage = 'Items that you got as a reward is: ', false for _, v in pairs(task) do if (v.potionTask and getCreatureStorage(cid, v.storage) == v.count or getCreatureStorage(cid, mainStorage) == v.finishStorageValue) then showMessage = true if not v.potionTask then doCreatureSetStorage(cid, mainStorage, -1) else doCreatureSetStorage(cid, v.storage, v.count + 1) end if not v.requiedLevelToReward or v.requiedLevelToReward >= getPlayerLevel(cid) then for i = 1, #v.rewards/2 do local rewardType, rewardCount = v.rewards[i*2-1], v.rewards[i*2] if rewardType == 'item' and type(rewardCount) == 'table' and #rewardCount > 1 then for item = 1, #rewardCount / 2 do local rewardItemId, rewardItemCount = rewardCount[item*2-1], rewardCount[item*2] rewards = rewards .. rewardItemCount .. 'x ' .. getItemNameById(rewardItemId) .. ', ' doPlayerAddItem(cid, rewardItemId, rewardItemCount, true) end else rewards = rewards .. rewardCount .. 'x ' .. (rewardType == 'item' and getItemNameById(rewardCount) or rewardType == 'exp' and 'experience' or rewardType == 'cash' and 'money' or rewardType == 'smsPoints' and 'sms points') .. ', ' if rewardType == 'item' then doPlayerAddItem(cid, rewardCount, 1, true) elseif rewardType == 'exp' then doAddExp(cid, rewardCount) elseif rewardType == 'cash' then doPlayerAddMoney(cid, rewardCount) elseif rewardType == 'smsPoints' then db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. rewardCount .. " WHERE `name` = '" .. getAccountByName(getCreatureName(cid)) .. "' LIMIT 1;") end end end else rewards = 'Your experience level is too high to be able to receive the reward.' end end end return showMessage and doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string.sub(rewards, 1, string.len(rewards) - 1)..'.') else for k, v in pairs(task) do if isInArray((v.potionTask and {'potion','potions'} or {'info', 'information', 'details'}), param:lower()) and (v.potionTask and getCreatureStorage(cid, v.storage) >= 0 or getCreatureStorage(cid, mainStorage) > 0) then if (v.potionTask and getCreatureStorage(cid, v.storage) <= v.count or isInArray({v.finishStorageValue, v.beginStorageValue}, getCreatureStorage(cid, mainStorage))) then return doPlayerPopupFYI(cid, 'Your current task is to '..(v.potionTask and 'use' or 'kill')..' - ' .. v.count.. ' ' ..k:lower().. (v.count > 1 and 's' or '') .. '\nYou have killed ' .. getCreatureStorage(cid, v.storage) .. ' of ' .. v.count .. ' ' .. k:lower() .. (v.count == 1 and '' or 's') .. '. You must kill ' .. v.count - getCreatureStorage(cid, v.storage) .. ' ' .. k:lower() .. (v.count == 1 and '' or 's') .. ' yet\nRewards which you receive for finishing this task:\n' .. checkInfoAboutTask(v.rewards)) end end end end return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Wrong command!') end ]]></talkaction> <event type="kill" name="talkactionTask" event="script"><![CDATA[ domodlib('talkactionTask_conf') function onKill(cid, target) if isPlayer(target) or getCreatureMaster(target) or isNpc(target) then return true end for k, v in pairs(task) do if k:lower() == getCreatureName(target):lower() then if getCreatureStorage(cid, mainStorage) == v.beginStorageValue then if getCreatureStorage(cid, v.storage) < v.count then doCreatureSetStorage(cid, v.storage, getCreatureStorage(cid, v.storage) + 1) s = 'You killed ' .. getCreatureStorage(cid, v.storage) .. ' of ' .. v.count .. ' ' .. k:lower() .. (v.count == 1 and '' or 's') .. '.' if getCreatureStorage(cid, v.storage) == v.count then doCreatureSetStorage(cid, mainStorage, v.finishStorageValue) s = 'Congratulations! You have killed enough '.. k:lower() ..'.' end return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, s) end end end end return true end ]]></event> <event type="login" name="taskEventLogin" event="buffer"><![CDATA[ registerCreatureEvent(cid, 'talkactionTask') ]]></event> 1. Agora, quando você digita um !task monster recebe a mensagem 'Wrong command!' Como converter para receber um mensagem 'You have begun this task'? 2. Quando você digita um mensagem !task reward quer receber uma mensagem 'You have not completed the task' quando você não terminar o trabalho. Eu vou ser muito feliz se alguém pode ajudar.
  8. Tudo funciona! Eu te amo! Obrigado! :D :D Só mais uma coisa. Se você alterar a quantidade de out = {0,0} sobre out = {128,136} recebendo um erro. [17:13:17.305] [Error - CreatureScript Interface] [17:13:17.305] data/creaturescripts/scripts/InviteFriends.lua:onAdvance [17:13:17.305] Description: [17:13:17.305] (luaGetPlayerSex) Player not found [17:13:17.321] [Error - CreatureScript Interface] [17:13:17.321] data/creaturescripts/scripts/InviteFriends.lua:onAdvance [17:13:17.321] Description: [17:13:17.321] (luaDoPlayerAddOutfit) Player not found Feito: doPlayerAddOutfit(getPlayerByNameWildcard(name), getPlayerSex(getPlayerByNameWildcard(name)) == 0 and ka.out[1] or ka.out[2], 3)

Open Tibia Server

Quer aprender a criar seu próprio servidor de Tibia? Então está no lugar certo, aqui você encontrará milhares de tutorias, scripts, códigos, mapas e utilitários para que você possa fazer o seu próprio servidor de Tibia partindo do zero.

Redes Sociais

Anuncie no Tibia King

Precisa de mais visibilidade em seus projetos? Quer publicidade para o seu servidor? Anuncie no Tibia King e faça sua divulgação, possuímos centenas de acessos simultâneos e milhares diários, com certeza será a sua solução! A publicação do seu anuncio é instantânea!

×