Exactly what I was looking for, thanks ^^
If anybody comes by looking for the same thing,
have in mind that local values can't be read by dofile.
For example:
local test = 333 -- will be ignored by dofile since it's a local value
test = 333 -- will return 333 by calling test using dofile as it's a global value
Example of how to use:
we have a movement script named a.lua
Code:
shared = 3381
function onStepIn(cid, pos, fromPosition, toPosition)
dosomething
return true
end
and a talkaction named b.lua
<talkaction words="!b" script="b.lua"/>
Code:
dofile("data/movements/scripts/a.lua")
function onSay(cid, param, words, channel)
doCreatureSay(cid, '' .. shared .. '', 19, false, cid)
return true
end
now when we write !b it will say 3381 in orange text