whitevo
Feeling good, thats what I do.
Talkactions is so much easier to script xD i think i might start move my spells there.
Anyway here is the script i made to set and get storageValue in the game.
Ty for hint codinablack.
.XML
setStorageValue
getStorageValue
Anyway here is the script i made to set and get storageValue in the game.
Ty for hint codinablack.
.XML
Code:
<talkaction words="!setSV" separator=" " script="selfmade/setStorageValue.lua" />
<talkaction words="!getSV" separator=" " script="selfmade/getStorageValue.lua" />
Code:
function onSay(cid, words, param)
local player = Player(cid)
local split = param:split(",")
if not player:getGroup():getAccess() then
return true
end
if player:getAccountType() < ACCOUNT_TYPE_GOD then
return false
end
player:setStorageValue(split[1], split[2])
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
player:sendTextMessage(TALKTYPE_MONSTER_SAY, "Storage "..split[1].." is set to "..split[2])
return false
end
Code:
function onSay(cid, words, param)
local player = Player(cid)
local split = param:split(",")
if not player:getGroup():getAccess() then
return true
end
if player:getAccountType() < ACCOUNT_TYPE_GOD then
return false
end
local storageValue = player:getStorageValue(param)
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
player:sendTextMessage(TALKTYPE_MONSTER_SAY, "Storage "..param.." has value "..storageValue)
return false
end
Last edited: