Poziomek
New Member
Hello,
I have a little problem.
ots/data/movements/scripts/questtile.lua
movements.xml
I have this script but he don't work. When i have items id 9999, 9998, 9997 and I step on tile (actionid 20000) that I go, but when i don't have these items I also go but display "You don't have needed items.". Who help me? Sorry, for my English but I'm from other country.
I have a little problem.
ots/data/movements/scripts/questtile.lua
Code:
function onStepIn(cid, item, fromPosition, item2, toPosition)
local config = {
id1 = [B]9997[/B],
id2 = [B]9998[/B],
id3 = [B]9999[/B]
}
if getPlayerItemCount(cid, config.id1) < 1 and getPlayerItemCount(cid, config.id2) < 1 and getPlayerItemCount(cid, config.id3) < 1 then
doTeleportThing(cid, fromPosition)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have needed items.")
end
return true
end
movements.xml
Code:
<movevent type="StepIn" actionid="[B]20000[/B]" event="script" value="questtile.lua"/>
I have this script but he don't work. When i have items id 9999, 9998, 9997 and I step on tile (actionid 20000) that I go, but when i don't have these items I also go but display "You don't have needed items.". Who help me? Sorry, for my English but I'm from other country.