FE

[Script] Nick [Vip]

Por FeehGusso, 24 de fev. de 2011 em Archived

script
8
1.6k
FeehGussoF
24 de fevereiro de 2011 às 14:05

No meu ot tem o sistem vip de clica no item ..vc clica no item e vira vip :p..mais tipo keria ke clica e muda o nick ..fica [VIP] O nome do player.. kero que quando o player use o item o char dele deslogue e volte com o nome [VIP] Antes... sem precisa muda pelo sqlite... ajudem ae

 

olhem minha script.

 

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

local config={

removeOnUse = "yes" -- remover quando usar ("yes" or "no")

}

local days = 15 -- dias que serão adicionados

local daysvalue = days * 24 * 60 * 60

local storageplayer = getPlayerStorageValue(cid, 13540)

local timenow = os.time()

if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then

time = timenow + daysvalue

else

time = storageplayer + daysvalue

end

 

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")

setPlayerStorageValue(cid, 13540, time)

local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(24 * 60 * 60))

doSendMagicEffect(getPlayerPosition(cid), math.random(28,30))

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram Adicionados ".. quantity .." de dias de VIP.")

if (config.removeOnUse == "yes") then

doRemoveItem(item.uid, 1)

end

 

return TRUE

end

curruwilliamC
24 de fevereiro de 2011 às 14:48

Area Serta ??

FeehGussoF
24 de fevereiro de 2011 às 18:09

eu preciso q de o nome [VIP] cara... e quando use o mesmo item pela 2 vez ele nao der pox ex : [VIP][VIP] ... e sim soma os dias vip... mais eu ativo o item ele so da vip... nao da o nik vip... ajuda ae

helanioH
26 de fevereiro de 2011 às 13:41

mano area errada

FeehGussoF
27 de fevereiro de 2011 às 17:26

Mano como assim ? oO..Eu fiz em actions ..se é area errada fala aonde é pra por ¬¬..e me manda como é :\..nao so fica falando area errada ¬¬'..

pintopintoP
27 de fevereiro de 2011 às 17:51
function onUse(cid, item, fromPosition, itemEx, toPosition)

removeOnUse = true -- remover quando usar

local days = 15 -- dias que serão adicionados
local daysvalue = days * 24 * 60 * 60
local storageplayer = getPlayerStorageValue(cid, 13540)
local timenow = os.time()

if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then
time = timenow + daysvalue
else
time = storageplayer + daysvalue
end

if (config.removeOnUse == true) then
doRemoveItem(item.uid, 1)
end
if string.find(tostring(getCreatureName(cid)),"[[Vip]]") then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")
setPlayerStorageValue(cid, 13540, time)
doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) 
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")
setPlayerStorageValue(cid, 13540, time)
local name = getCreatureName(cid)
db.executeQuery("UPDATE `players` SET `name` = '[Vip] "..name.."' WHERE `id` = "..getPlayerGUID(cid)..";")
doRemoveCreature(cid)
end
return true
end

FeehGussoF
28 de fevereiro de 2011 às 12:54

Mano tentei assim mais clikei em cima do item nao aconteceu nada ..mal vip virou..tipo ke bulgou o iten :\..eu puis em actions script..Olha Como Eu puis :

 

Olha:

 

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

 

removeOnUse = true -- remover quando usar

 

local days = 15 -- dias que serão adicionados

local daysvalue = days * 24 * 60 * 60

local storageplayer = getPlayerStorageValue(cid, 13540)

local timenow = os.time()

 

if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then

time = timenow + daysvalue

else

time = storageplayer + daysvalue

end

 

if (config.removeOnUse == true) then

doRemoveItem(item.uid, 1)

end

if string.find(tostring(getCreatureName(cid)),"[[Vip]]") then

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")

setPlayerStorageValue(cid, 13540, time)

doSendMagicEffect(getPlayerPosition(cid), math.random(28,30))

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")

setPlayerStorageValue(cid, 13540, time)

local name = getCreatureName(cid)

db.executeQuery("UPDATE `players` SET `name` = '[Vip] "..name.."' WHERE `id` = "..getPlayerGUID(cid)..";")

doRemoveCreature(cid)

end

return true

end

 

e Da Esse Erro No Ot -

post-303040-078721200 1298908433_thumb.jpg

helanioH
03 de março de 2011 às 16:17

area errada