ATT3
Intermediate OT User
- Joined
- Sep 22, 2010
- Messages
- 512
- Reaction score
- 100
Well, I am trying to make somewhat the say reward chest system as RL tibia has.
If you don't know how the system works, here's something: http://www.tibia.com/news/?subtopic=newsarchive&id=2486
My script/system doesn't work like that at the moment, though the goal is to make it alike ;I
Just by thinking about it, how would you write it?
e.g like me~ (code below) or would you e.g make a table where certain storage value equals certain boss(base storage) then adding x storage value there would equal to x item.
Well, let's not get ahead of ourselves, I am in the "very beginning".
So far I've create a table like this:
Obviously adding multiple bosses with their "full loots" there the file will become very large.
Would you design this table differently? ("clearer")
Also instead of using item names, should I use their id's instead?
Least in that case the it would place the consonants/vowels there.
Problems:
1. I don't want it to get the same item twice e.g:
dragon shield, dragon shield
2. Add items to the corpse AND to the reward chest (adventurer's guild)
I don't know how to add "all the items" which the player will get to the reward container.
Ok, that would only solve the problem briefly.
Should it be like:
Current script: http://pastebin.com/Mp2ThEFk
If you understood what I am trying to say: great.
If not, please ask and I will clarify and update this post.
If you don't know how the system works, here's something: http://www.tibia.com/news/?subtopic=newsarchive&id=2486
My script/system doesn't work like that at the moment, though the goal is to make it alike ;I
Just by thinking about it, how would you write it?
e.g like me~ (code below) or would you e.g make a table where certain storage value equals certain boss(base storage) then adding x storage value there would equal to x item.
Well, let's not get ahead of ourselves, I am in the "very beginning".
So far I've create a table like this:
Code:
local bosses = {
['rat'] = {bestLoot = {
[1] = {"ferumbras hat", "hat of the mad", "magic plate armor", "golden armor", "golden helmet"},
[2] = {"dragon shield", "war hammer", "plate armor", "golden shied", "blue robe"},
[3] = {"gold coin", "crystal coin", "small emerald", "golden legs", "golden boots"}
}},
{goodLoot = {
oneTimeItem = {"ferumbras hat", "hat of the mad"},
singleItem = {"dragon shield", "war hammer"},
multiItem = {"gold coin", "crystal coin", "small emerald"}
}},
{worseLoot = {
oneTimeItem = {"ferumbras hat", "hat of the mad"},
singleItem = {"dragon shield", "war hammer"},
multiItem = {"gold coin", "crystal coin", "small emerald"}
}},
{worstLoot = {
oneTimeItem = {"ferumbras hat", "hat of the mad"},
singleItem = {"dragon shield", "war hammer"},
multiItem = {"gold coin", "crystal coin", "small emerald"}
}},
['another monster'] = {bestLoot = {
[1] = {"ferumbras hat", "hat of the mad", "magic plate armor", "golden armor", "golden helmet"},
[2] = {"dragon shield", "war hammer", "plate armor", "golden shied", "blue robe"},
[3] = {"gold coin", "crystal coin", "small emerald", "golden legs", "golden boots"}
}},
{goodLoot = {
oneTimeItem = {"ferumbras hat", "hat of the mad"},
singleItem = {"dragon shield", "war hammer"},
multiItem = {"gold coin", "crystal coin", "small emerald"}
}},
{worseLoot = {
oneTimeItem = {"ferumbras hat", "hat of the mad"},
singleItem = {"dragon shield", "war hammer"},
multiItem = {"gold coin", "crystal coin", "small emerald"}
}},
{worstLoot = {
oneTimeItem = {"ferumbras hat", "hat of the mad"},
singleItem = {"dragon shield", "war hammer"},
multiItem = {"gold coin", "crystal coin", "small emerald"}
}},
}
Obviously adding multiple bosses with their "full loots" there the file will become very large.
Would you design this table differently? ("clearer")
Also instead of using item names, should I use their id's instead?
Least in that case the it would place the consonants/vowels there.
Problems:
1. I don't want it to get the same item twice e.g:
dragon shield, dragon shield
2. Add items to the corpse AND to the reward chest (adventurer's guild)
I don't know how to add "all the items" which the player will get to the reward container.
Ok, that would only solve the problem briefly.
Should it be like:
Code:
If reward item == "dragon shield" then
player:setStorageValue(REWARD_RAT_STROAGE+ITEM_NUMBER_ON_ARRAY.. or table)
end
Current script: http://pastebin.com/Mp2ThEFk
If you understood what I am trying to say: great.
If not, please ask and I will clarify and update this post.