Postado Setembro 15, 2017 7 anos Bom preciso de uma script que mande o item para o depot do player mesmo que esteja ofiline ou online "quero essa script, pra qnd ele doantar eu mandar os pontos para a depot dele, que no caso fica na loja onde vende os itens" se alguem poder me ajudar eu agradeço, ja tentnei todas as scripts nehuma delas funcionaro
Postado Setembro 16, 2017 7 anos data/talkactions/pontos.lua function onSay(cid, words, param) local param = param.explode(param, ',') if param then if isPlayer(getCreatureByName(param[1])) == TRUE then doPlayerSendTextMessage(getCreatureByName(param[1]), 22, "Você acabou de resebe seus pontos!") doPlayerAddItem(getCreatureByName(param[1]), param[2], param[3]) end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") end return TRUE end data/talkactions/talkactions.xml <talkaction log="yes" access="5" words="/pontos" event="script" value="pontos.lua"/> Comando : /Pedro, 2160, 100 o player chamado Pedro vai receber 100 crystal coins.
Postado Setembro 16, 2017 7 anos 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) end function onSay(cid, words, param) local param = param.explode(param, ',') if param then if isPlayer(getCreatureByName(param[1])) == TRUE then doPlayerSendTextMessage(getCreatureByName(param[1]), 22, "Seus pontos foram para o depot!") doPlayerAddDepotItems(getCreatureByName(param[1]),{[param[2]] = param[3]}) end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") end return true end
Postado Setembro 21, 2017 7 anos Autor Em 16/09/2017 em 16:20, DboExplorer disse: 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) end function onSay(cid, words, param) local param = param.explode(param, ',') if param then if isPlayer(getCreatureByName(param[1])) == TRUE then doPlayerSendTextMessage(getCreatureByName(param[1]), 22, "Seus pontos foram para o depot!") doPlayerAddDepotItems(getCreatureByName(param[1]),{[param[2]] = param[3]}) end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") end return true end onde coloco o id do item ? Em 16/09/2017 em 14:51, henriquesafadao disse: data/talkactions/pontos.lua function onSay(cid, words, param) local param = param.explode(param, ',') if param then if isPlayer(getCreatureByName(param[1])) == TRUE then doPlayerSendTextMessage(getCreatureByName(param[1]), 22, "Você acabou de resebe seus pontos!") doPlayerAddItem(getCreatureByName(param[1]), param[2], param[3]) end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") end return TRUE end data/talkactions/talkactions.xml <talkaction log="yes" access="5" words="/pontos" event="script" value="pontos.lua"/> Comando : /Pedro, 2160, 100 o player chamado Pedro vai receber 100 crystal coins. no caso queria que fosse pro depot do player ta indo direto pra bad dele Em 16/09/2017 em 16:20, DboExplorer disse: 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) end function onSay(cid, words, param) local param = param.explode(param, ',') if param then if isPlayer(getCreatureByName(param[1])) == TRUE then doPlayerSendTextMessage(getCreatureByName(param[1]), 22, "Seus pontos foram para o depot!") doPlayerAddDepotItems(getCreatureByName(param[1]),{[param[2]] = param[3]}) end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") end return true end da erro na distro error-talkation interface <luaaddContainer item> item notfound
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.