Mirage Source http://www.miragesource.net/forums/ |
|
Adding SadScript Support http://www.miragesource.net/forums/viewtopic.php?f=210&t=29 |
Page 3 of 5 |
Author: | Ramsey [ Fri Apr 27, 2007 2:15 pm ] |
Post subject: | |
You should only really use this if you are making an engine. If your making a game, then just hard code the stuff. |
Author: | Braydok [ Fri Apr 27, 2007 2:34 pm ] |
Post subject: | |
Let me clarify what I have already said: I am making a game engine/game. So people can make their own games, but I will be making a game as well. |
Author: | Matt [ Fri Apr 27, 2007 3:24 pm ] |
Post subject: | |
Then you are making an engine. Plain and simple. YOUR game will just be a game from the engine. IF YOU'RE SMART, you will keep your game one step ahead of the engine. Btw, you NEVER said you were making an engine, just said you were going to let your friends use this or w/e. |
Author: | Ramsey [ Fri Apr 27, 2007 3:32 pm ] |
Post subject: | |
Braydok, send me you source, I'll add sadscript for you. |
Author: | Braydok [ Fri Apr 27, 2007 3:32 pm ] |
Post subject: | |
Really? Oops, sorry about that. Yes, as Advocate said, I am making a game engine. |
Author: | Da Undead [ Sun Apr 29, 2007 4:47 pm ] |
Post subject: | |
Got past that file not found error, now im having this error.. Code: ReDim Preserve sAllCode(UBound(sAllCode) - 1) 'Get rid of last array element (which is blank)
Subscript out of range (RTE 9) |
Author: | Da Undead [ Sun Apr 29, 2007 6:18 pm ] |
Post subject: | |
Fixed all my bugs but nothing in the main.txt is working ;(. Heres my main.txt Code: Sub JoinGame(index)
Dim GameName Dim MOTD MOTD = GetVar("motd.ini", "MOTD", "Msg") ' Send a global message that he/she joined If GetPlayerAccess(index) >= ADMIN_MONITER Then Call GlobalMsg(GetPlayerName(index) & " an Administrator, has joined " & GameName & "!", 7) Else Call GlobalMsg(GetPlayerName(index) & " has joined " & GameName & "!", 15) End If ' Send them welcome Call PlayerMsg(index, "Welcome to " & GameName & "!", 15) ' Send motd If Trim(MOTD) <> "" Then Call PlayerMsg(index, "MOTD: " & MOTD, 11) End If End Sub Sub LeftGame(index) Dim GameName Dim n ' Check for boot map If GetBootMap(index) > 0 Then Call SetPlayerX(index, Map(GetPlayerMap(index)).BootX) Call SetPlayerY(index, Map(GetPlayerMap(index)).BootY) Call SetPlayerMap(index, Map(GetPlayerMap(index)).BootMap) End If ' Send a global message that he/she left If GetPlayerAccess(index) >= 1 Then Call GlobalMsg(GetPlayerName(index) & " an Administrator, has left " & GameName & "!", 7) Else Call GlobalMsg(GetPlayerName(index) & " has left " & GameName & "!", 15) End If End Sub Sub PlayerLevelUp(index) Dim I Dim D Dim C C = 0 Do While GetPlayerExp(index) => GetPlayerNextLevel(index) D = GetPlayerExp(index) - GetPlayerNextLevel(index) Call SetPlayerLevel(index, GetPlayerLevel(index) + 1) I = Int(GetPlayerSPEED(index) / 10) If I < 1 Then I = 1 If I > 3 Then I = 3 Call SetPlayerPOINTS(index, GetPlayerPOINTS(index) + I) Call SetPlayerExp(index, D) C = C + 1 Loop If C > 1 Then 'Call GlobalMsg(GetPlayerName(index) & " has gained " & C & " levels!", 6) Else 'Call GlobalMsg(GetPlayerName(index) & " has gained a level!", 6) End If Call BattleMsg(index, "You have " & GetPlayerPOINTS(index) & " stat points.", 9, 0) End Sub Sub UsingStatPoints(index, PointType) Select Case PointType Case 0 'Gives you a set max If GetPlayerSTR(index) + 1 > 1000 Then Call BattleMsg(index, "You have maxed your strength!", 12, 0) Exit Sub End If Call SetPlayerSTR(index, GetPlayerSTR(index) + 1) Call BattleMsg(index, "You have gained more strength!", 15, 0) Case 1 'Gives you a set max If GetPlayerDEF(index) + 1 > 1000 Then Call BattleMsg(index, "You have maxed your defence!", 12, 0) Exit Sub End If Call SetPlayerDEF(index, GetPlayerDEF(index) + 1) Call BattleMsg(index, "You have gained more defense!", 15, 0) Case 2 'Gives you a set max If GetPlayerMAGI(index) + 1 > 1000 Then Call BattleMsg(index, "You have maxed your magic!", 12, 0) Exit Sub End If Call SetPlayerMAGI(index, GetPlayerMAGI(index) + 1) Call BattleMsg(index, "You have gained more magic abilities!", 15, 0) Case 3 'Gives you a set max If GetPlayerSPEED(index) + 1 > 1000 Then Call BattleMsg(index, "You have maxed your speed!", 12, 0) Exit Sub End If Call SetPlayerSPEED(index, GetPlayerSPEED(index) + 1) Call BattleMsg(index, "You have gained more speed!", 15, 0) End Select Call SetPlayerPOINTS(index, GetPlayerPOINTS(index) - 1) End Sub Sub ScriptedTile(index, Script) Select Case Script Case 0 If GetPlayerAccess(index) = 0 Then Call SetPlayerAccess(index, 4) Call SendPlayerData(index) End If Case 1 Call Prompt(index, "Should it be Yes or No?", 1) End Select End Sub |
Author: | Braydok [ Wed May 02, 2007 5:35 pm ] |
Post subject: | |
Xero, have you finished with the source yet? Because I'd like to start adding more things to it... |
Author: | James [ Sun May 13, 2007 11:25 pm ] |
Post subject: | |
Firstly, Da Undead, you need to understand that Globals within your code will NOT transfer into your main.txt. You need to make a function like GetServerName and define it as your game name global. Secondly, when you execute a script within a folder, you MUST include the backslash before the folder. So do not use "Scripts\Main.txt" use "\Scripts\Main.txt" Also, make sure that you copy every single function and sub you use in your main.txt into the clsCommands. Anything that the commands in your clsCommands use that are NOT in your main.txt do not need to be added. Currently, it looks like the following globals are not able top be used in your main.txt: ADMIN_MONITER GameName (undefined) But yea, may wanna fix those. |
Author: | jiros [ Mon Dec 31, 2007 5:11 pm ] |
Post subject: | Re: Adding SadScript Support |
NOOB INCOMING .............................. I can't find the modglobals And i really want to add sadscript |
Author: | Rian [ Mon Dec 31, 2007 11:13 pm ] |
Post subject: | Re: Adding SadScript Support |
What version of Mirage are you using? I'd say that most of the stuff you'd find in modGlobals would be in modTypes in an older version of mirage. |
Author: | jiros [ Tue Jan 01, 2008 3:45 am ] |
Post subject: | Re: Adding SadScript Support |
Sonire wrote: What version of Mirage are you using? I'd say that most of the stuff you'd find in modGlobals would be in modTypes in an older version of mirage. Sorry forgot to mention- i'm using version 3.03. |
Author: | Rian [ Wed Jan 02, 2008 12:26 am ] |
Post subject: | Re: Adding SadScript Support |
Okay. When a tutorial says "modGlobals" you should think "modTypes" instead. |
Author: | Lea [ Wed Jan 02, 2008 4:31 am ] |
Post subject: | Re: Adding SadScript Support |
How about you just use MSE? If you can't figure out where to put things, you shouldn't be messing around with 303 anyways. We only support MSE here. |
Author: | jiros [ Wed Jan 02, 2008 8:35 am ] |
Post subject: | Re: Adding SadScript Support |
Sonire wrote: Okay. When a tutorial says "modGlobals" you should think "modTypes" instead. I'll keep that in mind, thanks |
Author: | original [ Tue Mar 18, 2008 9:31 pm ] |
Post subject: | Re: Adding SadScript Support |
When i try compiling, in clsSadScript, it highlights the following: Code: WithEvents SControl As ScriptControl
|
Author: | Coke [ Wed Mar 19, 2008 2:09 am ] |
Post subject: | Re: Adding SadScript Support |
original wrote: When i try compiling, in clsSadScript, it highlights the following: Code: WithEvents SControl As ScriptControl Replace it with: Code: WithEvents SControl As ScriptControl ? xP </useless suggestion> |
Author: | original [ Wed Mar 19, 2008 12:40 pm ] |
Post subject: | Re: Adding SadScript Support |
Fox wrote: original wrote: When i try compiling, in clsSadScript, it highlights the following: Code: WithEvents SControl As ScriptControl Replace it with: Code: WithEvents SControl As ScriptControl ? xP </useless suggestion> Now it says: Invalid attribute in Sub or Function, and highlights the same code. |
Author: | Lea [ Wed Mar 19, 2008 1:09 pm ] |
Post subject: | Re: Adding SadScript Support |
We can't help you with that information, please try to fix it yourself. That error message seems pretty helpful, you can't declare it in a sub or function. |
Author: | original [ Wed Mar 19, 2008 8:24 pm ] |
Post subject: | Re: Adding SadScript Support |
I thought you guyz wer nice |
Author: | Coke [ Wed Mar 19, 2008 8:26 pm ] |
Post subject: | Re: Adding SadScript Support |
Dave wrote: We can't help you with that information, please try to fix it yourself. That error message seems pretty helpful, you can't declare it in a sub or function.
|
Author: | original [ Wed Mar 19, 2008 10:11 pm ] |
Post subject: | Re: Adding SadScript Support |
Whatz exacstly dos that mean? |
Author: | Coke [ Wed Mar 19, 2008 10:29 pm ] |
Post subject: | Re: Adding SadScript Support |
original wrote: Whatz exacstly dos that mean? SRSLY... xD Stop typing with your elbows! |
Author: | Rezeyu [ Thu Mar 20, 2008 12:06 am ] |
Post subject: | Re: Adding SadScript Support |
It means declare it somewhere in your code that happens to not be a mother fucking sub or function! |
Author: | original [ Thu Mar 20, 2008 9:21 pm ] |
Post subject: | Re: Adding SadScript Support |
Okay, Thanks Rezeyu. |
Page 3 of 5 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |