• 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/1.3] Free scripting service

Status
Not open for further replies.
Mining/Gathering.
25uml8k.jpg

(5709, 5868, 5750, 5619, 8633, 8634, 8635, 8636)
(5708, 5866, 5751, 5620, 8637, 8638, 8639, 8640)
(5707, 5867, 5752, 5621, Blank, Blank, Blank, Blank)


Hello I'm requesting something that perhaps was already made, but not quite like I imagine a mining system in a game should be.
What I'm asking for is the a system in which the player will need certain luck+skill level to be able to get his reward. Players will use an item(Pick) to hit a Vein of ore and if Level is good and chance is right the vein will brake into an smaller one, and then again to an un working vein that will need time to heal it self, but while the vein is on the second stage it can heal.
Lets say there's 3 stages:
1 The vein is on its natural state.
2 The vein is on a volatile stage, it could heal or it could explode.
3 The vein is exhausted need time to heal.

So in stage one it does nothing, player can use his pick to try and mine something, vein will change to stage 2 if level and chance ocurre. In stage two the vain has some events, It can heal it self, It can Explode, It can give the ore to the players. In the last stage it can't be used since its exhausted.
The image show only 2 veins in the crystals since i was thinking to make them with a lower chance to give the reward making them already hard to get.

Basically a mining system is what I'm asking for.

--This was made long ago by Quas for me, but now its non working. perhaps it can give you some insight ideas.
http://pastebin.com/haB4cpcq
 
Mining/Gathering.
25uml8k.jpg

(5709, 5868, 5750, 5619, 8633, 8634, 8635, 8636)
(5708, 5866, 5751, 5620, 8637, 8638, 8639, 8640)
(5707, 5867, 5752, 5621, Blank, Blank, Blank, Blank)


Hello I'm requesting something that perhaps was already made, but not quite like I imagine a mining system in a game should be.
What I'm asking for is the a system in which the player will need certain luck+skill level to be able to get his reward. Players will use an item(Pick) to hit a Vein of ore and if Level is good and chance is right the vein will brake into an smaller one, and then again to an un working vein that will need time to heal it self, but while the vein is on the second stage it can heal.
Lets say there's 3 stages:
1 The vein is on its natural state.
2 The vein is on a volatile stage, it could heal or it could explode.
3 The vein is exhausted need time to heal.

So in stage one it does nothing, player can use his pick to try and mine something, vein will change to stage 2 if level and chance ocurre. In stage two the vain has some events, It can heal it self, It can Explode, It can give the ore to the players. In the last stage it can't be used since its exhausted.
The image show only 2 veins in the crystals since i was thinking to make them with a lower chance to give the reward making them already hard to get.

Basically a mining system is what I'm asking for.

--This was made long ago by Quas for me, but now its non working. perhaps it can give you some insight ideas.
http://pastebin.com/haB4cpcq
thank god someone knows how to provide information
ill work on it tomorrow

edit: i noticed your picture has 4 rows of items but your ids only have 3 rows?
 
talkactions\online.lua
http://pastebin.com/Wq83STE4

talkactions\addBounty.lua
http://pastebin.com/Bp2Um3iX

Code:
<talkaction words="!bounty" separator=" " script="addbounty.lua"/>

creaturescripts\bountyKill.lua
http://pastebin.com/0N513ZzB

events\player.lua @Player:eek:nLook
http://pastebin.com/tp8RhwjK


Code:
<event type="death" name="bountyKill" script="bountyKill.lua"/>
register bountyKill in login.lua

Finaly got round to testing this, couple of small bugs.

For some reason when you add a bounty it takes away 1gp?

15:32 [BOUNTY]: Test Pally has added a bounty of 70000 gold to fishie druid. Current bounty: 69999
15:32 [BOUNTY] Test Pally has killed Fishie Druid with a bounty, he has been rewarded with 69999 gold.
15:32 [BOUNTY]: Test Pally has added a bounty of 70000 gold to fishie druid. Current bounty: 69999
15:32 [BOUNTY] Test Pally has killed Fishie Druid with a bounty, he has been rewarded with 69999 gold.
15:34 [BOUNTY]: Test Pally has added a bounty of 1000000 gold to fishie druid. Current bounty: 999999

Also when i add the onlook part to player it makes players unable to look at anything, not getting no errors in console.
 
