Okay, so this is my first serious script i have ever made.
It's function: When you use "x" item (i use the hangable minimap or the writable map) You receive x marks/locations on your minimap.
Insert this into actions -> scripts -> chosen location
Useful information -> Different marks you can add for the icons
Regards
It's function: When you use "x" item (i use the hangable minimap or the writable map) You receive x marks/locations on your minimap.
Insert this into actions -> scripts -> chosen location
Lua:
--[[ Script by Ghostx...
Use a map recieve map marks/locations on minimap
Any issues and/or questions do contact me on otland.
]]--
function onUse(cid, item, fromPosition, itemEx, toPosition)
local Mark = {
[1]={{x=0000,y=0000,z=7},"name",MAPMARK_TEMPLE}, -- Edit the locations to the position to mark
[2]={{x=0000,y=0000,z=7},"name",MAPMARK_LOCK}, -- Where it says 'name' change it to the place
[3]={{x=0000,y=0000,z=7},"name",MAPMARK_SWORD}, -- You can change the icon after the mapmark_
[4]={{x=0000,y=0000,z=7},"name",MAPMARK_STAR}, -- You can add or reduce locations just by
[5]={{x=0000,y=0000,z=7},"name",MAPMARK_FLAG}, -- adding/deleteing a line
[6]={{x=0000,y=0000,z=7},"name",MAPMARK_TICK}, -- Make sure to follow the [1], [2] order rule.
[7]={{x=0000,y=0000,z=7},"name",MAPMARK_REDWEST},
[8]={{x=0000,y=0000,z=7},"name",MAPMARK_BAG}
}
for i = 1, #mark do
doPlayerAddMark(cid, Mark[i][1], Mark[i][3], Mark[i][2])
end
doPlayerSendTextMessage(cid, 21, "You now have locations marked on your map")
return true
end
if you're using 0.2, use this function instead:
Lua:doAddMapMark(cid, pos, type, <optional> description)
Useful information -> Different marks you can add for the icons
XML:
MAPMARK_TICK
MAPMARK_QUESTION
MAPMARK_EXCLAMATION
MAPMARK_STAR
MAPMARK_CROSS
MAPMARK_TEMPLE
MAPMARK_KISS
MAPMARK_SHOVEL
MAPMARK_SWORD
MAPMARK_FLAG
MAPMARK_LOCK
MAPMARK_BAG
MAPMARK_SKULL
MAPMARK_DOLLAR
MAPMARK_REDNORTH
MAPMARK_REDSOUTH
MAPMARK_REDEAST
MAPMARK_REDWEST
MAPMARK_GREENNORTH
MAPMARK_GREENSOUTH
You could probably edit it like this in order to make it compatible to both 0.2 and 0.3.
Also, you should use constants instead of 21 in text message.
Lua:--[[ Script by Ghostx... Use a map recieve map marks/locations on minimap Any issues and/or questions do contact me on otland. ]]-- local marks = { [1]={{x=0000,y=0000,z=7}, "name", MAPMARK_TEMPLE}, -- Edit the locations to the position to mark [2]={{x=0000,y=0000,z=7}, "name", MAPMARK_LOCK}, -- Where it says 'name' change it to the place [3]={{x=0000,y=0000,z=7}, "name", MAPMARK_SWORD}, -- You can change the icon after the mapmark_ [4]={{x=0000,y=0000,z=7}, "name", MAPMARK_STAR}, -- You can add or reduce locations just by [5]={{x=0000,y=0000,z=7}, "name", MAPMARK_FLAG}, -- adding/deleteing a line [6]={{x=0000,y=0000,z=7}, "name", MAPMARK_TICK}, -- Make sure to follow the [1], [2] order rule. [7]={{x=0000,y=0000,z=7}, "name", MAPMARK_REDWEST}, [8]={{x=0000,y=0000,z=7}, "name", MAPMARK_BAG} } function onUse(cid, item, fromPosition, itemEx, toPosition) for i = 1, #marks do if doAddMapMark then doAddMapMark(cid, marks[i][1], marks[i][3], marks[i][2]) else doPlayerAddMark(cid, marks[i][1], marks[i][3], marks[i][2]) end end doPlayerSendTextMessage(cid, 21, "You now have locations marked on your map") return true end
Regards
Last edited: