Emosyos Posted January 21, 2014 Author Share Posted January 21, 2014 Hey,I was just curious at to how I would make a custom command that halts for 15 seconds before continuing the rest of the event. This is for fishing as I would like it to be an aspect of the game. This would me much appreciated as I haven't made a custom script for the event system before.~The Pug Lord Link to comment Share on other sites More sharing options...
Richy420Rich Posted January 22, 2014 Share Posted January 22, 2014 Why not just use the resource editor for fishing, and such?I am assuming and I might be wrong, it'll use this in your custom script though:Nah this won't work. ~~EventType.evWait.ActionTimer = GetTickCount + 15000~~ Link to comment Share on other sites More sharing options...
Emosyos Posted January 22, 2014 Author Share Posted January 22, 2014 …I feel awfully stupid xDOh how I thank you so!I'm going to sit in the Dunce's chair for a bit... Link to comment Share on other sites More sharing options...
Richy420Rich Posted January 22, 2014 Share Posted January 22, 2014 For anyone else that may want to know how a wait function can work in a Custom Script event, here you go; Thanks to Mod Matt!``` Public Sub CustomScript(index As Long, caseID As Long) Select Case caseID Case 1 CustomWait 5000 PlayerMsg index, "Yo wait 15 seconds.", Yellow CustomWait 15000 PlayerMsg index, "Yo this works?", Yellow Case Else PlayerMsg index, "You just activated custom script " & caseID & ". This script is not yet programmed.", BrightRed End Select End Sub Public Sub CustomWait(ByVal Timer As Long) Dim TempTimer As Long TempTimer = GetTickCount Do While (TempTimer + Timer) >= GetTickCount If (TempTimer + Timer) = GetTickCount Then ' Just wasting time. End If DoEvents Loop End Sub``` Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now