thank god someone knows how to provide information
ill work on it tomorrow

edit: i noticed your picture has 4 rows of items but your ids only have 3 rows?

I'm planing on releasing a batch of free sprites along with that system you are making, the last row are the reward/ore/mineral you get, as of right now you can use X or 5880 as a reward.
 
Finaly got round to testing this, couple of small bugs.

For some reason when you add a bounty it takes away 1gp?

15:32 [BOUNTY]: Test Pally has added a bounty of 70000 gold to fishie druid. Current bounty: 69999
15:32 [BOUNTY] Test Pally has killed Fishie Druid with a bounty, he has been rewarded with 69999 gold.
15:32 [BOUNTY]: Test Pally has added a bounty of 70000 gold to fishie druid. Current bounty: 69999
15:32 [BOUNTY] Test Pally has killed Fishie Druid with a bounty, he has been rewarded with 69999 gold.
15:34 [BOUNTY]: Test Pally has added a bounty of 1000000 gold to fishie druid. Current bounty: 999999

Also when i add the onlook part to player it makes players unable to look at anything, not getting no errors in console.
add this to your login.lua
Code:
if player:getStorageValue(bountyStorage) == -1 then
player:setStorageValue(bountyStorage, 0)
end
storages are -1 by default

try repasting the whole function again
Code:
function Player:onLook(thing, position, distance)
    local description = "You see " .. thing:getDescription(distance)
    if self:getGroup():getAccess() then
        if thing:isItem() then
            description = string.format("%s\nItem ID: %d", description, thing:getId())

            local actionId = thing:getActionId()
            if actionId ~= 0 then
                description = string.format("%s, Action ID: %d", description, actionId)
            end

            local uniqueId = thing:getAttribute(ITEM_ATTRIBUTE_UNIQUEID)
            if uniqueId > 0 and uniqueId < 65536 then
                description = string.format("%s, Unique ID: %d", description, uniqueId)
            end

            local itemType = thing:getType()

            local transformEquipId = itemType:getTransformEquipId()
            local transformDeEquipId = itemType:getTransformDeEquipId()
            if transformEquipId ~= 0 then
                description = string.format("%s\nTransforms to: %d (onEquip)", description, transformEquipId)
            elseif transformDeEquipId ~= 0 then
                description = string.format("%s\nTransforms to: %d (onDeEquip)", description, transformDeEquipId)
            end

            local decayId = itemType:getDecayId()
            if decayId ~= -1 then
                description = string.format("%s\nDecays to: %d", description, decayId)
            end
        elseif thing:isCreature() then
            local str = "%s\nHealth: %d / %d"
            if thing:getMaxMana() > 0 then
                str = string.format("%s, Mana: %d / %d", str, thing:getMana(), thing:getMaxMana())
            end
            description = string.format(str, description, thing:getHealth(), thing:getMaxHealth()) .. "."
        end

        local position = thing:getPosition()
        description = string.format(
            "%s\nPosition: %d, %d, %d",
            description, position.x, position.y, position.z
        )

        if thing:isCreature() then
            if thing:isPlayer() then
                description = string.format("%s\nIP: %s.", description, Game.convertIpToString(thing:getIp()))
            end
        end
    end
    if thing:isPlayer() then
        local pronoun, posess, user = thing:getSex() == PLAYERSEX_MALE and 'He' or 'She', 'has', thing
        if thing == self then
            pronoun = 'You'
            posess = 'have'
            user = self
        end
        local bounty = user:getStorageValue(bountyStorage)
        if bounty > 0 then
            description = description .. string.format('\n%s %s a bounty of %d gold coins.', pronoun, posess, bounty)
        end
    end
    self:sendTextMessage(MESSAGE_INFO_DESCR, description)
end
 
holy shit, sorry for spam the thread but this guy, tampek are the worse leecher here, he have an otserver but ask for help everyday don't try by himself :S
and then now "item when use say lasted raid spawned like Item ID: 1434." ? WTF IS THIS
i don't know
i'm just gonna ignore him cause he's asked for 3 things and didn't bother giving information + his horrid english
 
add this to your login.lua
Code:
if player:getStorageValue(bountyStorage) == -1 then
player:setStorageValue(bountyStorage, 0)
end
storages are -1 by default

