[Tiny]Traps System

06/22/2013 20:25 2slam#1
lately I've seen LordGragen. post about buffs and he was asking for the traps system so I've come up with something like that : //P.S don't Blame me for the coding way I'm less than a beginner

Steps :

1-sending map effect
2-code your action

floor effect has been released before :

Code:
 if (ServerBase.Kernel.GetDistance(client.Entity.X, client.Entity.Y, 376, 392) < 17 && !client.Effect3) 
                                    { 
                                        client.Effect3 = true; 
                                        if (client.Entity.MapID == 1002) //mapid 
                                        { 
                                            Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true); 
                                             
                                            floorItem.ItemID = 791; //effectid 
                                            floorItem.MapID = 1002;//mapid 
                                            floorItem.X = 376; //X,Co-ordinate 
                                            floorItem.Y = 392; //Y,Co-ordinate 
                                            floorItem.Type = Network.GamePackets.FloorItem.Effect; 

                                            client.Send(floorItem); 
                                        } 
                                    } 
                                    else 
                                    { 
                                        if (ServerBase.Kernel.GetDistance(client.Entity.X, client.Entity.Y, 376, 392) > 17) 
                                        { 
                                            client.Effect3 = false; 
                                        } 
                                    }

in packethandler:

Code:
                        if (client.Entity.MapID == 1002)//mapid
                        {
                            if (new_X == 376 && new_Y == 392) //x.y
                            {
                              if (client.Entity.EntityFlag == Projectname.Game.EntityFlag.Player)
                                 {
                                  client.Entity.Teleport(1004, 50, 50);//action
                                  client.Send(new Message("You have been teleported to " + client.Entity.MapID + "!", System.Drawing.Color.Yellow, Message.Whisper));
                                 }
                            }
                            

                        }

Ive made it like a portal :


the end.
06/22/2013 20:33 LordGragen.#2
yah the thing is i want them to get from monster, they kill the monster they get the buff 100 sec, making them step on it makes the dungeon a bit easy, so i need to make sure they work as a team they share the buff as a team and give the buff to the person who is doing the most dmg,

but the system you are showing i might use it for teleporting people XD looks cool.
i forgot about that edit.
06/22/2013 23:05 pro4never#3
You can handle it any way you want.

Step on it = spell/damage triggered
Step on it = buffs/heals/revives
Step on it = teleport/knockback/etc
06/23/2013 09:50 LordGragen.#4
thats my point pro4never, if we make people step on it then the whole team will get the buff every second and finish the dungeon in few min and there will not be point even putting a time when the buff will end,

my point is, if we make a mini boss who carry the buff and let 1 member only get the buff from the monster it will make the game fun, coz then the team will have to think who to give the buff,

i
06/23/2013 10:05 Spirited#5
My traps are hidden. ;P They never reach the client as a packet (unless I want them to of course). Anyways, good job. It's nice to see someone developing with tiny maps. It's a very decent map system to say the least.
06/23/2013 10:17 pro4never#6
Quote:
Originally Posted by LordGragen. View Post
thats my point pro4never, if we make people step on it then the whole team will get the buff every second and finish the dungeon in few min and there will not be point even putting a time when the buff will end,

my point is, if we make a mini boss who carry the buff and let 1 member only get the buff from the monster it will make the game fun, coz then the team will have to think who to give the buff,

i
I think we have confusion yet again. I'm saying you can handle it any way you want.

Why would the whole team get it? Only spawn the effect to the client when you want the buff available and remove it from their screen the second the trap has been used up.
06/23/2013 15:48 turk55#7
Quote:
Originally Posted by pro4never View Post
You can handle it any way you want.

Step on it = spell/damage triggered
Step on it = buffs/heals/revives
Step on it = teleport/knockback/etc
Reminds me a little of Squama, getting money or a db :O
06/23/2013 15:56 2slam#8
Quote:
Originally Posted by turk55 View Post
Reminds me a little of Squama, getting money or a db :O
yea exactly once i got a db in a squama in the tiger cave.
06/23/2013 18:28 Super Aids#9
< 18.

Quote:
Originally Posted by turk55 View Post
Reminds me a little of Squama, getting money or a db :O
Agree with this :D
06/24/2013 04:29 LordGragen.#10
Quote:
Originally Posted by pro4never View Post
I think we have confusion yet again. I'm saying you can handle it any way you want.

Why would the whole team get it? Only spawn the effect to the client when you want the buff available and remove it from their screen the second the trap has been used up.
ah i see your point now, yah that's a good idea to.
06/24/2013 09:19 Korvacs#11
Quote:
Originally Posted by LordGragen. View Post
ah i see your point now, yah that's a good idea to.
You should have the trap move around the map aswell, giving the players only a couple of seconds to get to it before it disappears, then put it on a cooldown.
06/24/2013 10:03 LordGragen.#12
Quote:
Originally Posted by Korvacs View Post
You should have the trap move around the map aswell, giving the players only a couple of seconds to get to it before it disappears, then put it on a cooldown.
thats a Amazing idea,

for example when they enter the dungeon like 2 min later a message with red names pop up saying

" a damage buff has been summoned in x432 y232) hurry up and get it before it disable in 45sec XD
06/24/2013 12:42 2slam#13
Quote:
Originally Posted by LordGragen. View Post
thats a Amazing idea,

for example when they enter the dungeon like 2 min later a message with red names pop up saying

" a damage buff has been summoned in x432 y232) hurry up and get it before it disable in 45sec XD
45 sec is too much.
06/25/2013 06:02 Super Aids#14
Quote:
Originally Posted by 2slam View Post
45 sec is too much.
Depends on the area as well, if it's small or big.
07/31/2013 21:11 java12#15
were we can find the efects ids to use on


floorItem.ItemID = 791; //effectid ?