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

Help Developing Cool Quest Scripts Open for all to share!

Artvs Magnvs

Member
Joined
Aug 22, 2021
Messages
24
Reaction score
9
Hello everyone!

I'm a
fantasy novel writer developing a custom server and trying to create my first quests, but I don't know much about scripting or programming, so I've got the idea to make a Community Quest Scripting thread so we all can develop and share different ideas to create great custom Quests!

Here are some ideas of scripts that I want to implement in my quests:

- Room name "Ladies first": the quest requires 4 vocations (In my game there are 4 vocations and have unique genders 2+2), and I want to make a door that will only be opened if the 2 characters that open it are the woman. if a male character tries to open it first, a bunch of super-strong monsters will summon and kill them all :D

- Room name: "The Awakening": In this room, there is only 1 monster standing still (it won't attack until a player attacks him) but here is the thing: since players enter the room, the monster will evolve into a much more strong monster all the time he is not being attacked. For example, after 10 seconds, his stats are x2, after 5 more seconds, his stats are x5, after 5 more seconds, his stats are x10, and after 5 more seconds, he is invincible and will kill everyone super quickly.

- Room name: "Poison room": In this room, since the player enters, poison fields with a movement slow effect start to spread from different points. The players have to run and find the pattern of how the poison expands and find quickly a path to get out of there to the next room.

- Room name: "Greed room": In this room, there are a lot of chests with rewards/runes/potions, and some more special items, but every chest has like 35% chance to summon an immense wave of monsters.

- Room name: "Ancestral statues": There are no monsters in this room, but instead, there are statues with a face that turn in direction every 3-5 seconds. Every statue has a different "action". One statue causes damage to the tile in front of its face. Another statue pushes the player 3 tiles in the direction of the face. Another statue will poison/burn the player. Another statue will heal the player. Etc, there are so many possibilities ^^

- Room name: "Peace Room": In this room monsters have high HP and reflect 75% of the damage of all types (melee, distance, spells, etc), so the players should better not fight and cross it as fast as possible.

- Room name: "Sacrifice Room": The teleport/door to the next room will only appear/open when a player clicks "use" on an item that will give him a debuff for the next 20 minutes (-30 shielding, -30 attack, -30 magic level, - 35% mana, -35% hp)


These are some of the ideas I've got, I would like to make them real! So if any of you would like to help me develop some of them and we share them all here it would be awesome!

Please feel free to add new ideas to the thread! :D
 
I've got something similar to your "greed room" idea. I had a treasure map which was spawning treasure chest somewhere on the map. I will share a script used for a treasure chest. Probably you will get idea what's goin' on and adapt it for your needs.

You have to conditionally spawn monsters instead of spawning everytime as I did.

LUA:
local defendingPirates = {
    [1] = {name = 'Pirate Marauder',  count = 3 },
    [2] = {name = 'Pirate Buccaneer', count = 2 },
    [3] = {name = 'Pirate Cutthroat', count = 2 },
    [4] = {name = 'Pirate Corsair', count = 1 }
}
local treasureItems = {
    [1] = {name = 'pirate shirt', id = 6095, count = 1},
    [2] = {name = 'pirate knee breeches', id = 5918, count = 1},
    [3] = {name = 'pirate hat', id = 6096, count = 1},
    [4] = {name = 'black pearl', id = 2144, count = 2},
    [5] = {name = 'white pearl', id = 2143, count = 2},
    [6] = {name = 'peg leg', id = 6162, count = 2},
    [7] = {name = 'hook', id = 6097, count = 1},
    [8] = {name = 'eye patch', id = 6098, count = 1}
}


function onUse(cid, item, fromPosition, itemEx, toPosition)
    local player = Player(cid)
    if not player then
        return false
    end
    local defendingPirateRecord = defendingPirates[math.random(#defendingPirates)]
    for i = 1 , defendingPirateRecord.count do
        Game.createMonster(defendingPirateRecord.name, fromPosition)
    end
    player:addItem(ITEM_PLATINUM_COIN, math.random(8, 14))
    local treasureReward = treasureItems[math.random(#treasureItems)]
    player:addItem(treasureReward.id, treasureReward.count)
    player:sendTextMessage(MESSAGE_INFO_DESCR, 'You have found treasure.')
    item:remove(1)
    return true
end

And declare actionid which will be connected to that script (actions.xml):
XML:
<action actionid="2100" script="other/pirate_treasure.lua" />
 
I've got something similar to your "greed room" idea. I had a treasure map which was spawning treasure chest somewhere on the map. I will share a script used for a treasure chest. Probably you will get idea what's goin' on and adapt it for your needs.

You have to conditionally spawn monsters instead of spawning everytime as I did.

LUA:
local defendingPirates = {
    [1] = {name = 'Pirate Marauder',  count = 3 },
    [2] = {name = 'Pirate Buccaneer', count = 2 },
    [3] = {name = 'Pirate Cutthroat', count = 2 },
    [4] = {name = 'Pirate Corsair', count = 1 }
}
local treasureItems = {
    [1] = {name = 'pirate shirt', id = 6095, count = 1},
    [2] = {name = 'pirate knee breeches', id = 5918, count = 1},
    [3] = {name = 'pirate hat', id = 6096, count = 1},
    [4] = {name = 'black pearl', id = 2144, count = 2},
    [5] = {name = 'white pearl', id = 2143, count = 2},
    [6] = {name = 'peg leg', id = 6162, count = 2},
    [7] = {name = 'hook', id = 6097, count = 1},
    [8] = {name = 'eye patch', id = 6098, count = 1}
}


function onUse(cid, item, fromPosition, itemEx, toPosition)
    local player = Player(cid)
    if not player then
        return false
    end
    local defendingPirateRecord = defendingPirates[math.random(#defendingPirates)]
    for i = 1 , defendingPirateRecord.count do
        Game.createMonster(defendingPirateRecord.name, fromPosition)
    end
    player:addItem(ITEM_PLATINUM_COIN, math.random(8, 14))
    local treasureReward = treasureItems[math.random(#treasureItems)]
    player:addItem(treasureReward.id, treasureReward.count)
    player:sendTextMessage(MESSAGE_INFO_DESCR, 'You have found treasure.')
    item:remove(1)
    return true
end

And declare actionid which will be connected to that script (actions.xml):
XML:
<action actionid="2100" script="other/pirate_treasure.lua" />
That's Great, thank you very much! How do you think I could adapt it into the "greed room" idea?
 
That's the script that can be bounded to your greed chests. Chest should have assigned actionid according to the one provided in actions.xml.

You can rework that part of code to be closer to your needs:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local player = Player(cid)
    if not player then
        return false
    end
    if (math.random(100) <= 35) then
        local defendingPirateRecord = defendingPirates[math.random(#defendingPirates)]
        for i = 1 , defendingPirateRecord.count do
            Game.createMonster(defendingPirateRecord.name, fromPosition)
        end
    end
    player:addItem(ITEM_PLATINUM_COIN, math.random(8, 14))
    local treasureReward = treasureItems[math.random(#treasureItems)]
    player:addItem(treasureReward.id, treasureReward.count)
    player:sendTextMessage(MESSAGE_INFO_DESCR, 'You have found treasure.')
    item:remove(1)
    return true
end

Now it works like that -> when player click on the chest then there is 35 % chance to spawn random set of declared monsters in a defendingPirates structure. Player additionally gets between 8-14 platinum coins and gets random items from the treasureReward structure. Finally the chest is removed.
 
That's the script that can be bounded to your greed chests. Chest should have assigned actionid according to the one provided in actions.xml.

You can rework that part of code to be closer to your needs:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local player = Player(cid)
    if not player then
        return false
    end
    if (math.random(100) <= 35) then
        local defendingPirateRecord = defendingPirates[math.random(#defendingPirates)]
        for i = 1 , defendingPirateRecord.count do
            Game.createMonster(defendingPirateRecord.name, fromPosition)
        end
    end
    player:addItem(ITEM_PLATINUM_COIN, math.random(8, 14))
    local treasureReward = treasureItems[math.random(#treasureItems)]
    player:addItem(treasureReward.id, treasureReward.count)
    player:sendTextMessage(MESSAGE_INFO_DESCR, 'You have found treasure.')
    item:remove(1)
    return true
end

Now it works like that -> when player click on the chest then there is 35 % chance to spawn random set of declared monsters in a defendingPirates structure. Player additionally gets between 8-14 platinum coins and gets random items from the treasureReward structure. Finally the chest is removed.
aswesome, thank you very much!!
 
Back
Top