try repasting the whole function again
Code:
function Player:onLook(thing, position, distance)
    local description = "You see " .. thing:getDescription(distance)
    if self:getGroup():getAccess() then
        if thing:isItem() then
            description = string.format("%s\nItem ID: %d", description, thing:getId())

            local actionId = thing:getActionId()
            if actionId ~= 0 then
                description = string.format("%s, Action ID: %d", description, actionId)
            end

            local uniqueId = thing:getAttribute(ITEM_ATTRIBUTE_UNIQUEID)
            if uniqueId > 0 and uniqueId < 65536 then
                description = string.format("%s, Unique ID: %d", description, uniqueId)
            end

            local itemType = thing:getType()

            local transformEquipId = itemType:getTransformEquipId()
            local transformDeEquipId = itemType:getTransformDeEquipId()
            if transformEquipId ~= 0 then
                description = string.format("%s\nTransforms to: %d (onEquip)", description, transformEquipId)
            elseif transformDeEquipId ~= 0 then
                description = string.format("%s\nTransforms to: %d (onDeEquip)", description, transformDeEquipId)
            end

            local decayId = itemType:getDecayId()
            if decayId ~= -1 then
                description = string.format("%s\nDecays to: %d", description, decayId)
            end
        elseif thing:isCreature() then
            local str = "%s\nHealth: %d / %d"
            if thing:getMaxMana() > 0 then
                str = string.format("%s, Mana: %d / %d", str, thing:getMana(), thing:getMaxMana())
            end
            description = string.format(str, description, thing:getHealth(), thing:getMaxHealth()) .. "."
        end

        local position = thing:getPosition()
        description = string.format(
            "%s\nPosition: %d, %d, %d",
            description, position.x, position.y, position.z
        )

        if thing:isCreature() then
            if thing:isPlayer() then
                description = string.format("%s\nIP: %s.", description, Game.convertIpToString(thing:getIp()))
            end
        end
    end
    if thing:isPlayer() then
        local pronoun, posess, user = thing:getSex() == PLAYERSEX_MALE and 'He' or 'She', 'has', thing
        if thing == self then
            pronoun = 'You'
            posess = 'have'
            user = self
        end
        local bounty = user:getStorageValue(bountyStorage)
        if bounty > 0 then
            description = description .. string.format('\n%s %s a bounty of %d gold coins.', pronoun, posess, bounty)
        end
    end
    self:sendTextMessage(MESSAGE_INFO_DESCR, description)
end

Added it again but same result. Ill post what i got incase im doing something wrong.

function Player:eek:nBrowseField(position)
return true
function Player:eek:nLook(thing, position, distance)
local description = "You see " .. thing:getDescription(distance)
if self:getGroup():getAccess() then
if thing:isItem() then
description = string.format("%s\nItem ID: %d", description, thing:getId())

local actionId = thing:getActionId()
if actionId ~= 0 then
description = string.format("%s, Action ID: %d", description, actionId)
end

local uniqueId = thing:getAttribute(ITEM_ATTRIBUTE_UNIQUEID)
if uniqueId > 0 and uniqueId < 65536 then
description = string.format("%s, Unique ID: %d", description, uniqueId)
end

local itemType = thing:getType()

local transformEquipId = itemType:getTransformEquipId()
local transformDeEquipId = itemType:getTransformDeEquipId()
if transformEquipId ~= 0 then
description = string.format("%s\nTransforms to: %d (onEquip)", description, transformEquipId)
elseif transformDeEquipId ~= 0 then
description = string.format("%s\nTransforms to: %d (onDeEquip)", description, transformDeEquipId)
end

local decayId = itemType:getDecayId()
if decayId ~= -1 then
description = string.format("%s\nDecays to: %d", description, decayId)
end
elseif thing:isCreature() then
local str = "%s\nHealth: %d / %d"
if thing:getMaxMana() > 0 then
str = string.format("%s, Mana: %d / %d", str, thing:getMana(), thing:getMaxMana())
end
description = string.format(str, description, thing:getHealth(), thing:getMaxHealth()) .. "."
end

local position = thing:getPosition()
description = string.format(
"%s\nPosition: %d, %d, %d",
description, position.x, position.y, position.z
)

