narko
vertrauenswürdig ~
Hello, i present a new script:
Example:
Rick buy a $5 dollars pack <<< for 50 levels per login for (1month) << Used this system if have a reset level for a die or login.
Script:
data/creaturescripts/login.lua
open login.lua and after
Add:
How to addStorage << with a time function:
data/talkactions/scripts/
create addstorage.lua
How to use:
/setstorage player, 5689, 30
this config is for a one month..
Comment!!
if you have a other code please post.
Example:
Rick buy a $5 dollars pack <<< for 50 levels per login for (1month) << Used this system if have a reset level for a die or login.
Script:
data/creaturescripts/login.lua
open login.lua and after
Code:
if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
Add:
Code:
if getPlayerStorageValue(cid, 5689) then
doPlayerAddLevel(cid, 50)
doCreatureSay(cid, "Im recieve 50 levels because im donator.", TALKTYPE_ORANGE_1)
end
How to addStorage << with a time function:
data/talkactions/scripts/
create addstorage.lua
Lua:
function onSay(cid, words, param)
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return TRUE
end
local t = string.explode(param, ",")
if(not isPlayer(t[1])) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with that name is not online.")
return TRUE
end
local storage = tonumber(t[2])
local days = tonumber(t[3])
if(not storage or days) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong input.")
return TRUE
end
setAccountStorageValue(getAccountIdByName(t[1]), t[2], os.time() + (t[3] * 24 * 3600))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Storage Value #"..t[2].." of player "..t[1].." has been set to "..t[3]..".")
return TRUE
end
How to use:
/setstorage player, 5689, 30
this config is for a one month..
Comment!!
if you have a other code please post.