Eclipse - Free 2D Mmorpg Maker
September 02, 2010, 10:23:38 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 3
Site Author : Topic: Chest Script [1/5]  (Read 7094 times)
0 Members and 1 Guest are viewing this topic.
December 25, 2006, 10:10:33 AM
Global Moderator
Demi God
*
User No : 1712
Posts: 6821
  • 1292 credits
  • View Inventory
  • Send Money To Stephan
    • View Profile


    This script is easy and maybe wanted? well I don't know but ok here it is  :wink:

    Replace the whole sub(if not changed) Sub OnAttack(index) with:
    Code: [Select]
    Sub OnAttack(index)
    Dim PX
    Dim PY
    Dim PM
    Dim check
    Dim itemcheck
    Dim num
    Dim val
    PX = GetPlayerX(index)
    PY = GetPlayerY(index)
    PM = GetPlayerMap(index)
    check = 1
    itemcheck = 1
    Do while check <= 9999
    Do while itemcheck <= 24
    If Int(PX + 1) = GetVar(App.Path & "Chest.ini", check, X) And PY = GetVar(App.Path & "Chest.ini", check, Y) And PM = GetVar(App.Path & "Chest.ini", check, MAP) Then
    Call PlayerMsg(index, "You opened the chest.", 12)
    num = GetVar(App.Path & "Chest.ini", check, "num")
    val = GetVar(App.Path & "Chest.ini", check, "val")
    If num = 0 Then
    Call PlayerMsg(index, "There is nothing in the chest.", 12)
    Exit Sub
    Elseif GetPlayerInvNum(index, itemcheck) = 0 then
    Call SetPlayerInvNum(index, itemcheck, num)
    Call SetPlayerInvVal(index, itemcheck, val)
    Call PlayerMsg(index, "You founded an item.", 12)
    Else
    Call PlayerMsg(index, "There is nothing in the chest.", 12)
    Exit sub
    End If
    End If
    If Int(PX - 1) = GetVar(App.Path & "Chest.ini", check, X) And PY = GetVar(App.Path & "Chest.ini", check, Y) And PM = GetVar(App.Path & "Chest.ini", check, MAP) Then
    Call PlayerMsg(index, "You opened the chest.", 12)
    num = GetVar(App.Path & "Chest.ini", check, "num")
    val = GetVar(App.Path & "Chest.ini", check, "val")
    If num = 0 Then
    Call PlayerMsg(index, "There is nothing in the chest.", 12)
    Exit Sub
    Elseif GetPlayerInvNum(index, itemcheck) = 0 then
    Call SetPlayerInvNum(index, itemcheck, num)
    Call SetPlayerInvVal(index, itemcheck, val)
    Call PlayerMsg(index, "You founded an item.", 12)
    Else
    Call PlayerMsg(index, "There is nothing in the chest.", 12)
    Exit sub
    End If
    End If
    If Int(PY + 1) = GetVar(App.Path & "Chest.ini", check, X) And PY = GetVar(App.Path & "Chest.ini", check, Y) And PM = GetVar(App.Path & "Chest.ini", check, MAP) Then
    Call PlayerMsg(index, "You opened the chest.", 12)
    num = GetVar(App.Path & "Chest.ini", check, "num")
    val = GetVar(App.Path & "Chest.ini", check, "val")
    If num = 0 Then
    Call PlayerMsg(index, "There is nothing in the chest.", 12)
    Exit Sub
    Elseif GetPlayerInvNum(index, itemcheck) = 0 then
    Call SetPlayerInvNum(index, itemcheck, num)
    Call SetPlayerInvVal(index, itemcheck, val)
    Call PlayerMsg(index, "You founded an item.", 12)
    Else
    Call PlayerMsg(index, "There is nothing in the chest.", 12)
    Exit sub
    End If
    End If
    If Int(PX + 1) = GetVar(App.Path & "Chest.ini", check, X) And PY = GetVar(App.Path & "Chest.ini", check, Y) And PM = GetVar(App.Path & "Chest.ini", check, MAP) Then
    Call PlayerMsg(index, "You opened the chest.", 12)
    num = GetVar(App.Path & "Chest.ini", check, "num")
    val = GetVar(App.Path & "Chest.ini", check, "val")
    If num = 0 Then
    Call PlayerMsg(index, "There is nothing in the chest.", 12)
    Exit Sub
    Elseif GetPlayerInvNum(index, itemcheck) = 0 then
    Call SetPlayerInvNum(index, itemcheck, num)
    Call SetPlayerInvVal(index, itemcheck, val)
    Call PlayerMsg(index, "You founded an item.", 12)
    Else
    Call PlayerMsg(index, "There is nothing in the chest.", 12)
    Exit sub
    End If
    Else
    Exit Sub
    End If
    Loop
    Loop
    End Sub

    That should work well now the ini

    Chest.ini
    Code: [Select]
    [1]
    MAP=
    X=
    Y=
    num=
    val=
    [2]
    MAP=
    X=
    Y=
    num=
    val=
    [1] 1 = the chest number. You can have 9999 chests with this script or if you change 9999 into the script then more.
    num=0 is an empty chest. Other numbers are possible but it only can contain less or equal too your max items.
    val=# # is how much of you want it into the chest. 0 is for non-stackable items.
    MAP=# # is the map where the chest must be on.
    X=# # is the X the chest must be on.
    Y=# # is the Y the chest must be on.
    Also you need to block that tile. Else the player can walk into the chest O.o.
    Ctrl to open the chest and to get an item.
    Have fun with your chests.

    EDIT: Bug fixed normally, if more bugs appear then report.

    EDIT2: Going to fix this whole script(re-making it and stuff :P)
    « Last Edit: January 19, 2007, 10:16:11 AM by Godlord » Logged


    • I do not provide help through the PM-system, e-mail, Skype or MSN, since this is kind of disturbing. I encourage you to make a new topic with proper spelling and grammar in the appropriate board instead, if possible.
    • I can't stand people who act like if they were children, so please don't.
    • I recommend you to read the rules before posting. It might solve conflicts before they actually occur.
    • I also recommend you to find the solution yourself before making a new topic about your issue. Chances are that other people had the same issue as well.
    December 25, 2006, 10:46:50 AM
    Contest Winner
    Advanced Eclipser
    *
    User No : 1532
    Posts: 1483
  • 272 credits
  • View Inventory
  • Send Money To l0lz!
    • View Profile
    Very Nice, Good job Godlord  8-).
    Logged

    December 25, 2006, 10:52:15 AM
    Global Moderator
    Demi God
    *
    User No : 1712
    Posts: 6821
  • 1292 credits
  • View Inventory
  • Send Money To Stephan
    • View Profile
    No problem my next script are 5 skills. :-P (I work at christmas, Am I an elf?)
    Logged


    • I do not provide help through the PM-system, e-mail, Skype or MSN, since this is kind of disturbing. I encourage you to make a new topic with proper spelling and grammar in the appropriate board instead, if possible.
    • I can't stand people who act like if they were children, so please don't.
    • I recommend you to read the rules before posting. It might solve conflicts before they actually occur.
    • I also recommend you to find the solution yourself before making a new topic about your issue. Chances are that other people had the same issue as well.
    December 29, 2006, 01:22:57 PM
    The Uber-Scriptor
    Advanced Member
    ****
    User No : 375
    Posts: 590
  • 0 credits
  • View Inventory
  • Send Money To Ilnair
  • Location : Netherlands, The
    The Uber-Scriptor
    • View Profile
    • WWW
    Nice work ;).
    Logged

    Ilnair
    Uber-Scriptor

    Nishansu, beta testing. Have a look at http://www.nishansu.com
    December 29, 2006, 01:36:03 PM
    Global Moderator
    Demi God
    *
    User No : 1712
    Posts: 6821
  • 1292 credits
  • View Inventory
  • Send Money To Stephan
    • View Profile
    Thanks.
    Logged


    • I do not provide help through the PM-system, e-mail, Skype or MSN, since this is kind of disturbing. I encourage you to make a new topic with proper spelling and grammar in the appropriate board instead, if possible.
    • I can't stand people who act like if they were children, so please don't.
    • I recommend you to read the rules before posting. It might solve conflicts before they actually occur.
    • I also recommend you to find the solution yourself before making a new topic about your issue. Chances are that other people had the same issue as well.
    January 01, 2007, 08:14:02 PM
    Active Member
    ***
    User No : 1940
    Posts: 130
  • 0 credits
  • View Inventory
  • Send Money To Chrono917
  • Location : Wherever I wanna be
    • View Profile
    Wow Nice
    Logged

    January 01, 2007, 08:46:43 PM
    Awesome Panda.
    Active Member
    ***
    User No : 374
    Posts: 259
  • 0 credits
  • View Inventory
  • Send Money To KainBloodbane
  • Location : Canada!!
    Mapper Extrordinaire
    • View Profile
    • WWW
    Awesome dude, I'll prolly implement this into NOTD later :P
    Logged

    http://www.fantasyworldcreations.com

    92% of teens have moved on to rap.  If you are part of the 8% who still listen to real music, copy and paste this into your signature.
    January 08, 2007, 05:36:10 PM
    Member
    **
    User No : 2067
    Posts: 58
  • 0 credits
  • View Inventory
  • Send Money To Sythja
    • View Profile
    err  is there a way mappers without direct access to my server files can make chests? cuz I really don't want to have to go and punch in all that info into the chest.ini myself, it would get in the way of the rest of the stuff I'm doing for it lol
    Logged
    January 10, 2007, 02:42:05 AM
    Member
    **
    User No : 2067
    Posts: 58
  • 0 credits
  • View Inventory
  • Send Money To Sythja
    • View Profile
    nvm then I'll find the answer elsewhere
    Logged
    January 10, 2007, 03:32:34 AM
    Global Moderator
    Demi God
    *
    User No : 1712
    Posts: 6821
  • 1292 credits
  • View Inventory
  • Send Money To Stephan
    • View Profile
    yes...  you need to use the Command Maker version 3.0 ;) btw. You need to input an X, Y and M position like /makechest M X Y and then it writes those coordininates into the INI file.
    Logged


    • I do not provide help through the PM-system, e-mail, Skype or MSN, since this is kind of disturbing. I encourage you to make a new topic with proper spelling and grammar in the appropriate board instead, if possible.
    • I can't stand people who act like if they were children, so please don't.
    • I recommend you to read the rules before posting. It might solve conflicts before they actually occur.
    • I also recommend you to find the solution yourself before making a new topic about your issue. Chances are that other people had the same issue as well.
    January 10, 2007, 01:13:11 PM
    Member
    **
    User No : 2067
    Posts: 58
  • 0 credits
  • View Inventory
  • Send Money To Sythja
    • View Profile
    got it, just not sure how to use it, I've been having so many problems with scripting its almost comical

    almost
    « Last Edit: January 10, 2007, 05:35:49 PM by Sythja » Logged
    January 11, 2007, 03:58:55 PM
    Member
    **
    User No : 1334
    Posts: 86
  • 0 credits
  • View Inventory
  • Send Money To Wojtexx
    • View Profile
    Very good working script :)
    Logged
    January 12, 2007, 01:52:11 AM
    Member
    **
    User No : 2067
    Posts: 58
  • 0 credits
  • View Inventory
  • Send Money To Sythja
    • View Profile
    I must be doin something wrong cuz each time I add it I lose my commands, I type them in and get no response
    Logged
    January 12, 2007, 08:30:45 PM
    DezireSoft
    Veteran
    Teh Uberleet
    *
    User No : 1929
    Posts: 2020
  • 0 credits
  • View Inventory
  • Send Money To Mighty Jewfro
  • Seyerdin Online Supporter
    • View Profile
    ...Damn  :wave: this kicks ass thanks man
    Logged

    [Removed]
    January 12, 2007, 08:32:02 PM
    Global Moderator
    Demi God
    *
    User No : 1712
    Posts: 6821
  • 1292 credits
  • View Inventory
  • Send Money To Stephan
    • View Profile
    no problem.
    Logged


    • I do not provide help through the PM-system, e-mail, Skype or MSN, since this is kind of disturbing. I encourage you to make a new topic with proper spelling and grammar in the appropriate board instead, if possible.
    • I can't stand people who act like if they were children, so please don't.
    • I recommend you to read the rules before posting. It might solve conflicts before they actually occur.
    • I also recommend you to find the solution yourself before making a new topic about your issue. Chances are that other people had the same issue as well.
    January 12, 2007, 08:33:52 PM
    Hoplitai General
    Veteran
    Active Member
    *
    User No : 29
    Posts: 269
  • 0 credits
  • View Inventory
  • Send Money To Fax
  • Location : Anstantenopolisariam?
    Hahaha what?
    • View Profile
    • WWW
    It doesnt seem to be working. (I am using TE and I installed it correctly) but when I replace the on attack sub the whole main stops working. is there a error in it. also where do I place the chests.ini in the server folder or the scripts folder
    Logged

    January 12, 2007, 08:37:56 PM
    Global Moderator
    Demi God
    *
    User No : 1712
    Posts: 6821
  • 1292 credits
  • View Inventory
  • Send Money To Stephan
    • View Profile
    Server folder, lemme check. Maybe I scripted something wrong.
    Logged


    • I do not provide help through the PM-system, e-mail, Skype or MSN, since this is kind of disturbing. I encourage you to make a new topic with proper spelling and grammar in the appropriate board instead, if possible.
    • I can't stand people who act like if they were children, so please don't.
    • I recommend you to read the rules before posting. It might solve conflicts before they actually occur.
    • I also recommend you to find the solution yourself before making a new topic about your issue. Chances are that other people had the same issue as well.
    January 12, 2007, 08:38:31 PM
    Hoplitai General
    Veteran
    Active Member
    *
    User No : 29
    Posts: 269
  • 0 credits
  • View Inventory
  • Send Money To Fax
  • Location : Anstantenopolisariam?
    Hahaha what?
    • View Profile
    • WWW
    awesome script though
    Logged

    January 12, 2007, 08:44:54 PM
    Global Moderator
    Demi God
    *
    User No : 1712
    Posts: 6821
  • 1292 credits
  • View Inventory
  • Send Money To Stephan
    • View Profile
    try again with the new code. If it still doesn't work then I probably know the problem.
    Logged


    • I do not provide help through the PM-system, e-mail, Skype or MSN, since this is kind of disturbing. I encourage you to make a new topic with proper spelling and grammar in the appropriate board instead, if possible.
    • I can't stand people who act like if they were children, so please don't.
    • I recommend you to read the rules before posting. It might solve conflicts before they actually occur.
    • I also recommend you to find the solution yourself before making a new topic about your issue. Chances are that other people had the same issue as well.
    January 12, 2007, 08:46:04 PM
    Hoplitai General
    Veteran
    Active Member
    *
    User No : 29
    Posts: 269
  • 0 credits
  • View Inventory
  • Send Money To Fax
  • Location : Anstantenopolisariam?
    Hahaha what?
    • View Profile
    • WWW
    will do hold on
    Logged

    Pages: [1] 2 3
     


    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.964 seconds with 28 queries.