ID:155315
 
How can i make it so that when i click the verb Random Poisoning it will shoot the icon 'Poison.dmi' randomly in every direction ( a guaranteed hit ) a lot of times and when you hit a mob it will hit for a damage rand(300-500) and also a poison stack that will last about 10 seconds and will do 40 damage added on top of the other 300-500
Any feel like making this guy's game for him? Really dude?

Look up Missile() rand() and for()

as in for(mob in oview(10))
In response to Kyle_ZX
For future reference, check out the guide, the reference, or maybe just do a simple forum search(most of your answers can usually be found this way).
SillyChild123 wrote:
How can i make it so that when i click the verb Random Poisoning it will shoot the icon 'Poison.dmi' randomly in every direction ( a guaranteed hit ) a lot of times and when you hit a mob it will hit for a damage rand(300-500) and also a poison stack that will last about 10 seconds and will do 40 damage added on top of the other 300-500

For the poison damage,i have an idea on how you can do.

First create a proc.
mob/Poison(V,var/Time,var/damage) //The V is the Victim,i'll teach later on how to do that,the time,is how many seconds it will degrade the hp.And the damage,is the HP will be consumed every second.
V << "You got poisoned." //Ever is good to alert the victim if he's with bad status.
var/i = 0 //This is a temporary variable.
while(i << Time) // If i is lower than Time...
V.HP -= damage // ...the victim HP will be damaged....
V.DeathCheck(V) //...and later check if the character is dead (Create a proc for that,or use an existing one.)...
i += 1 // ...but if he's not dead,it will add 1 to i...
sleep(10) //...and sleep for one second...
V << "The poison effect has been neutralized." //...but when i reachs Time,the poison effect vanishes.


But to call the poison effect,you must put
Poison(src,10,5) //Hey,but how this works?
Well,as seen on the upper script,this will call the
proc event,and define the things,without having bugs on proc.

On the Poison(src,10,5),the src,is the target i will define as V on the proc,the 10,is the time of the effect,as i have defined on the proc too,and the five,the damage.
So,you can configure that by the way you wan't.

I hope i helped.
In response to Kyle_ZX
Kyle_ZX wrote:
Any feel like making this guy's game for him? Really dude?

Look up Missile() rand() and for()

as in for(mob in oview(10))

Sorry i didnt know one attack was an entire game.. Great to know..
In response to Nakano15
Great help man! :P
In response to SillyChild123
SillyChild123 wrote:
Kyle_ZX wrote:
Any feel like making this guy's game for him? Really dude?

Look up Missile() rand() and for()

as in for(mob in oview(10))

Sorry i didnt know one attack was an entire game.. Great to know..
The point was that the question was just really basic. Don't worry though, I asked a lot of stupid questions myself, and still do, I'm just saying to maybe give a bit of a search before asking questions.
In response to SillyChild123
Hi SillyChild123,
if you not liked the code i put,you just have to say,
not to tell anybody to send this to me:

Galactic Soldier: SillyChild123: message nakano15 and tell him i called him a dumbass

I'm a newbie on programming with this game,and i'm learning too,but sometimes i can try to help some peoples in with codes that i can try to solve the trouble.

But call a byond member to call-me of your adjective,is not a good or friendly way to do anything.

So,don't do anything stupid.
In response to Nakano15
dude did u believe him? i never said that , ur an idiot for believing trolls , specially galactic soldier
In response to Crowgraft13
The forums do not need your personal conflicts.
In response to SillyChild123
You took what I said out of context. I'm implying that if he thinks people will just code such a large piece of his game for him then he'll keep on doing this. I'm saying that while this is called "Developer How-To" it's not "Developer Do-For-Me".