74

Comando /addpoints...

Por 7401131, 06 de jul. de 2011 em Scripts

tibia
script
otserv
5
1.9k
74011317
06 de julho de 2011 às 14:27

Tipo do script: Talkactions

Protocolo (versão do Tibia): 8.6

Servidor utilizado:TFS

Nível de experiência: Medio

Adicionais/Informações: Eu queria um comando de add poins pelo god....Possivel?

 

REP++

meubkM
06 de julho de 2011 às 15:05

para que sistema de points ?

74011317
07 de julho de 2011 às 15:51

Uso o do gesior msm 8.6...Nao e por storage.

12 de julho de 2011 às 23:25

function onSay(cid, words, param)

local par = string.explode(param, ",")

if type(par) == "table" and #par == 2 and isPlayer(getCreatureByName(par[1])) and tonumber(par[2]) then
doPlayerSendTextMessage(getCreatureByName(par[1]), 27, "You will be kicked in 5 seconds to get more points.")
addEvent(addPoints, 5000, getCreatureByName(par[1]), tonumber(par[2]))
else
doPlayerSendCancel(cid, "Wrong param.")
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 .. ";")
end

 

Não testei.

 

Usa assim: !nomeDaTalk Demonbholder, 3000

Editado Julho 12 por Demonbholder

74011317
13 de julho de 2011 às 23:21

Deu certinho Vlw..ja dei seu rep+