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


Pages: [1] 2
Site Author : Topic: Player shops :P  (Read 9608 times)
0 Members and 1 Guest are viewing this topic.
September 12, 2006, 09:08:33 AM
Administrator
Demi God
*
User No : 141
Posts: 5001
  • 48 credits
  • View Inventory
  • Send Money To unnown
  • -Admin-
    • View Profile


    this gives people the ability to sell and buy items from your shop and it really dissapears from the shop or appears if you solled something to the shop


    add this to the bottom of the main.txt

    Code: [Select]
    '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ' This sub is used to open/refresh the playershop
    Sub shop(map)
    '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Dim I
    Dim a
    Dim Number
    Dim x
    I = 1
        Do While I < GetVar("config.ini", "MAX", "MAX_PLAYERS")
                If GetPlayerMap(I) = map Then
                    If 0 + GetVar("shops.ini", "PLAYER", getplayername(I)) <> 0 Then
                        Call CustomMenuClose(I)
                        Call CustomMenuShow(I, "SHOP", "\GUI\CUSTOM\shopBG.jpg", 0)
                        a = 1
                        Number = 1
                        x = 54
                        If GetVar("shops.ini", "CONFIG", "show") = 1 Then
                            Do While Number <= GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(I)), "max")
                                If 0 + GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(I)), "item" & Number) <> 0 Then
                                    Call CustomMenuPicture(I, Number, "\GUI\CUSTOM\item" & 0 + GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(I)), "item" & Number) & ".jpg", Number * 45 + 133, x)
        else
                                    Call CustomMenuPicture(I, Number, "\GUI\CUSTOM\item0.jpg", 1, 1)
                                End If

                                a = a + 1
                                    If a > 9 Then
                                        x = x + 40
                                        a = 1
                                    End If
                                If Number = 0 + GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(I)), "max") Then
                                  Call CustomMenuPicture(I, Number + 1, "\GUI\CUSTOM\trade.jpg", 490, 310)
                                    Call CustomMenuPicture(I, Number + 2, "\GUI\CUSTOM\exit.jpg", 535, 310)
                                    Call CustomMenuLabel(I, 1, " ", 525, 50, 8, 0, 1, 200, 40)
                                    Call CustomMenuLabel(I, 2, " ", 525, 50, 8, 0, 1, 200, 40)
                                    Call CustomMenuLabel(I, 3, " ", 525, 50, 8, 0, 1, 200, 40)
                                    Call CustomMenuLabel(I, 4, " ", 525, 50, 8, 0, 1, 200, 40)
    b = 1
    c = 1
    d = 50
    do while b <= 24
    if 0 + GetPlayerInvItemNum(I, b) <> 0 then
                                    Call CustomMenuPicture(I, b + number + 3, "\GUI\CUSTOM\item" & 0 + GetPlayerInvItemNum(I, b) & ".jpg", c * 35, d)
    else
                                    Call CustomMenuPicture(I, b + number + 3, "", b * 45 + 10, 10)
    end if
    b = b + 1
    c = c + 1
    if c > 3 then
    c = 1
    d = d + 35
    end if
    loop
                                End If
                                Number = Number + 1
                            Loop

                        Else
                            Do While Number <= GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(I)), "max")
                                Call CustomMenuPicture(I, Number, "\GUI\CUSTOM\item1.jpg", Number * 45 + 133, x)
                                If Number = 0 + GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(I)), "max") Then
                                            Call CustomMenuPicture(I, Number + 1, "\GUI\CUSTOM\trade.jpg", 490, 310)
                                            Call CustomMenuPicture(I, Number + 2, "\GUI\CUSTOM\exit.jpg", 535, 310)
                                    Call CustomMenuLabel(I, 1, " ", 525, 50, 8, 0, 1, 200, 40)
                                    Call CustomMenuLabel(I, 2, " ", 525, 50, 8, 0, 1, 200, 40)
                                    Call CustomMenuLabel(I, 3, " ", 525, 50, 8, 0, 1, 200, 40)
                                    Call CustomMenuLabel(I, 4, " ", 525, 50, 8, 0, 1, 200, 40)
    b = 1
    c = 1
    d = 50
    do while b <= 24
    if 0 + GetPlayerInvItemNum(I, b) <> 0 then
                                    Call CustomMenuPicture(I, b + number + 3, "\GUI\CUSTOM\item0.jpg", c * 35, d)
    else
                                    Call CustomMenuPicture(I, b + number + 3, "", b * 45 + 10, 10)
    end if
    b = b + 1
    c = c + 1
    if c > 3 then
    c = 1
    d = d + 35
    end if
    loop
                                End If
        number = number + 1
                                a = a + 1
                                    If a > 9 Then
                                        x = x + 40
                                        a = 1
                                    End If
                            Loop
                        End If
                    End If
                End If
                    I = I + 1
        Loop
    End Sub

    Code: [Select]
    '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ' This sub runs when something on a custom menu is clicked. 
    Sub MenuScripts(index, Clicked_Index, Menu_Type)           
    '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Dim field_message
    Dim menu_title
    Dim a
    dim temp
    menu_title = getplayermenuclicktitle(index)
    field_message = getplayermenuclickmsg(index)

    ' Figure out what type of button was clicked ie picture, textbox, label.
    Select Case Menu_Type

    Case 1
    Select Case menu_title
                    Case "SHOP"
                        If Clicked_Index <= 0 + GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "max") Then
                            Call CustomMenuLabel(index, 1, "Name:", 650, 30, 8, 0, 0, 400, 40)
                            Call CustomMenuLabel(index, 2, "" & getitemname(GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "item" & Clicked_Index)), 590, 50, 8, 0, 2, 200, 40)
                            Call CustomMenuLabel(index, 3, "Price:", 650, 75, 8, 0, 0, 400, 40)
                            Call CustomMenuLabel(index, 4, "" & GetVar("shops.ini", "PRICES", "price" & GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "item" & Clicked_Index)), 570, 95, 8, 0, 2, 200, 40)
                            Call PutVar("shops.ini", "PLAYER", "" & GetPlayername(index), 0 + GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "item" & Clicked_Index))
    call putVar("shops.ini", "PLAYER", "clicked," & GetPlayerName(index), 0 + Clicked_Index)
                        Else
                            If Clicked_Index = GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "max") + 1 Then
                                    Money = 0 + getInvItemslot(index, GetVar("shops.ini", "CONFIG", "money"), GetVar("shops.ini", "PRICES", "price" & GetVar("shops.ini", "PLAYER", "" & GetPlayerName(index))), 0)
                                    Call giveplayeritemtoslot(index, Money, GetVar("shops.ini", "CONFIG", "money"), GetPlayerInvItemValue(index, Money) - GetVar("shops.ini", "PRICES", "price" & GetVar("shops.ini", "PLAYER", "" & GetPlayerName(index))), 0)
                                    Call giveplayeritemtoslot(index, getInvItemslot(index, 0, 0, 0), GetVar("shops.ini", "PLAYER", "" & GetPlayerName(index)), 1, 0)
                                    Call PutVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "item" & GetVar("shops.ini", "PLAYER", "clicked," & GetPlayerName(index)), 0)
                                    Call PlayerMsg(index, "Trade succesfull.", 2)
                                    Call Shop(GetPlayerMap(index))
                            End If

                            If Clicked_Index = GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "max") + 2 Then
    call putvar("shops.ini", "PLAYER", GetPlayerName(index), 0)
    call CustomMenuClose(index)
    end if

                            If Clicked_Index > GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "max") + 2 Then
    a = 1
    do while a <= 0 + GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "max")
    if 0 + GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "item" & a) = 0 then
    money = 0 + getInvItemslot(index, GetVar("shops.ini", "CONFIG", "money"), 0, 0)
    if money = 0 then
    money = 0 + getInvItemslot(index, 0, 0, 0)
    end if
    Call giveplayeritemtoslot(index, money, GetVar("shops.ini", "CONFIG", "money"), GetPlayerInvItemValue(index, money) + GetVar("shops.ini", "PRICES", "price" & getVar("shops.ini", "PLAYER", "" & GetPlayername(index))), 0)
    tempy = Clicked_Index
    tempy = tempy - GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "max") - 3
    Call putVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "item" & a, GetPlayerInvItemNum(index, tempy))
    Call giveplayeritemtoslot(index, tempy, 0, 0, 0)
                                    Call PlayerMsg(index, "Trade succesfull.", 2)
                                    Call Shop(GetPlayerMap(index))
    end if
    a = a + 1
    loop
    end if
                        End If

                    End Select

    Case 2
    ' FIELD WAS CLICKED   
    ' Player has clicked a text field OK button whos number is clicked_index on the custom menu named menu_title.
    Call playermsg(index, "Clicked  field number " & clicked_index & " on the menu named " & menu_title & ". The field text was " & field_message, 14)

    Case 3
    Select Case menu_title
    Case ""
    Select Case clicked_index
    Case 3

    end Select
    end Select
    End Select
         
    End Sub

    add/replace this

    Code: [Select]
    call putvar("shops.ini", "PLAYER", getplayername(index), 1)
    call shop(GetPlayerMap(index))

    this can be put in for example a scripted tile sub

    http://www.verzend.be/v/9872144/CUSTOM.rar.html
    download and unrar this in client\gui\custom\


    and make shops.ini
    Code: [Select]
    [CONFIG]
    show=1
    money=1
    [PRICES]
    price1=100
    price2=100
    price3=100
    [SHOP1]
    max=3
    item1=1
    item2=0
    item3=0
    [PLAYER]
    show - means show the image of the items if 0 it would show item0.jpg for all items if 1 it would show item(itemnumber).jpg
    money - the itemnumber of the currency used
    price - is the number of currency you get / need to buy the item
    [SHOP1] - the 1 is for the map number (this would be an shop on map 1)
    max - the max number of items that are for sale
    item - number from 1 till max(used to put items in the shop)
    « Last Edit: January 19, 2007, 12:36:39 PM by Godlord » Logged

    thinks godlord is an crazy dutchie :D
    September 12, 2006, 10:20:53 AM
    Active Member
    ***
    User No : 1485
    Posts: 119
  • 0 credits
  • View Inventory
  • Send Money To Rotales
  • Location : Michigan
    • View Profile
    This is really nice Unnown, I have heard players ask for personal shops in other forums a lot. This would take some work to integrate in to a game properly, but it is a great foundation for a really nice feature. Thanks.
    Logged

    In the land of blind men, the one eyed man still has horrible depth perception.
    September 12, 2006, 10:28:24 AM
    Administrator
    Demi God
    *
    User No : 141
    Posts: 5001
  • 48 credits
  • View Inventory
  • Send Money To unnown
  • -Admin-
    • View Profile
    well...won't be a lot of work once it's in the main.txt
    Logged

    thinks godlord is an crazy dutchie :D
    September 12, 2006, 10:47:29 AM
    Active Member
    ***
    User No : 1485
    Posts: 119
  • 0 credits
  • View Inventory
  • Send Money To Rotales
  • Location : Michigan
    • View Profile
    They will have to set item numbers for each item and they will probably want to make a GUI. I guess it depends on what you're definition of "a lot" is. I didn't mean it as a bad thing though, I was just commenthing that you made a really good base, and it's not a simple copy paste script, it takes some work to put it in a game. But in my opinion, that is a good thing.
    Logged

    In the land of blind men, the one eyed man still has horrible depth perception.
    September 12, 2006, 11:51:57 AM
    Administrator
    Demi God
    *
    User No : 141
    Posts: 5001
  • 48 credits
  • View Inventory
  • Send Money To unnown
  • -Admin-
    • View Profile
    aah well this was the only way possible and it ads depth to games
    Logged

    thinks godlord is an crazy dutchie :D
    September 12, 2006, 01:03:51 PM
    Newb
    *
    User No : 1044
    Posts: 10
  • 0 credits
  • View Inventory
  • Send Money To Tomonzob
    • View Profile
    ACE  ;D,  now I gotta work out all the items  :D
    Logged
    September 13, 2006, 03:22:56 PM
    Contest Winner
    Advanced Eclipser
    *
    User No : 1532
    Posts: 1483
  • 272 credits
  • View Inventory
  • Send Money To l0lz!
    • View Profile
     I installed the script but how do I use it?
    Logged

    September 13, 2006, 03:58:22 PM
    Active Member
    ***
    User No : 780
    Posts: 152
  • 0 credits
  • View Inventory
  • Send Money To master5006
  • Location : USA
    • View Profile
    • WWW
    Ya how do I use it?
    Logged


    September 13, 2006, 05:47:37 PM
    Veteran
    Advanced Eclipser
    *
    User No : 192
    Posts: 1600
  • 120 credits
  • View Inventory
  • Send Money To Bobosk
    • View Profile
    I'm guessing you "Call shop(map)" right unnown?
    Logged
    September 13, 2006, 11:24:10 PM
    Administrator
    Demi God
    *
    User No : 141
    Posts: 5001
  • 48 credits
  • View Inventory
  • Send Money To unnown
  • -Admin-
    • View Profile
    needs to be in a scripted sub

    call putvar("shops.ini", "PLAYER", getplayername(index), 1)
    call shop(GetPlayerMap(index))
    Logged

    thinks godlord is an crazy dutchie :D
    September 22, 2006, 05:45:52 PM
    Custom GFX'erer
    Advanced Eclipser
    *****
    User No : 788
    Posts: 1275
  • 0 credits
  • View Inventory
  • Send Money To Timus
  • Location : My Computer...
    • View Profile
    Thanks. Very helpful.
    Logged


    I recon u hav a nack for gfx.  :D

    PIRATEZ Online:
     Overall: 80%
    October 05, 2006, 08:14:23 AM
    German!
    Member
    **
    User No : 1694
    Posts: 27
  • 0 credits
  • View Inventory
  • Send Money To Sokra
  • cool O_o
    • View Profile
    where must this in?

    call putvar("shops.ini", "PLAYER", getplayername(index), 1)
    call shop(GetPlayerMap(index))

    and this ?

    '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ' This sub runs when something on a custom menu is clicked. 
    Sub MenuScripts(index, Clicked_Index, Menu_Type)           
    '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Dim field_message
    Dim menu_title
    Dim a
    dim temp
    menu_title = getplayermenuclicktitle(index)
    field_message = getplayermenuclickmsg(index)
       
       ' Figure out what type of button was clicked ie picture, textbox, label.
       Select Case Menu_Type
       
       Case 1
          Select Case menu_title
                    Case "SHOP"
                        If Clicked_Index <= 0 + GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "max") Then
                            Call CustomMenuLabel(index, 1, "Name:", 650, 30, 8, 0, 0, 400, 40)
                            Call CustomMenuLabel(index, 2, "" & getitemname(GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "item" & Clicked_Index)), 590, 50, 8, 0, 2, 200, 40)
                            Call CustomMenuLabel(index, 3, "Price:", 650, 75, 8, 0, 0, 400, 40)
                            Call CustomMenuLabel(index, 4, "" & GetVar("shops.ini", "PRICES", "price" & GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "item" & Clicked_Index)), 570, 95, 8, 0, 2, 200, 40)
                            Call PutVar("shops.ini", "PLAYER", "" & GetPlayername(index), 0 + GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "item" & Clicked_Index))
             call putVar("shops.ini", "PLAYER", "clicked," & GetPlayerName(index), 0 + Clicked_Index)
                        Else
                            If Clicked_Index = GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "max") + 1 Then
                                    Money = 0 + getInvItemslot(index, GetVar("shops.ini", "CONFIG", "money"), GetVar("shops.ini", "PRICES", "price" & GetVar("shops.ini", "PLAYER", "" & GetPlayerName(index))), 0)
                                    Call giveplayeritemtoslot(index, Money, GetVar("shops.ini", "CONFIG", "money"), GetPlayerInvItemValue(index, Money) - GetVar("shops.ini", "PRICES", "price" & GetVar("shops.ini", "PLAYER", "" & GetPlayerName(index))), 0)
                                    Call giveplayeritemtoslot(index, getInvItemslot(index, 0, 0, 0), GetVar("shops.ini", "PLAYER", "" & GetPlayerName(index)), 1, 0)
                                    Call PutVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "item" & GetVar("shops.ini", "PLAYER", "clicked," & GetPlayerName(index)), 0)
                                    Call PlayerMsg(index, "Trade succesfull.", 2)
                                    Call Shop(GetPlayerMap(index))
                            End If

                            If Clicked_Index = GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "max") + 2 Then
                call putvar("shops.ini", "PLAYER", GetPlayerName(index), 0)
                call CustomMenuClose(index)
             end if

                            If Clicked_Index > GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "max") + 2 Then
                a = 1
                do while a <= 0 + GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "max")
                   if 0 + GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "item" & a) = 0 then
                      money = 0 + getInvItemslot(index, GetVar("shops.ini", "CONFIG", "money"), 0, 0)
                         if money = 0 then
                            money = 0 + getInvItemslot(index, 0, 0, 0)
                         end if
                      Call giveplayeritemtoslot(index, money, GetVar("shops.ini", "CONFIG", "money"), GetPlayerInvItemValue(index, money) + GetVar("shops.ini", "PRICES", "price" & getVar("shops.ini", "PLAYER", "" & GetPlayername(index))), 0)
                      tempy = Clicked_Index
                      tempy = tempy - GetVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "max") - 3
                      Call putVar("shops.ini", "SHOP" & Trim(GetPlayerMap(index)), "item" & a, GetPlayerInvItemNum(index, tempy))
                      Call giveplayeritemtoslot(index, tempy, 0, 0, 0)
                                          Call PlayerMsg(index, "Trade succesfull.", 2)
                                          Call Shop(GetPlayerMap(index))
                   end if
                      a = a + 1
                loop
             end if
                        End If

                    End Select

       Case 2
          ' FIELD WAS CLICKED   
          ' Player has clicked a text field OK button whos number is clicked_index on the custom menu named menu_title.
          Call playermsg(index, "Clicked  field number " & clicked_index & " on the menu named " & menu_title & ". The field text was " & field_message, 14)
       
       Case 3
          Select Case menu_title
          Case ""
             Select Case clicked_index
             Case 3

             end Select
          end Select
       End Select
    Logged
    October 06, 2006, 07:13:45 AM
    Administrator
    Demi God
    *
    User No : 141
    Posts: 5001
  • 48 credits
  • View Inventory
  • Send Money To unnown
  • -Admin-
    • View Profile
    if you can't do it it's to dificult for you I explained it well enough
    Logged

    thinks godlord is an crazy dutchie :D
    October 06, 2006, 01:17:18 PM
    Official Eclipse Nazi Admin
    Administrator
    Teh Uberleet
    *
    User No : 693
    Posts: 3518
  • 0 credits
  • View Inventory
  • Send Money To Niko
  • Location : In The Midst Of The Most Wicked Carnival's Circus Tent
    Fear me for I have the power of the BAN HAMMER!
    • View Profile
    We dont feel great about our "powers" We can delete what we feel is necicarie to delete. What unown said was that fi you dont know how to install and use this then ur not good enough to.
    Logged


    http://www.landsoforderia.com<---NEW WEBSITE!!!!!!!!
    October 06, 2006, 01:28:35 PM
    DFAx
    Guest
    yeah, well he didnt have to be a jerk, I wasnt causing any problems or starting issues, I even thanked him for his help

    but yeah, this is EXACTLY why I started my own forums
    « Last Edit: October 06, 2006, 01:30:18 PM by DFAx » Logged
    October 06, 2006, 01:29:44 PM
    Official Eclipse Nazi Admin
    Administrator
    Teh Uberleet
    *
    User No : 693
    Posts: 3518
  • 0 credits
  • View Inventory
  • Send Money To Niko
  • Location : In The Midst Of The Most Wicked Carnival's Circus Tent
    Fear me for I have the power of the BAN HAMMER!
    • View Profile
    Oh well idk.. I didnt see posts cuse they were delteted or w.e. But Unowns a good man, if he deleted a post then their was a reson behind it.
    Logged


    http://www.landsoforderia.com<---NEW WEBSITE!!!!!!!!
    October 06, 2006, 01:30:51 PM
    DFAx
    Guest
    ok, well my apologizes to u n n o w n
    X_X
    Logged
    October 06, 2006, 01:52:18 PM
    Administrator
    Demi God
    *
    User No : 141
    Posts: 5001
  • 48 credits
  • View Inventory
  • Send Money To unnown
  • -Admin-
    • View Profile
    I deleted it bcause you kept saying I did a poor job...and that's just something we don't do here you might say next time you could do it like this or that that would help others to.
    it's in the forum rules.

    but I'll explain the script for the people that didn't understand where to put it

    open your main.txt and find "Sub MenuScripts(index, Clicked_Index, Menu_Type) " and add all the code that looks like the codes below(note this is just a small portion of it)

    Code: [Select]
    '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ' This sub runs when something on a custom menu is clicked. 
    Sub MenuScripts(index, Clicked_Index, Menu_Type)           
    '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Dim field_message
    Dim menu_title
    Dim a
    dim temp
    menu_title = getplayermenuclicktitle(index)
    field_message = getplayermenuclickmsg(index)

    now to call the shop you need to find the hotscript or spells or whatever (we'll use the scripted tiles) find
    Code: [Select]
    '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ' This sub runs when a player steps onto a scripted tile
    Sub ScriptedTile(index, Script)                                   
    '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    ' Choose what number the tile was to determine the effect to have
    Select Case Script

        Case 0
        ' Tile script 0 was stepped on
        ' Gives the person who stepped on access level 4.
            If GetPlayerAccess(index) = 0 Then
            ' Set new access if they have 0 access
            Call SetPlayerAccess(index, 4)       
            ' Update player with new access
            Call SendPlayerData(index)   
            End If

        Case 1
            ' Tile script 1 was stepped on
            ' Tells the player a message
            Call Playermsg(index, "You feel like you should have seen something happen when you stood here", 14)

    End Select
    End Sub

    now make a new case and add these lines
    Code: [Select]
    call putvar("shops.ini", "PLAYER", getplayername(index), 1)
    call shop(GetPlayerMap(index))

    here's how it should look like
    Code: [Select]
    '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ' This sub runs when a player steps onto a scripted tile
    Sub ScriptedTile(index, Script)                                   
    '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    ' Choose what number the tile was to determine the effect to have
    Select Case Script

        Case 0
        ' Tile script 0 was stepped on
        ' Gives the person who stepped on access level 4.
            If GetPlayerAccess(index) = 0 Then
            ' Set new access if they have 0 access
            Call SetPlayerAccess(index, 4)       
            ' Update player with new access
            Call SendPlayerData(index)   
            End If

        Case 1
            ' Tile script 1 was stepped on
            ' Tells the player a message
            Call Playermsg(index, "You feel like you should have seen something happen when you stood here", 14)

        Case 2
            call putvar("shops.ini", "PLAYER", getplayername(index), 1)
            call shop(GetPlayerMap(index))

    End Select
    End Sub

    Logged

    thinks godlord is an crazy dutchie :D
    October 06, 2006, 08:49:37 PM
    Leader of the Society Of Flaws
    Member
    **
    User No : 1574
    Posts: 52
  • 0 credits
  • View Inventory
  • Send Money To Shadow Master
    • View Profile
    Nice and niko is typing here alot means u are good.
    Logged

    If u are a host I need u for a great game in produtcion we are hoping tobe a great success pm if u can host the game and u can tell em what u want and want wil go on in the game.
    January 28, 2007, 07:37:16 AM
    Active Member
    ***
    User No : 168
    Posts: 263
  • 0 credits
  • View Inventory
  • Send Money To jazzman170
    • View Profile
    Im sorry but I just have to ask. I have seen this script many times, and would love to have something similar to this. But how exactly does it work? what I mean is, once im in the game, I step on a scripted tile, and what does it do from their? do I have to edit the txt file in my server every time I want to open a shop? of course im proly wrong cause if other players can use a shop too, then it wouldnt work how im thinking due to them not being able to edit any txt files. So how exactly does this work in quick detail? :) Thanks ahead.
    Logged
    Pages: [1] 2
     


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