![]() |
AI, func[rand] usage and conditions
hello,
i am looking to understand how func[rand] works and how to use it with conditions, here the algo i want to do: Select a random integer between 0 and 3 (i dunno if it is correct) if result <=1 goto L1 if result =2 goto L2 if result >=3 goto L3 and here the syntax i suppose i have to use with AI: Code:
L0Tx for your help :) |
Code:
//i0=Rand(4) => i0 E [0,3] |
can you explain this part please ?
Code:
push_event //i0 and finally, can i use the following part to call back i0 each time i need to use it in my stack ? Code:
push_event |
Amazing how u said u were gone from good but u keep asking for help here lol...
|
Quote:
|
My shit was the truth, and the truth is all the shit u said before. U insult everyone here, remove ur share posts, insult everyone again, say u'll never post here again yet you keep asking for help.
Oh and the fact that this post can help other ppl (wich it can) doesnt explain the fact that u said u never posted here again yet u keep doing so. |
stop me if i say something stupid, but why not use nasc, to compile your own ai code with a language that looks like C
|
strangely, or not so strangely, i agree with metal
=D |
Quote:
|
It crash only ? strange.
You can found source code example in l2tools. Then you just have to specify the filename of source code to compile in the command line of nasc, like "nasc ai_mmerged.txt" (will produce a ai.obj in same directory) <fr>il plante betement ? bizard. Tu peux trouver le code source de L2 ('prelude' me semble) dans L2Tools. Pour compiler ensuite, suffit de donner le nom du fichier a compiler dans la ligne de commande de nasc, ex : "nasc ai_mmerged.txt" qui produira un ai.obj dans le meme repertoire</fr> |
hello,
i tried nasc but it is not very clear for me for the moment then i tried to do something with the old way: Code:
push_event // i0 btw do you know, if it is possible, to do something like: Code:
class my_class : my_parent_class |
x=Rand(3)
x=0,1,2 |
?
in AI language, how do u write that ? tx :D |
hello, i try to do something, i want the following class use randomly 1 of his 3 skills when we attack him:
Code:
class myclass : parent_classTx in advance |
Don't use NASC because the headers are different and your AI code will come out messed up. We had this discussion in irc a while ago, and found out the hard way. If you want, you can generate your code and then edit out the faulty header to make it work. Just look at Digital's post on the AI code in the stickies section. :P
The best way is to probably do it by hand. |
i use nasc and make some good things, like monster derby track, sevensigns, and stuff that doesnt exist on official server too.
ofcourse, we must replace some number id of functions/handlers, ... but i have make a program to do it, but it's very more useful to code with nasc instead of make ai code |
| All times are GMT. The time now is 15:40. |