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

[TFS 1.2] Modal Mount Doll 2.0

strutZ

Australian OT Member {AKA Beastn}
Joined
Nov 16, 2014
Messages
1,391
Solutions
7
Reaction score
550
Hello Otland!
I have converted my modal window mount doll script to use @Non Sequitur modal window system which can be found HERE

You will have to install that in order to be able to use this system.

Why use this one instead?
Much cleaner then the last version you just need to add the action script and the lib files. There is no need to register the scripts on login.lua or add creaturescripts!

Information on the system
It has an easy config section for you to customize it how you would like it! You just need to fill out the config table found in the action script (pictured below)
Code:
-- Config
   dollID = 9019, -- Change this to your dolls or items, item ID

   -- Main Window Messages (The first window the player sees)
   mainTitle = "Choose a Mount!",
   mainMsg = "Choose a mount to unlock.",

   -- Already Owned Window (The window that appears when the player already owns the addon)
   ownedTitle = "Whoops!",
   ownedMsg = "You already have this mount. Please choose another.",

   -- No Doll in Backpack (The window that appears when the player doesnt have the doll in their backpack)
   dollTitle = "Whoops!",
   dollMsg = "The mount doll must be in your backpack.",
-- End Config

The system now however, Does not remove the mounts from the list. Instead it just adds "[Owned]" to the end of the mounts that are already unlocked. If a player is a little silly and clicks on an already owned mount by mistake it will give them an error message and allow them to go back. There is also a check to make sure the mount doll is in the players backpack before the mount is received.

Installation

1)
Install the modal window helper HERE

2) Register the script in /data/actions/actions.xml by adding this line (Replacing "ITEMID" with the item you want to use:
Code:
    <action itemid="ITEMID" script="mount_doll.lua"/>
3) Create a new text document in /data/actions/scripts and name it "mount_doll.lua" and paste the following:
http://pastebin.com/xeP0bJZT
http://pastebin.com/xeP0bJZT
4) Add the following line to your global.lua:
Code:
dofile('data/lib/mount_doll.lua')
5) Create a new text document in /data/lib/ and name it "mount_doll.lua" and paste the following:
http://pastebin.com/eB30RfW9

Enjoy =)
 
Thanks for another great release. I added the addon system with no problems but this one is not giving me the mount. It says I have it but if I check my mounts or use the item again it is not in the list. No errors either, any ideas?
 
Thanks for another great release. I added the addon system with no problems but this one is not giving me the mount. It says I have it but if I check my mounts or use the item again it is not in the list. No errors either, any ideas?
It definitely works man i just tested it again... do you mind testing with the widow queen and see if that works?
 
I would think I would get some type of error message but nothing haha. I tried loading it again and still nothing. Also tested the addon script again to make sure it was still working and it is.
 
I would think I would get some type of error message but nothing haha. I tried loading it again and still nothing. Also tested the addon script again to make sure it was still working and it is.
If you used my old mount system make sure you remove EVERYTHING and reinstall this one. Remembering to install the modalwindow helper.
 
Thanks for another great release. I added the addon system with no problems but this one is not giving me the mount. It says I have it but if I check my mounts or use the item again it is not in the list. No errors either, any ideas?
I had same problem when i was Free Account. When I use Premium Account problem is gone.

edit:
In data/action/scripts/mount_doll.lua replace:

Lua:
function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)
    player:sendMountWindow(mounts)
end

with

Lua:
function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)
    if isPremium(player) == FALSE then
        doPlayerSendTextMessage(player, 19, "Only premium players can use mount doll.")
    else
    player:sendMountWindow(mounts)
    end
end
 
Last edited:
Back
Top