É uma função bem útil, mas acho que muitos encontraram problemas com a declaração da função doPlayerSendMailByName.
No mais, obrigado pela colaboração.
Por SkyDangerous, 09 de ago. de 2012 em Mods, funções e outros
É uma função bem útil, mas acho que muitos encontraram problemas com a declaração da função doPlayerSendMailByName.
No mais, obrigado pela colaboração.
info
Grupo: Infante
Registrado: 04/03/11
Posts: 1.6k
Reputação: +393
Char no Tibia: No Have

Realmente curti.
Alem de verificar se e um numero ou uma string.
Parabens
info
Grupo: Lorde
Registrado: 17/01/09
Posts: 2.1k
Reputação: +395
Char no Tibia: Adra Sata

opa vlw.
estou estudando algumas funções pra tentar fazer algumas legais..
Devia por pra selecionar o id do container, pq ele pode nao querer parcel
info
Grupo: Visconde
Registrado: 27/10/12
Posts: 323
Reputação: +46
Char no Tibia: Schznister Equilibriun

Revivendo
Tem como faser este script para quando o player morrer, os items droparem e os items shops irem para seu depot?
Ex: o player Jhonny morre com 1 wand shop e um set free, quando ela morre só o set free e a backpack que irão dropar e a wand shop vai diretamente para o DP, Não chegando a cair no chão e sim SUMINDO e Aparecendo no DEPOT do player que morreu.
info
Grupo: Lorde
Registrado: 17/01/09
Posts: 2.1k
Reputação: +395
Char no Tibia: Adra Sata
Envia o item diretamente no depot do jogador.
function doPlayerAddDepotItems(cid, items, town) if (not isPlayer(cid)) then error("Player not found") end local town = town or getPlayerTown(cid) local parcel = doCreateItemEx(ITEM_PARCEL) for item, count in pairs(items) do if (type(item) == "number") then doAddContainerItem(parcel, item, count) elseif (type(item) == "string") then doAddContainerItem(parcel, getItemIdByName(item), count) else error("Undefinied type of item name") end end return doPlayerSendMailByName(getCreatureName(cid), parcel, town) endComo usar
function onSay(cid, words, param, channel) if (param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") else local params = string.explode(param, ",") if (not params[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") elseif (not getPlayerByNameWildcard(params[1])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.") else local items, item_params = {}, {} for i = 2, #params do item_params = string.explode(params[i], "x") if (#item_params ~= 2 or tonumber(item_params[1]) <= 0 or tonumber(item_params[2]) <= 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") else items[tonumber(item_params[2])] = tonumber(item_params[1]) print(items[tonumber(item_params[2])]) end end if (#item_params > 0) then doPlayerAddDepotItems(getPlayerByNameWildcard(params[1]), items) end end end return true endCreditos:
sn4ake
Não testado
Editado Agosto 9 por SkyDangerous