Eclipse - Free 2D Mmorpg Maker
September 02, 2010, 10:23:29 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Shop Arcade chat Login Register  
 
 
   
 
collapse

* No Spam Or Websites

Refresh History
  • Ertzel: So... Anyone with basic/none/limited photoshop or even paint skills want to make some money converting sprites for me?
    Today at 10:07:35 PM
  • Gamma™: weaver why are you oflfine on H&H? :S
    Today at 10:04:26 PM
  • Ertzel: Ya, only one try per knife, my one try failed :(
    Today at 10:00:17 PM
  • LegendWeaver: is it one use?
    Today at 09:43:15 PM
  • Ertzel: Wish I didnt spend my 1k+ credits to buy the stupid knife that failed at stealing Robins credits >.<
    Today at 09:42:42 PM
  • Wraith: ) Kreator!
    Today at 09:06:52 PM
  • Wraith: yes! you were! (in red text
    Today at 09:06:46 PM
  • ToshiroHayate: Kreator!
    Today at 08:25:02 PM
  • Kreator: o_0 Was I supposed to Wraith?
    Today at 08:16:02 PM
  • [Pie] ICT: Don't worry.. I commented.
    Today at 07:55:08 PM
  • Wraith: Ay, kreator, wtf is up with you not posting anything about my new cliffs??
    Today at 07:50:36 PM

* Recent Topics

[EO] Attaching Problem. by 314piwm
[Today at 10:21:04 PM]


Project Vertigo [2d Tile-based Side-Scrolling Engine] by Miguu
[Today at 10:03:22 PM]


Zacaras Empire (Hiring) by Ertzel
[Today at 08:43:54 PM]


custom cliff tiles by ToshiroHayate
[Today at 08:29:15 PM]


.: RPG Kingdom :. by LegendWeaver
[Today at 08:25:20 PM]


What do you think? by [Pie] ICT
[Today at 07:54:54 PM]


[Show Off] Aztec Stuff by [Pie] ICT
[Today at 07:50:07 PM]


So I herd you liek mudkipz by Kreator
[Today at 07:36:52 PM]


Haven and Hearth: Epic Screenshot Thread by Tompwnage™
[Today at 07:14:21 PM]


The Lonliest Star [RP] by DDunit
[Today at 07:09:46 PM]


* Who's Online


Pages: [1] 2
Site Author : Topic: Boat Script  (Read 5731 times)
0 Members and 1 Guest are viewing this topic.
August 10, 2005, 03:19:02 PM
Similac Child
Owner
Demi God
*
User No : 13358
Posts: 7477
  • 1425 credits
  • View Inventory
  • Send Money To Marsh
  • Comfort the disturbed disturb the comfortable
    • View Profile
    • WWW
    Difficulty: Medium 3/5

    Creator: Dram

    Code:

        Case 2
            If int(GetPlayerSprite(Index)) > 79 Then
               Call SetPlayerSprite(Index, 79)
               Call PlayerMsg(index, "You begin to set sail.", 2)
               Call SendPlayerData(index)

       ElseIf int(GetPlayerSprite(Index)) < 79 Then
                 Call SetPlayerSprite(Index, 79)
               Call PlayerMsg(index, "You begin to set sail.", 2)
               Call SendPlayerData(index)
       End If

        Case 3  
       Dim Sprite

            Sprite = int(GetVar("accounts\" & GetPlayerLogin(index) &".ini", "CHAR" & GetPlayerCharNum(index), "Sprite"))
       
            If int(GetPlayerSprite(Index)) = 79 Then
                   Call SetPlayerSprite(Index, Sprite)
                   Call PlayerMsg(index, "You have docked.", 2)
                   Call SendPlayerData(index)
            Else
                   Call PlayerMsg(Index, "Step onto the water to begin sailing", 2)
            End If


    Here you go people!

    the boat script! Smile
    turns you into a boat = Case 2
    turns you Back = Case 3

    Edit: oops did not know someone else posted it :blink:
    Logged

    don't call your mother - don't call your priest
    don't call your doctor - call the police
    you bring the razor blade - I'll bring the speed
    Take off your coat - it's gonna be a long night
    January 22, 2006, 05:09:54 AM
    Anonymous
    Guest
    Im not good at scripting.
    So I dont know where I should put the script
    can u tell me?
    Logged
    January 23, 2006, 04:41:42 AM
    Member
    **
    User No : 37
    Posts: 29
  • 0 credits
  • View Inventory
  • Send Money To marcopolo8
    • View Profile
    • WWW
    I added call so I warp 2 blocks past on the the docking else the player can dock the boat carfully and then bring it upon land.


        Call PlayerWarp(index, 4, 5, 21)


    of course each dock will need its own docking script - it did stop the problems with carefull planning.
    Logged

    January 23, 2006, 06:59:14 AM
    Active Member
    ***
    User No : 139
    Posts: 197
  • 0 credits
  • View Inventory
  • Send Money To dbgtrulz
    • View Profile
    • WWW
    For case 2, why don't you just say:
    Code: [Select]
    If int(GetPlayerSprite(Index)) <> 79 Then
    Call SetPlayerSprite(Index, 79)
    Call PlayerMsg(index, "You begin to set sail.", 2)
    Call SendPlayerData(index)
    End If

    The <> means "does not equal". So if the player's sprite does not equal 79 then turn him into a boat. Saves code and system resources :)
    Logged

    January 30, 2006, 02:31:59 PM
    Active Member
    ***
    User No : 139
    Posts: 197
  • 0 credits
  • View Inventory
  • Send Money To dbgtrulz
    • View Profile
    • WWW
    I modified the boat script. The one you have up there as of this post has one big glitch: If you log out when you're a boat, or you save when your a boat, you will be a boat on last after docking, because it would've saved your sprite as 79. This version fixes that glitch:
    Code: [Select]
    Case 2
    If int(GetPlayerSprite(index)) <> 79 Then
    Call PutVar("accounts\" & GetPlayerLogin(index) &".ini", "CHAR" & GetPlayerCharNum(index), "noboat", GetPlayerSprite(index))
    Call SetPlayerSprite(index, 79)
    Call PlayerMsg(index, "You begin to set sail.", 2)
    Call SendPlayerData(index)
    End If
    Case 3
    Dim Sprite
    Sprite = int(GetVar("accounts\" & GetPlayerLogin(index) &".ini", "CHAR" & GetPlayerCharNum(index), "noboat"))
    If int(GetPlayerSprite(index)) = 79 Then
    Call SetPlayerSprite(index, Sprite)
    Call PlayerMsg(index, "You have docked.", 2)
    Call SendPlayerData(index)
    Else
    Call PlayerMsg(index, "Step onto the water to begin sailing", 2)
    End If
    Logged

    January 30, 2006, 08:36:17 PM
    Lord Of Spleens
    Administrator
    Teh Uberleet
    *
    User No : 166
    Posts: 2951
  • 0 credits
  • View Inventory
  • Send Money To Baron
  • Location : Australia
    Badges? We dont need no stinkin' badges!
    • View Profile
    ... Itd be easier if you just set up block tiles around all the water edges, and had one scripted tile that simply put a var into the character file.

    ie (Psuedocode, not sadscript.)

    Case scriptedtilenumberx

     if getVar boat <> 1 then
    Putvar currentplayersprite into boattemp
    set playersprite to boatsprite
    Putvar boat = 1

     if getVar boat = 1 then
    Set currentplayersprite to boattemp
    Putvar boat = 0

    -----

    I couldnt be arsed scripting it completely properly. This script also relies on ini creation through On error Resume next.
    Logged


    Apparently ICT thinks that:
    [ 98% of Eclipse forums thinks baron is cool. Put this in your signature if you are on of the 2% that knows he's an asshôle ]

    If I'm only pissing 1 in 50 people off, I don't think that is too bad at all :D
    January 30, 2006, 11:50:39 PM
    Uses Harden
    Administrator
    Advanced Eclipser
    *
    User No : 8
    Posts: 1708
  • 156 credits
  • View Inventory
  • Send Money To Spike
  • Location : Viridian Forest
    • View Profile
    id take barons word for it if I were u...hes one of the best scriptors I know
    Logged
    January 31, 2006, 12:10:14 AM
    Lord Of Spleens
    Administrator
    Teh Uberleet
    *
    User No : 166
    Posts: 2951
  • 0 credits
  • View Inventory
  • Send Money To Baron
  • Location : Australia
    Badges? We dont need no stinkin' badges!
    • View Profile
    Quote from: ALANSPIKE
    id take barons word for it if I were u...hes one of the best scriptors I know


    Ill post my script for boats here in 2 secs, just debugging it...
    Logged


    Apparently ICT thinks that:
    [ 98% of Eclipse forums thinks baron is cool. Put this in your signature if you are on of the 2% that knows he's an asshôle ]

    If I'm only pissing 1 in 50 people off, I don't think that is too bad at all :D
    January 31, 2006, 01:04:44 AM
    Lord Of Spleens
    Administrator
    Teh Uberleet
    *
    User No : 166
    Posts: 2951
  • 0 credits
  • View Inventory
  • Send Money To Baron
  • Location : Australia
    Badges? We dont need no stinkin' badges!
    • View Profile
    Code: [Select]


    Case SCRIPTEDTILEX
    'DIM THESE:
    'sprite
    'onMsg
    'offMsg

    onMsg = PUT_GET_ON_MESSAGE_HERE
    offmsg = PUT_GET_OFF_MESSAGE_HERE
    sprite = PUT_SPRITE_NUMBER_HERE
    Call Boatchange(index, sprite, onMsg, offMsg)



    Thats your scripted tile code. Change SCRIPTEDTILEX to the new number.

    Place this scripted tile wherever you want people to change from land to boat or vice versa.

    Paste this at the bottom of your main.txt

    Code: [Select]

    '**************************
    '**************************
    'BOAT SCRIPT BY BARONY
    'Last Edited Jan 31st 2006
    'www.barony.deviantart.com
    '**************************
    '**************************

    Sub Boatchange(index,sprite,onMsg,offMsg)
    On Error Resume Next
    Dim enterboat
    Dim leaveboat
    Dim boat

    '***********


    Boat = 0 + GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "boat")

    If boat = 1 Then

    leaveboat = 0 + GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "offboat")

    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "boat", "0")

    Call Setplayersprite(index, leaveboat)
    Call SendPlayerData(index)

    Call PlayerMsg (index, OffMsg, 4)

    End If

    '****************

    enterboat = 0 + (GetPlayerSprite(index))

    Call PlayerMsg (index, "sprite = " & enterboat, 4)

    If boat <> 1 Then

    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "boat", "1")

    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "offboat", 0 + enterboat )

    Call Setplayersprite(index, sprite)
    Call SendPlayerData(index)

    Call PlayerMsg (index, onMsg, 4)

    End If

    End Sub

    '**************************
    'End Of Boat Script
    'Place Scripted Tile calling this script where ever you want players to change from their current sprite to boat or vice versa.
    'Do not delete the On Error Resume Next for this script, this is needed to create the .ini check logic.
    '**************************



    It is also important to note that this same script could be used to make players swim across rivers, drive cars etc etc.

    Like all the scripts I write, I hope they are versatile enough toi help you do something cool. Enjoy this ;)
    Logged


    Apparently ICT thinks that:
    [ 98% of Eclipse forums thinks baron is cool. Put this in your signature if you are on of the 2% that knows he's an asshôle ]

    If I'm only pissing 1 in 50 people off, I don't think that is too bad at all :D
    January 31, 2006, 05:29:17 AM
    Active Member
    ***
    User No : 164
    Posts: 310
  • 0 credits
  • View Inventory
  • Send Money To yakuza_II
  • Location : In a cage in Area 51
    • View Profile
    thanx everyone I was usin a similar written script without realising its major flaw... phew.... take that bugs
    Logged

    IF YOU SCRIPT IT THEY WILL COME!!!
    February 02, 2006, 11:09:27 AM
    Active Member
    ***
    User No : 159
    Posts: 308
  • 0 credits
  • View Inventory
  • Send Money To Kay-No
    • View Profile
    • WWW
    Boat Script (#10)
    I using boat script and it works very good but theres one thing,
    when I go on the boat scripted tile I turn into a boat but then can I
    just go back and im a boat that sealing around on the land... :P

    got one more question, can I make so  I need a item to go boating
    like an boat contract?
    Logged

    Tekrania - Free mmorpg
    http://www.tekrania.tk

    Do you wanna be a part of Tekrania's team?   Or you could add my MSN: Kay-No@hotmail.com Im ""  Right now.  Please Vote:      
    February 02, 2006, 11:45:54 AM
    Uses Harden
    Administrator
    Advanced Eclipser
    *
    User No : 8
    Posts: 1708
  • 156 credits
  • View Inventory
  • Send Money To Spike
  • Location : Viridian Forest
    • View Profile
    Boat Script (#11)
    o....k
    Logged
    February 02, 2006, 01:17:16 PM
    Member
    **
    User No : 127
    Posts: 27
  • 0 credits
  • View Inventory
  • Send Money To Cruzn
    • View Profile
    Boat Script (#12)
    Place at the bottom of the main.txt
    Code: [Select]
    ' ********************************************
    ' * Base Script By: Dram // Script By: Cruzn *
    ' ********************************************
    Sub BoatDock(index, sprite, message, color)
        If GetPlayerSprite(index) = sprite Then
            Call BlockPlayer(index)
            Call PlayerMsg(index, "Sorry, this is the entrance.", 1)
        Else
            Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "TempSprite" , 0)
            Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "TempSprite" , GetPlayerSprite(index))
            Call SetPlayerSprite(index, sprite)
            Call PlayerMsg(index, message, color)
            Call SendPlayerData(index)
        End If
    End Sub

    ' ********************************************
    ' * Base Script By: Dram // Script By: Cruzn *
    ' ********************************************
    Sub BoatExit(index, sprite, message, color)
        If GetPlayerSprite(index) <> sprite Then
            Call BlockPlayer(index)
            Call PlayerMsg(index, "Sorry, this is the exit.", 1)
        Else
        Call SetPlayerSprite(index, GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(Index), "TempSprite"))
        Call PlayerMsg(index, message, color)
        Call SendPlayerData(index)
        End If
    End Sub


    Use these codes under ScriptTile Sub::Examples;
    Code: [Select]
       Case 2
            Call BoatDock(index, 31, "You set sail across the smooth seas.", 1)
        Case 3
            Call BoatExit(index, 31, "Your boat docks safely, and you walk off.", 1)

    Code: [Select]
    Call BoatDock(index, sprite, "message", color)

    That should help... -- My version of this script.
    Logged
    February 02, 2006, 09:22:07 PM
    Active Member
    ***
    User No : 164
    Posts: 310
  • 0 credits
  • View Inventory
  • Send Money To yakuza_II
  • Location : In a cage in Area 51
    • View Profile
    Boat Script (#13)
    you need to have to docks one getting on the boat with scripted tile "1" and another with dock to get off boat with scripted tile "2"


    wat happened to avatar baron !!!!!    its all pirated!!!! hehehe

    pirates dig the booty :wink:
    Logged

    IF YOU SCRIPT IT THEY WILL COME!!!
    February 03, 2006, 08:15:25 AM
    Uses Harden
    Administrator
    Advanced Eclipser
    *
    User No : 8
    Posts: 1708
  • 156 credits
  • View Inventory
  • Send Money To Spike
  • Location : Viridian Forest
    • View Profile
    Boat Script (#14)
    :lol:
    Logged
    February 15, 2006, 10:59:03 AM
    Newb
    *
    User No : 237
    Posts: 20
  • 0 credits
  • View Inventory
  • Send Money To Darkmage
    • View Profile
    Boat Script (#15)
    Where do I paste it and how do I get it to work?
    Logged

    DONT READ THIS I SAID DONT READ THIS TO LATE YOUR DEAD!

    If a cat always land there feet and toast land on the buttered side what side would it land on if a cat is stuck to a buttered toats?!
    February 15, 2006, 12:17:43 PM
    Intellectual and Creative Troll.
    Veteran
    Teh Uberleet
    *
    User No : 58
    Posts: 2205
  • 146 credits
  • View Inventory
  • Send Money To [Pie] ICT
  • Location : Philly
    <3 you
    • View Profile
    Boat Script (#16)
    you paste it in your main txt
    I suggest you dont use scripts untill you semi understand how the hell they work
    Logged



    [ 98% of Eclipse forums thinks baron is cool. Put this in your signature if you are on of the 2% that knows he's an asshôle ]
    dude, admin, I can get away with this shit
    August 01, 2007, 09:32:34 AM
    PROGRAMER for PSP and PC
    Active Member
    ***
    User No : 3437
    Posts: 102
  • 0 credits
  • View Inventory
  • Send Money To thecobra
    • View Profile
    • WWW
    you need to have to docks one getting on the boat with scripted tile "1" and another with dock to get off boat with scripted tile "2"


    wat happened to avatar baron !!!!!    its all pirated!!!! hehehe

    pirates dig the booty :wink:

    u can just mae a tile that check if u are a bouat or some one else
    Logged

    MESS with the BEST ,
    and DIE like the REST

    creater of psp program:
    JOKEtopia
    MEMORY RECOVERY
    August 01, 2007, 09:46:33 AM
    Uses Harden
    Administrator
    Advanced Eclipser
    *
    User No : 8
    Posts: 1708
  • 156 credits
  • View Inventory
  • Send Money To Spike
  • Location : Viridian Forest
    • View Profile
    dude...this topic is 16 months old :O

    please add a "BUMPED TOPIC" sign to the beginning of your post
    Logged
    July 30, 2008, 07:19:08 AM
    Advanced
    Active Member
    ***
    User No : 7260
    Posts: 104
  • 0 credits
  • View Inventory
  • Send Money To bashh
  • Location : UK
    Pixel Artist BASHH
    • View Profile
    let me tell u something, if you turn into a boat and you have paperdoll, then your clothes will still be on. xD

    So you'll look like a boat wearing clothes.
    Logged

    Yo momma's so fat her cereal bowl comes with a lifeguard

    Pages: [1] 2
     


    Powered by MySQL Powered by PHP Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
    SimplePortal 2.3.1 © 2008-2009, SimplePortal
    Valid XHTML 1.0! Valid CSS!
    Page created in 0.299 seconds with 30 queries.