Advertisement
BlackSkull

Ghosts GameMode v1 [1.15]

Oct 23rd, 2014
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 5.48 KB | None | 0 0
  1. 'Importing [ System.Threading - System.Text ] ~>
  2. Imports System.Threading
  3. Imports System.Text
  4.  
  5. Public Class Form1
  6.  
  7.     '[#] /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ [#]
  8.     '///                     Ghosts GameMode v1                       \\\
  9.     '///                 This tool has been made by                   \\\
  10.     '///                        Black Skull                           \\\
  11.     '///                    Skype : iBlackSkull                       \\\
  12.     '///          YouTube - www.youtube.com/user/lblackskull          \\\
  13.     '[#] /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ [#]
  14.  
  15.  
  16.     'Declaring [ ProcessID - Target ]  ~>
  17.     Private Shared ProcessID As UInt32
  18.     Private Const Target As Integer = 0
  19.  
  20.     Private Sub ConnectAttachBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ConnectAttachBtn.Click
  21.         'Connect & Attach ~>
  22.         Try
  23.             Dim BlackSkull() As UInt32 = Nothing
  24.             PS3TMAPI.InitTargetComms()
  25.             PS3TMAPI.Connect(0, Nothing)
  26.             PS3TMAPI.GetProcessList(0, BlackSkull)
  27.             ProcessID = Convert.ToUInt32(BlackSkull(0))
  28.             PS3TMAPI.ProcessAttach(0, PS3TMAPI.UnitType.PPU, ProcessID)
  29.             PS3TMAPI.ProcessContinue(0, ProcessID)
  30.             'Initializing RPC ~>
  31.             GHOSTS.RPC.Init()
  32.             MsgBox("PS3 Connected and Attached", MsgBoxStyle.Information, "Success!")
  33.         Catch
  34.             MsgBox("PS3 can't Attach or connect to your PS3!", MsgBoxStyle.Critical, "Fail..!")
  35.         End Try
  36.     End Sub
  37.  
  38.     '[ SV_GameSendServerCommand - iPrintln - iPrintlnBold ] functions ~>
  39.     Public Shared Sub iPrintln(ByVal ClientID As Integer, ByVal Message As String)
  40.         SV_GameSendServerCommand(ClientID, "e """ & Message & """")
  41.     End Sub
  42.     Public Shared Sub iPrintlnBold(ByVal ClientID As Integer, ByVal Message As String)
  43.         SV_GameSendServerCommand(ClientID, "c """ & Message & """")
  44.     End Sub
  45.     Public Shared Sub SV_GameSendServerCommand(ByVal ClientID As Integer, ByVal Command As String)
  46.         GHOSTS.RPC.[Call](&H681434, ClientID, 0, Command)
  47.     End Sub
  48.  
  49.     '[ Set/GetMemory - Getting Player Name - Getting Valid Player ] functions
  50.     Public Shared Sub GetMemory(ByVal offset As UInteger, ByRef bytes() As Byte)
  51.         PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, ProcessID, 0L, CULng(offset), bytes)
  52.     End Sub
  53.     Public Shared Sub SetMemory(ByVal Offset As UInteger, ByVal bytes() As Byte)
  54.         PS3TMAPI.ProcessSetMemory(0, PS3TMAPI.UnitType.PPU, ProcessID, 0L, CULng(Offset), bytes)
  55.     End Sub
  56.     Public Shared Function GetPlayerName(ByVal ClientID As Integer) As String
  57.         Dim bytes As Byte() = New Byte(0) {}
  58.         Dim num As UInteger = 0
  59.         Dim list As New List(Of Byte)()
  60.         While True
  61.             GetMemory(&HF47F9C + (ClientID * &H3700) + num, bytes)
  62.             If bytes(0) = 0 Then
  63.                 Exit While
  64.             End If
  65.             list.Add(bytes(0))
  66.             num += 1
  67.         End While
  68.         Dim encoding As New UTF8Encoding()
  69.         Return encoding.GetString(list.ToArray())
  70.     End Function
  71.     Public Shared Function GetValidPlayer(ByVal ClientID As Integer) As Boolean
  72.         Return GetPlayerName(ClientID) <> ""
  73.     End Function
  74.    
  75.     'Declare the selected player as an integer ~>
  76.     Private Shared SelectedClient As Integer
  77.  
  78.     'Declare Random_ as a Random ~>
  79.     Private Shared Random_ As New Random
  80.  
  81.     'Declare the time as an integer ~>
  82.     Private Shared Time As Integer
  83.  
  84.     'Declare Abort as boolean and initializing it with True
  85.     Private Shared Abort As Boolean = True
  86.  
  87.     'Countdown and player selecting function ~>
  88.     Public Shared Sub CountDownAndSelectPlayer(ByVal Time As Integer)
  89.  
  90.         'Start Abort loop ~>
  91.         Do While Abort = False
  92.  
  93.             'Start the countdown loop ~>
  94.             While Time > 0
  95.                 'Time decreases by 1 ~>
  96.                 Time -= 1
  97.                 'Printing in the countdown ~>
  98.                 iPrintlnBold(-1, "Game Will Start After : ^2" & Time & " ^7Seconds")
  99.                 'System Sleeps for 1 second ~>
  100.                 Thread.Sleep(1000)
  101.                 'Ending the loop ~>
  102.             End While
  103.  
  104.             'Assigning the selected player variable ~>
  105.             SelectedClient = Random_.Next(0, 11)
  106.  
  107.             'Getting a valid Player loop ~>
  108.             Do Until GetValidPlayer(SelectedClient) = True
  109.                 SelectedClient = Random_.Next(0, 11)
  110.                 'Ending the loop ~>
  111.             Loop
  112.  
  113.             'Printing in the The selected player ~>
  114.             iPrintln(SelectedClient, "^1YOU ARE THE SELECTED PLAYER !!")
  115.             iPrintlnBold(-1, GetPlayerName(SelectedClient) & " Is The Sellected Player ! ")
  116.             SetModel(SelectedClient)
  117.             'Ending Abort loop ~>
  118.         Loop
  119.  
  120.     End Sub
  121.  
  122.     Private Sub StartGameModeBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StartGameModeBtn.Click
  123.         'Start GameMode with 10 seconds ~>
  124.         CountDownAndSelectPlayer(10)
  125.     End Sub
  126.  
  127.     Private Sub StopGameMode_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StopGameMode.Click
  128.         'Stop GameMode ~>
  129.         Abort = True
  130.     End Sub
  131.  
  132.     'Set Meodel function ~>
  133.     Public Shared Sub SetModel(ByVal ClientID As Integer)
  134.         GHOSTS.RPC.Call(&H28F95C, &HE04F00 + (ClientID * 640), "com_plasticcase_green_big_us_dirt")
  135.     End Sub
  136. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement