Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Folder Saving
#3
Back when I made Playerworlds games, I used to use folders to sort quests and such. Only mine was kinda reversed.. where I had the name of the quest as a folder, then a (playername).ini that was created.. a kind of flag system.

Mine were set up like this: (Taken from my PW Main.AS)

Code:
Sub OnScriptedTile(Player)

Dim FileSystem,filename
Filename = GetPlayerName(player)
Set FileSystem = CreateObject("Scripting.FileSystemObject")

'... etc


Code:
Case 20

    If GetPlayerX(player) = 9 and GetPlayerY(player) = 3 Then

        If FileSystem.FolderExists("C:\Documents and Settings\Owner\My Documents\Player Worlds\The Plane\Server\accounts\bank\Cookbook\" & filename) Then
        Call PlayerMessage(player,"You have already read this book!",15)
        Else
        Call PlayerMessage(player,"You browse the pages of the cookbook.",10)
        Call PlayerMessage(player,"[+100 EXP]",15)
        Call GivePlayerEXP(player, +100)
        Call CheckPlayerLevel(Player)
        Call FileSystem.CreateFolder("C:\Documents and Settings\Owner\My Documents\Player Worlds\The Plane\Server\accounts\bank\Cookbook\" & filename)    
        End If
    End If
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)