About This File
This script commands allow you to "Inject" scripts inside other scripts.
But Zell, why I want this?
Well, you can use a script code from a SQL table! Imagine that now you can change scripts code blocks without reloading scripts direct from your database or you can even do like me where I'm building scripts from a API!
Sample Script:
prontera,150,150,5 Script Inject Test 91,{ .@test = rand(1, 100); mes "Let's test Inject"; mes "I will declare variable [email protected] as " + .@test + "."; mes "My npc id is " + getnpcid(0), " "; mes "[Inject Code Start]", " "; // This script text coud be loaded from a SQL table! Inject( "mes \"Running NPC is \" + getnpcid(0); " + "mes \"Value of [email protected] is \" + [email protected]; " + "next; " + "[email protected] = rand(200, 500); " + "mes \"Now value of [email protected] will be \" + [email protected];" + "close2; " ); mes "[Inject Code End]", " "; mes "Inject was ok and [email protected] is now " + .@test; close; }