Eclipse - Free 2D Mmorpg Maker
September 02, 2010, 10:20:14 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 Ertzel
[Today at 10:11:57 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: fishing script  (Read 4163 times)
0 Members and 1 Guest are viewing this topic.
July 18, 2006, 09:29:17 AM
Newb
*
User No : 1296
Posts: 22
  • 0 credits
  • View Inventory
  • Send Money To snowking2
    • View Profile
    1) Find the blank part just above the 'Sub ScriptedTile(index, Script)' part in main.txt. I have shown it on the diagram below. This is NOT the code you have to copy and paste in.



    Code:
    Code:
    Sub DropItems(index)
        If GetPlayerWeaponSlot(index) > 0 Then
            Call PlayerMapDropItem(index, GetPlayerWeaponSlot(index), 0)
        End If

        If GetPlayerArmorSlot(index) > 0 Then
            Call PlayerMapDropItem(index, GetPlayerArmorSlot(index), 0)
        End If
       
        If GetPlayerHelmetSlot(index) > 0 Then
            Call PlayerMapDropItem(index, GetPlayerHelmetSlot(index), 0)
        End If

        If GetPlayerShieldSlot(index) > 0 Then
            Call PlayerMapDropItem(index, GetPlayerShieldSlot(index), 0)
        End If
    End Sub
    ###############BLANK PART!###############
    Sub ScriptedTile(index, Script)
    Select Case Script
        Case 0
            Call Flash(index, "Intro.swf")



    2) Paste the following piece of script into the blank area that we just found (shown on the last diagram):

    Code:
    Code:
    Sub ReplaceOneInvItem(index, olditem, newitem)
    Dim n
    n = 1
    Do
       If GetPlayerInvItemNum(index, n) = olditem Then
          Call SetPlayerInvItemNum(index, n, newitem)
          Call SendInventoryUpdate(index, n)
          Exit Do
       End If
       n = n + 1
    Loop Until n > 24
    End Sub

    Sub GoFishing(index, item, maxlevel, name)
       Dim c
       Dim level
       level = maxlevel + 1
          If GetPlayerlevel(index) < maxlevel Then
             c = Int(Rnd * Int(level - GetPlayerLevel(index)))
             If c = 1 Then
                Call PlayerMsg(index, GetPlayerName(index) & " caught a " & name, 2)
                Call ReplaceOneInvItem(index, 0, item)
             Else
                Call PlayerMsg(index, GetPlayerName(index) & " found nothing!", 12)
             End If
          Else
             Call PlayerMsg(index, GetPlayerName(index) & " caught a " & name, 2)
             Call ReplaceOneInvItem(index, 0, item)
          End If
    End Sub
     



    3)Ok. Now that you have pasted that part in, its time to add the part you will actually tread on.

    Find the cases section within Main.txt, and then find the next case number that is not being used. For this demo, we will assume that we are on case 2 - However, some of you may be on different numbers


    Code:
    Code:
        Case 9
       dim weapon
       weapon = GetPlayerWeaponSlot(index)
       If weapon = 0 Then
          Call PlayerMsg(index, "You don't have a #EQUIPMENT NAME# equiped", 15)
          ElseIf GetPlayerInvItemNum(index, weapon) = #EQUIPMENT NUM# Then
          Call GoFishing(index, #FISH NUM#, #MAX LEVEL#, "#FISH NAME")
          Else
          Call PlayerMsg(index, "You don't have a #EQUIPMENT NAME# equiped", 15)
       End If



    Parts you need to change

    #EQUIPMENT NUM# - This is the item number of the equipment you need to catch the fish (ie. a fishing net).

    #EQUIPMENT NAME# - This is the name of the equipment that you need to catch the fish (ie. a fishing net).

    #FISH NUM# - This is the number of the item that you want to be able to catch

    #FISH NAME# - This is the name of the fish. Just change the name, DO NOT delete the quotation marks from around the name ^^.

    #MAX LEVEL# - This is the level at which you will start to catch the fish 100% of the time

    PLEASE NOTE: That, you can make it so that you can have more than one fishing spot, by simply copying and pasting this code into a free case slot further down, and changing the numbers around.
    PM me if you get stuck XD



    For the more advanced programmers

    A more advanced programmer would notice that I have made two new Sub-Routines; called 'GoFishing' and 'ReplaceOneInvItem'. Any of you are welcome to use this subroutine, and I shall give you the Syntax for it:


    GoFishing(INDEX, ITEM, MAXLEVEL, "NAME")
    -Sets the variables for going fishing. Item, is the item number. Maxlevel, is the level at which you start catching the fish 100% of the time. Name, is the name of the fish - The name that's printed into the Player Message.

    Example:Call GoFishing(index, 24, 5, "Shrimp")
    ReplaceOneInvItem(INDEX, OLDITEM, NEWITEM)

    -This replaces just ONE of the items in your inventory with another item. Set the replace item to 0, to replace the item with an empty slot, or to fill the next empty slot.

    Example:Call ReplaceOneInvItem(index, 24, 0)


    However, some of you may be wondering why it is replace 'ONE' inv item. This is because I have made another which I shall also give you the syntax for ^^. ReplaceAllInvItems(INDEX, OLDITEM, NEWITEM)

    Will search every single slot in your inventory and replace an item with a new item. Set the replace item to 0, to replace the items with an empty slot, or to fill all the empty slots.

    ExampleCall ReplaceAllInvItems(index, 24, 0)

    And then, you will also need the code for this sub... (Although you DO NOT need this code to make the fishing script work)


    Code:
    Code:
    Sub ReplaceAllInvItem(index, olditem, newitem)

    Dim n
    n = 1
    Do
       If GetPlayerInvItemNum(index, n) = olditem Then
          Call SetPlayerInvItemNum(index, n, newitem)
          Call SendInventoryUpdate(index, n)
       End If
       n = n + 1
    Loop Until n > 24
    End Sub
    Logged

    Snow king online (100%)
    vote 4 pedro sanchez and all ur wildest dreams will come true!
    April 12, 2008, 10:31:45 AM
    Member
    **
    User No : 3563
    Posts: 96
  • 0 credits
  • View Inventory
  • Send Money To IrunoHatake
    • View Profile
    • WWW
    ??? you didn't explain which case section ???
    where does this go?

    Code: [Select]
        Case 9
       dim weapon
       weapon = GetPlayerWeaponSlot(index)
       If weapon = 0 Then
          Call PlayerMsg(index, "You don't have a #EQUIPMENT NAME# equiped", 15)
          ElseIf GetPlayerInvItemNum(index, weapon) = #EQUIPMENT NUM# Then
          Call GoFishing(index, #FISH NUM#, #MAX LEVEL#, "#FISH NAME")
          Else
          Call PlayerMsg(index, "You don't have a #EQUIPMENT NAME# equiped", 15)
       End If
    [/s]

    EDIT: nm also is it possible for it to check not only if u have a fishing item but a item like bait also? I put bait as a shield so probably check shield right?
    « Last Edit: April 12, 2008, 10:55:50 AM by IrunoHatake » Logged

    Game Creater Of the brand new and improved, Iruno Online Chronicles.
    August 22, 2009, 09:10:12 PM
    Newb
    *
    User No : 14013
    Posts: 4
  • 0 credits
  • View Inventory
  • Send Money To dresser525
    • View Profile
    it just keeps saying I dont have the item I need equipted but I do! :embarrassed:
    srry I totaly did it wrong its working now.
    « Last Edit: August 23, 2009, 10:53:08 AM by dresser525 » Logged
    August 27, 2009, 05:34:11 PM
    xrx526
    Guest
    Is this for TE or EE 2.8?  I am rly lost cuz I am a nub at scripting.
    Logged
    August 27, 2009, 05:37:44 PM
    When I crash and burn, I want it to at least be Spectacular
    Donated
    Demi God
    *
    User No : 1466
    Posts: 4884
  • 1352 credits
  • View Inventory
  • Send Money To DrNova
  • Location : My own personal hell
    And boom goes the dynamite
    • View Profile
    Nobody uses TE. Least no one in their right mind
    Logged

    Its shiny. By video game rules, it must be important.


    August 27, 2009, 05:44:04 PM
    █☻█
    Administrator
    Epic Poster
    *
    User No : 440
    Posts: 8768
  • 494 credits
  • View Inventory
  • Send Money To ÅÐмiядζ ЯξƒµĢ€
  • Location : Delaware, USA
    The Admiral.
    • View Profile
    Is this for TE or EE 2.8?  I am rly lost cuz I am a nub at scripting.
    It doesn't matter; virtually all of the TE scripts work in EE2.8
    Logged

    I no longer offer engine support through PMs.  If you need help, please do so by posting in the correct board, thank you.
    I also do not grant "Moderator" or "Administrator" requests; such a PM will be ignored.


    Remember that marshmallow from Ghost Busters? marsh is a Canadian version of that.

    And thus paperdoll was born! | Sub: "Destroy Game" | Evolve 4.0 -- Evolving Simulaton! | Script Index - Almost ALL of Eclipse's ScriptsOkay, if you are not open-minded, then stop reading...
    Guess what? Telekinesis, Pyrokinesis, Cryokinesis, Hydrokinesis, Electrokinesis, Psychokinesis, Telepathy, Empathy, Energy Balls, Energy Shields, Remote Viewing, and more IS POSSIBLE! If you have an open mind, and willing to TRY IT YOURSELF, then  read THIS FREE BOOK I've compiled myself!
    Hello! I am French and I have found my happiness on your software.
    August 27, 2009, 05:46:45 PM
    That crazy foxy aussie
    Advanced Eclipser
    *****
    User No : 9848
    Posts: 1460
  • 0 credits
  • View Inventory
  • Send Money To [God of Foxiness] Owen
  • Hi thar
    • View Profile
    Nobody uses TE. Least no one in their right mind
    complete bollocks! there is nothing wrong with TE, but all the new versions are merely better.
    Logged

    Lost my sig due to incompetence
    August 27, 2009, 05:50:39 PM
    █☻█
    Administrator
    Epic Poster
    *
    User No : 440
    Posts: 8768
  • 494 credits
  • View Inventory
  • Send Money To ÅÐмiядζ ЯξƒµĢ€
  • Location : Delaware, USA
    The Admiral.
    • View Profile
    complete bollocks! there is nothing wrong with TE, but all the new versions are merely better.
    Actually there are quite afew things wrong with TE.
    Logged

    I no longer offer engine support through PMs.  If you need help, please do so by posting in the correct board, thank you.
    I also do not grant "Moderator" or "Administrator" requests; such a PM will be ignored.


    Remember that marshmallow from Ghost Busters? marsh is a Canadian version of that.

    And thus paperdoll was born! | Sub: "Destroy Game" | Evolve 4.0 -- Evolving Simulaton! | Script Index - Almost ALL of Eclipse's ScriptsOkay, if you are not open-minded, then stop reading...
    Guess what? Telekinesis, Pyrokinesis, Cryokinesis, Hydrokinesis, Electrokinesis, Psychokinesis, Telepathy, Empathy, Energy Balls, Energy Shields, Remote Viewing, and more IS POSSIBLE! If you have an open mind, and willing to TRY IT YOURSELF, then  read THIS FREE BOOK I've compiled myself!
    Hello! I am French and I have found my happiness on your software.
    August 27, 2009, 05:54:18 PM
    That crazy foxy aussie
    Advanced Eclipser
    *****
    User No : 9848
    Posts: 1460
  • 0 credits
  • View Inventory
  • Send Money To [God of Foxiness] Owen
  • Hi thar
    • View Profile
    Actually there are quite afew things wrong with TE.
    And there's nothing wrong with 2.7/2.8/Eclipse Stable/Project Vertigo and all those other engines? XD
    I think I have made my point clear ;)
    Anywho you can remove these posts to prevent off topicness.
    Logged

    Lost my sig due to incompetence
    October 16, 2009, 10:24:11 AM
    Newb
    *
    User No : 14108
    Posts: 8
  • 0 credits
  • View Inventory
  • Send Money To Legolas
    • View Profile
    I'm just a nub... so ... maybe its a stupid question but what is now the place where you can fish ???  I try to read the script but I cant see anywhere X or Y ??? so Plz can u help me ???
    Logged
    November 17, 2009, 04:09:18 AM
    Im your best friend :)
    Moderator
    Advanced Member
    *
    User No : 13967
    Posts: 694
  • 1064 credits
  • View Inventory
  • Send Money To Captain evilbunnie
  • Location : NEW ZEALAND
    HardStyle Addict
    • View Profile
    NECRO POST FAIL.
    Logged


    November 17, 2009, 05:18:16 PM
    Global Moderator
    Teh Uberleet
    *
    User No : 13370
    Posts: 3669
  • 432 credits
  • View Inventory
  • Send Money To Soul
    • View Profile
    I'm just a nub... so ... maybe its a stupid question but what is now the place where you can fish ???  I try to read the script but I cant see anywhere X or Y ??? so Plz can u help me ???

    Do /loc and you can see your X and Y.

    NECRO POST FAIL.

    Necro's don't apply here.
    Logged
    May 19, 2010, 06:45:40 PM
    Newb
    *
    User No : 19251
    Posts: 9
  • 0 credits
  • View Inventory
  • Send Money To SecretMyphie
  • Hi!
    • View Profile
    • WWW
    ICANOT SEE THE BLANK PART YOU'RE REFERRING TO.
    Logged

    hEllo! my name's Secret Myphie! I'm from asia :)
    May 19, 2010, 06:50:17 PM
    █☻█
    Administrator
    Epic Poster
    *
    User No : 440
    Posts: 8768
  • 494 credits
  • View Inventory
  • Send Money To ÅÐмiядζ ЯξƒµĢ€
  • Location : Delaware, USA
    The Admiral.
    • View Profile
    ICANOT SEE THE BLANK PART YOU'RE REFERRING TO.
    I think your cap lock key may be stuck; I'd suggest getting it fixed or turning it off.

    With that being said, this script is about four years old, but if you want a fishing script (or skill script in general), I'd recommend Baron's Superscript.
    Logged

    I no longer offer engine support through PMs.  If you need help, please do so by posting in the correct board, thank you.
    I also do not grant "Moderator" or "Administrator" requests; such a PM will be ignored.


    Remember that marshmallow from Ghost Busters? marsh is a Canadian version of that.

    And thus paperdoll was born! | Sub: "Destroy Game" | Evolve 4.0 -- Evolving Simulaton! | Script Index - Almost ALL of Eclipse's ScriptsOkay, if you are not open-minded, then stop reading...
    Guess what? Telekinesis, Pyrokinesis, Cryokinesis, Hydrokinesis, Electrokinesis, Psychokinesis, Telepathy, Empathy, Energy Balls, Energy Shields, Remote Viewing, and more IS POSSIBLE! If you have an open mind, and willing to TRY IT YOURSELF, then  read THIS FREE BOOK I've compiled myself!
    Hello! I am French and I have found my happiness on your software.
     


    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.315 seconds with 31 queries.