if thing:isCreature() then
if thing:isPlayer() then
description = string.format("%s\nIP: %s.", description, Game.convertIpToString(thing:getIp()))
end
end
end
if thing:isPlayer() then
local pronoun, posess, user = thing:getSex() == PLAYERSEX_MALE and 'He' or 'She', 'has', thing
if thing == self then
pronoun = 'You'
posess = 'have'
user = self
end
local bounty = user:getStorageValue(bountyStorage)
if bounty > 0 then
description = description .. string.format('\n%s %s a bounty of %d gold coins.', pronoun, posess, bounty)
end
end
end
if thing:isPlayer() then
local pronoun, posess, user = thing:getSex() == PLAYERSEX_MALE and 'He' or 'She', 'has', thing
if thing == self then
pronoun = 'You'
posess = 'have'
user = self
end
local kills = user:getStorageValue(80000)
description = description .. string.format('\n%s %s %d %s', pronoun, posess, kills == -1 and 0 or kills, kills == 1 and 'kill.' or 'kills.')
end
self:sendTextMessage(MESSAGE_INFO_DESCR, description)
end

function Player:eek:nLookInBattleList(creature, distance)
local description = "You see " .. creature:getDescription(distance)
if self:getGroup():getAccess() then
local str = "%s\nHealth: %d / %d"
if creature:getMaxMana() > 0 then
str = string.format("%s, Mana: %d / %d", str, creature:getMana(), creature:getMaxMana())
end
description = string.format(str, description, creature:getHealth(), creature:getMaxHealth()) .. "."

local position = creature:getPosition()
description = string.format(
"%s\nPosition: %d, %d, %d",
description, position.x, position.y, position.z
)

if creature:isPlayer() then
description = string.format("%s\nIP: %s", description, Game.convertIpToString(creature:getIp()))
end
end
local isSelf, kills = thing.uid == self.uid , player:getStorageValue(80000)
description = description .. string.format('\n%s %s %d %s', isSelf and 'you' or thing:getSex() == PLAYERSEX_MALE and 'he' or 'she', isSelf and 'have' or 'has', kills, kills == 1 and 'kill' or 'kills')
self:sendTextMessage(MESSAGE_INFO_DESCR, description)
end

function Player:eek:nLookInTrade(partner, item, distance)
self:sendTextMessage(MESSAGE_INFO_DESCR, "You see " .. item:getDescription(distance))
end

function Player:eek:nLookInShop(itemType, count)
return true
end

function Player:eek:nMoveItem(item, count, fromPosition, toPosition, fromCylinder, toCylinder)
return true
end

function Player:eek:nMoveCreature(creature, fromPosition, toPosition)
return true
end

function Player:eek:nTurn(direction)
return true
end

function Player:eek:nTradeRequest(target, item)
return true
end

function Player:eek:nTradeAccept(target, item, targetItem)
return true
end

local soulCondition = Condition(CONDITION_SOUL, CONDITIONID_DEFAULT)
soulCondition:setTicks(4 * 60 * 1000)
soulCondition:setParameter(CONDITION_PARAM_SOULGAIN, 1)

local function useStamina(player)
local staminaMinutes = player:getStamina()
if staminaMinutes == 0 then
return
end

local playerId = player:getId()
local currentTime = os.time()
local timePassed = currentTime - nextUseStaminaTime[playerId]
if timePassed <= 0 then
return
end

if timePassed > 60 then
if staminaMinutes > 2 then
staminaMinutes = staminaMinutes - 2
else
staminaMinutes = 0
end
nextUseStaminaTime[playerId] = currentTime + 120
else
staminaMinutes = staminaMinutes - 1
nextUseStaminaTime[playerId] = currentTime + 60
end
player:setStamina(staminaMinutes)
end

function Player:eek:nGainExperience(source, exp, rawExp)
if not source or source:isPlayer() then
return exp
end

-- Soul regeneration
local vocation = self:getVocation()
if self:getSoul() < vocation:getMaxSoul() and exp >= self:getLevel() then
soulCondition:setParameter(CONDITION_PARAM_SOULTICKS, vocation:getSoulGainTicks() * 1000)
self:addCondition(soulCondition)
end

-- Apply experience stage multiplier
exp = exp * Game.getExperienceStage(self:getLevel())

-- Stamina modifier
if configManager.getBoolean(configKeys.STAMINA_SYSTEM) then
useStamina(self)

