• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Map

jestemPolakiem

New Member
Joined
Oct 17, 2009
Messages
48
Reaction score
2
Location
Poland
Map
by jestemPolakiem

script has been tested on The Forgotten Server 0.3.6pl1 and worked

maparb.png


Code:
[B]To use the script, just use a map.[/B]
Map has been updated.

data/actions/actions.xml
PHP:
<action itemid="1956"	event="script"	value="1956.lua"/>

data/actions/scripts/1956.lua
PHP:
marks = {
	[0] = {pos = {x = 160, y = 55, z = 7}, type = MAPMARK_TEMPLE, 	 description = "Temple"}, 
	[1] = {pos = {x = 143, y = 51, z = 7}, type = MAPMARK_BAG, 	    description = "Shops"}, 
	[2] = {pos = {x = 131, y = 55, z = 7}, type = MAPMARK_STAR, 	   description = "City Center"}, 
	[3] = {pos = {x = 184, y = 64, z = 7}, type = MAPMARK_GREENNORTH,  description = "Gate Output"}
}

function onUse(cid, item, fromPos, itemEx, toPos)
	for i = 0, #marks do 
		doPlayerAddMapMark(cid, marks[i].pos, marks[i].type, marks[i].description)
	end
	doCreatureSay(cid, 'Map has been updated.', TALKTYPE_MONSTER) 
	return true
end



Greets
jestemPolakiem
 
Last edited:
Lua:
local config = {
    storage = 58200,
    version = 1, -- Increase this value after adding new marks, so player can step again and receive new map marks
    marks = {
        {mark = 3, pos = {x = 346, y = 889, z = 7}, desc = "Depot, training monks, and tools shop"},
        {mark = 2, pos = {x = 395, y = 856, z = 7}, desc = "NPC Loot"},
        {mark = 5, pos = {x = 343, y = 831, z = 7}, desc = "NPC runes y potions"},
        {mark = 14, pos = {x = 319, y = 897, z = 7}, desc = "NPC Addons"},
        {mark = 1, pos = {x = 326, y = 907, z = 7}, desc = "Distance Shop"},
        {mark = 15, pos = {x = 411, y = 903, z = 7}, desc = "Salida, exit"},
        {mark = 1, pos = {x = 501, y = 864, z = 7}, desc = "Wyverns"},
        {mark = 1, pos = {x = 580, y = 907, z = 7}, desc = "Cyclops"},
        {mark = 1, pos = {x = 476, y = 786, z = 7}, desc = "Ghouls, tarantulas, beholders"},
        {mark = 1, pos = {x = 518, y = 777, z = 7}, desc = "Dragons"},
    }
}

local f_addMark = doPlayerAddMapMark
if(not f_addMark) then f_addMark = doAddMapMark end

function onStepIn(cid, item, position, fromPosition)
    if(isPlayer(cid) ~= TRUE or getPlayerStorageValue(cid, config.storage) == config.version) then
        return
    end

    for _, m  in pairs(config.marks) do
        f_addMark(cid, m.pos, m.mark, m.desc ~= nil and m.desc or "")
                doCreatureSay(cid,"Check your minimap!", TALKTYPE_ORANGE_1)
    end
    setPlayerStorageValue(cid, config.storage, config.version)
    return TRUE
end
 
Can you post the other map marks? (All of them) and can you make this script a movement like a StepIn on the first square on the map they StepIn they get the marks?
 
I Use like this.


Create in creaturescripts/scripts/Marks.lua
Lua:
local config = {
	storage = 9432,
	version = 4, -- Increase this value after adding new marks, so player can step again and receive new map marks
	marks = {
		{mark = 11, pos = {x = 56, y = 100, z = 7}, desc = "Venda de loot"},
		{mark = 11, pos = {x = 32, y = 101, z = 7}, desc = "Items para addon"},
		{mark = 18, pos = {x = 21, y = 12, z = 7}, desc = "Barco"},
		{mark = 2, pos = {x = 122, y = 33, z = 7}, desc = "Dragons"},
		{mark = 12, pos = {x = 70, y = 52, z = 7}, desc = "Runas"},
		{mark = 15, pos = {x = 73, y = 119, z = 7}},
		{mark = 8, pos = {x = 51, y = 144, z = 7}, desc = "Undeads ( Ghoul )"},
		{mark = 1, pos = {x = 87, y = 148, z = 7}, desc = "Canavial"},
		{mark = 11, pos = {x = 91, y = 99, z = 7}, desc = "Vendedor"},
		{mark = 0, pos = {x = 79, y = 99, z = 7}, desc = "Fazedor de addon"},
		{mark = 13, pos = {x = 83, y = 85, z = 7}, desc = "Banco"},
		{mark = 6, pos = {x = 75, y = 61, z = 7}, desc = "Food"},
		{mark = 11, pos = {x = 108, y =68, z = 7}, desc = "Ring"},
		{mark = 16, pos = {x = 112, y =57, z = 7}, desc = "Saida East"},
		{mark = 11, pos = {x = 106, y =105, z = 7}, desc = "Saida East"},
		{mark = 3, pos = {x = 81, y = 24, z = 7}, desc = "Promotion"}}
	}


local f_addMark = doPlayerAddMapMark
if(not f_addMark) then f_addMark = doAddMapMark end

function onLogin(cid)

 if(isPlayer(cid) == TRUE) then

if(isPlayer(cid) == TRUE) then
	if  (getPlayerStorageValue(cid, config.storage) ~= config.version) then
		TextUm = 'Foram adicionadas marcas sobre os npcs de dorion em seu mapa'
		doPlayerPopupFYI(cid, TextUm)
		
		for _, m  in pairs(config.marks) do
			f_addMark(cid, m.pos, m.mark, m.desc ~= nil and m.desc or "")
		end
		setPlayerStorageValue(cid, config.storage, config.version)
		return TRUE
	end
	return TRUE
end

	end
	return TRUE
	

	
end

add in
login.lua

Lua:
registerCreatureEvent(cid, "marks")


Add in creaturescripts.xml
Lua:
<event type="login" 		name="Mark" event="script" value="marks.lua"/>
 
Map
by jestemPolakiem

script has been tested on The Forgotten Server 0.3.6pl1 and worked

maparb.png


Code:
[B]To use the script, just use a map.[/B]
Map has been updated.

data/actions/actions.xml
PHP:
<action itemid="1956"	event="script"	value="1956.lua"/>

data/actions/scripts/1956.xml
PHP:
marks = {
	[0] = {pos = {x = 160, y = 55, z = 7}, type = MAPMARK_TEMPLE, 	 description = "Temple"}, 
	[1] = {pos = {x = 143, y = 51, z = 7}, type = MAPMARK_BAG, 	    description = "Shops"}, 
	[2] = {pos = {x = 131, y = 55, z = 7}, type = MAPMARK_STAR, 	   description = "City Center"}, 
	[3] = {pos = {x = 184, y = 64, z = 7}, type = MAPMARK_GREENNORTH,  description = "Gate Output"}
}

function onUse(cid, item, fromPos, itemEx, toPos)
	for i = 0, #marks do 
		doPlayerAddMapMark(cid, marks[i].pos, marks[i].type, marks[i].description)
	end
	doCreatureSay(cid, 'Map has been updated.', TALKTYPE_MONSTER) 
	return true
end



Greets
jestemPolakiem


data/actions/scripts/1956.xml :confused:

data/actions/scripts/1956.lua <-- :thumbup:
 
For what ?! If player will delete marks from map (or he will log on other computer), Then he can use it again..
when i say storages doesnt mean forever, i actually meant for a certain time so they dont abuse it ;]
 
Back
Top