Eclipse - Free 2D Mmorpg Maker
September 02, 2010, 10:21:55 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: Give and Take item script all in one  (Read 2870 times)
0 Members and 1 Guest are viewing this topic.
July 28, 2006, 08:15:11 PM
Ex-Eclipse Programmer
Veteran
Active Member
*
User No : 1283
Posts: 303
  • 0 credits
  • View Inventory
  • Send Money To Brutal - Zeldo
  • Pie
    • View Profile
    Ok I made this for anyone to use in there scripts so that theres not 15 million diffrent ones being made every time a new script is made so here it is

    add this to the bottom of ur main
    Code: [Select]
    Sub itemz(index, item, value, stackable , type)
    Dim Slot
    If type = 1 Then
        If stackable = 0 Then
    Slot = 1
    Do While Slot < 24
    If GetPlayerInvItemNum(index, Slot) = item Then
    Call SetPlayerInvItemNum(index, Slot, 0)
    Call SetPlayerInvItemValue(index, Slot, 0)
    Call SendInventoryUpdate(index, Slot)
    Slot = 24
    End If
    Slot = Slot+1
    Loop
    Exit Sub
        End If
        If stackable = 1 Then
    Slot = 1
    Do While Slot < 24
    If GetPlayerInvItemNum(index, Slot) = item Then
    AMOUNT = GetPlayerInvItemValue(index, Slot)
    TAKE = Int(AMOUNT-value)
    If TAKE <0> 0 Then
    Call SetPlayerInvItemNum(index, Slot, 0)
    Call SetPlayerInvItemValue(index, Slot, 0)
    Call SetPlayerInvItemNum(index, Slot, item)
    Call SetPlayerInvItemValue(index, Slot, TAKE)
    Call SendInventoryUpdate(index, Slot)
    End If
    Slot = 24
    End If
    Slot = Slot+1
    Loop
    Exit Sub
        End If
    ElseIf type = 2 Then
    Do While Slot < 24
    If GetPlayerInvItemNum(index, Slot) = 0 Then
    Call SetPlayerInvItemNum(index, Slot, item)
    Call SetPlayerInvItemValue(index, Slot, GetPlayerInvItemValue(index, Slot)+value)
    Call SendInventoryUpdate(index, Slot)
    Slot = 24
    End If
    Slot = Slot+1
    Loop
    End If
    End Sub

    And Thats is  :)

    HOW TO USE

    Command is Sub itemz(index, item, value, stackable , type)
    item = the item num
    value = how many of the item(if non-stackable put 0)
    stackable = 0 if not stackable and 1 if it is
    type = 1 if its takeing an item and 2 if it giveing an item

    Well thats it post here if you are haveing a problem
    Logged
    July 28, 2006, 11:47:34 PM
    Member
    **
    User No : 1260
    Posts: 84
  • 0 credits
  • View Inventory
  • Send Money To jakeruston
  • Location : In my house, duh!
    • View Profile
    • WWW
    So what do you type to give an item?
    Logged

    Darksoft Games Competition has started!
    Visit http://www.darksoft.co.uk/community/index.php?showtopic=135]Here to vote in the latest match which is:

    Fear V To The Death!

    Note to all entrants who haven't finished their games: Get it done as soon as possible please ;)
    July 29, 2006, 03:17:24 PM
    Ex-Eclipse Programmer
    Veteran
    Active Member
    *
    User No : 1283
    Posts: 303
  • 0 credits
  • View Inventory
  • Send Money To Brutal - Zeldo
  • Pie
    • View Profile
    type = 1 if its takeing an item and 2 if it giveing an item
    I posted that above msn me if u still dont get it (I will ONLY help u not put the script in or help u use it I will only teach u how to)
    Logged
    July 31, 2006, 12:38:59 PM
    Newb
    *
    User No : 1434
    Posts: 24
  • 0 credits
  • View Inventory
  • Send Money To GF3
    • View Profile
    I Put The Code But Can Get It to work...Is this Code useable on NPCs?
    Logged



    Wait 15 Sec to See More Of My Hobbies, games, ecit. ^
    July 31, 2006, 01:56:14 PM
    Ex-Eclipse Programmer
    Veteran
    Active Member
    *
    User No : 1283
    Posts: 303
  • 0 credits
  • View Inventory
  • Send Money To Brutal - Zeldo
  • Pie
    • View Profile
    If you know what ur doin (know how to call a sub...) then yes
    Logged
    July 31, 2006, 02:49:16 PM
    Newb
    *
    User No : 1434
    Posts: 24
  • 0 credits
  • View Inventory
  • Send Money To GF3
    • View Profile
    Quote from: brutal
    If you know what ur doin (know how to call a sub...) then yes
    Uhh to tell you I have no Idea what im Doing....
    Logged



    Wait 15 Sec to See More Of My Hobbies, games, ecit. ^
    July 31, 2006, 06:31:04 PM
    Ex-Eclipse Programmer
    Veteran
    Active Member
    *
    User No : 1283
    Posts: 303
  • 0 credits
  • View Inventory
  • Send Money To Brutal - Zeldo
  • Pie
    • View Profile
    Read the script tuts to learn...Then try and use scripts
    Logged
    June 06, 2007, 11:53:33 AM
    Active Member
    ***
    User No : 2847
    Posts: 488
  • 8 credits
  • View Inventory
  • Send Money To 1472000
    • View Profile
    Read the script tuts to learn...Then try and use scripts
    I read this and it helps a lot!

    Thanks!~
    Logged
    July 26, 2007, 07:56:41 PM
    Member
    **
    User No : 2362
    Posts: 46
  • 0 credits
  • View Inventory
  • Send Money To kayoken
  • Location : Earth
    Dont Mess with the God of Battle
    • View Profile
    • WWW
    thx for this iv been looking for this for a while
    Logged

    April 10, 2009, 07:48:14 AM
    Newb
    *
    User No : 11844
    Posts: 18
  • 0 credits
  • View Inventory
  • Send Money To openeyestudios
    • View Profile
    Whats the take item so if you use the item then the item disappears?
    Logged
    May 11, 2009, 02:24:58 AM
    Sloogo
    Member
    **
    User No : 11546
    Posts: 89
  • 0 credits
  • View Inventory
  • Send Money To Merchant
  • Location : I know your out there stalkers!
    Its all an illusion...
    • View Profile
    I put it in, but how do I use it?
    Logged

    May 11, 2009, 02:27:35 AM
    Lord Tipsta
    Guest
    read it idiot ALSO YOU SHOULD GET WARNED FOR POSTING IN A TOPIC THAT IS LIKE 1 .5 YEARS OLD remember the rules if its over 60 days no posts DONT post cause it is smarter to make a new topic

    HOW TO USE

    Command is Sub itemz(index, item, value, stackable , type)
    item = the item num
    value = how many of the item(if non-stackable put 0)
    stackable = 0 if not stackable and 1 if it is
    type = 1 if its takeing an item and 2 if it giveing an item


    call itemz(index, item, value, stackable , type)
    « Last Edit: May 11, 2009, 02:29:11 AM by Tipsta » Logged
    May 11, 2009, 03:08:16 AM
    Zombologist
    Demi God
    User No : 6258
    Posts: 4609
  • 408 credits
  • View Inventory
  • Send Money To Zоmbie
    • View Profile
    • WWW
    Quote
    9. No necroposting

    Necro posting is not allowed. Leave old topics alone. Necroposting is posting in a topic which is older than 1 month.
    Necroposting only apply to the following boards:

    Chit Chat
    General Chat
    Questions
    Game Design
    Wishlist
    Need a Job?
    Recruiting Center
    Scripting Questions
    Request Script
    GFX Chit Chat
    GUI Help
    GFX Showoff
    Request Resources
    Paperdoll Questions
    Programming Questions
    Mapping Contest
    Graphic Contest
    Dutch
    Spanish
    Signatures

    No necroposting here.
    Tipsta:
    read it idiot
    Logged

    May 11, 2009, 03:12:05 AM
    The Insane Sane.
    Teh Uberleet
    ******
    User No : 8671
    Posts: 3317
  • 0 credits
  • View Inventory
  • Send Money To Hippoman
  • Location : Here
    Insanity is Freedom.
    • View Profile
    • WWW
    read it idiot ALSO YOU SHOULD GET WARNED FOR POSTING IN A TOPIC THAT IS LIKE 1 .5 YEARS OLD remember the rules if its over 60 days no posts DONT post cause it is smarter to make a new topic

    HOW TO USE

    Command is Sub itemz(index, item, value, stackable , type)
    item = the item num
    value = how many of the item(if non-stackable put 0)
    stackable = 0 if not stackable and 1 if it is
    type = 1 if its takeing an item and 2 if it giveing an item


    call itemz(index, item, value, stackable , type)

    1. stop yelling
    2. stop flaming.
    3.its not itemz its items.
    Logged

    How do we know that the Insane are really insane? What I mean is that the Sane could just be controlled little minds, never knowing the truth, when the Insane always know the truth and why. KrauftRolled
    WHEN ALL ELSE FAILS, USE TASK MANAGER! - Hippoman 7-8-09.
    R.I.P. Al Bernhagen, 8-9-09
    May 11, 2009, 03:50:31 AM
    Lord Tipsta
    Guest
    hippy your so wrong look it is sub itemz so thats what we call and im sick of people not following the rules (I reported myself) and wow I thought necro still applied for old scripts and scripts its self meh my bad someone warn me please
    Logged
     


    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.288 seconds with 30 queries.