• 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!

Organising mods

Master-m

Need help? Just ask!
Senator
Joined
May 28, 2007
Messages
4,338
Reaction score
16
Location
The Netherlands
Hello all:)

I've got a question. How can you organise your mods folder? Insteed of having all xml files in one folder.

like:

\\Data\Mods\Talkactions
\\Data\Mods\Actions
\\Data\Mods\Movements

etc.

I tried it but tfs doesn't read in the folders?
Any solution?
 
Why don't you just name them like so? (Don't really know how the new mod system works, and I'm not sure if the extension is LUA, but you get the idea)
PHP:
./actions-myMod.lua
./actions-myModTwo.lua
./talkactions-myModThree.lua

EDIT: Until further knowledge concerning the directories that is.
 
Why don't you just name them like so? (Don't really know how the new mod system works, and I'm not sure if the extension is LUA, but you get the idea)
PHP:
./actions-myMod.lua
./actions-myModTwo.lua
./talkactions-myModThree.lua

EDIT: Until further knowledge concerning the directories that is.

its .xml:p

But yeah I already did it like that but its gettting messy when I'm done converting all my scripts..;/
 
Alright, is there no like mods.xml where you link all the mods to their corresponding script or do you do that directly in the mod file? Like <status active="1" /> or so.
 
Alright, is there no like mods.xml where you link all the mods to their corresponding script or do you do that directly in the mod file? Like <status active="1" /> or so.

n0p look, this is an example:
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Buy premium command" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes">
	<config name="buypremium_config"><![CDATA[
		config = {
			days = 90,
			cost = 10000,
			maxDays = 360
		}
	]]></config>
	<talkaction words="!buypremium; !pacc" event="buffer"><![CDATA[
		domodlib('buypremium_config')
		if(getPlayerPremiumDays(cid) > config.maxDays) then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can not buy more than " .. config.days + config.maxDays .. " days of Premium Account.")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
			return
		end

		if(not doPlayerRemoveMoney(cid, config.cost)) then
			doPlayerSendCancel(cid, "You don't have enough money, " .. config.days .. " days premium account costs " .. config.cost .. " gold coins.")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
			return
		end

		doPlayerAddPremiumDays(cid, config.days)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have bought " .. config.days .. " days of premium account.")
	]]></talkaction>
</mod>
 
Its actually just to edit this line:
PHP:
if(!boost::filesystem::is_directory(it->status()) && name.find(".xml") != std::string::npos)

:)

_I_
 
Back
Top