Vlw cara deu certinho. vo dar seu rep++....
VOCE PODERIA ME AJUDAR NESSES SCRIPTS?
http://www.xtibia.com/forum/topic/158634-comando-voc/page__p__1046113#entry1046113
http://www.xtibia.com/forum/topic/158629-matar-monster-abrir-porta/page__p__1046094#entry1046094


info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: Demonbholder
Sim.
local items = { ["boots of haste"] = {id = 2525, count = 1, points = 20}, ["dwarven shield"] = {id = 2525, count = 1, points = 1} } -- ["nome do item"] = {id = id do item, count = quantidade que vai comprar, points = preço.} function onSay(cid, words, param) if not param or param == "" then return doPlayerSendTextMessage(cid, 27, "You have "..getPoints(cid).." points.") end local tab = items[param] if tab then if getPoints(cid) >= tab.points then doItemSetAttribute(doPlayerAddItem(cid, tab.id, tab.count),"description","Esse item for obtido por "..getPlayerName(cid)..".") doPlayerSendTextMessage(cid, 27, "You buy "..tab.count.." "..getItemNameById(tab.id).." for "..tab.points.." points, will now remain "..getPoints(cid).." points.") doPlayerSendTextMessage(cid, 27, "You will be kicked in 5 seconds.") addEvent(addPoints, 5000, cid, -tab.points) end end return true end function getPoints(cid) return tonumber(db.getResult("SELECT `premium_points` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. ";"):getDataString("premium_points")) end function addPoints(cid, points) local acc = getPlayerAccountId(cid) local pp = getPoints(cid) if isCreature(cid) then doRemoveCreature(cid) end db.executeQuery("UPDATE `accounts` SET `premium_points` = ".. pp + points .." WHERE `id` = " .. acc .. ";") endJá arrumei o errinho do tab nesse script. Tava com erro porque não fui eu quem fez o script.
Até.