kaszanalubizryc
New Member
- Joined
- Sep 10, 2015
- Messages
- 148
- Reaction score
- 1
hello, i need scroll give mounts
scroll give outfit
scroll give addons
can only use 1x
scroll give outfit
scroll give addons
can only use 1x
local config = {
[24347] = {mountid = 1, storage = 998898}
}
function onUse(player, item, itemid, fromPosition, target, toPosition, isHotkey)
local scroll = config[item.itemid]
if not scroll then
return false
end
doPlayerAddMount(player, config[item.itemid].mountid)
player:sendTextMessage(player, MESSAGE_EVENT_ADVANCE, "You have received ".. scroll.mountid .." premium mount.")
item:remove(1)
return true
end
i try myself but i have problems to send storage 998898
and add dosendcancelplayer
Code:local config = { [24347] = {mountid = 1, storage = 998898} } function onUse(player, item, itemid, fromPosition, target, toPosition, isHotkey) local scroll = config[item.itemid] if not scroll then return false end doPlayerAddMount(player, config[item.itemid].mountid) player:sendTextMessage(player, MESSAGE_EVENT_ADVANCE, "You have received ".. scroll.mountid .." premium mount.") item:remove(1) return true end
local config = {
[24347] = {mountid = 1, storage = 998898}
}
function onUse(player, item, itemid, fromPosition, target, toPosition, isHotkey)
local scroll = config[item.itemid]
if player:getStorageValue(scroll.storage >= 1) then
return false
end
player:setStorageValue(scroll.storage, 1)
player:addMount(scroll.mountid)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have received ".. scroll.mountid .." premium mount.")
item:remove(1)
return true
end
don't work how to use setstoragevalue ;]Maybe something like:
Code:local config = { [24347] = {mountid = 1, storage = 998898} } function onUse(player, item, itemid, fromPosition, target, toPosition, isHotkey) local scroll = config[item.itemid] if player:getStorageValue(scroll.storage >= 1) then return false end player:setStorageValue(scroll.storage, 1) player:addMount(scroll.mountid) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have received ".. scroll.mountid .." premium mount.") item:remove(1) return true end
local config = {
[24347] = {mountid = 1, storage = 998898},
[24348] = {mountid = 2, storage = 998897}
}
function onUse(player, item, itemid, fromPosition, target, toPosition, isHotkey)
local scroll = config[item.itemid]
if player:getStorageValue(scroll.storage >= 1) then
return false
end
player:setStorageValue(scroll.storage, 1)
player:addMount(scroll.mountid)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have received ".. scroll.mountid .." premium mount.")
item:remove(1)
return true
end