Eclipse - Free 2D Mmorpg Maker
September 02, 2010, 10:28:35 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


Site Author : Topic: My Fishing Script  (Read 379 times)
0 Members and 1 Guest are viewing this topic.
April 27, 2010, 10:46:59 AM
God of Noobs
Member
**
User No : 14856
Posts: 70
  • 28 credits
  • View Inventory
  • Send Money To [><]Raicon[><]
  • Location : Brazil
    • View Profile
    Bottom of Main
    Code: [Select]
    Sub Fishing(Index)
    ' Maked by Raicon.
    Dim Map
    Dim X
    Dim Y
    Dim Random
    Dim Weapon Needed
    Dim TileofWater
    TileofWater = "Tile Set of Water"
    Weapon Needed = "Weapon Needed"
    Map= getplayermap(index)
    if Getvar("CharStats\" & getplayername(index) & ".ini", "Fishing", "Status") = "1" then
    call playermsg(index, "You can't fishing 2x", 0)
    else
    if CheckItemSlot(index, Weapon Needed) = 1 then
    If getplayerdir(index) = 0 then
    X= getplayerx(index)
    Y= getplayery(index) -1
    else
    If getplayerdir(index) = 1 then
    X= getplayerx(index)
    Y= getplayery(index) +1
    else
    If getplayerdir(index) = 2 then
    X= getplayerx(index) -1
    Y= getplayery(index)
    else
    If getplayerdir(index) = 3 then
    X= getplayerx(index) +1
    Y= getplayery(index)
    end if
    end if
    end if
    end if


    Random = rand( 1, 3)
    if GetTileSet( Map, x, y, 0) = TileofWater then
    if Random = 2 then
    call settimer("Fishtimer " & Index & ", " & 1, 30000)
    call playermsg(index, "Wait......", blue)
    call putvar("CharStats\" & getplayername(index) & ".ini", "Fishing", "Status", "1")
    else
    if Random = 1 then
    call settimer("Fishtimer " & Index & ", " & 2, 45000)
    call playermsg(index, "Wait......", blue)
    call putvar("CharStats\" & getplayername(index) & ".ini", "Fishing", "Status", "1")
    else
    if Random = 3 then
    call settimer("Fishtimer " & Index & ", " & 3, 50000)
    call playermsg(index, "Wait......", blue)
    call putvar("CharStats\" & getplayername(index) & ".ini", "Fishing", "Status", "1")
    end if
    end if
    end if
    end if
    end if
    end if
    end sub

    Function CheckItemSlot(index, Item)
    ' Maked by Raicon.
    CheckItemSlot=0

    if GetPlayerInvItemNum(index, getplayerweaponslot(index)) = Item Then

    CheckItemSlot=1

    end if

    end function

    Sub FishTimer(Index, Script)
    ' Maked by Raicon.
    Dim Map
    Dim X
    Dim Y
    Dim WeaponNeeded
    Dim TileofWater
    WeaponNeeded= "Weapon Needed ( Number )"
    TileofWater = "Tile Set of Water"
    If getplayerdir(index) = 0 then
    X= getplayerx(index)
    Y= getplayery(index) -1
    else
    If getplayerdir(index) = 1 then
    X= getplayerx(index)
    Y= getplayery(index) +1
    else
    If getplayerdir(index) = 2 then
    X= getplayerx(index) -1
    Y= getplayery(index)
    else
    If getplayerdir(index) = 3 then
    X= getplayerx(index) +1
    Y= getplayery(index)
    end if
    end if
    end if
    end if

    On error resume next
    Select Case Script
    Case 1
    call removetimer("Fishtimer " & Index & ", " & 1)
    if GetTileSet( Map, x, y, 0) = TileofWater then
    if CheckItemSlot(index, 179) = WeaponNeeded then
    call playermsg(index, "You pickup fish.", 14)
    call putvar("CharStats\" & getplayername(index) & ".ini", "Fishing", "Status", "0")
    call giveplayeritem(index, 180, 1, 1)
    end if
    end if

    Case 2
    call removetimer("Fishtimer " & Index & ", " & 2)
    if GetTileSet( Map, x, y, 0) = TileofWater then
    if CheckItemSlot(index, 179) = WeaponNeeded then
    call playermsg(index, "You have losted that fish!.", 0)
    call putvar("CharStats\" & getplayername(index) & ".ini", "Fishing", "Status", "0")
    end if
    end if
    Case 3
    call removetimer("Fishtimer " & Index & ", " & 3)
    if GetTileSet( Map, x, y, 0) = TileofWater then
    if CheckItemSlot(index, 179) = WeaponNeeded then
    call putvar("CharStats\" & getplayername(index) & ".ini", "Fishing", "Status", "0")
    call fishing(index)
    end if
    end if
    End Select
    End Sub
    :D
    Quote
    Weapon Needed = Item Number of Weapon
    TileofWater = Tile Set of water ( 1, 2, 3...)
    Logged

    New World In Project...., Dreams Entertainment
    April 29, 2010, 12:47:00 AM
    Appleboy
    Active Member
    ***
    User No : 9747
    Posts: 342
  • 16 credits
  • View Inventory
  • Send Money To Pasketi
  • Location : Right here, you training dummy!
    • View Profile
    • WWW
    I quess it doesn't work. "Weapon needed" shouldn't have a space, because then the "needed" is not part of the same variable. It is fixed lower in the code (as "WeaponNeeded"), but I suggest you using something simpler, like "fishpole" or "rodID". Same goes for water: "TileofWater" -> "Water".

    The "tileset" thing might work, if you got ONLY water tiles in some tileset. Otherwise I'd suggest using Scripted tile.

    ("'Maked by Raicon"... Typo there: "'Made by Raicon")

    Don't quote, what you need to do to customize the code. Put an example value and comment above, what does it mean and do you have to edit it somehow.
    Logged


    Click -----><---- Here

    How do I open a .rar file?
    April 29, 2010, 07:55:29 AM
    God of Noobs
    Member
    **
    User No : 14856
    Posts: 70
  • 28 credits
  • View Inventory
  • Send Money To [><]Raicon[><]
  • Location : Brazil
    • View Profile
    I quess it doesn't work. "Weapon needed" shouldn't have a space, because then the "needed" is not part of the same variable. It is fixed lower in the code (as "WeaponNeeded"), but I suggest you using something simpler, like "fishpole" or "rodID". Same goes for water: "TileofWater" -> "Water".

    The "tileset" thing might work, if you got ONLY water tiles in some tileset. Otherwise I'd suggest using Scripted tile.

    ("'Maked by Raicon"... Typo there: "'Made by Raicon")

    Don't quote, what you need to do to customize the code. Put an example value and comment above, what does it mean and do you have to edit it somehow.
    I have 13 years old :o
    I no speak english Very Good [=3]
    I am brazilian......
    I don't have finished the English School.
    .......................................
    Logged

    New World In Project...., Dreams Entertainment
    April 29, 2010, 07:57:21 AM
    God of Noobs
    Member
    **
    User No : 14856
    Posts: 70
  • 28 credits
  • View Inventory
  • Send Money To [><]Raicon[><]
  • Location : Brazil
    • View Profile
    I use this Program to test
    my english...
    Logged

    New World In Project...., Dreams Entertainment
    May 03, 2010, 11:48:53 AM
    Haha, applez.
    Advanced Member
    ****
    User No : 5993
    Posts: 649
  • 8 credits
  • View Inventory
  • Send Money To Xelander
  • Previous Xelander
    • View Profile
    There is better and more flexible ways...
    But not to bad for a beginner.
    I'd say it's rather good.
    As long as it works.

    Good luck with your english btw.
    Logged


    Well.. almost every college has a course on Eclipse Sad Script. So you could check at a local college.
    Cool, I didn't know the program is spread through colleges. And Ty.
    May 03, 2010, 12:15:21 PM
    Active Member
    ***
    User No : 8924
    Posts: 113
  • 0 credits
  • View Inventory
  • Send Money To PotHead Zach
  • Location : I can't see with this blindfold on. Ask the dude driving the van :D
    • View Profile
    • WWW
    Hmm how will the fishing be done afterward?

    Feel free to tell my lazy ass to check for myself :p
    Logged


    The only way to solve it is to light up.
     


    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.238 seconds with 29 queries.