GhostX
Mapping Board Moderator
Ok, so it's basically my first legit/propper script. I had a little help from fallen explaining some functions because i am new to this.
I also ran it though lua.org's lua demo test run program and it came through clear. So i then added to a server to try it out.
The script is meant to provide map marks when the hangable minimap is used with AID "xxxx" (i have this in the actions.xml)
The issue is, when i use the hangable map, it says "cannot use this item" or something similar, and no errors are produced in the console. The same happens when i try with other items.. E.g. i tested on pirate hat aswell.
*ACTIONID// thanks for wavoz for noticing this error, though problem still exists*
Any help to why it isn't working and what is missing (if there is) will be much appreciated.
Regards
I also ran it though lua.org's lua demo test run program and it came through clear. So i then added to a server to try it out.
The script is meant to provide map marks when the hangable minimap is used with AID "xxxx" (i have this in the actions.xml)
The issue is, when i use the hangable map, it says "cannot use this item" or something similar, and no errors are produced in the console. The same happens when i try with other items.. E.g. i tested on pirate hat aswell.
LUA:
--[[ Script by Ghostx...
Use minimap receive map marks
]]--
function onUse(cid, item, fromPosition, itemEx, toPosition)
local Mark = {
[1]={{x=1019,y=1044,z=7},"Temple",MAPMARK_TEMPLE},
[2]={{x=1024,y=1015,z=7},"Depot",MAPMARK_LOCK},
[3]={{x=1024,y=1007,z=7},"Equipment",MAPMARK_SWORD},
[4]={{x=1015,y=1017,z=7},"Hunting Shop",MAPMARK_STAR},
[5]={{x=1019,y=1005,z=7},"Castle",MAPMARK_FLAG},
[6]={{x=1009,y=1015,z=7},"Potion Shop",MAPMARK_TICK},
[7]={{x=992,y=1011,z=7},"Wilderness",MAPMARK_REDWEST},
[8]={{x=1056,y=1011,z=7},"Docks",MAPMARK_BAG}
}
for i=1,#Mark do
doPlayerAddMapMark(cid, Mark[i][1], Mark[i][3], Mark[i][2])
doPlayerSendTextMessage(cid,21,"You now have locations marked on your map")
end
return true
end
XML:
<action actionid="65535" script="other/mapmarking.lua"/>
Any help to why it isn't working and what is missing (if there is) will be much appreciated.
Regards
Last edited: