i was thinking about addings no raids to the rules list but i didn't think anyone would ever request one
ill see about making this i guess
thank god someone knows how to provide informationMining/Gathering.
(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
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 @PlayernLook
http://pastebin.com/tp8RhwjK
register bountyKill in login.luaCode:<event type="death" name="bountyKill" script="bountyKill.lua"/>
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?
add this to your login.luaFinaly 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.
if player:getStorageValue(bountyStorage) == -1 then
player:setStorageValue(bountyStorage, 0)
end
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
i don't knowholy 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
add this to your login.lua
storages are -1 by defaultCode:if player:getStorageValue(bountyStorage) == -1 then player:setStorageValue(bountyStorage, 0) end
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
you didnt use the script i just posted lolAdded it again but same result. Ill post what i got incase im doing something wrong.
function PlayernBrowseField(position)
return true
function PlayernLook(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 PlayernLookInBattleList(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 PlayernLookInTrade(partner, item, distance)
self:sendTextMessage(MESSAGE_INFO_DESCR, "You see " .. item:getDescription(distance))
end
function PlayernLookInShop(itemType, count)
return true
end
function PlayernMoveItem(item, count, fromPosition, toPosition, fromCylinder, toCylinder)
return true
end
function PlayernMoveCreature(creature, fromPosition, toPosition)
return true
end
function PlayernTurn(direction)
return true
end
function PlayernTradeRequest(target, item)
return true
end
function PlayernTradeAccept(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 PlayernGainExperience(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 PlayernLoseExperience(exp)
return exp
end
function PlayernGainSkillTries(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
here you goMining/Gathering.
(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
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?
xml: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
<globalevent name="monsterRaid" time="00:54:00" script="monsterRaid.lua"/>
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 partperhaps ad the oportunity to get to the next stage by vein instead as global
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)].i'm adding the other stuff but i don't understand this part
can you try to explain again?
local cfg = {
chance = 80, -- chance that the player will succeed in getting the ore
{ore = 5880, amount = {1, 3}, veins = {5709, 5708, 5707}, chance = 80,},
http://pastebin.com/fW8t7Y7fMy 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)