local staminaMinutes = self:getStamina()
if staminaMinutes > 2400 and self:isPremium() then
exp = exp * 1.5
elseif staminaMinutes <= 840 then
exp = exp * 0.5
end
end

return exp
end

function Player:eek:nLoseExperience(exp)
return exp
end

function Player:eek:nGainSkillTries(skill, tries)
if APPLY_SKILL_MULTIPLIER == false then
return tries
end

if skill == SKILL_MAGLEVEL then
return tries * configManager.getNumber(configKeys.RATE_MAGIC)
end
return tries * configManager.getNumber(configKeys.RATE_SKILL)
end
 
Added it again but same result. Ill post what i got incase im doing something wrong.

function Player:eek:nBrowseField(position)
return true
function Player:eek:nLook(thing, position, distance)
local description = "You see " .. thing:getDescription(distance)
if self:getGroup():getAccess() then
if thing:isItem() then
description = string.format("%s\nItem ID: %d", description, thing:getId())

local actionId = thing:getActionId()
if actionId ~= 0 then
description = string.format("%s, Action ID: %d", description, actionId)
end

local uniqueId = thing:getAttribute(ITEM_ATTRIBUTE_UNIQUEID)
if uniqueId > 0 and uniqueId < 65536 then
description = string.format("%s, Unique ID: %d", description, uniqueId)
end

local itemType = thing:getType()

local transformEquipId = itemType:getTransformEquipId()
local transformDeEquipId = itemType:getTransformDeEquipId()
if transformEquipId ~= 0 then
description = string.format("%s\nTransforms to: %d (onEquip)", description, transformEquipId)
elseif transformDeEquipId ~= 0 then
description = string.format("%s\nTransforms to: %d (onDeEquip)", description, transformDeEquipId)
end

local decayId = itemType:getDecayId()
if decayId ~= -1 then
description = string.format("%s\nDecays to: %d", description, decayId)
end
elseif thing:isCreature() then
local str = "%s\nHealth: %d / %d"
if thing:getMaxMana() > 0 then
str = string.format("%s, Mana: %d / %d", str, thing:getMana(), thing:getMaxMana())
end
description = string.format(str, description, thing:getHealth(), thing:getMaxHealth()) .. "."
end

local position = thing:getPosition()
description = string.format(
"%s\nPosition: %d, %d, %d",
description, position.x, position.y, position.z
)

if thing:isCreature() then
if thing:isPlayer() then
description = string.format("%s\nIP: %s.", description, Game.convertIpToString(thing:getIp()))
end
end
end
if thing:isPlayer() then
local pronoun, posess, user = thing:getSex() == PLAYERSEX_MALE and 'He' or 'She', 'has', thing
if thing == self then
pronoun = 'You'
posess = 'have'
user = self
end
local bounty = user:getStorageValue(bountyStorage)
if bounty > 0 then
description = description .. string.format('\n%s %s a bounty of %d gold coins.', pronoun, posess, bounty)
end
end
end
if thing:isPlayer() then
local pronoun, posess, user = thing:getSex() == PLAYERSEX_MALE and 'He' or 'She', 'has', thing
if thing == self then
pronoun = 'You'
posess = 'have'
user = self
end
local kills = user:getStorageValue(80000)
description = description .. string.format('\n%s %s %d %s', pronoun, posess, kills == -1 and 0 or kills, kills == 1 and 'kill.' or 'kills.')
end
self:sendTextMessage(MESSAGE_INFO_DESCR, description)
end

function Player:eek:nLookInBattleList(creature, distance)
local description = "You see " .. creature:getDescription(distance)
if self:getGroup():getAccess() then
local str = "%s\nHealth: %d / %d"
if creature:getMaxMana() > 0 then
str = string.format("%s, Mana: %d / %d", str, creature:getMana(), creature:getMaxMana())
end
description = string.format(str, description, creature:getHealth(), creature:getMaxHealth()) .. "."

local position = creature:getPosition()
description = string.format(
"%s\nPosition: %d, %d, %d",
description, position.x, position.y, position.z
)

if creature:isPlayer() then
description = string.format("%s\nIP: %s", description, Game.convertIpToString(creature:getIp()))
end
end
local isSelf, kills = thing.uid == self.uid , player:getStorageValue(80000)
description = description .. string.format('\n%s %s %d %s', isSelf and 'you' or thing:getSex() == PLAYERSEX_MALE and 'he' or 'she', isSelf and 'have' or 'has', kills, kills == 1 and 'kill' or 'kills')
self:sendTextMessage(MESSAGE_INFO_DESCR, description)
end

