Click to visit: JoinUO free shard list
Decompiled UOSL Code
7 posts
• Page 1 of 1
|
|
|
|
Nice.
Yeah, the mass M decompiler can add these parameters, but they are not in the original. There is an demo-internal table though which reveals all these parameters. The full internal function list is here: http://uodemo.joinuo.com/index.php?title=Command_List I just added all the triggers here: http://uodemo.joinuo.com/index.php?title=Triggers |
|
|
|
Please note that the Mass M Decompiler has different types of output.
The "native" output is almost 1 on 1 with the original script. When using the UOSL mode than some code is modified. The reason I programmed it that way was to make the scripts more intuitive to read for those who know the C language. Inside the trigger you see variables being used without a definition. That was very non-intuitive for me. This resulted in "on speech("*")(object speaker, string arg)" Two times () on the same line I didn't like. So I decided to replace the () by <>, as the parameter following is not really used by the code, but is more of a parameter to the engine as to tell when to trigger the speech event. Resulting in "on speech<"*">(object speaker, string arg)" You can also add a optional chance to the trigger (yes even to the speech trigger): Originally this looks like: "on 500 speech", which was again non-intuitive for me. Therefor the Mass M Decompiler will output this as: "on<500>speech("*")(object speaker, string arg)" Because the 500 chance is again ment as input for the trigger engine inside the EXE, so I used the same <>. The same is true for the "case" and "default" keywords, in UOSL mode I decided to an extra ":". In native mode this character is not added. I put those <> and : there for a reason, mainly because I believed, and I still believe that, it improves readability (it's important to know where variables comes from and what parameters are ment for the engine instead of the script itself). Also note that the latest Mass M Decompiler corrects many bugs found in the scripts : <Derrick> RunUO AI is kind of a functional prototype, which i have hacked into something resembling OSI behavior, but only by complitcating everything
|
|
|
|
Here it is if anyone wants to mess around with it (although I doubt it, just putting it out here):
https://github.com/chjj/node-uo/blob/ma ... pt/uosl.js |
|
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 9 guests