ID:166854
 
Since it seem's like it is not in any of the demo's or libraries I was wondering how do you:
Make it so when a player walks on a certain Turf it has a random chance of them engaging into a battle with a certain monster(Such as also a random chance between certain monsters which would meet their level).

~Link~
There are many demos out there, here's an example of one.

http://developer.byond.com/hub/Zagreus/RandomCombat
Here's a quicky:
turf/Batklhsakjhksdhilj
name="Always battle turf"
Entered(mob/M)//Is called when a mob fully steps into the turf... if you want it to be called before they step into it, use Enter(mob/M)
if(!M.client)return..()//if it's not a player, stops it
if(prob(OMGlezpyut0100))//...prob(X), X means X%
Teh_Awesome_Procz_of_PvP()
return 0
return..()


Don't bother copy/pasting, you'll get a ton of error (obviously...)


Better yet, see Taz's post

- GhostAnime
In response to GhostAnime
GhostAnime wrote:
Don't bother copy/pasting, you'll get a ton of error (obviously...)

Don't bother posting when almost everything you typed is incorrect.

~~> Unknown Person
In response to Tazor07
Tazor07 wrote:
There are many demos out there, here's an example of one.

http://developer.byond.com/hub/Zagreus/RandomCombat

One which shouldn't have been created for the public. That demo is filled with usr abuse and the like, and its implementation of a turn-based battle system is totally incorrect.

~~> Unknown Person
In response to Unknown Person
I said example. What do you think, that he will rip the code or something ^^
In response to Unknown Person
In response to Tazor07
I'm not going to rip it and use it just for my game I'm using these too study off of for example. I have already done that in the past where I have ripped from other codings, Now I would like to actually learn it.

~Link~
In response to Unknown Person
hM, CARE TO EXPLAIN? (AT WORK CURRENTLY >.>)

- GhostAnime
In response to Link899
Can anybody still explain this a little better?

~Link~