function Player:eek:nLookInTrade(partner, item, distance)
self:sendTextMessage(MESSAGE_INFO_DESCR, "You see " .. item:getDescription(distance))
end

function Player:eek:nLookInShop(itemType, count)
return true
end

function Player:eek:nMoveItem(item, count, fromPosition, toPosition, fromCylinder, toCylinder)
return true
end

function Player:eek:nMoveCreature(creature, fromPosition, toPosition)
return true
end

function Player:eek:nTurn(direction)
return true
end

function Player:eek:nTradeRequest(target, item)
return true
end

function Player:eek:nTradeAccept(target, item, targetItem)
return true
end

local soulCondition = Condition(CONDITION_SOUL, CONDITIONID_DEFAULT)
soulCondition:setTicks(4 * 60 * 1000)
soulCondition:setParameter(CONDITION_PARAM_SOULGAIN, 1)

local function useStamina(player)
local staminaMinutes = player:getStamina()
if staminaMinutes == 0 then
return
end

local playerId = player:getId()
local currentTime = os.time()
local timePassed = currentTime - nextUseStaminaTime[playerId]
if timePassed <= 0 then
return
end

if timePassed > 60 then
if staminaMinutes > 2 then
staminaMinutes = staminaMinutes - 2
else
staminaMinutes = 0
end
nextUseStaminaTime[playerId] = currentTime + 120
else
staminaMinutes = staminaMinutes - 1
nextUseStaminaTime[playerId] = currentTime + 60
end
player:setStamina(staminaMinutes)
end

function Player:eek:nGainExperience(source, exp, rawExp)
if not source or source:isPlayer() then
return exp
end

-- Soul regeneration
local vocation = self:getVocation()
if self:getSoul() < vocation:getMaxSoul() and exp >= self:getLevel() then
soulCondition:setParameter(CONDITION_PARAM_SOULTICKS, vocation:getSoulGainTicks() * 1000)
self:addCondition(soulCondition)
end

-- Apply experience stage multiplier
exp = exp * Game.getExperienceStage(self:getLevel())

-- Stamina modifier
if configManager.getBoolean(configKeys.STAMINA_SYSTEM) then
useStamina(self)

local staminaMinutes = self:getStamina()
if staminaMinutes > 2400 and self:isPremium() then
exp = exp * 1.5
elseif staminaMinutes <= 840 then
exp = exp * 0.5
end
end

return exp
end

function Player:eek:nLoseExperience(exp)
return exp
end

function Player:eek:nGainSkillTries(skill, tries)
if APPLY_SKILL_MULTIPLIER == false then
return tries
end

if skill == SKILL_MAGLEVEL then
return tries * configManager.getNumber(configKeys.RATE_MAGIC)
end
return tries * configManager.getNumber(configKeys.RATE_SKILL)
end
you didnt use the script i just posted lol
+ you deleted an end from player:eek:nBrowseField
 
maybe you can help with it?
I need part of script or script lines with this fuction:
- Create item gold nugget on x,y,z in different zones.

addEvent(Game.createMonster, 18 * 1000, "Castle Emperor", Position(179, 41, 12))
Your part here
 
It'd be appropriate if all posts are on topic, and all rules that xeraphus specified are fulfilled before posting. Otherwise this is just another shit post thread.

It's not necessary to have a discussion about this. I'll report my own post and have it removed tomorrow
 
Mining/Gathering.
25uml8k.jpg

(5709, 5868, 5750, 5619, 8633, 8634, 8635, 8636)
(5708, 5866, 5751, 5620, 8637, 8638, 8639, 8640)
(5707, 5867, 5752, 5621, Blank, Blank, Blank, Blank)


Hello I'm requesting something that perhaps was already made, but not quite like I imagine a mining system in a game should be.
What I'm asking for is the a system in which the player will need certain luck+skill level to be able to get his reward. Players will use an item(Pick) to hit a Vein of ore and if Level is good and chance is right the vein will brake into an smaller one, and then again to an un working vein that will need time to heal it self, but while the vein is on the second stage it can heal.
Lets say there's 3 stages:
1 The vein is on its natural state.
2 The vein is on a volatile stage, it could heal or it could explode.
3 The vein is exhausted need time to heal.

