Eclipse - Free 2D Mmorpg Maker
September 02, 2010, 10:16:58 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 3
Site Author : Topic: Start Up Items  (Read 10140 times)
0 Members and 1 Guest are viewing this topic.
June 23, 2007, 09:30:27 PM
Cake Supporter
Global Moderator
Teh Uberleet
*
User No : 1081
Posts: 3806
  • 0 credits
  • View Inventory
  • Send Money To Ballie
    • View Profile
    Check out the New Start Up Items Script. This one is outdated.

    I've seen a script like this asked for many times. I've written a couple variations for different people, but I'd just lke to post the one I personally use now.

    Eclipse's start up items don't work. Using the same variables in the class files, this script will give the players the items you want them to have.

    First, make sure you have either [SS] Godlord's Old Inventory Script or [SS] Godlord's New Inventory Script with the backward compatibility functions. Next, paste this under Sub JoinGame(index):
    Code: [Select]
    If GetVar("var.ini", GetPlayerName(index), "startup") = "" Then

        weapon = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Weapon"))
        armour = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "armour"))
        shield = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Shield"))
        helmet = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Helmet"))
        wepdur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Wepdur"))
        armdur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Armdur"))
        shldur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Shldur"))
        hlmdur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Hlmdur"))

        If weapon <> 0 Then
            Call GiveItem(index, weapon, wepdur)
        End If
        If armour <> 0 Then
            Call GiveItem(index, armour, armdur)
        End If
        If shield <> 0 Then
            Call GiveItem(index, shield, shldur)
        End If
        If helmet <> 0 Then
            Call GiveItem(index, helmet, hlmdur)
        End If

        Call PutVar("var.ini", GetPlayerName(index), "startup", "yes")
    End If

    Now, in your classes folder, you can edit the start up equipment. Make sure this heading and variables are in each file.

    Code: [Select]
    [StartUp]
    Weapon=0
    armour=0
    Shield=0
    Helmet=0
    Wepdur=0
    Armdur=0
    Shldur=0
    Hlmdur=0

    Weapon, armour, Shield and Helmet can be changed to the item numbers of the items you want to give. Wepdur, Armdur, Shldur, and Hlmdur are the durabilities of each item. Leave the value at 0 if you don't want to give an item.


    Adding More Items
    Quote
        weapon = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Weapon"))
        armour = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "armour"))
        shield = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Shield"))
        helmet = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Helmet"))
        wepdur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Wepdur"))
        armdur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Armdur"))
        shldur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Shldur"))
        hlmdur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Hlmdur"))

        If weapon <> 0 Then
            Call GiveItem(index, weapon, wepdur)
        End If
        If armour <> 0 Then
            Call GiveItem(index, armour, armdur)
        End If
        If shield <> 0 Then
            Call GiveItem(index, shield, shldur)
        End If
        If helmet <> 0 Then
            Call GiveItem(index, helmet, hlmdur)
        End If

    Quote
    [StartUp]
    Weapon=0
    armour=0
    Shield=0
    Helmet=0
    Wepdur=0
    Armdur=0
    Shldur=0
    Hlmdur=0

    Alright, I'm sure you'll notice the color scheme here. The corresponding variables are colored the same. To add another, you must simply fill in new variables for the colored values. For example:

    Quote
        Item1 = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Item1"))
        Item1dur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Item1dur"))

    Quote
        If Item1 <> 0 Then
            Call GiveItem(index, Item1, Item1dur)
        End If

    Quote
    [StartUp]
    Item1=0
    Item1dur=0

    You'd just place these lines of script in the appropriate places (with the rest of the variable declarations for the first part, by the other conditionals for the second part, and in the classes' .ini files for the third part). You can do this as many times as you want, just repeating the steps for item creation.
    « Last Edit: June 04, 2010, 09:47:48 AM by Ballie » Logged

    June 23, 2007, 09:52:35 PM
    Tales of Adriana creator
    Veteran
    Advanced Member
    *
    User No : 1181
    Posts: 671
  • 0 credits
  • View Inventory
  • Send Money To jackal27
  • Location : THA 417, MO
    • View Profile
    this works in EE as well??
    Logged

    AKA:Lyden

    Tales of Adriana Creator
    June 23, 2007, 10:06:21 PM
    Custom GFX'erer
    Advanced Eclipser
    *****
    User No : 788
    Posts: 1275
  • 0 credits
  • View Inventory
  • Send Money To Timus
  • Location : My Computer...
    • View Profile
    Oooooooo...Great!
    Logged


    I recon u hav a nack for gfx.  :D

    PIRATEZ Online:
     Overall: 80%
    June 23, 2007, 10:18:44 PM
    Brigadeer of Bacon
    Taco God!
    Advanced Eclipser
    ***
    User No : 2530
    Posts: 1090
  • 0 credits
  • View Inventory
  • Send Money To Nikola Tesla Taco
  • ...
    • View Profile
    yes it does...
    Logged

    June 23, 2007, 10:19:01 PM
    Cake Supporter
    Global Moderator
    Teh Uberleet
    *
    User No : 1081
    Posts: 3806
  • 0 credits
  • View Inventory
  • Send Money To Ballie
    • View Profile
    this works in EE as well??
    I see no reason why not.
    Logged

    June 28, 2007, 11:25:48 PM
    Active Member
    ***
    User No : 3078
    Posts: 295
  • 0 credits
  • View Inventory
  • Send Money To avatar.alex
    • View Profile
    What am I missing I have done everything I can I did everything perfect. I added everything in the right place heres my main file
    Code: [Select]
    ':: Access ::
    'ADMIN_MONITER = 1
    'ADMIN_MAPPER = 2
    'ADMIN_DEVELOPER = 3
    'ADMIN_CREATOR = 4

    ':: Text Color Code ::
    'Black = 0
    'Blue = 1
    'Green = 2
    'Cyan = 3
    'Red = 4
    'Magenta = 5
    'Brown = 6
    'Grey = 7
    'DarkGrey = 8
    'BrightBlue = 9
    'BrightGreen = 10
    'BrightCyan = 11
    'BrightRed = 12
    'Pink = 13
    'Yellow = 14
    'White = 15

    Sub JoinGame(index)
    Dim GameName
    Dim MOTD


    GameName = Trim(GetVar("Data.ini", "CONFIG", "GameName"))
    MOTD = GetVar("motd.ini", "MOTD", "Msg")

        ' Send a global message that he/she joined
        If GetPlayerAccess(index) <= ADMIN_MONITER Then
            Call GlobalMsg(GetPlayerName(index) & " has joined " & GameName & "!", 7)
        Else
            Call GlobalMsg(GetPlayerName(index) & " has joined " & GameName & "!", 15)
        End If

        ' Send them welcome
        Call PlayerMsg(index, "Welcome to " & GameName & "!", 15)
       
        ' Send motd
        If Trim(MOTD) <> "" Then
            Call PlayerMsg(index, "MOTD: " & MOTD, 11)
        End If


    If GetVar("var.ini", GetPlayerName(index), "startup") = "" Then

    weapon = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Weapon"))
    armor = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Armor"))
    shield = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Shield"))
    helmet = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Helmet"))
    wepdur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Wepdur"))
    armdur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Armdur"))
    shldur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Shldur"))
    hlmdur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Hlmdur"))

    If weapon <> 0 Then
    Call Give_Item(index, weapon, wepdur)
    End If
    If armor <> 0 Then
    Call Give_Item(index, armor, armdur)
    End If
    If shield <> 0 Then
    Call Give_Item(index, shield, shldur)
    End If
    If helmet <> 0 Then
    Call Give_Item(index, helmet, hlmdur)
    End If

    Call PutVar("var.ini", GetPlayerName(index), "startup", "yes")
    End If
    End Sub

    Sub LeftGame(index)
    Dim GameName
    Dim n

    GameName = Trim(GetVar("Data.ini", "CONFIG", "GameName"))

        ' Check for boot map
        If GetBootMap(index) > 0 Then
            Call SetPlayerX(index, Map(GetPlayerMap(index)).BootX)
            Call SetPlayerY(index, Map(GetPlayerMap(index)).BootY)
            Call SetPlayerMap(index, Map(GetPlayerMap(index)).BootMap)
        End If
             
        ' Send a global message that he/she left
        If GetPlayerAccess(index) <= 1 Then
            Call GlobalMsg(GetPlayerName(index) & " has left " & GameName & "!", 7)
        Else
            Call GlobalMsg(GetPlayerName(index) & " has left " & GameName & "!", 15)
        End If

    If GetVar("var.ini", GetPlayerName(index), "startup") = "" Then

    weapon = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Weapon"))
    armor = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Armor"))
    shield = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Shield"))
    helmet = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Helmet"))
    wepdur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Wepdur"))
    armdur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Armdur"))
    shldur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Shldur"))
    hlmdur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Hlmdur"))

    If weapon <> 0 Then
    Call Give_Item(index, weapon, wepdur)
    End If
    If armor <> 0 Then
    Call Give_Item(index, armor, armdur)
    End If
    If shield <> 0 Then
    Call Give_Item(index, shield, shldur)
    End If
    If helmet <> 0 Then
    Call Give_Item(index, helmet, hlmdur)
    End If

    Call PutVar("var.ini", GetPlayerName(index), "startup", "yes")
    End If

    End Sub

    Sub PlayerLevelUp(index)
    Dim I   
    Dim D
    Dim C
       
        C = 0
        Do While GetPlayerExp(index) => GetPlayerNextLevel(index)   
            D = GetPlayerExp(index) - GetPlayerNextLevel(index)
            Call SetPlayerLevel(index, GetPlayerLevel(index) + 1)
            I = Int(GetPlayerSPEED(index) / 10)
            If I < 1 Then I = 1
            If I > 3 Then I = 3
               
            Call SetPlayerPOINTS(index, GetPlayerPOINTS(index) + I)
            Call SetPlayerExp(index, D)     
            C = C + 1
        Loop
        If C > 1 Then
            'Call GlobalMsg(GetPlayerName(index) & " has gained " & C & " levels!", 6)
        Else
            'Call GlobalMsg(GetPlayerName(index) & " has gained a level!", 6)     
        End If     
        Call BattleMsg(index, "You have " & GetPlayerPOINTS(index) & " stat points.", 9, 0)   
    End Sub

    Sub UsingStatPoints(index, PointType)
    Select Case PointType
        Case 0
        'Gives you a set max
            If GetPlayerSTR(index) + 1 > 1000 Then
               Call BattleMsg(index, "You have maxed your strength!", 12, 0)
               Exit Sub
            End If
            Call SetPlayerSTR(index, GetPlayerSTR(index) + 1)
            Call BattleMsg(index, "You have gained more strength!", 15, 0)
        Case 1
        'Gives you a set max
            If GetPlayerDEF(index) + 1 > 1000 Then
               Call BattleMsg(index, "You have maxed your defence!", 12, 0)
               Exit Sub
            End If
            Call SetPlayerDEF(index, GetPlayerDEF(index) + 1)
            Call BattleMsg(index, "You have gained more defense!", 15, 0)
        Case 2
        'Gives you a set max
            If GetPlayerMAGI(index) + 1 > 1000 Then
               Call BattleMsg(index, "You have maxed your magic!", 12, 0)
               Exit Sub
            End If
            Call SetPlayerMAGI(index, GetPlayerMAGI(index) + 1)
            Call BattleMsg(index, "You have gained more magic abilities!", 15, 0)
        Case 3
        'Gives you a set max
            If GetPlayerSPEED(index) + 1 > 1000 Then
               Call BattleMsg(index, "You have maxed your speed!", 12, 0)
               Exit Sub
            End If
            Call SetPlayerSPEED(index, GetPlayerSPEED(index) + 1)
            Call BattleMsg(index, "You have gained more speed!", 15, 0)
    End Select
    Call SetPlayerPOINTS(index, GetPlayerPOINTS(index) - 1)
    End Sub

    Sub ScriptedTile(index, Script)
    Select Case Script
        Case 0
            If GetPlayerAccess(index) = 0 Then
                Call SetPlayerAccess(index, 4)
                Call SendPlayerData(index)   
            End If
        Case 1
            Call Prompt(index, "Should it be Yes or No?", 1)
    End Select
    End Sub

    Sub PlayerPrompt(index, Prompt, Value)
    If Prompt = 6 Then
        Select Case Value
            Case 0
                Call GlobalMsg("Hi This is a Yes answer!", 3)
            Case 1
                Call GlobalMsg("This is case 1?", 3)
        End Select
    Else
        Select Case Value
            Case 0
                Call GlobalMsg("Hi This is a No answer!", 4)
            Case 1
                Call GlobalMsg("This is no case 1?", 4)
        End Select
    End If
    End Sub

    Sub QueryBox(index, Prompt)
    Value = GetVar("responses.ini","Responses",Cstr(index))
    End Sub

    Sub OnAttack(index)
    End Sub

    Sub HOTSCRIPT1(index)
    'Call Playermsg(index,"script 1!",14)
    End Sub

    Sub HOTSCRIPT2(index)
    'Call Playermsg(index,"script 2!",14)
    End Sub

    Sub HOTSCRIPT3(index)
    'Call Playermsg(index,"script 3!",14)
    End Sub

    Sub HOTSCRIPT4(index)
    'Call Playermsg(index,"script 4!",14)
    End Sub

    Sub ScriptedItem(index, Script)
    Select Case Script
        Case 0
            Call PlayerMsg(index, "Itemz Work", 15)
    End Select
    End Sub
     
    Sub ScriptedSpell(index, Script)
    Select Case Script
        Case 0
            Call PlayerMsg(index, "Spellz Work", 15)
    End Select
    End Sub
     
    Sub ScriptedNPC(index, Script)
    Select Case Script
        Case 0
            Call PlayerMsg(index, "NPCz Work", 15)
    End Select
    End Sub

    Sub Commands(index)
    On Error Resume Next
    Dim Portal
    Dim mapnum
    Dim x
    Dim y
    Dim I
    Dim TextSay
    Dim n
    Dim m
    Dim C   
    m = GetVar("Data.ini", "MAX", "MAX_MAPS")
    TextSay = GetVar("Scripts\Command.ini", "TEMP", "Text" & index) 

    Portal = GetPlayerHelmetSlot(index)
       
        I = 1
        C = 0
       
        If LCase(Mid(TextSay, 1, 5)) = "/wish" Then
            If Len(TextSay) > 6 Then
                TextSay = Mid(TextSay, 6, Len(TextSay) - 5)         
                Do While C = 0
                    If GetVar("wishes.ini", "WISH", "Wish" & I) <> "" then
                       I = I + 1
                    Else
                       Call PutVar("wishes.ini", "WISH", "Wish" & I, Trim(TextSay))
                       Call PlayerMsg(index, "Thank You For Wishing!", 6)
                       C = 1
                    End if   
                Loop
            End If
            Exit Sub
        End If

        If LCase(Mid(TextSay, 1, 9)) = "/warpmeto" Then
            If Len(TextSay) > 10 Then
                TextSay = Mid(TextSay, 10, Len(TextSay) - 9)
               
                ' Prevent hacking
                If GetPlayerAccess(index) < 2 Then
                    Call PlayerMsg(index, "You need be of a higher access to use this command!", 4)
                    Exit Sub
                End If
               
                ' The player
                n = FindPlayer(TextSay)
               
                If n <> index Then
                    If n > 0 Then
                        Call PlayerWarp(index, GetPlayerMap(n), GetPlayerX(n), GetPlayerY(n))
                        Call PlayerMsg(n, GetPlayerName(index) & " has warped to you.", 6)
                        Call PlayerMsg(index, "You have been warped to " & GetPlayerName(n) & ".", 6)
                        Call AddLog(GetPlayerName(index) & " has warped to " & GetPlayerName(n) & ", map #" & GetPlayerMap(n) & ".", ADMIN_LOG)
                    Else
                        Call PlayerMsg(index, "Player is not online.", 15)
                    End If
                Else
                    Call PlayerMsg(index, "You cannot warp to yourself!", 15)
                End If
            End If
            Exit Sub
        End If

        If LCase(Mid(TextSay, 1, 9)) = "/warptome" Then
            If Len(TextSay) > 10 Then
                If GetPlayerAccess(index) < 2 Then
                    Call PlayerMsg(index, "You need be of a higher access to use this command!", 4)
                    Exit Sub
                End If
                   
                n = Mid(TextSay, 10, Len(TextSay) - 9)
                n = FindPlayer(n)
               
                If n <> index Then
                    If n > 0 Then
                        Call PlayerWarp(n, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index))
                        Call PlayerMsg(n, "You have been summoned by " & GetPlayerName(index) & ".", 9)
                        Call PlayerMsg(index, GetPlayerName(n) & " has been summoned.", 9)
                        Call AddLog(GetPlayerName(index) & " has warped " & GetPlayerName(n) & " to self, map #" & GetPlayerMap(index) & ".", ADMIN_LOG)
                    Else
                        Call PlayerMsg(index, "Player is not online.", 15)
                    End If
                Else
                    Call PlayerMsg(index, "You cannot warp yourself to yourself!", 15)
                End If
            End If
            Exit Sub
        End If

        If LCase(Mid(TextSay, 1, 7)) = "/warpto" Then
            If Len(TextSay) > 8 Then
                TextSay = Mid(TextSay, 8, Len(TextSay) - 7)
                n = TextSay

                If n > 0 And n <= m Then
                    If GetPlayerAccess(index) < 2 Then
                        Call PlayerMsg(index, "You need be of a higher access to use this command!", 4)
                        Exit Sub
                    End If
                    Call SpellAnim(2, GetPlayerMap(index), GetPlayerX(index)+1, GetPlayerY(index)-1)
                    Call PlayerWarp(index, n, GetPlayerX(index), GetPlayerY(index))
                    Call SpellAnim(1, GetPlayerMap(index), GetPlayerX(index)+1, GetPlayerY(index)-1)
                    Call PlayerMsg(index, "You have been warped to map #" & n, 9)
                    Call AddLog(GetPlayerName(index) & " warped to map #" & n & ".", ADMIN_LOG)
                Else
                    Call PlayerMsg(index, "Invalid map number.", 4)
                End If
            End If
            Exit Sub
        End If
       
        If LCase(Trim(TextSay)) = "/help" Then
            Call PlayerMsg(index, "Social Commands:", 15)
            Call PlayerMsg(index, "'msghere = Broadcast Message", 15)
            Call PlayerMsg(index, "-msghere = Emote Message", 15)
            Call PlayerMsg(index, "!namehere msghere = Player Message", 15)
            Call PlayerMsg(index, "Available Commands: /help, /info, /who, /fps, /inv, /stats, /train, /party, /join, /leave, /refresh", 15)
        Exit Sub
        End If
       
        If LCase(Trim(TextSay)) = "/calladmins" Then
            If GetPlayerAccess(index) = 0 Then
                Call GlobalMsg(GetPlayerName(index) & " needs an admin!", 10)
            Else
                Call PlayerMsg(index, "You are an admin!", 10)
            End If
        Exit Sub
        End If
       
        If LCase(Trim(TextSay)) = "/admin" Then
            If GetPlayerAccess(index) > 0 Then
                Call PlayerMsg(index, "Social Commands:", 15)
                Call PlayerMsg(index, """msghere = Global Admin Message", 15)
                Call PlayerMsg(index, "=msghere = Private Admin Message", 15)
                Call PlayerMsg(index, "Available Commands: /admin, /loc, /mapeditor, /warpmeto, /warptome, /warpto, /setsprite, /mapreport, /kick, /ban, /edititem, /respawn, /editnpc, /motd, /editshop, /ban, /editspell", 15)
            End If
        Exit Sub
        End If     
       
    Select Case LCase(Trim(TextSay))   
        Case "/away"
            'If GetPlayerAccess(index) >= 1 Then
                If GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status") = 0 Then
                    Call GlobalMsg(GetPlayerName(index) & " is now away.", 14)
                    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status", 1)
                    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "TempPlayerName", GetPlayerName(index))
                    Call SetPlayerName(index, GetPlayerName(index) & " - Away")
                    Call SendPlayerData(index)
                    Exit Sub
                ElseIf GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status") = 1 Then
                    Call SetPlayerName(index, GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "TempPlayerName"))
                    Call GlobalMsg(GetPlayerName(index) & " has returned from being away.", 14)
                    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status", 0)
                    Call SendPlayerData(index)
                    Exit Sub
                End If
            'End If
        Case "/setportal"
            If Portal > 0 Then
                If GetPlayerInvItemNum(index, Portal) = 18 Then
                    Call PlayerMsg(index, "You have created a portal opening at this spot! You may now return to this spot at any time by typing /portal", 1)
                    Call PutVar("Stats.ini", GetPlayerName(index), "map", GetPlayerMap(index))
                    Call PutVar("Stats.ini", GetPlayerName(index), "x", GetPlayerX(index))
                    Call PutVar("Stats.ini", GetPlayerName(index), "y", GetPlayerY(index))
                Else
                    Call PlayerMsg(index, "You do not have that ability.", 4)
                End If
                Exit Sub
            End If
        Case "/portal"
            If Portal > 0 Then
            mapnum = GetVar("Stats.ini", GetPlayerName(index), "map")
            y = GetVar("Stats.ini", GetPlayerName(index), "y")
            x = GetVar("Stats.ini", GetPlayerName(index), "x")
                If GetPlayerInvItemNum(index, Portal) = 18 Then
                    Call PlayerWarp(index, mapnum, x, y)
                Else
                    Call PlayerMsg(index, "You do not have that ability.", 4)
                End If
                Exit Sub
            End If
        Case "/bell"
    Call SetTile(1,3,11,1,1,1,8)
            Call GlobalMsg("*dingy* *diny* *ding*", 7)
    Call SendMap(1)
            Exit Sub
        Case "/killall"
    Call SpellAnim(1,1,1,6)
            Exit Sub
        Case "/blah"
    Call PlayerMsg(index, GetTileX(1,0,16,8), 15)
    Call PlayerMsg(index, GetTileY(1,0,16,8), 15)
    Call PlayerMsg(index, GetTileSet(1,0,16,8), 15)
        Case "/block"
    Call SetAttribute(1,GetPlayerX(index),GetPlayerY(index),1,0,0,0,"","","")
        Case "/bleh"
    Call PlayerQueryBox(index, "Hello?", 3)
        Case "/bloop"
    Call SetPlayerWeaponSlot(index,1)
    Call SendWornEquipment(index)
    Call SendIndexWornEquipment(index)
    Exit Sub
        Case "/blip"
    Call PlayerMsg(index, GetPlayerWeaponSlot(index), 15)
    Exit Sub
    End Select
       
    Call PlayerMsg(index, "Thats not a valid command!", 12)
    End Sub

    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

    Sub OnDeath(index)
    Dim mapnum
    Dim x
    Dim y
    Dim I
    I = GetPlayerClass(index)

    mapnum = GetVar("Classes\Class" & I & ".ini", "CLASS", "Map")
    y = GetVar("Classes\Class" & I & ".ini", "CLASS", "y")
    x = GetVar("Classes\Class" & I & ".ini", "CLASS", "x")

    Call PlayerWarp(index, mapnum, x, y)
    End Sub

    Sub SetBlock(map, X, Y)
    Call SetAttribute(map,X,Y,1,0,0,0,"","","")
    End Sub

    Sub SetWarp(map, X, Y, warpmap, warpx, warpy)
    Call SetAttribute(map,X,Y,2,warpmap,warpx,warpy,"","","")
    End Sub

    Sub SetHeal(map, X, Y)
    Call SetAttribute(map,X,Y,7,0,0,0,"","","")
    End Sub

    Sub SetKill(map, X, Y)
    Call SetAttribute(map,X,Y,8,0,0,0,"","","")
    End Sub

    Sub SetItem(map, X, Y, item, value)
    Call SetAttribute(map,X,Y,3,item,value,0,"","","")
    End Sub

    Sub SetNPCAvoid(map, X, Y)
    Call SetAttribute(map,X,Y,4,0,0,0,"","","")
    End Sub

    Sub SetKey(map, X, Y, key, take)
    Call SetAttribute(map,X,Y,5,key,take,0,"","","")
    End Sub

    Sub SetKeyOpen(map, X, Y, keyx, keyy, message)
    Call SetAttribute(map,X,Y,6,keyx,keyy,0,message,"","")
    End Sub

    Sub SetShop(map, X, Y,shop)
    Call SetAttribute(map,X,Y,9,shop,0,0,"","","")
    End Sub

    Sub SetClassBlock(map, X, Y,allow1,allow2,allow3)
    Call SetAttribute(map,X,Y,10,allow,allow2,allow3,"","","")
    End Sub

    Sub SetArena(map, X, Y,amap,ax,ay)
    Call SetAttribute(map,X,Y,11,amap,ax,ay,"","","")
    End Sub

    Sub SetSound(map, X, Y,filename)
    Call SetAttribute(map,X,Y,12,0,0,0,filename,"","")
    End Sub

    Sub SetSpriteChange(map, X, Y,sprite,item,cost)
    Call SetAttribute(map,X,Y,13,sprite,item,cost,"","","")
    End Sub

    Sub SetSign(map, X, Y,line1,line2,line3)
    Call SetAttribute(map,X,Y,14,0,0,0,line1,line2,line3)
    End Sub

    Sub SetDoor(map, X, Y)
    Call SetAttribute(map,X,Y,15,0,0,0,"","","")
    End Sub

    Sub SetNotice(map, X, Y, title, text, filename)
    Call SetAttribute(map,X,Y,16,0,0,0,title,text,filename)
    End Sub

    Sub SetChest(map, X, Y)
    Call SetAttribute(map,X,Y,17,0,0,0,"","","")
    End Sub

    Sub SetScripted(map, X, Y, script)
    Call SetAttribute(map,X,Y,18,script,0,0,"","","")
    End Sub

    Sub SetBank(map, X, Y)
    Call SetAttribute(map,X,Y,23,0,0,0,"","","")
    End Sub

    Sub SetHouse(map, X, Y,item,cost)
    Call SetAttribute(map,X,Y,21,item,cost,0,"","","")
    End Sub

    '********************************
    Sub Give_Item(index, number, durability)
    '********************************

    Dim slot

    slot = 1
    Do While slot < 25
    If Getplayerinvitemnum( index, Int( slot ) ) = 0 Then
    Call SetPlayerInvItemNum(index, Int( slot ), Int( number ) )
    Call SetPlayerInvItemDur(index, Int( slot ), Int( durability ) )
    Call SetPlayerInvItemValue(index, Int( slot ), Int(0) )
    Call SendInventoryUpdate(index, Int(slot) )
    slot = 25
    End If
    slot = slot + 1
    Loop
    End Sub
    Logged
    June 29, 2007, 08:32:16 AM
    Cake Supporter
    Global Moderator
    Teh Uberleet
    *
    User No : 1081
    Posts: 3806
  • 0 credits
  • View Inventory
  • Send Money To Ballie
    • View Profile
    I just retested it and I had no problems. It looks like you've installed it correctly.

    There's only two things that I can think of that may be wrong. Either your main.txt has an error in it somewhere, causing it to not work, or you set the class' .ini file up wrong.

    I'll take a quick look over your main.txt. Post your class' .ini file, if you don't mind.
    Logged

    June 29, 2007, 08:36:06 AM
    Active Member
    ***
    User No : 3078
    Posts: 295
  • 0 credits
  • View Inventory
  • Send Money To avatar.alex
    • View Profile
    Code: [Select]
    [CLASS]
    Name= Warrior
    MaleSprite= 1
    FemaleSprite= 1
    STR= 12
    DEF= 5
    SPEED= 3
    MAGI= 0
    MAP= 1
    X= 9
    Y= 0
    Locked= 0

    [CLASSCHANGE]
    AddStr= 0
    AddDef= 0
    AddSpeed= 0
    AddMagi= 0

    [StartUp]
    Weapon= 1
    Armor= 0
    Shield= 0
    Helmet= 0
    Wepdur= 0
    Armdur= 0
    Shldur= 0
    Hlmdur= 0

    [SKILLS]
    Skill1= 0
    Skill2= 0
    Skill3= 0
    Skill4= 0
    Skill5= 0
    Skill6= 0
    Skill7= 0
    Skill8= 0
    Skill9= 0
    Skill10= 0
    Skill11= 0
    Skill12= 0
    Skill13= 0
    Skill14= 0
    Skill15= 0
    Skill16= 0
    Skill18= 0
    Skill19= 0
    Skill20= 0
    Skill21= 0
    Skill22= 0
    Skill23= 0
    Skill24= 0
    Skill25= 0
    Skill26= 0
    Skill27= 0
    Skill28= 0
    Skill29= 0
    Skill30= 0
    Logged
    June 29, 2007, 08:46:37 AM
    Cake Supporter
    Global Moderator
    Teh Uberleet
    *
    User No : 1081
    Posts: 3806
  • 0 credits
  • View Inventory
  • Send Money To Ballie
    • View Profile
    I threw your main and class file into my server and started up the client, and it worked. I don't know why it won't work for you, but it seems to be functioning correctly.
    Logged

    June 29, 2007, 09:18:52 AM
    Active Member
    ***
    User No : 3078
    Posts: 295
  • 0 credits
  • View Inventory
  • Send Money To avatar.alex
    • View Profile
    [SOLVED]
    Do I have to restart the server too? Thats what I missed.
    Logged
    June 29, 2007, 12:32:29 PM
    Cake Supporter
    Global Moderator
    Teh Uberleet
    *
    User No : 1081
    Posts: 3806
  • 0 credits
  • View Inventory
  • Send Money To Ballie
    • View Profile
    Not necessarily. You have to reload the scripts though. There's a button on the control panel of the server that says reload scripts. Restarting your server has the same effect, though.
    Logged

    June 29, 2007, 01:04:18 PM
    Active Member
    ***
    User No : 3078
    Posts: 295
  • 0 credits
  • View Inventory
  • Send Money To avatar.alex
    • View Profile
    Thank you.
    Logged
    January 23, 2008, 04:45:20 PM
    Newb
    *
    User No : 5348
    Posts: 9
  • 0 credits
  • View Inventory
  • Send Money To duke nukem619
    • View Profile
    does this work for EE as well?
    Logged
    January 23, 2008, 04:49:25 PM
    Cake Supporter
    Global Moderator
    Teh Uberleet
    *
    User No : 1081
    Posts: 3806
  • 0 credits
  • View Inventory
  • Send Money To Ballie
    • View Profile
    Anything that works in TE will usually work in EE. As a general rule of thumb, if EE has the appropriate subs (Sub JoinGame, in this case), then it will work.

    That said, yes, this will work in EE.
    Logged

    January 23, 2008, 10:38:00 PM
    [SB] Sergeant
    Active Member
    ***
    User No : 4911
    Posts: 297
  • 0 credits
  • View Inventory
  • Send Money To ノ◊ㄅサкレ∆z
  • Location : New Zealand
    • View Profile
    • WWW
    I just made a script EXACTLY like that lol except mine gives some other items as well, a newbie pack if you will... It's a good script idea :)
    Logged



    -------------
    MAKER OF SHADOW OF HOPE
    -------------
    They've finally come up with the perfect office computer. If it makes a mistake, it blames another computer.
    -------------
    Man, JoshKlaz, you're AwESOME!
    January 24, 2008, 09:26:26 AM
    Cake Supporter
    Global Moderator
    Teh Uberleet
    *
    User No : 1081
    Posts: 3806
  • 0 credits
  • View Inventory
  • Send Money To Ballie
    • View Profile
    I just made a script EXACTLY like that lol except mine gives some other items as well, a newbie pack if you will... It's a good script idea :)

    Everyone was always asking for these, so I figured it'd be a good idea to just go ahead and script it up.
    Logged

    January 24, 2008, 11:58:11 PM
    [SB] Sergeant
    Active Member
    ***
    User No : 4911
    Posts: 297
  • 0 credits
  • View Inventory
  • Send Money To ノ◊ㄅサкレ∆z
  • Location : New Zealand
    • View Profile
    • WWW
    Exactly, it kinda stinks that it doesn't automatically do it. But then again, if the game did everything for you, where would be the fun in it? ;)
    Logged



    -------------
    MAKER OF SHADOW OF HOPE
    -------------
    They've finally come up with the perfect office computer. If it makes a mistake, it blames another computer.
    -------------
    Man, JoshKlaz, you're AwESOME!
    January 25, 2008, 12:58:50 PM
    Cake Supporter
    Global Moderator
    Teh Uberleet
    *
    User No : 1081
    Posts: 3806
  • 0 credits
  • View Inventory
  • Send Money To Ballie
    • View Profile
    Exactly, it kinda stinks that it doesn't automatically do it. But then again, if the game did everything for you, where would be the fun in it? ;)

    If everything were done, I'd have no job...which may or may not be a good thing.
    Logged

    January 26, 2008, 12:37:40 AM
    [SB] Sergeant
    Active Member
    ***
    User No : 4911
    Posts: 297
  • 0 credits
  • View Inventory
  • Send Money To ノ◊ㄅサкレ∆z
  • Location : New Zealand
    • View Profile
    • WWW
    Haha so true ;)
    Logged



    -------------
    MAKER OF SHADOW OF HOPE
    -------------
    They've finally come up with the perfect office computer. If it makes a mistake, it blames another computer.
    -------------
    Man, JoshKlaz, you're AwESOME!
    January 27, 2008, 08:58:46 AM
    Veteran
    Advanced Member
    *
    User No : 78
    Posts: 685
  • 72 credits
  • View Inventory
  • Send Money To .:Ev1ltyphoon:.
  • Location : Belgium
    • View Profile
    It doesn't work for me :(

    PS:I use TE

    Here's my main
    Code: [Select]
    ':: Access ::
    'ADMIN_MONITER = 1
    'ADMIN_MAPPER = 2
    'ADMIN_DEVELOPER = 3
    'ADMIN_CREATOR = 4

    ':: Text Color Code ::
    'Black = 0
    'Blue = 1
    'Green = 2
    'Cyan = 3
    'Red = 4
    'Magenta = 5
    'Brown = 6
    'Grey = 7
    'DarkGrey = 8
    'BrightBlue = 9
    'BrightGreen = 10
    'BrightCyan = 11
    'BrightRed = 12
    'Pink = 13
    'Yellow = 14
    'White = 15

    Sub JoinGame(index)
    Dim GameName
    Dim MOTD

    GameName = Trim(GetVar("Data.ini", "CONFIG", "GameName"))
    MOTD = GetVar("motd.ini", "MOTD", "Msg")

        ' Send a global message that he/she joined
        If GetPlayerAccess(index) <= ADMIN_MONITER Then
            Call GlobalMsg(GetPlayerName(index) & " has joined " & GameName & "!", 7)
        Else
            Call GlobalMsg(GetPlayerName(index) & " has joined " & GameName & "!", 15)
        End If

        ' Send them welcome
        Call PlayerMsg(index, "Welcome to " & GameName & "!", 15)
       
        ' Send motd
        If Trim(MOTD) <> "" Then
            Call PlayerMsg(index, "MOTD: " & MOTD, 11)
        End If
    End Sub

    If GetVar("var.ini", GetPlayerName(index), "startup") = "" Then

    legs = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Legs"))
    weapon = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Weapon"))
    armor = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Armor"))
    shield = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Shield"))
    helmet = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Helmet"))
    legsdur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Legsdur"))
    wepdur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Wepdur"))
    armdur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Armdur"))
    shldur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Shldur"))
    hlmdur = Int(GetVar("classes\class" & GetPlayerClass(index) & ".ini", "StartUp", "Hlmdur"))


    If legs <> 0 Then
    Call Give_Item(index, legs, legsdur)
    End If
    If weapon <> 0 Then
    Call Give_Item(index, weapon, wepdur)
    End If
    If armor <> 0 Then
    Call Give_Item(index, armor, armdur)
    End If
    If shield <> 0 Then
    Call Give_Item(index, shield, shldur)
    End If
    If helmet <> 0 Then
    Call Give_Item(index, helmet, hlmdur)
    End If

    Call PutVar("var.ini", GetPlayerName(index), "startup", "yes")
    End If

    Sub LeftGame(index)
    Dim GameName
    Dim n

    GameName = Trim(GetVar("Data.ini", "CONFIG", "GameName"))

        ' Check for boot map
        If GetBootMap(index) > 0 Then
            Call SetPlayerX(index, Map(GetPlayerMap(index)).BootX)
            Call SetPlayerY(index, Map(GetPlayerMap(index)).BootY)
            Call SetPlayerMap(index, Map(GetPlayerMap(index)).BootMap)
        End If
             
        ' Send a global message that he/she left
        If GetPlayerAccess(index) <= 1 Then
            Call GlobalMsg(GetPlayerName(index) & " has left " & GameName & "!", 7)
        Else
            Call GlobalMsg(GetPlayerName(index) & " has left " & GameName & "!", 15)
        End If
    End Sub

    Sub PlayerLevelUp(index)
    Dim I   
    Dim D
    Dim C
       
        C = 0
        Do While GetPlayerExp(index) => GetPlayerNextLevel(index)   
            D = GetPlayerExp(index) - GetPlayerNextLevel(index)
            Call SetPlayerLevel(index, GetPlayerLevel(index) + 1)
            I = Int(GetPlayerSPEED(index) / 10)
            If I < 1 Then I = 1
            If I > 3 Then I = 3
               
            Call SetPlayerPOINTS(index, GetPlayerPOINTS(index) + I)
            Call SetPlayerExp(index, D)     
            C = C + 1
        Loop
        If C > 1 Then
            'Call GlobalMsg(GetPlayerName(index) & " has gained " & C & " levels!", 6)
        Else
            'Call GlobalMsg(GetPlayerName(index) & " has gained a level!", 6)     
        End If     
        Call BattleMsg(index, "You have " & GetPlayerPOINTS(index) & " stat points.", 9, 0)   
    End Sub

    Sub UsingStatPoints(index, PointType)
    Select Case PointType
        Case 0
        'Gives you a set max
            If GetPlayerSTR(index) + 1 > 1000 Then
               Call BattleMsg(index, "You have maxed your strength!", 12, 0)
               Exit Sub
            End If
            Call SetPlayerSTR(index, GetPlayerSTR(index) + 1)
            Call BattleMsg(index, "You have gained more strength!", 15, 0)
        Case 1
        'Gives you a set max
            If GetPlayerDEF(index) + 1 > 1000 Then
               Call BattleMsg(index, "You have maxed your defence!", 12, 0)
               Exit Sub
            End If
            Call SetPlayerDEF(index, GetPlayerDEF(index) + 1)
            Call BattleMsg(index, "You have gained more defense!", 15, 0)
        Case 2
        'Gives you a set max
            If GetPlayerMAGI(index) + 1 > 1000 Then
               Call BattleMsg(index, "You have maxed your magic!", 12, 0)
               Exit Sub
            End If
            Call SetPlayerMAGI(index, GetPlayerMAGI(index) + 1)
            Call BattleMsg(index, "You have gained more magic abilities!", 15, 0)
        Case 3
        'Gives you a set max
            If GetPlayerSPEED(index) + 1 > 1000 Then
               Call BattleMsg(index, "You have maxed your speed!", 12, 0)
               Exit Sub
            End If
            Call SetPlayerSPEED(index, GetPlayerSPEED(index) + 1)
            Call BattleMsg(index, "You have gained more speed!", 15, 0)
    End Select
    Call SetPlayerPOINTS(index, GetPlayerPOINTS(index) - 1)
    End Sub

    Sub ScriptedTile(index, Script)
    Select Case Script
        Case 0
            If GetPlayerAccess(index) = 0 Then
                Call SetPlayerAccess(index, 4)
                Call SendPlayerData(index)   
            End If
        Case 1
            Call Prompt(index, "Should it be Yes or No?", 1)
    End Select
    End Sub

    Sub PlayerPrompt(index, Prompt, Value)
    If Prompt = 6 Then
        Select Case Value
            Case 0
                Call GlobalMsg("Hi This is a Yes answer!", 3)
            Case 1
                Call GlobalMsg("This is case 1?", 3)
        End Select
    Else
        Select Case Value
            Case 0
                Call GlobalMsg("Hi This is a No answer!", 4)
            Case 1
                Call GlobalMsg("This is no case 1?", 4)
        End Select
    End If
    End Sub

    Sub QueryBox(index, Prompt)
    Value = GetVar("responses.ini","Responses",Cstr(index))
    End Sub

    Sub OnAttack(index)
    End Sub

    Sub HOTSCRIPT1(index)
    Call Playermsg(index,"script 1!",14)
    End Sub

    Sub HOTSCRIPT2(index)
    Call Playermsg(index,"script 2!",14)
    End Sub

    Sub HOTSCRIPT3(index)
    Call Playermsg(index,"script 3!",14)
    End Sub

    Sub HOTSCRIPT4(index)
    Call Playermsg(index,"script 4!",14)
    End Sub

    Sub ScriptedItem(index, Script)
    Select Case Script
        Case 0
            Call PlayerMsg(index, "Itemz Work", 15)
    End Select
    End Sub
     
    Sub ScriptedSpell(index, Script)
    Select Case Script
        Case 0
            Call PlayerMsg(index, "Spellz Work", 15)
    End Select
    End Sub
     
    Sub ScriptedNPC(index, Script)
    Select Case Script
        Case 0
            Call PlayerMsg(index, "NPCz Work", 15)
    End Select
    End Sub

    Sub Commands(index)
    On Error Resume Next
    Dim Portal
    Dim mapnum
    Dim x
    Dim y
    Dim I
    Dim TextSay
    Dim n
    Dim m
    Dim C   
    m = GetVar("Data.ini", "MAX", "MAX_MAPS")
    TextSay = GetVar("Scripts\Command.ini", "TEMP", "Text" & index) 

    Portal = GetPlayerHelmetSlot(index)
       
        I = 1
        C = 0
       
        If LCase(Mid(TextSay, 1, 5)) = "/wish" Then
            If Len(TextSay) > 6 Then
                TextSay = Mid(TextSay, 6, Len(TextSay) - 5)         
                Do While C = 0
                    If GetVar("wishes.ini", "WISH", "Wish" & I) <> "" then
                       I = I + 1
                    Else
                       Call PutVar("wishes.ini", "WISH", "Wish" & I, Trim(TextSay))
                       Call PlayerMsg(index, "Thank You For Wishing!", 6)
                       C = 1
                    End if   
                Loop
            End If
            Exit Sub
        End If

        If LCase(Mid(TextSay, 1, 9)) = "/warpmeto" Then
            If Len(TextSay) > 10 Then
                TextSay = Mid(TextSay, 10, Len(TextSay) - 9)
               
                ' Prevent hacking
                If GetPlayerAccess(index) < 2 Then
                    Call PlayerMsg(index, "You need be of a higher access to use this command!", 4)
                    Exit Sub
                End If
               
                ' The player
                n = FindPlayer(TextSay)
               
                If n <> index Then
                    If n > 0 Then
                        Call PlayerWarp(index, GetPlayerMap(n), GetPlayerX(n), GetPlayerY(n))
                        Call PlayerMsg(n, GetPlayerName(index) & " has warped to you.", 6)
                        Call PlayerMsg(index, "You have been warped to " & GetPlayerName(n) & ".", 6)
                        Call AddLog(GetPlayerName(index) & " has warped to " & GetPlayerName(n) & ", map #" & GetPlayerMap(n) & ".", ADMIN_LOG)
                    Else
                        Call PlayerMsg(index, "Player is not online.", 15)
                    End If
                Else
                    Call PlayerMsg(index, "You cannot warp to yourself!", 15)
                End If
            End If
            Exit Sub
        End If

        If LCase(Mid(TextSay, 1, 9)) = "/warptome" Then
            If Len(TextSay) > 10 Then
                If GetPlayerAccess(index) < 2 Then
                    Call PlayerMsg(index, "You need be of a higher access to use this command!", 4)
                    Exit Sub
                End If
                   
                n = Mid(TextSay, 10, Len(TextSay) - 9)
                n = FindPlayer(n)
               
                If n <> index Then
                    If n > 0 Then
                        Call PlayerWarp(n, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index))
                        Call PlayerMsg(n, "You have been summoned by " & GetPlayerName(index) & ".", 9)
                        Call PlayerMsg(index, GetPlayerName(n) & " has been summoned.", 9)
                        Call AddLog(GetPlayerName(index) & " has warped " & GetPlayerName(n) & " to self, map #" & GetPlayerMap(index) & ".", ADMIN_LOG)
                    Else
                        Call PlayerMsg(index, "Player is not online.", 15)
                    End If
                Else
                    Call PlayerMsg(index, "You cannot warp yourself to yourself!", 15)
                End If
            End If
            Exit Sub
        End If

        If LCase(Mid(TextSay, 1, 7)) = "/warpto" Then
            If Len(TextSay) > 8 Then
                TextSay = Mid(TextSay, 8, Len(TextSay) - 7)
                n = TextSay

                If n > 0 And n <= m Then
                    If GetPlayerAccess(index) < 2 Then
                        Call PlayerMsg(index, "You need be of a higher access to use this command!", 4)
                        Exit Sub
                    End If
                    Call SpellAnim(2, GetPlayerMap(index), GetPlayerX(index)+1, GetPlayerY(index)-1)
                    Call PlayerWarp(index, n, GetPlayerX(index), GetPlayerY(index))
                    Call SpellAnim(1, GetPlayerMap(index), GetPlayerX(index)+1, GetPlayerY(index)-1)
                    Call PlayerMsg(index, "You have been warped to map #" & n, 9)
                    Call AddLog(GetPlayerName(index) & " warped to map #" & n & ".", ADMIN_LOG)
                Else
                    Call PlayerMsg(index, "Invalid map number.", 4)
                End If
            End If
            Exit Sub
        End If
       
        If LCase(Trim(TextSay)) = "/help" Then
            Call PlayerMsg(index, "Social Commands:", 15)
            Call PlayerMsg(index, "'msghere = Broadcast Message", 15)
            Call PlayerMsg(index, "-msghere = Emote Message", 15)
            Call PlayerMsg(index, "!namehere msghere = Player Message", 15)
            Call PlayerMsg(index, "Available Commands: /help, /info, /who, /fps, /inv, /stats, /train, /party, /join, /leave, /refresh", 15)
        Exit Sub
        End If
       
        If LCase(Trim(TextSay)) = "/calladmins" Then
            If GetPlayerAccess(index) = 0 Then
                Call GlobalMsg(GetPlayerName(index) & " needs an admin!", 10)
            Else
                Call PlayerMsg(index, "You are an admin!", 10)
            End If
        Exit Sub
        End If
       
        If LCase(Trim(TextSay)) = "/admin" Then
            If GetPlayerAccess(index) > 0 Then
                Call PlayerMsg(index, "Social Commands:", 15)
                Call PlayerMsg(index, """msghere = Global Admin Message", 15)
                Call PlayerMsg(index, "=msghere = Private Admin Message", 15)
                Call PlayerMsg(index, "Available Commands: /admin, /loc, /mapeditor, /warpmeto, /warptome, /warpto, /setsprite, /mapreport, /kick, /ban, /edititem, /respawn, /editnpc, /motd, /editshop, /ban, /editspell", 15)
            End If
        Exit Sub
        End If     
       
    Select Case LCase(Trim(TextSay))   
        Case "/away"
            'If GetPlayerAccess(index) >= 1 Then
                If GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status") = 0 Then
                    Call GlobalMsg(GetPlayerName(index) & " is now away.", 14)
                    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status", 1)
                    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "TempPlayerName", GetPlayerName(index))
                    Call SetPlayerName(index, GetPlayerName(index) & " - Away")
                    Call SendPlayerData(index)
                    Exit Sub
                ElseIf GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status") = 1 Then
                    Call SetPlayerName(index, GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "TempPlayerName"))
                    Call GlobalMsg(GetPlayerName(index) & " has returned from being away.", 14)
                    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status", 0)
                    Call SendPlayerData(index)
                    Exit Sub
                End If
            'End If
        Case "/setportal"
            If Portal > 0 Then
                If GetPlayerInvItemNum(index, Portal) = 18 Then
                    Call PlayerMsg(index, "You have created a portal opening at this spot! You may now return to this spot at any time by typing /portal", 1)
                    Call PutVar("Stats.ini", GetPlayerName(index), "map", GetPlayerMap(index))
                    Call PutVar("Stats.ini", GetPlayerName(index), "x", GetPlayerX(index))
                    Call PutVar("Stats.ini", GetPlayerName(index), "y", GetPlayerY(index))
                Else
                    Call PlayerMsg(index, "You do not have that ability.", 4)
                End If
                Exit Sub
            End If
        Case "/portal"
            If Portal > 0 Then
            mapnum = GetVar("Stats.ini", GetPlayerName(index), "map")
            y = GetVar("Stats.ini", GetPlayerName(index), "y")
            x = GetVar("Stats.ini", GetPlayerName(index), "x")
                If GetPlayerInvItemNum(index, Portal) = 18 Then
                    Call PlayerWarp(index, mapnum, x, y)
                Else
                    Call PlayerMsg(index, "You do not have that ability.", 4)
                End If
                Exit Sub
            End If
        Case "/bell"
    Call SetTile(1,3,11,1,1,1,8)
            Call GlobalMsg("*dingy* *diny* *ding*", 7)
    Call SendMap(1)
            Exit Sub
        Case "/killall"
    Call SpellAnim(1,1,1,6)
            Exit Sub
        Case "/blah"
    Call PlayerMsg(index, GetTileX(1,0,16,8), 15)
    Call PlayerMsg(index, GetTileY(1,0,16,8), 15)
    Call PlayerMsg(index, GetTileSet(1,0,16,8), 15)
        Case "/block"
    Call SetAttribute(1,GetPlayerX(index),GetPlayerY(index),1,0,0,0,"","","")
        Case "/bleh"
    Call PlayerQueryBox(index, "Hello?", 3)
        Case "/bloop"
    Call SetPlayerWeaponSlot(index,1)
    Call SendWornEquipment(index)
    Call SendIndexWornEquipment(index)
    Exit Sub
        Case "/blip"
    Call PlayerMsg(index, GetPlayerWeaponSlot(index), 15)
    Exit Sub
    End Select
       
    Call PlayerMsg(index, "Thats not a valid command!", 12)
    End Sub

    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

    Sub OnDeath(index)
    Dim mapnum
    Dim x
    Dim y
    Dim I
    I = GetPlayerClass(index)

    mapnum = GetVar("Classes\Class" & I & ".ini", "CLASS", "Map")
    y = GetVar("Classes\Class" & I & ".ini", "CLASS", "y")
    x = GetVar("Classes\Class" & I & ".ini", "CLASS", "x")

    Call PlayerWarp(index, mapnum, x, y)
    End Sub

    Sub SetBlock(map, X, Y)
    Call SetAttribute(map,X,Y,1,0,0,0,"","","")
    End Sub

    Sub SetWarp(map, X, Y, warpmap, warpx, warpy)
    Call SetAttribute(map,X,Y,2,warpmap,warpx,warpy,"","","")
    End Sub

    Sub SetHeal(map, X, Y)
    Call SetAttribute(map,X,Y,7,0,0,0,"","","")
    End Sub

    Sub SetKill(map, X, Y)
    Call SetAttribute(map,X,Y,8,0,0,0,"","","")
    End Sub

    Sub SetItem(map, X, Y, item, value)
    Call SetAttribute(map,X,Y,3,item,value,0,"","","")
    End Sub

    Sub SetNPCAvoid(map, X, Y)
    Call SetAttribute(map,X,Y,4,0,0,0,"","","")
    End Sub

    Sub SetKey(map, X, Y, key, take)
    Call SetAttribute(map,X,Y,5,key,take,0,"","","")
    End Sub

    Sub SetKeyOpen(map, X, Y, keyx, keyy, message)
    Call SetAttribute(map,X,Y,6,keyx,keyy,0,message,"","")
    End Sub

    Sub SetShop(map, X, Y,shop)
    Call SetAttribute(map,X,Y,9,shop,0,0,"","","")
    End Sub

    Sub SetClassBlock(map, X, Y,allow1,allow2,allow3)
    Call SetAttribute(map,X,Y,10,allow,allow2,allow3,"","","")
    End Sub

    Sub SetArena(map, X, Y,amap,ax,ay)
    Call SetAttribute(map,X,Y,11,amap,ax,ay,"","","")
    End Sub

    Sub SetSound(map, X, Y,filename)
    Call SetAttribute(map,X,Y,12,0,0,0,filename,"","")
    End Sub

    Sub SetSpriteChange(map, X, Y,sprite,item,cost)
    Call SetAttribute(map,X,Y,13,sprite,item,cost,"","","")
    End Sub

    Sub SetSign(map, X, Y,line1,line2,line3)
    Call SetAttribute(map,X,Y,14,0,0,0,line1,line2,line3)
    End Sub

    Sub SetDoor(map, X, Y)
    Call SetAttribute(map,X,Y,15,0,0,0,"","","")
    End Sub

    Sub SetNotice(map, X, Y, title, text, filename)
    Call SetAttribute(map,X,Y,16,0,0,0,title,text,filename)
    End Sub

    Sub SetChest(map, X, Y)
    Call SetAttribute(map,X,Y,17,0,0,0,"","","")
    End Sub

    Sub SetScripted(map, X, Y, script)
    Call SetAttribute(map,X,Y,18,script,0,0,"","","")
    End Sub

    Sub SetBank(map, X, Y)
    Call SetAttribute(map,X,Y,23,0,0,0,"","","")
    End Sub

    Sub SetHouse(map, X, Y,item,cost)
    Call SetAttribute(map,X,Y,21,item,cost,0,"","","")
    End Sub

    '********************************
    Sub Give_Item(index, number, durability)
    '********************************

    Dim slot

    slot = 1
    Do While slot < 25
    If Getplayerinvitemnum( index, Int( slot ) ) = 0 Then
    Call SetPlayerInvItemNum(index, Int( slot ), Int( number ) )
    Call SetPlayerInvItemDur(index, Int( slot ), Int( durability ) )
    Call SetPlayerInvItemValue(index, Int( slot ), Int(0) )
    Call SendInventoryUpdate(index, Int(slot) )
    slot = 25
    End If
    slot = slot + 1
    Loop
    End Sub

    Here's my Class0.ini
    Code: [Select]
    [CLASS]
    Name= Salvager
    MaleSprite= 0
    FemaleSprite= 1
    STR= 12
    DEF= 5
    SPEED= 3
    MAGI= 0
    MAP= 1
    X= 9
    Y= 0
    Locked= 0

    [CLASSCHANGE]
    AddStr= 0
    AddDef= 0
    AddSpeed= 0
    AddMagi= 0

    [StartUp]
    Legs=2
    Weapon=0
    Armor=3
    Shield=0
    Helmet=4
    Legsdur=0
    Wepdur=0
    Armdur=0
    Shldur=0
    Hlmdur=0

    [SKILLS]
    Skill1= 0
    Skill2= 0
    Skill3= 0
    Skill4= 0
    Skill5= 0
    Skill6= 0
    Skill7= 0
    Skill8= 0
    Skill9= 0
    Skill10= 0
    Skill11= 0
    Skill12= 0
    Skill13= 0
    Skill14= 0
    Skill15= 0
    Skill16= 0
    Skill18= 0
    Skill19= 0
    Skill20= 0
    Skill21= 0
    Skill22= 0
    Skill23= 0
    Skill24= 0
    Skill25= 0
    Skill26= 0
    Skill27= 0
    Skill28= 0
    Skill29= 0
    Skill30= 0
    « Last Edit: January 27, 2008, 09:28:32 AM by Eviltyphoon » Logged



    "Humans are beautiful, but humanity is not."

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