Eclipse - Free 2D Mmorpg Maker
September 02, 2010, 10:22:25 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: Christmas Script 2006 by Godlord (Quest with MiniGame)  (Read 3330 times)
0 Members and 1 Guest are viewing this topic.
December 24, 2006, 12:09:19 PM
Global Moderator
Demi God
*
User No : 1712
Posts: 6821
  • 1292 credits
  • View Inventory
  • Send Money To Stephan
    • View Profile
    The Script

    replace Sub OnAttack(index) with:
    Code: [Select]
    Sub OnAttack(index)
    Dim PX
    Dim PY
    Dim PM
    Dim check
    PX = GetPlayerX(index)
    PY = GetPlayerY(index)
    PM = GetPlayerMap(index)
    For check = 1 to 9999
    If GetPlayerDir(index) = 1 And Int(PX + 1) = GetVar("xmas.ini", check, X) And PY = GetVar("xmas.ini", check, Y) And PM = GetVar("xmas.ini", check, MAP) And GetVar("xmas.ini", check, DIR) = "^" Then
    Call Playerwarp(index, PM, Int(PX + 2), PY)
    Call PlayerMsg(index, "You feel like you walked trough the door.", 12)
    Call PlaySound(index, "key.wav")
    Exit Sub
    End If
    If GetPlayerDir(index) = 3 And Int(PX - 1) = GetVar("xmas.ini", check, X) And PY = GetVar("xmas.ini", check, Y) And PM = GetVar("xmas.ini", check, MAP) And GetVar("xmas.ini", check, DIR) = "V" Then
    Call Playerwarp(index, PM, Int(PX - 2), PY)
    Call PlayerMsg(index, "You feel like you walked trough the door.", 12)
    Call PlaySound(index, "key.wav")
    Exit Sub
    End If
    If GetPlayerDir(index) = 2 And Int(PY + 1) = GetVar("xmas.ini", check, X) And PY = GetVar("xmas.ini", check, Y) And PM = GetVar("xmas.ini", check, MAP) And GetVar("xmas.ini", check, DIR) = ">" Then
    Call Playerwarp(index, PM, PX, Int(PY + 2))
    Call PlayerMsg(index, "You feel like you walked trough the door.", 12)
    Call PlaySound(index, "key.wav")
    Exit Sub
    End If
    If GetPlayerDir(index) = 4 And Int(PX + 1) = GetVar("xmas.ini", check, X) And PY = GetVar("xmas.ini", check, Y) And PM = GetVar("xmas.ini", check, MAP) And GetVar("xmas.ini", check, DIR) = "<" Then
    Call Playerwarp(index, PM, PX, Int(PY - 2))
    Call PlayerMsg(index, "You feel like you walked trough the door.", 12)
    Call PlaySound(index, "key.wav")
    Exit Sub
    End If
    Next Check
    End Sub

    Make an ini called xmas.ini put the next into it you can always change the values and stuff ;)
    xmas.ini
    Code: (vb) [Select]
    [1]
    X=
    Y=
    MAP=
    DIR=
    [2]
    X=
    Y=
    MAP=
    DIR=
    [3]
    X=
    Y=
    MAP=
    DIR=
    [4]
    X=
    Y=
    MAP=
    DIR=
    [CONFIG]
    [HOUSE]
    MAP=
    X=
    Y=
    [FACTORY]
    MAP=
    X=
    Y=
    [NEEDEDITEM1]
    Name=
    ItemNum=
    ItemVal=
    [NEEDEDITEM2]
    Name=
    ItemNum=
    ItemVal=
    [NEEDEDITEM3]
    Name=
    ItemNum=
    ItemVal=
    [NEEDEDITEM4]
    Name=
    ItemNum=
    ItemVal=
    [NEEDEDITEM5]
    Name=
    ItemNum=
    ItemVal=
    [NEEDEDITEM6]
    Name=
    ItemNum=
    ItemVal=
    [GETITEM]
    Num=
    Total=
    [LABYRINTH]
    MAP=
    X=
    Y=
    [EndSpawn]
    MAP=
    X=
    Y=
    [REWARD]
    Num=
    Val=

    Replace Sub ScriptedTile(index,script) with:
    Code: [Select]
    Sub ScriptedTile(index, Script)
    Dim check
    Dim check2
    Dim check3
    Dim check4
    Dim A
    Dim B
    Dim C
    Dim M
    Dim X
    Dim Y
    Dim N1
    Dim N2
    Dim N3
    Dim N4
    Dim N5
    Dim N6
    Dim G
    N1 = GetVar("xmas.ini", "NEEDEDITEM1", "NAME") )
    N2 = GetVar("xmas.ini", "NEEDEDITEM2", "NAME") )
    N3 = GetVar("xmas.ini", "NEEDEDITEM3", "NAME") )
    N4 = GetVar("xmas.ini", "NEEDEDITEM4", "NAME") )
    N5 = GetVar("xmas.ini", "NEEDEDITEM5", "NAME") )
    N6 = GetVar("xmas.ini", "NEEDEDITEM6", "NAME") )
    Select Case Script
        Case 0
    For check = 1 to 17
    If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM1", "ITEMNUM") And
    GetPlayerInvItemVal(index, check) = GetVar("xmas.ini", "NEEDEDITEM1", "ITEMVAL") Then
    A = check
    For check2 = 1 to 17
    If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM2", "ITEMNUM") And
    GetPlayerInvItemVal(index, check) = GetVar("xmas.ini", "NEEDEDITEM2", "ITEMVAL") Then
    B = check2
    For check3 = 1 to 17
    If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM3", "ITEMNUM") And
    GetPlayerInvItemVal(index, check) = GetVar("xmas.ini", "NEEDEDITEM3", "ITEMVAL")  Then
    C = check3
    Call SetPlayerInvItemVal(index, A, Int(GetPlayerInvItemVal(index, A)  - GetVar("xmas.ini", "NEEDEDITEM1", "ITEMVAL") )
    Call SetPlayerInvItemVal(index, B, Int(GetPlayerInvItemVal(index, B)  - GetVar("xmas.ini", "NEEDEDITEM2", "ITEMVAL") )
    Call SetPlayerInvItemVal(index, C, Int(GetPlayerInvItemVal(index, C)  - GetVar("xmas.ini", "NEEDEDITEM3", "ITEMVAL") )
    M = GetVar("xmas.ini", "Labyrinth", "MAP") )
    X = GetVar("xmas.ini", "Labyrinth", "X") )
    Y = GetVar("xmas.ini", "Labyrinth", "Y") )
    Call PlayerWarp(index, M, X, Y)
    Call PlayerMsg(index, "You stand up and see's that you are into a small room with 4 doors.", 12)
    Else
    Call PlayerMsg(index, "You don't have " & N3 & "." , 12)
    End If
    Next check3
    Else
    Call PlayerMsg(index, "You don't have" & N2 & "." , 12)
    End If
    Next check2
    Else
    Call PlayerMsg(index, "You don't have " & N1 & "." , 12)
    End If
    Next check
        Case 1
    M = GetVar("xmas.ini", "Factory", "MAP") )
    X = GetVar("xmas.ini", "Factory", "X") )
    Y = GetVar("xmas.ini", "Factory", "Y") )
    Call PlayerWarp(index, M, X, Y)
    Call PlaySound(index, "key.wav")
        Case 2
    If GetVar("xmas.ini", "Accounts\" & GetPLayerLogin(index) & ".ini", "QUESTXMAS2006") = 1 Then
    M = GetVar("xmas.ini", "House", "MAP") )
    X = GetVar("xmas.ini", "House", "X") )
    Y = GetVar("xmas.ini", "House", "Y") )
    Call PlayerWarp(index, M, X, Y)
    Call PlaySound(index, "key.wav")
    Case 3
    For check = 1 to 17
    For check2 = 1 to 17
    If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM1", "ITEMNUM") And GetPlayerInvItemVal(index, Check) >= GetVar("xmas.ini", "NEEDEDITEM1", "ITEMNUM") Then
    Call PlayerMsg(index, "You can't find anything.", 12)
    Exit Sub
    Elseif GetPlayerInvItemNum(index, check2) = 0 Then
    Call SetPlayerInvItemNum(index, check2, GetVar("xmas.ini", "NEEDEDITEM1", "ITEMNUM") )
    Call SetPlayerInvItemVal(index, check2, int(GetPlayerInvItemVal(index,check) + GetVar("xmas.ini", "NEEDEDITEM1", "ITEMVAL") ) )
    Call PlayerMsg(index, "You founded a " & N1 , 12)
    End If
    Next check2
    Next check
    Case 4
    For check = 1 to 17
    For check2 = 1 to 17
    If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM2", "ITEMNUM") And GetPlayerInvItemVal(index, Check) >= GetVar("xmas.ini", "NEEDEDITEM2", "ITEMNUM") Then
    Call PlayerMsg(index, "You can't find anything.", 12)
    Exit Sub
    Elseif GetPlayerInvItemNum(index, check2) = 0 Then
    Call SetPlayerInvItemNum(index, check2, GetVar("xmas.ini", "NEEDEDITEM2", "ITEMNUM") )
    Call SetPlayerInvItemVal(index, check2, int(GetPlayerInvItemVal(index,check) + GetVar("xmas.ini", "NEEDEDITEM2", "ITEMVAL") ) )
    Call PlayerMsg(index, "You founded a " & N2 , 12)
    End If
    Next check2
    Next check
    Case 5
    For check = 1 to 17
    For check2 = 1 to 17
    If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM3", "ITEMNUM") And GetPlayerInvItemVal(index, Check) >= GetVar("xmas.ini", "NEEDEDITEM3", "ITEMNUM") Then
    Call PlayerMsg(index, "You can't find anything.", 12)
    Exit Sub
    Elseif GetPlayerInvItemNum(index, check2) = 0 Then
    Call SetPlayerInvItemNum(index, check2, GetVar("xmas.ini", "NEEDEDITEM3", "ITEMNUM") )
    Call SetPlayerInvItemVal(index, check2, int(GetPlayerInvItemVal(index,check) + GetVar("xmas.ini", "NEEDEDITEM3", "ITEMVAL") ) )
    Call PlayerMsg(index, "You founded a " & N3 , 12)
    End If
    Next check2
    Next check
    Case 6
    For check = 1 to 17
    For check2 = 1 to 17
    If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM4", "ITEMNUM") And GetPlayerInvItemVal(index, Check) >= GetVar("xmas.ini", "NEEDEDITEM4", "ITEMNUM") Then
    Call PlayerMsg(index, "You can't find anything.", 12)
    Exit Sub
    Elseif GetPlayerInvItemNum(index, check2) = 0 Then
    Call SetPlayerInvItemNum(index, check2, GetVar("xmas.ini", "NEEDEDITEM4", "ITEMNUM") )
    Call SetPlayerInvItemVal(index, check2, int(GetPlayerInvItemVal(index,check) + GetVar("xmas.ini", "NEEDEDITEM4", "ITEMVAL") ) )
    Call PlayerMsg(index, "You founded a " & N4 , 12)
    End If
    Next check2
    Next check
    Case 7
    For check = 1 to 17
    For check2 = 1 to 17
    If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM5", "ITEMNUM") And GetPlayerInvItemVal(index, Check) >= GetVar("xmas.ini", "NEEDEDITEM5", "ITEMNUM") Then
    Call PlayerMsg(index, "You can't find anything.", 12)
    Exit Sub
    Elseif GetPlayerInvItemNum(index, check2) = 0 Then
    Call SetPlayerInvItemNum(index, check2, GetVar("xmas.ini", "NEEDEDITEM5", "ITEMNUM") )
    Call SetPlayerInvItemVal(index, check2, int(GetPlayerInvItemVal(index,check) + GetVar("xmas.ini", "NEEDEDITEM5", "ITEMVAL") ) )
    Call PlayerMsg(index, "You founded a " & N5 , 12)
    End If
    Next check2
    Next check
    Case 8
    For check = 1 to 17
    For check2 = 1 to 17
    If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM6", "ITEMNUM") And GetPlayerInvItemVal(index, Check) >= GetVar("xmas.ini", "NEEDEDITEM6", "ITEMNUM") Then
    Call PlayerMsg(index, "You can't find anything.", 12)
    Exit Sub
    Elseif GetPlayerInvItemNum(index, check2) = 0 Then
    Call SetPlayerInvItemNum(index, check2, GetVar("xmas.ini", "NEEDEDITEM6", "ITEMNUM") )
    Call SetPlayerInvItemVal(index, check2, int(GetPlayerInvItemVal(index,check) + GetVar("xmas.ini", "NEEDEDITEM6", "ITEMVAL") ) )
    Call PlayerMsg(index, "You founded a " & N6 , 12)
    End If
    Next check2
    Next check
    Case 9
    For check = 1 to 17
    If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM4", "ITEMNUM") And
    GetPlayerInvItemVal(index, check) = GetVar("xmas.ini", "NEEDEDITEM4", "ITEMVAL") Then
    A = check
    For check2 = 1 to 17
    If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM5", "ITEMNUM") And
    GetPlayerInvItemVal(index, check) = GetVar("xmas.ini", "NEEDEDITEM5", "ITEMVAL") Then
    B = check2
    For check3 = 1 to 17
    If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM6", "ITEMNUM") And
    GetPlayerInvItemVal(index, check) = GetVar("xmas.ini", "NEEDEDITEM6", "ITEMVAL")  Then
    C = check3
    For check4 = 1 to 17
    G = GetVar("xmas.ini", "GetItem", "Num")
    If GetPlayerInvItem(index, check4) = 0 then
    Call SetPlayerInvItemNum(index, check4, G)
    Call PlayerMsg(index, "You gained a package. You still need " & int(GetVar("xmas.ini", "GetItem", "Total")) - GetPlayerInvVal(index, check4)), 12)
    ElseIf GetPlayerInvItem(index, check4) < GetVar("xmas.ini", "GetItem", "Total") then
    Call SetPlayerInvItemVal(index, check4, Int(GetPlayerInvItemVal(index, check4) + 1))
    Call PlayerMsg(index, "You gained a package. You still need " & int(GetVar("xmas.ini", "GetItem", "Total")) - GetPlayerInvVal(index, check4)), 12)
    Else
    Exit Sub
    End If
    Next check4
    Call SetPlayerInvItemVal(index, A, Int(GetPlayerInvItemVal(index, A) - GetVar("xmas.ini", "NEEDEDITEM4", "ITEMVAL") )
    Call SetPlayerInvItemVal(index, B, Int(GetPlayerInvItemVal(index, B) - GetVar("xmas.ini", "NEEDEDITEM5", "ITEMVAL") )
    Call SetPlayerInvItemVal(index, C, Int(GetPlayerInvItemVal(index, C) - GetVar("xmas.ini", "NEEDEDITEM6", "ITEMVAL") )
    Else
    Call PlayerMsg(index, "You don't have " & N6 & "." , 12)
    End If
    Next check3
    Else
    Call PlayerMsg(index, "You don't have" & N5 & "." , 12)
    End If
    Next check2
    Else
    Call PlayerMsg(index, "You don't have " & N4 & "." , 12)
    End If
    Next check
    End Select
    End Sub

    replace Sub ScriptedNPC(index,script) with:
    Code: [Select]
    Sub ScriptedNPC(index, Script)
    Dim check
    Dim check2
    Dim check3
    Dim M
    Dim X
    Dim Y
    M = GetVar("xmas.ini", "EndSpawn", "MAP")
    X = GetVar("xmas.ini", "EndSpawn", "X")
    Y = GetVar("xmas.ini", "EndSpawn", "Y")
    Select Case Script
        Case 0
    Call PlayerMsg("Welcome to the Christmas Quest of 2006", 12)
    Call PlayerMsg("Can you help my gnomes with making 25 christmas presents?", 12)
    Call PlayerMsg("You need to go to the old house...", 12)
    Call PutVar("xmas.ini", "Accounts\" & GetPLayerLogin(index) & ".ini", "QUESTXMAS2006", 1)
    Case 1
    For check = 1 to 17
    If GetPlayerInvItem(index, check) = GetVar("xmas.ini", "GetItem", "Num") And GetPlayerInvVal(index, check) = GetVar("xmas.ini", "GetItem", "Total") Then
    Call SetPlayerInvItemNum(index, check, GetVar("xmas.ini", "Reward", "Num"))
    Call SetPlayerInvItemVal(index, check, GetVar("xmas.ini", "Reward", "Val"))
    Call PlayerMsg(index, "Quest Complete!, Merry Christmas!", 12)
    Call PlayerWarp(index, M, X, Y)
    Call PutVar("xmas.ini", "Accounts\" & GetPLayerLogin(index) & ".ini", "QUESTXMAS2006", 2)
    End If
    Next Check
    End Select
    End Sub

    in Sub JoinGame(index) add total down above end sub:
    Code: (vb) [Select]
    If GetVar("xmas.ini", "Accounts\" & GetPLayerLogin(index) & ".ini", "QUESTXMAS2006") = 1 Then
    Exit Sub
    ElseIf GetVar("xmas.ini", "Accounts\" & GetPLayerLogin(index) & ".ini", "QUESTXMAS2006") = 2 Then
    Exit Sub
    Else
    Call PutVar("xmas.ini", "Accounts\" & GetPLayerLogin(index) & ".ini", "QUESTXMAS2006", 0)
    End If


    INSTALLATION:
    Well Installing is easy read the notes in the SCRIPT piece.
    Well for the INI.
    • you can put here 1 to 9999 doesn't matter. These are tiles.

    MAP=On which map the tile is.
    X=On which X the tile is.
    Y=On which Y the tile is.
    DIR=# # can be V, >, <, ^ it is the direction where you can get it. These are one sided doors.
    [HOUSE] This is where the door of the house is.
    MAP=You Know
    X=You Know
    Y=You Know
    [FACTORY]You Know
    MAP=You Know
    X=You Know
    Y=You Know
    [NEEDEDITEM1]What you need for the stairs
    Name=The name
    ItemNum=The item number
    ItemVal=The item value, 0 is for non-stackable
    [NEEDEDITEM2]You Know
    Name=You Know
    ItemNum=You Know
    ItemVal=You Know
    [NEEDEDITEM3]You Know
    Name=You Know
    ItemNum=You Know
    ItemVal=You Know
    [NEEDEDITEM4]This is for getting the 25 packets
    Name=You Know
    ItemNum=You Know
    ItemVal=You Know
    [NEEDEDITEM5]You Know
    Name=You Know
    ItemNum=You Know
    ItemVal=You Know
    [NEEDEDITEM6]You Know
    Name=You Know
    ItemNum=You Know
    ItemVal=You Know
    [GETITEM]This is what you get out of the machine.
    Num=You Know
    Total=Same as Value
    [LABYRINTH]This is the point where you spawn into the labyrinth.
    MAP=You Know
    X=You Know
    Y=You Know
    [EndSpawn]Where you spawn after doing the quest.
    MAP=You Know
    X=You Know
    Y=You Know
    [REWARD]This is the reward you get after the quest.
    Num=You Know
    Val=You Know

    SCREENSHOTS:
    Not available yet.


    WINNER OF SCRIPTING CONTEST 2006:



    FUNCTION:
    This script is a quest. The quest begins normally installed at Santa. He needs 25 christmas presents. Well he tells you that you need to go to an old house. You can only go in when you talked to Santa. Well if you are in then you need to search at the drawers and cupboards to find 12 planks, 48 nails and a hammer(or something else depends on what you configured). If you found that then you need to go to the broken stairs without those items you can't fix it. When you fix it then you fall down into the labyrinth(mini-game, maze). You need to try all doors until your are at the end. All doors are one sided. which means you can get in but not out. When you go into the end then you go to a factory there you need to find 25 papers, ropes and toys. You need to go to a machine which makes you the christmas presents. When you have 25 then you need to talk to the gnome. He will give you the reward(santa hat or whatever you want.) and he will take your items and he will teleport you to a place. Quest Complete. Merry Christmas.

    Comments and Bugs or other stuff may be replied. No flaming is allowed.

    EDIT: Script will be re-made if I have some time.
    « Last Edit: October 07, 2009, 09:39:54 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.
    January 08, 2007, 01:46:48 AM
    Advanced Member
    ****
    User No : 937
    Posts: 645
  • 0 credits
  • View Inventory
  • Send Money To :DNINJA
  • ^-^
    • View Profile
    • WWW
    thats awsum godlord :) ill have to shove it in on my game somewhere thanks  :blob:
    Logged

    January 11, 2007, 03:36:09 PM
    Member
    **
    User No : 1334
    Posts: 86
  • 0 credits
  • View Inventory
  • Send Money To Wojtexx
    • View Profile
    This script is amazing thanks for this !!! you ar king XDgodlord
    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.942 seconds with 29 queries.