Hi, I though it was already possible to call a custom script with an Item in E.Worlds, but it isn’t, so there’s a tutorial for those who want to do it. It is very basic but some people may need it:

1st: Both Client and Server side

! ->In modConstants, after the last item constant, you put:
! ```
Public Const ITEM_TYPE_CSCRIPT As Byte = 10

In my case is ten because the last item constant I had was 9, but you'll have to put the next to the last number. This will set a new item type.
>!
>!
>! ->In modTypes, in Public Type ItemRec, add this before the End Type:
>! ```
CScriptNumber As Byte

This will create a new property for items, that indicates the Custom Script number.

! Note: If you want to have more than 255 Custom Scripts (I doubt that), set it As Long instead of As Byte.

2nd: Client Side

! In Frm Editor_Item:
! ->Create a new frame, named fraCScript. Inside this frame create a new label named lblCScript (its caption should be Custom Script: 1). Also, create a scrollbar named scrlCScript. Set the scrollbar max to 255 if you set the CScriptNumber as Byte before, or set it at more if you set it at As Long. This way, you won’t be able to exced 255 and won’t cause any bug. Double click the scrollbar and paste this code:
! ```
Private Sub scrlCScript_Change()
If EditorIndex < 1 Or EditorIndex > MAX_ITEMS Then Exit Sub

’ If debug mode, handle error then exit out
If App.LogMode = 1 And Options.Debug = 1 Then On Error GoTo ErrorHandler

So if Custom Script Number is 0, it’ll say “You just activated custom script 0. It works hell yea.” And if Custom Script Number is 1, it’ll give you a random item with 5% chances to obtain the Eclipse Sword, 20%chances to obtain a diamond and 75% to obtain 20 gold. Custom Scripts can be used for many things, it just depends on your imagination, so having the option to call a custom script with an item is pretty good. If you have any problem, please report it, although I might not be able to solve it if it’s something dificult, to be honest i don’t really know anything about vb6, I just looked at the code in order to work out how to do little edits.

So if Custom Script Number is 0, it’ll say “You just activated custom script 0. It works hell yea.” And if Custom Script Number is 1, it’ll give you a random item with 5% chances to obtain the Eclipse Sword, 20%chances to obtain a diamond and 75% to obtain 20 gold. Custom Scripts can be used for many things, it just depends on your imagination, so having the option to call a custom script with an item is pretty good. If you have any problem, please report it, although I might not be able to solve it if it’s something dificult, to be honest i don’t really know anything about vb6, I just looked at the code in order to work out how to do little edits.

I’m not going to share anymore of my scripts since out of 260 views there isn’t even a single comment . I bet 50% of people here hasn’t even commented a post and just comes, takes all the scripts he can and leaves.