<movevent type="StepIn" actionid="50000" event="script" value="itemreward.lua"/>
local config = {
storageid = 20000,
position = {x = 1000, y = 1000, z = 7},
itemid = 2148,
itemcount = 2
}
function onStepIn(cid, item, position, fromPosition)
if(getPlayerStorageValue(cid, config.storageid) < 2) and (isPlayer(cid) == true) then
if config.itemcount <= 1 then
doPlayerSendTextMessage(cid, 22, "You recived " .. config.itemcount .. " " .. getItemNameById(config.itemid) .. ".")
else
doPlayerSendTextMessage(cid, 22, "You recived " .. config.itemcount .. " " .. getItemPluralNameById(config.itemid) .. ".")
end
doTeleportThing(cid, config.position, true)
doPlayerSetStorageValue(cid, config.storageid, 2)
doPlayerGiveItem(cid, config.itemid, config.itemcount)
elseif (getPlayerStorageValue(cid, config.storageid) >= 2) then
doPlayerSendTextMessage(cid, 22, "You allready recived the reward.")
elseif (isPlayer(cid) == false) then
-- Do Nothing
end
return true
end

but why all that script..\data\movements\movements.xml
Code:<movevent type="StepIn" actionid="50000" event="script" value="itemreward.lua"/>
..\data\movements\scripts\itemreward.lua
Code:local config = { storageid = 20005, position = {x = 1000, y = 1000, z = 7}, itemid = 2148, itemcount = 2 } function onStepIn(cid, item, position, fromPosition) if(getPlayerStorageValue(cid, config.storageid) < 2) then if config.itemcount <= 1 then doPlayerSendTextMessage(cid, 22, "You recived " .. config.itemcount .. " " .. getItemNameById(config.itemid) .. ".") else doPlayerSendTextMessage(cid, 22, "You recived " .. config.itemcount .. " " .. getItemPluralNameById(config.itemid) .. ".") end doTeleportThing(cid, config.position, true) doPlayerSetStorageValue(cid, config.storageid, 2) doPlayerGiveItem(cid, config.itemid, config.itemcount) else doPlayerSendTextMessage(cid, 22, "You allready recived the reward.") end return true end
And edit this on the title on your map:
View attachment 17859
Greetings,
Manack![]()