|
You last visited: Today at 14:02
Advertisement
fun idea
Discussion on fun idea within the CO2 Private Server forum part of the Conquer Online 2 category.
05/16/2013, 00:26
|
#31
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
|
Quote:
Originally Posted by LordGragen.
gotcha, yah what i think is better if i make the storm hit the player like you say by using targetUID
i think it will be better hitting the player every 20-30 sec prob like 200 dmg per atk,
i am just having a bit problem how to build the atk system instead of just the effect going on you.
and ty infamous for explaining
|
It all depends on how your source is written but the 'best' way to handle it would be to send the spell to local clients as a ground targeted X/Y skill. Then pass the skill to your attack handler or some other system which can process the spell ID/X/Y to calculate what targets have been hit and deal appropriate damage to them.
The concern there is that most sources will have an issue with this type of handling due to no attacker entity so you'll have to either re-write your attack handler or have a different one to handle server events dealing damage.
Just as an initial thought I feel the best way would be to write a base attack handler and then inherit from it for any spells that need special handling which can then call more generic targeting methods but I'd have to dig into it a bit more to see if that's actually the most efficient route.
|
|
|
05/16/2013, 01:00
|
#32
|
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 68
|
Quote:
Originally Posted by pro4never
It all depends on how your source is written but the 'best' way to handle it would be to send the spell to local clients as a ground targeted X/Y skill. Then pass the skill to your attack handler or some other system which can process the spell ID/X/Y to calculate what targets have been hit and deal appropriate damage to them.
The concern there is that most sources will have an issue with this type of handling due to no attacker entity so you'll have to either re-write your attack handler or have a different one to handle server events dealing damage.
Just as an initial thought I feel the best way would be to write a base attack handler and then inherit from it for any spells that need special handling which can then call more generic targeting methods but I'd have to dig into it a bit more to see if that's actually the most efficient route.
|
in that case take a look at this,
for the thunder system i made this inside of the handle.cs which holds my spells
Code:
if (attacker.MapID == 1505)
{
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = 1000;
suse.SpellLevel = spell.Level;
System.Threading.Thread.Sleep(5000);
if (attacked.Hitpoints <= damage)
attacked.Hitpoints = 200;
}
so far its not working i still need to figure few things out but i think i am close.
|
|
|
05/16/2013, 01:36
|
#33
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
|
This relies on someone attacking....
You want
- Separate script running on its own thread/timer/etc to control intermittent lightning strikes.
- Code that can take a given location (X/Y of strike) and calculate what targets are hit
- Code that can deal damage to a given target (without a specific attacker)
- A way to display damage dealt (if any targets were hit) as well as spell effect to all users in range
How you handle these tasks and where you place them in your source is really up to you and the source you're using.
|
|
|
05/16/2013, 01:46
|
#34
|
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 68
|
Quote:
Originally Posted by pro4never
This relies on someone attacking....
You want
- Separate script running on its own thread/timer/etc to control intermittent lightning strikes.
- Code that can take a given location (X/Y of strike) and calculate what targets are hit
- Code that can deal damage to a given target (without a specific attacker)
- A way to display damage dealt (if any targets were hit) as well as spell effect to all users in range
How you handle these tasks and where you place them in your source is really up to you and the source you're using.
|
got it thank you, i will try v2 and let you know
|
|
|
05/16/2013, 11:30
|
#35
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
|
Quote:
Originally Posted by pro4never
This relies on someone attacking....
You want
- Separate script running on its own thread/timer/etc to control intermittent lightning strikes.
- Code that can take a given location (X/Y of strike) and calculate what targets are hit
- Code that can deal damage to a given target (without a specific attacker)
- A way to display damage dealt (if any targets were hit) as well as spell effect to all users in range
How you handle these tasks and where you place them in your source is really up to you and the source you're using.
|
I did write him some quick code in notepad to give him a general idea.. all he has to do is make it take damage... rest is already kinda done for him.
(And yes, I know the variable 'lastStrike' does not follow naming conventions.. notepad man  )
PHP Code:
///////////////////////////// WRITTEN IN NOTEPAD! WONT WORK! CODE SUCKS! /////////////////////////////
///// NOTE: Try not to use DateTime if you can. :) ////
using System;
namespace COPS { public class Storm { DateTime lastStrike = DateTime.Now; //Threaded run public void run() { foreach(Client client in Clients.Values.ToArray()) { if (Chance(10)) return; // Let's not bug them all the time, a chance this wont show. if (Chance(5) && DateTime.Now >= lastStrike.AddMinutes(1)) { lastStrike = DateTime.Now; client.SendScreenShake(5); for (int i = 0;i<10;i++) client.send(GenerateThunderPacket()); } client.send(GenerateThunderPacket()); } } public byte[] GenerateThunderPacket(Client client) { return new SpellPacket() { SpellID = 1234, Level = 2, UID = client.Id, X = Random(client.X, client.X+10), Y = Random(client.Y, client.Y+10) }.Build()); } } }
I mean.. you could just do something like
if (Map[client.Map].GetCell(pkt.X, pkt.Y).Entity != null)
{
//Send it to the attack processor and let it to the rest.
}
|
|
|
05/16/2013, 11:35
|
#36
|
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 68
|
this looks good, code is simple i can understand it, but first i will try the handle.cs option if that works then it should be more clean handling it from there.
if i get stuch or unable to do it then i got this as a backup.
|
|
|
05/16/2013, 11:55
|
#37
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
|
Quote:
Originally Posted by LordGragen.
this looks good, code is simple i can understand it, but first i will try the handle.cs option if that works then it should be more clean handling it from there.
if i get stuch or unable to do it then i got this as a backup.
|
I don't understand why you want to code this entire system in your attack handler... lol
|
|
|
05/16/2013, 12:23
|
#38
|
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 68
|
Quote:
Originally Posted by _DreadNought_
I don't understand why you want to code this entire system in your attack handler... lol
|
well not the entire system,
the rain will be in program.cs with the map id in it, so every time you enter the map it will rain, so lets take that out of the list,
the next thing will be is the thunder, which i will see if i can make it atk every 25 sec, and take 200hp out of it, thats it.
|
|
|
05/16/2013, 14:16
|
#39
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
|
Any implementation which involves a Sleep(x) for this, isn't properly done and is a waste of a single thread. Just throwing that out there. Secondly, DateTime has a lot of over head if you're not using DateTime.UtcNow
|
|
|
05/16/2013, 14:24
|
#40
|
elite*gold: 0
Join Date: Mar 2013
Posts: 118
Received Thanks: 95
|
Quote:
Originally Posted by _DreadNought_
I did write him some quick code in notepad to give him a general idea.. all he has to do is make it take damage... rest is already kinda done for him.
(And yes, I know the variable 'lastStrike' does not follow naming conventions.. notepad man  )
I mean.. you could just do something like
if (Map[client.Map].GetCell(pkt.X, pkt.Y).Entity != null)
{
//Send it to the attack processor and let it to the rest.
}
|
Any specific reason you use Clients.Values.ToArray? Just wondering
|
|
|
05/16/2013, 14:55
|
#41
|
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
|
Quote:
Originally Posted by Smaehtin
Any specific reason you use Clients.Values.ToArray? Just wondering
|
In that case there is no reason, since Values can be enumerated.
|
|
|
05/16/2013, 14:56
|
#42
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
|
Quote:
Originally Posted by InfamousNoone
Any implementation which involves a Sleep(x) for this, isn't properly done and is a waste of a single thread. Just throwing that out there. Secondly, DateTime has a lot of over head if you're not using DateTime.UtcNow
|
Quote:
Originally Posted by Smaehtin
Any specific reason you use Clients.Values.ToArray? Just wondering
|
I was using a simple demonstration that was programmed in notepad. (aka.. dont judge)
If I was doing it for myself, I would use some things that I think would be awesome, such as some sort of action/event system (If I was able to find a use that was sufficient)
|
|
|
05/28/2013, 02:41
|
#43
|
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
|
This is how thunder should look 
I'll spice it up a bit by adding night, although I haven't come around coding that yet.
|
|
|
05/28/2013, 06:48
|
#44
|
elite*gold: 0
Join Date: May 2013
Posts: 24
Received Thanks: 49
|
I think that would irritate most players' eyes.
|
|
|
05/28/2013, 16:03
|
#45
|
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
|
True, not going to be as often as in the video though
|
|
|
 |
|
Similar Threads
|
New Bypass Idea *IDEA NOT A HACK*
01/19/2009 - Soldier Front - 5 Replies
Think about it..xfire to bypass GameGuard.
I dunno about anyone else or why it hasn't been mentioned ..or maybe it has.
But let me give you an example of what i mean.
You would Inject your "wallhack.dll" into the xfire.exe process.
Then Login to xFire.Then login to SF and let your Xfire ingame Load up.
Since xfire layers its chat windows over the SF screen freely without causing the ALT+TAB error
that means its has some kind of control over the D3D.
|
[Idea] just an idea about having more power..
11/22/2007 - Kal Online - 5 Replies
Hello ..
I know i know ..everyone will replay with (SERVER SIDED) but we all thought the (Job Change) is Server Sided & we also thought (Cooldown Hack) is Server Sided .. bla bla bla but im not talking about adding STR or Agility because i know whatever you add it will just show as a number & wont have any effects ... & you will give the same damage ..
the point of this is .. in (Speed Hack) the normal speed is 0 & with Speed-up its 45 .. right ? .. & the Speed-up is just a potions (buff)...
|
Good idea or bad idea?
05/22/2007 - Conquer Online 2 - 4 Replies
I have a water(110)-Trojan(130) but i dont know if i should go to trojan again for 2nd rb or should i rb to water?
If i am water(110)-trojan(130)-water(130) how much hp would i have if i went melee and had about 2.4k mana?
|
Idea:Possibly good potential idea!
10/26/2005 - Conquer Online 2 - 3 Replies
Well today I was thinking and it was stated that it's impossible to view if you have a +1 item unless you look in your inventory, but it is generated before its picked up.
This could be a big job, could be worth it if it was possible and done correctly though. Turn the items on the floors into items in your inventory images, I should probably explain a bit more. The images that are used in your inventory, put those on the floor. That way if you moused over the image it'd show the +1...
|
All times are GMT +1. The time now is 14:04.
|
|