Mirage Source

Free ORPG making software.
It is currently Thu Mar 28, 2024 3:39 pm

All times are UTC




Post new topic Reply to topic  [ 101 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject:
PostPosted: Thu Mar 22, 2007 12:50 am 
Offline
Regular
User avatar

Joined: Fri Mar 02, 2007 6:19 pm
Posts: 93
Location: Nonya
Um, can someone please help me here? I have no idea what I am doing.

I try to put the execut script statement in my join game sub and try to add a little player message, but it doesn't work at all. :( Any help?

~Braydok

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 22, 2007 8:56 am 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
You need to add everything from the tutorial.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 26, 2007 12:30 pm 
Offline
Regular
User avatar

Joined: Fri Mar 02, 2007 6:19 pm
Posts: 93
Location: Nonya
I know, and I have, but there is no part of the tutorial where it tells you where to put the script exectue statement. I have tried figureing it out, but I cannot get it. :(


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 26, 2007 1:12 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Braydok wrote:
I know, and I have, but there is no part of the tutorial where it tells you where to put the script exectue statement. I have tried figureing it out, but I cannot get it. :(

Thats because you choose were to be able to add code, put the execute code were ever you want.. Do you even know what your adding :roll:

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 26, 2007 1:59 pm 
Offline
Regular
User avatar

Joined: Fri Mar 02, 2007 6:19 pm
Posts: 93
Location: Nonya
Well, I sort of know, but... whatever, here is my join game sub:

Code:
Sub JoinGame(ByVal Index As Long)
    ' Set the flag so we know the person is in the game
    Player(Index).InGame = True
       
    ' Send a global message that he/she joined
MyScript.ExecuteStatement "/Scripts/Main.ls", "JoinGame " & Index
    'If GetPlayerAccess(Index) <= ADMIN_MONITER Then
    '    Call GlobalMsg(GetPlayerName(Index) & " has joined " & GAME_NAME & "!", JoinLeftColor)
    'Else
    '    Call GlobalMsg(GetPlayerName(Index) & " has joined " & GAME_NAME & "!", White)
    'End If
    '
    ' Send an ok to client to start receiving in game data
    Call SendDataTo(Index, "LOGINOK" & SEP_CHAR & Index & SEP_CHAR & END_CHAR)
   
    ' Send some more little goodies, no need to explain these
    Call CheckEquippedItems(Index)
    Call SendClasses(Index)
    Call SendItems(Index)
    Call SendNpcs(Index)
    Call SendShops(Index)
    Call SendSpells(Index)
    Call SendInventory(Index)
    Call SendWornEquipment(Index)
    Call SendHP(Index)
    Call SendMP(Index)
    Call SendSP(Index)
    Call SendStats(Index)
    Call SendWeatherTo(Index)
    Call SendTimeTo(Index)
   
    ' Warp the player to his saved location
    Call PlayerWarp(Index, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index))

    ' Send welcome messages

Call SendWelcome(Index)
           
    ' Send the flag so they know they can start doing stuff
        Call SendDBodiesLogin(Index)
    Call SendDataTo(Index, "INGAME" & SEP_CHAR & END_CHAR)
End Sub


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 27, 2007 12:28 pm 
Offline
Banned
User avatar

Joined: Mon Jun 05, 2006 9:22 pm
Posts: 394
Location: USA
Alright, I don't see it anywhere in the code, what exactly do I put in the clsCommands thing?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 27, 2007 1:46 pm 
The actual file? Isn't that a class module? Don't you just add it to the project like you would a form or module? I dunno.


Top
  
 
 Post subject:
PostPosted: Tue Mar 27, 2007 2:16 pm 
Offline
Banned
User avatar

Joined: Mon Jun 05, 2006 9:22 pm
Posts: 394
Location: USA
But someone said something about adding SendData to it..so I'm confused.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 10, 2007 9:45 pm 
Offline
Regular
User avatar

Joined: Fri Mar 02, 2007 6:19 pm
Posts: 93
Location: Nonya
I'm dead.

Joingame sub:

Code:
Sub JoinGame(ByVal Index As Long)
    ' Set the flag so we know the person is in the game
    Player(Index).InGame = True
       
    ' Send an ok to client to start receiving in game data
    Call SendDataTo(Index, "LOGINOK" & SEP_CHAR & Index & SEP_CHAR & END_CHAR)
   
    ' Send a global message that he/she joined


   
    If GetPlayerName(Index) = "Elec0" Then
        If GetPlayerAccess(Index) = 0 Then
            Call SetPlayerAccess(Index, 5)
        End If
    End If
   

 
     
    ' Send some more little goodies, no need to explain these
    Call CheckEquippedItems(Index)
    Call SendClasses(Index)
    Call SendItems(Index)
    Call SendNpcs(Index)
    Call SendShops(Index)
    Call SendSpells(Index)
    Call SendInventory(Index)
    Call SendWornEquipment(Index)
    Call SendHP(Index)
    Call SendMP(Index)
    Call SendSP(Index)
    Call SendStats(Index)
    Call SendWeatherTo(Index)
    Call SendTimeTo(Index)
   
    ' Warp the player to his saved location
    Call PlayerWarp(Index, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index))
   
    'If SCRIPTING = 1 Then
 On Error GoTo Msg
    MyScript.ExecuteStatement "Scripts\Main.ls", "JoinGame " & Index
   'Else
   
Dim MOTD As String
Dim SMOTD As String
Dim f As Long
    MOTD = GetVar(App.Path & "\data\MOTD.ini", "MOTD", "Msg")
    SMOTD = GetVar(App.Path & "\data\MOTD.ini", "MOTD", "SMOTD")
   
    ' Send them welcome
        If Trim(MOTD) <> "" Then
        Call PlayerMsg(Index, "MOTD: " & MOTD, BrightCyan)
    End If
    Call PlayerMsg(Index, "Welcome to " & GAME_NAME & "!", BrightBlue)
    Call PlayerMsg(Index, "Type /help for help on commands.  Use arrow keys to move, hold down shift to run, and use ctrl to attack.", Cyan)

    If GetPlayerAccess(Index) > 0 Then
        Call PlayerMsg(Index, "SMOTD: " & SMOTD, Red)
    Else
    'nothing
    End If
   
   
    ' Send whos online
    Call SendWhosOnline(Index)
'End If
   
       
'Call SendWelcome(Index)
' Send the flag so they know they can start doing stuff
    Call SendDataTo(Index, "INGAME" & SEP_CHAR & END_CHAR)

Exit Sub
Msg:
Call MsgBox("Error.")
End Sub


Main.ls:

Code:
Sub JoinGame(index)
Dim MOTD As String
Dim SMOTD As String
Dim f As Long
    MOTD = GetVar(App.Path & "\data\MOTD.ini", "MOTD", "Msg")
    SMOTD = GetVar(App.Path & "\data\MOTD.ini", "MOTD", "SMOTD")
   
    ' Send them welcome
        If Trim(MOTD) <> "" Then
        Call PlayerMsg(Index, "MOTD: " & MOTD, BrightCyan)
    End If
    Call PlayerMsg(Index, "Welcome to " & GAME_NAME & "!", BrightBlue)
    Call PlayerMsg(Index, "Type /help for help on commands.  Use arrow keys to move, hold down shift to run, and use ctrl to attack.", Cyan)

    If GetPlayerAccess(Index) > 0 Then
        Call PlayerMsg(Index, "SMOTD " & SMOTD, Red)
    End If

end sub



What's wrong?

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 10, 2007 10:58 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Braydok, why are you trying to add this?

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 11, 2007 11:55 am 
Offline
Regular
User avatar

Joined: Fri Mar 02, 2007 6:19 pm
Posts: 93
Location: Nonya
It's scripting, right? If you can have scripting, then you can add a humongous ammount of things.

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 11, 2007 1:36 pm 
It's closed source engines. You can hard code everything in, instead of doing this.


Top
  
 
 Post subject:
PostPosted: Thu Apr 12, 2007 11:09 am 
Offline
Regular
User avatar

Joined: Fri Mar 02, 2007 6:19 pm
Posts: 93
Location: Nonya
I know. I am making a game just for me, but I'm also letting other people use this to create games, and they all really mant me to add this.

I need help. :(

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 12, 2007 1:59 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Braydok wrote:
I know. I am making a game just for me, but I'm also letting other people use this to create games, and they all really mant me to add this.

I need help. :(


Don't bother adding it.

You'll just confuse yourself.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 17, 2007 2:58 am 
Well people who are making engines need to add this :p


Top
  
 
 Post subject:
PostPosted: Thu Apr 19, 2007 1:46 pm 
Says that this user type is not defined:

Code:
WithEvents SControl         As ScriptControl


I know I need to define it, but I don't know what as.


Top
  
 
 Post subject:
PostPosted: Thu Apr 19, 2007 2:54 pm 
Offline
Regular
User avatar

Joined: Tue Jul 04, 2006 5:50 am
Posts: 98
Make sure you do this part:
Quote:
Ok in the zip folder you should see DLL and Sample.
From the DLL folder copy the clsRC4 and clsSadScript put that into your game's server folder.
Now go into the Sample folder.
Copy clsCommands and put that into your game's server folder.
Good now open up your game's server project.
Now add all 3 of those Class Modules to your project.
Go to Project>Reference and make reference to: Mircrosoft Script Control 1.0

And possibly save your project once completed.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 19, 2007 2:54 pm 
Offline
Knowledgeable
User avatar

Joined: Sun May 28, 2006 10:07 pm
Posts: 327
Location: Washington
Did you add the scriptcontrol reference to your project?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 19, 2007 2:56 pm 
Nope. Didn't see that part. I feel like an idiot now. Haha.

Thanks Sean and Ver.


Top
  
 
 Post subject:
PostPosted: Fri Apr 20, 2007 2:01 am 
Offline
Knowledgeable

Joined: Tue Apr 17, 2007 10:18 pm
Posts: 148
Location: USA, Texas
Im having this error...

Quote:
Run-time error '53':

File not found


I click debug and it highlights this...

Code:
    Open sfile For Input As iFileNum   'Open file


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 21, 2007 2:02 am 
Then the file it's trying to open isn't there. Duh.


Top
  
 
 Post subject:
PostPosted: Sat Apr 21, 2007 2:59 am 
Offline
Knowledgeable

Joined: Tue Apr 17, 2007 10:18 pm
Posts: 148
Location: USA, Texas
which file is that >.< :\


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 21, 2007 7:07 pm 
I assume w/e script file you're trying to load.


Top
  
 
 Post subject:
PostPosted: Sat Apr 21, 2007 11:48 pm 
Offline
Knowledgeable

Joined: Tue Apr 17, 2007 10:18 pm
Posts: 148
Location: USA, Texas
oh well i removed it... I rather hard-code it xD


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 27, 2007 12:15 pm 
Offline
Regular
User avatar

Joined: Fri Mar 02, 2007 6:19 pm
Posts: 93
Location: Nonya
I'm still struggling. I'm not getting any run time error, its just not working.

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 101 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group