Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

VB source edit instead of Events


Zamin
 Share

Recommended Posts

Hello,

Another confusion. I am using Eclipse Stable. You know that you have a few files in \Server\Scripts\Events\ folder. And you make scripting edits here in various files. Well, I was thinking, instead of using this, can we make all the necessary edits withint VB source?

I mean, for example. If I want to edit the 'ScriptedNPC' file. Is it possible to do a VB source edit instead? I am guess the answer is 'yes'. But How?

I can find the 'Sub JoinGame' in the server side of the source. But no 'ScriptedNPC' or 'MenuScripts' subs/functions.

Can someone please point me to the right direction?

-Thanks in advance
Link to comment
Share on other sites

I'm not exactly sure what you're talking about, but I think you want to try to move your scripting Subs to the source. To do this, simply copy and paste your scripting Sub and put it in the Server source, preferrably in **modGameLogic**. Then, find a statement like this in the source:

```
MyScript.ExecuteStatement "Scripts\Scripts\Events.ess", "ScriptedNPC " & Attacker & "," & NPC(NPCnum).SpawnSecs
```
Replace that with:

```
Call ScriptedNPC(Attacker, NPC(NPCnum).SpawnSecs)
```
Of course, you may need to change it up a little more than that. I don't use Eclipse Stable, so I wouldn't know the exact way to do this. Also, please note that you may have to change some things when you're moving something from scripts to source because scripting sometimes has some commands that sourcing doesn't, although you can easily add them into the source.
Link to comment
Share on other sites

The way I would do it is pretty simple, I would just create a binary file within the script editor to store the script in, and the script would be 100% VB6.Ā  Then, when needed, I'd have the code pulled from the binary file.

Soft Coding rocks.Ā  That, or I'd try to foresee every possible use for the scripts, and hard-code the major ones
Link to comment
Share on other sites

@Captain:

> Sorry lord zamin, But, Kimmaru was right.

LOL. Alright Captain EW *bows*

But still. You can find something about 'ScriptedNPC' in the source. But nothing related to ltes say 'MenuScripts'. I don't want to use the Events (which is a pretty stupid idea). Just thinking if everything can be implemented in the source itself, easily.

-Thanks in advanceĀ  XD
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...