Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''sistema de aluguel''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Downloads
    • Recursos
    • Suporte
    • Pedidos
    • Show-Off
    • Tutoriais
  • OFF-Topic
    • Barzinho do Éks
    • Design
    • Informática

Encontrar resultados em...

Encontrar resultados que contenham...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


Sou

Encontrado 1 registro

  1. Ta de bobeira? dé uma inovada em seu servidor colocando novos sistemas. Veja este por exemplo. Ele dá a possibilidade de colocar itens para aluguel, ou seja ao execultar o comando o player pode adquirir um item por um tempo determinado em troca de alguma grana!. Comando para alugar o item: !rent itemname: Aluga o item desejado !rent list: Exibe a lista dos itens disponiveis para aluguel Para instalar: Crie um arquivo com o nome de rentitens.xml que deve ser intalado na pasta mods do seu servidor e insira neste arquivo o seguinte codigo. <?xml version="1.0" encoding="UTF-8"?> <mod name="Rent System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes"> <config name="rent_config"><![CDATA[ messages = { sucess = MESSAGE_INFO_DESCR, fail = MESSAGE_STATUS_WARNING, } warningStorage = 45768 items = { ["knight armor"] = {id=2476, time=1, price=3000, premium=true, cap=false}, ["demon legs"] = {id=2495, time=3, price=3000, premium=true, cap=true}, ["blue legs"] = {id=7730, time=2, price=3000, premium=true, cap=true}, ["demon shield"] = {id=2520, time=1, price=3000, premium=true, cap=true}, } function doWarningItemWasRemoved(cid) if (getCreatureStorage(cid, warningStorage) > -1) then local item = items[getItemNameById(getCreatureStorage(cid, warningStorage))] doPlayerSendTextMessage(cid, messages.sucess, "Ok, "..item.time..(item.time > 1 and " minutes" or " minute").." has passed, the rent of "..getItemNameById(item.id).." ended.") doCreatureSetStorage(cid, warningStorage, -1) end end ]]></config> <talkaction words="!rent" event="buffer"><![CDATA[ domodlib('rent_config') local item, itemuid = items[param:lower()], math.random(1000, 65535) if (param == "") then return doPlayerSendTextMessage(cid, messages.fail, "Sorry, you need to inform parameters.") end if (param == "list") then local str = "~* Rent System by Kimoszin *~\n\n" for name, iten in pairs(items) do str = str..string.sub(name, 0, 1):upper()..string.sub(name, 2):lower().." - "..iten.price.."gps \n" end str = str .."\n WWW.TIBIAKING.COM" return doPlayerPopupFYI(cid, str) end if not(item) then return doPlayerSendTextMessage(cid, messages.fail, "Sorry, but it is not possible to rent this item.") end if (item.premium and not(isPremium(cid))) then return doPlayerSendTextMessage(cid, messages.fail, "You need a premium account.") end if (item.cap and not(getPlayerFreeCap(cid) >= getItemWeightById(item.id, 1, 1))) then return doPlayerSendTextMessage(cid, messages.fail, "You don't have capacity.") end if not(doPlayerRemoveMoney(cid, item.price)) then return doPlayerSendTextMessage(cid, messages.fail, "Sorry, you do not have any money.") end doItemSetAttribute(doPlayerAddItem(cid, item.id, 1), "uid", itemuid) doPlayerSendTextMessage(cid, messages.sucess, "You rented a "..getItemNameById(item.id).." for "..item.time.. (item.time > 1 and " minutes" or " minute")..".") doCreatureSetStorage(cid, warningStorage, item.id) local player_id = getPlayerGUID(cid) addEvent(function() local player = getPlayerByGUID(player_id) if not(isPlayer(player)) then db.executeQuery("DELETE FROM `player_items` WHERE `player_items`.`player_id` = "..player_id.." AND `itemtype` = "..item.id..";") else doPlayerSendTextMessage(cid, messages.sucess, "Ok, "..item.time..(item.time > 1 and " minutes" or " minute").." has passed, the rent of "..getItemNameById(item.id).." ended.") doCreatureSetStorage(cid, warningStorage, -1) doRemoveItem(itemuid, 1) end end, item.time * 60 * 1000) ]]></talkaction> <creatureevent name="rentLogin" type="login" event="buffer"><![CDATA[ domodlib('rent_config') doWarningItemWasRemoved(cid) ]]></creatureevent> </mod> Aqui você adiciona, remove ou configura os itens: items = { ["knight armor"] = {id=2476, time=1, price=3000, premium=true, cap=false}, ["demon legs"] = {id=2495, time=3, price=3000, premium=true, cap=true}, ["blue legs"] = {id=7730, time=2, price=3000, premium=true, cap=true}, ["demon shield"] = {id=2520, time=1, price=3000, premium=true, cap=true}, } Configuração: [" item name"] = {i d=itemid, time=tempo, price=valor, premium=requer premium(true/false), cap=requer capacidade(true/false) Qualquer duvida estou a disposição! espero que aproveitem. Edit: trocando o titulo para um mais claro. Credito Kimoszin
×
×
  • Criar Novo...