• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

onStepIn with storage value, help please..

Synergy

New Member
Joined
Nov 24, 2011
Messages
334
Reaction score
0
Well I know I make alot of threads and I request alot, but well
I didn't get help with a single one of them :/

I hope to get help on this one


What I need is this:

The players first login on the server, which is in the tutorial temple.
When you try to leave the temple, the last tiles of the exit will have a MESSAGE pop up saying:

"You should go see Sarah at her farm, she will give you your first task"

With storage so the next time the player enter this tiles it won't pop up.
 
LUA:
local storage = 12345
function onStepIn(cid, item, fromPosition, toPosition)
	if(isPlayer(cid) and getCreatureStorage(cid, storage) < 0) then
		doCreatureSay(cid, "Message here.", TALKTYPE_MONSTER)
		doCreatureSetStorage(cid, storage, 1)
	end
end
 
Last edited:
Thank you J.dre :)

- - - Updated - - -

LUA:
local storage = 12345
function onStepIn(cid, item, fromPosition, toPosition)
	if(getCreatureStorage(cid, storage) < 0) then
		doPlayerSendTextMessage(cid, "You should do something.")
		doCreatureSetStorage(cid, storage, 1)
	end
end


I get this error:

LuaInterface::luaDoPlayerSendTextMessage> Player not found
 
That's why maybe a creature that's not a player in steping on the tile, not a problem..

or use this:

Code:
doPlayerSendTextMessage(cid,22,"You should do something.")
 
LUA:
local storage = 12345
function onStepIn(cid, item, fromPosition, toPosition)
	if isPlayer(cid) and getCreatureStorage(cid, storage) < 0 then
		doCreatureSay(cid, "Message here.", TALKTYPE_MONSTER)
		doCreatureSetStorage(cid, storage, 1)
	end
	return true
end
 
LUA:
local storage = 12345
function onStepIn(cid, item, fromPosition, toPosition)
	if isPlayer(cid) and getCreatureStorage(cid, storage) < 0 then
		doCreatureSay(cid, "Message here.", TALKTYPE_MONSTER)
		doCreatureSetStorage(cid, storage, 1)
	end
	return true[/QUOTE]


Synthetic, can you try to make this script?:
[URL="http://otland.net/f132/enchanting-speed-stones-167278/"]Enchanting with Speed Stone[/URL]
 
Back
Top