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

chest game

someusername

New Member
Joined
Feb 14, 2013
Messages
24
Reaction score
1
Hello id like too request a chest game this is how it works.

A npc sends you into a room with 3 chests only 1 person can enter this room others needs to wait till its empty. To keep blockers away it says you have 10 seconds to pick a chest. Now about the game

Random chest holds a reward and the other 2 are empty but it random what chest holds the reward. Hope somebody can help me with it


Server information : 0.3.6

Edit: forgot to say if you picked 1 chest if its empty or giving reward it tps you back to the npc room
 
Last edited:
Why can't there be more people in the room? Is it just for a story or does it also have something to do with the chests?
If it's for a story, can you post how the ingame conversation with the npc should look like?
 
Last edited:
Why can't there be more people in the room? Is it just for a story or does it also have something to do with the chests?
If it's for a story, ca you post how the ingame conversation with the npc should look like?
mmm this is like lucky room for only 1 person and everytime he enter this room can take a random reward from 1 chest only and other 2 are empty and i think you need to make it to send you to random rooms i mean we can map like 20 rooms after then the npc can tp to any room from them that's all i understand from him
 
The actual chests are easy I think, seeing as you can only ever choose 1/3.. and there's no way to actually know what's inside them..
You could simply make it roll 1-3.. and if 3 give reward.. and in all cases teleport player to another destination..

If it's some kind of teleport/npc you'd have to create a function to check if anyone is in the room.. but I'm sure looking around the forum you could find something similar and patch it together. :p
 
The actual chests are easy I think, seeing as you can only ever choose 1/3.. and there's no way to actually know what's inside them..
You could simply make it roll 1-3.. and if 3 give reward.. and in all cases teleport player to another destination..

If it's some kind of teleport/npc you'd have to create a function to check if anyone is in the room.. but I'm sure looking around the forum you could find something similar and patch it together. :p
I do not know what he meant until now has not seen it before in Tibia but I saw in another game I do not know how it would look like if we doing it on tibia but in other way its lucky to win item with chance and other items with low/high chance
 
I do not know what he meant until now has not seen it before in Tibia but I saw in another game I do not know how it would look like if we doing it on tibia but in other way its lucky to win item with chance and other items with low/high chance
Soo let's say there are 3 items.
60% chance
30% chance
10% chance
roll 1-100
if roll <= 10, give good prize.
if roll >= 41, give bad prize.
else give medium prize.
then teleport player.
 
Soo let's say there are 3 items.
60% chance
30% chance
10% chance
roll 1-100
if roll <= 10, give good prize.
if roll >= 41, give bad prize.
else give medium prize.
then teleport player.
and this prize will be on one chest from that 3 chests already on room and if he open empty one he will tp out
 
Soo all in all you want this.
Npc which teleports into room.
When you choose a chest you get teleported out.
When you open a chest, you will either get nothing, or you will get a prize.
The chests are to be in random order each time?
If the chest gives you a prize, you can either get a good, mediocre, or bad item.

Hi
hello player
teleport
done.
choose chest
1/3 chance.
if lucky, roll again for rarity of item.
obtain item, teleport out.

Script wise.. all chests would be the same.
Player wise.. it seems like the chests are swapping each time.
 
Power of math! Do one script, what gives you 33% chances to get the reward, then add this script into each of 3 chests. Logicially it will be the same.

Aslo, code is simple:
Code:
function onUse(cid, item)
     local r = math.random(1,100)
     if r > 66 then
          doPlayerAddItem(cid, 2195, 1) -- reward
     else
          doPlayerSendCancel(cid, "SORRY, THIS CHEST IS EMPTY")
     end
     doTeleportCreature(cid, pos)
     return true
end

To protect other players from entering this room while someone is inside you can make a simple script in movements.

Code:
getSpectators
isInArea
 
Last edited:
Soo all in all you want this.
Npc which teleports into room.
When you choose a chest you get teleported out.
When you open a chest, you will either get nothing, or you will get a prize.
The chests are to be in random order each time?
If the chest gives you a prize, you can either get a good, mediocre, or bad item.

Hi
hello player
teleport
done.
choose chest
1/3 chance.
if lucky, roll again for rarity of item.
obtain item, teleport out.

Script wise.. all chests would be the same.
Player wise.. it seems like the chests are swapping each time.
yea exactly
 
Power of math! Do one script, what gives you 33% chances to get the reward, then add this script into each of 3 chests. Logicially it will be the same.

Aslo, code is simple:
Code:
function onUse(cid, item)
     local r = math.random(1,100)
     if r > 66 then
          doPlayerAddItem(cid, 2195, 1) -- reward
     else
          doPlayerSendCancel(cid, "SORRY, THIS CHEST IS EMPTY")
     end
     doTeleportCreature(cid, pos)
     return true
end

To protect other players from entering this room while someone is inside you can make a simple script in movements.

Code:
getSpectators
isInArea
may you explain more please? cuz i didn't understand some of your msg
 
Why can't there be more people in the room? Is it just for a story or does it also have something to do with the chests?
If it's for a story, can you post how the ingame conversation with the npc should look like?


Well it is just a game not story in it just so players can try out their luck.

Player: hi
Npc: greetings playername I'm hosting a chest game. You open a chest and...suprise!!! you find your reward... or not. right click on the chest to open it. try out your luck.
Npc: Like to play? It costs 10 gold coins.
Player: yes

Tps you inside the play room..
open chest (reward) could be 3 items tped back with the text "congratulations you win :item name."
open chest( no reward) tped back with the message "unfortunately no reward from this chest"

well i agree no need to have 1 person in the room :p forget that
 
Well it is just a game not story in it just so players can try out their luck.

Player: hi
Npc: greetings playername I'm hosting a chest game. You open a chest and...suprise!!! you find your reward... or not. right click on the chest to open it. try out your luck.
Npc: Like to play? It costs 10 gold coins.
Player: yes

Tps you inside the play room..
open chest (reward) could be 3 items tped back with the text "congratulations you win :item name."
open chest( no reward) tped back with the message "unfortunately no reward from this chest"

well i agree no need to have 1 person in the room :p forget that
yea its good too
 
Back
Top