So in stage one it does nothing, player can use his pick to try and mine something, vein will change to stage 2 if level and chance ocurre. In stage two the vain has some events, It can heal it self, It can Explode, It can give the ore to the players. In the last stage it can't be used since its exhausted.
The image show only 2 veins in the crystals since i was thinking to make them with a lower chance to give the reward making them already hard to get.

Basically a mining system is what I'm asking for.

--This was made long ago by Quas for me, but now its non working. perhaps it can give you some insight ideas.
http://pastebin.com/haB4cpcq
here you go
http://pastebin.com/NDMP5f3L

was pretty fun to make, good request
 
here you go
http://pastebin.com/NDMP5f3L

was pretty fun to make, good request
Damn that was fast, but a mistake on my part for not asking/explaining this, can each Vein have different level requirements to gather? and give skill tries as reward too?

Im going to test right now.

--Edit, and add more chance to get the ore the higher the skill level, perhaps ad the oportunity to get to the next stage by vein instead as global, aswel as skill level to mine the resource/vein
 
Last edited:
Automatic raids for 1.3 with easy tables for setup...
With possibilities use in x day and x hour each boss... and each raid u can setup boss and monsters.

PS: Great job this iniciative
xml:
Code:
<globalevent name="monsterRaid" time="00:54:00" script="monsterRaid.lua"/>

monsterRaid.lua:
Code:
local cfg = {
    monsters = {'Wolf'},
    centerPos = Position(1022, 1001, 7)
}

function onTime(interval)
    Game.broadcastMessage('[RAID] A raid has started', MESSAGE_STATUS_CONSOLE_BLUE)
    local pos = cfg.centerPos
    local monsterCount = math.random(20) -- How many monsters will spawn?
    local spawned = 0
    while spawned < monsterCount do
        local randX, randY = math.random(-13, 13), math.random(-13, 13)
        local spawnPosition = Position(pos.x + randX, pos.y + randY, pos.z)
        local tile = Tile(spawnPosition)
        if tile and (not tile:getHouse()) and (not (tile:getCreatureCount() > 0)) and (not tile:hasFlag(TILESTATE_PROTECTIONZONE)) then
            Game.createMonster(cfg.monsters[math.random(#cfg.monsters)], spawnPosition, true)
            spawned = spawned + 1
        end
    end
    return true
end
 
i'm adding the other stuff but i don't understand this part
can you try to explain again?
My idea was that its not a 100% chance to go from Stage 1 to stage 2, or stage 3. There is a chance of success as well as level required [Per Vein(Stack of 3 or 2)].
So lets say {5709, 5708, 5707} Requires skill_Level 20, but at skill 20 you have 50% chance to break from stage 1, to stage 2 and 40 % chance to get to stage 3 (It can be 50% for both i just want not to be a perfect chance, and to increase as the skill level is higher)

And what I meant

Code:
local cfg = {
    chance = 80,            -- chance that the player will succeed in getting the ore


maybe put it


Code:
{ore = 5880, amount = {1, 3}, veins = {5709, 5708, 5707}, chance = 80,},



(Numbers are examples)
 
My idea was that its not a 100% chance to go from Stage 1 to stage 2, or stage 3. There is a chance of success as well as level required [Per Vein(Stack of 3 or 2)].
So lets say {5709, 5708, 5707} Requires skill_Level 20, but at skill 20 you have 50% chance to break from stage 1, to stage 2 and 40 % chance to get to stage 3 (It can be 50% for both i just want not to be a perfect chance, and to increase as the skill level is higher)

And what I meant

Code:
local cfg = {
    chance = 80,            -- chance that the player will succeed in getting the ore


maybe put it


Code:
{ore = 5880, amount = {1, 3}, veins = {5709, 5708, 5707}, chance = 80,},



(Numbers are examples)
http://pastebin.com/fW8t7Y7f
instead of making the chance configurable for each vein i kept it as a constant in config but the chance increases as you level up your skill
the formula is: cfg.chance + (skillLevel / 2)
i also made the skill tries based off of your skill level
the formula is: math.random(3000, 5000) / skillLevel
 
Status
Not open for further replies.
Back
Top