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

Modal Window Addon and Mount Doll

strutZ

Australian OT Member {AKA Beastn}
Joined
Nov 16, 2014
Messages
1,393
Solutions
7
Reaction score
552
Hey all,

I'm in the process of updating the mount doll script, As I was doing it I though it would be a real cool idea if maybe when a player right clicks and "sets outfit" when you are scrolling for outfits or mounts all the mounts and outfits are there but if they are not owned by that player there is a "buy button" which will deduct the addon/mount doll. Would this be possible? Going to finish updating the mount doll talk action and start trying to work it out, So any info/help on this would be sick.

Also another way we could do it is when you use the addon/mount doll a modal window pops up with a list of the mounts/addons and shows a display of each outfit/mount with a buy button under it.

Anyways any help would be awesome.

SCRIPT WILL BE FOR TFS 1.1 (Or maybe 1.2)
 
None of them are possible without client and server edit.
Mkay. I've startd making the ModalWindow for the outfits though will jsut be a list and they can choose that way. Its assume i cant have a preview of the outfit though..


tl;dr

a small suggestion: make it doesn't display outfits/addons that player already got

lmao its vote even that long you lazy shit haha.

Thats not a bad idea though see how i go. jsut trying to work out how to make it distinguish between male/female
 
So this is the current layout of the script (Will be cleaned later)for some reason though my GOD doesnt give addon if he already has it but when i use a player it just keeps trying to give the addon even though he already has it?

Code:
function onModalWindow(player, modalWindowId, buttonId, choiceId)
    player:unregisterEvent("modalad")
    local maleOutfits = {128, 129, 130, 131, 132, 133, 134, 147, 148, 149, 150, 151, 152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, 465, 472, 512, 516, 541, 574, 577, 610, 619, 633, 634, 637, 664, 667, 684, 695, 697, 699}
    local femaleOutfits = {136, 137, 141, 139, 140, 138, 142, 143, 144, 145, 146, 155, 156, 157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 431, 433, 464, 466, 471, 513, 514, 542, 575, 578, 618, 620, 632, 578, 636, 665, 578, 683, 694, 696, 698}

    if modalWindowId == 1000 then
        if buttonId == 100 then
             if player:hasOutfit(player:getSex() == 0 and maleOutfits or femaleOutfits, 3) then
                player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have already obtained the addons.')
                return false
             end
             player:addOutfitAddon(maleOutfits[choiceId], 3)
             player:addOutfitAddon(femaleOutfits[choiceId], 3)
             player:getPosition():sendMagicEffect(CONST_ME_FIREWORK_YELLOW)
        end
    end
end
 
Last edited:
Ahh yea someone pointed that out to me. I'll edit main thread now. Actually i cant edit it lol.. oh well people need to learn to read the thread haha
 
Back
Top