Eclipse
January 05, 2009, 08:37:47 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Chat Help Rules Arcade Search Calendar Gallery Login Register  
 
 
 
Recent Topics +-
Makai Realms by ʇıunpp ʎqɹıʞ࣭
Today at 08:37:01 PM

Disparity Recruiting by Ninja-Tech
Today at 08:36:45 PM

[$$] Paying Paypal - GFX artists [$$] by Baron
Today at 08:36:28 PM

The New Eclipse Raid on Runscape by The Tribal
Today at 08:33:34 PM

SnowCap by Baron
Today at 08:33:04 PM

THE Cult by The Tribal
Today at 08:27:46 PM

Server Status by westin444
Today at 08:27:23 PM

Dreadlord Online v1.2 Beta - Need Moderators and Trustworthy Mappers! by thingyguy
Today at 08:26:47 PM

Request SVN/GIT by The Tribal
Today at 08:20:31 PM

Sig please :) by Kreator
Today at 08:16:38 PM

Members Online +-
12 Guests, 21 Users
Peter,
Kainan54,
Amperglyph,
ʇıunpp ʎqɹıʞ࣭,
RamBONE,
Baron,
Airscar,
westin444,
Ninja-Tech,
kira423,
‪‫‬‭‮‪‫‬‭The Admiral,
The Roujo,
thingyguy,
The Tribal,
softbagel14,
Almighty Wing,
l0lz!,
Niko,
Kreator,
Devogen,
skevsama
Pages: [1]
  Print  
Author Topic: Chest script(fully editable with no access to server)  (Read 1568 times)
0 Members and 1 Guest are viewing this topic.
Brutal - Zeldo
Ex-Eclipse Programmer
Global Moderator
Active Member
*
Offline Offline

Posts: 324

Pie


View Profile Email
« on: July 12, 2006, 03:30:44 AM »

Difficuly unknown/5 (someone tell me and ill change :p)

By: Brutal(with some help of baron if hes doesent mind i left in his credits)

Chest Script that allows you to have 5 chest * how ever many maps you have while only useing 5 scripted tiles
and is compleately editable from the client(you need no access to server files)

Ok First add this at the bottom of you Main.txt

Code: [Select]

Sub make_chestini(index)
On Error Resume next
Dim chest__num
Dim chest__numb
Dim new_chest_max
Dim make_amount_chests

chest__num = GetVar("Chests.ini " , "DATA"  , "Amountmade")
make_amount_chests = Int(GetVar("Chests.ini " , "DATA"  , "makeamount"))

If chest__num = 0 Then
chest__num = 1
Call PutVar("Chests.ini " , "DATA" , "Editingchestnum", Int(0))
Call PutVar("Chests.ini " , "DATA" , "whatedited", Int(0))
Do While chest__num <= make_amount_chests
Call PutVar("Chests.ini " , "CHEST" & chest__num , "stackable", "")
Call PutVar("Chests.ini " , "CHEST" & chest__num , "itemnum", "")
Call PutVar("Chests.ini " , "CHEST" & chest__num , "itemamount", "")
Call PutVar("Chests.ini " , "CHEST" & chest__num , "message", "")
chest__num = chest__num+1
LOOP
Call PutVar("Chests.ini " , "DATA" , "Amountmade", Int(make_amount_chests))

ElseIf chest__num > 0 Then
new_chest_max = chest__num+make_amount_chests
chest__num = chest__num+1
Do While chest__num <= new_chest_max
Call PutVar("Chests.ini " , "CHEST" & chest__num , "stackable", "")
Call PutVar("Chests.ini " , "CHEST" & chest__num , "itemnum", "")
Call PutVar("Chests.ini " , "CHEST" & chest__num , "itemamount", "")
chest__num = chest__num+1
LOOP
Call PutVar("Chests.ini " , "DATA" , "Amountmade", Int(new_chest_max))
End If
End Sub

'******************************************
Sub chest_1_sub(index)'                   *
'By Brutal(with a little of barons script)*
'******************************************
On Error Resume next
Dim chest_num
Dim done_chest_check
Dim item_num
Dim item_amount
Dim stackablea

If Int(GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST1","has_data")) < 0 Then
Call Putvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST1","number", 0)
Call Putvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST1","has_data", 1)
Call Playermsg(index, "Made Chest1 template for map", 14)
Call Playermsg(index, "Credits go to Brutal & Baron(mostly Baron on the template makeing part :P) - http://barony.deviantart.com/", 14)

ElseIf Int(GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST1","has_data")) = 1 Then
Call Playermsg(index, "You Must First Type /mapchest1 on this map and follow instructions to use this chest", 14)

ElseIf Int(GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST1","has_data")) = 2 Then

chest_num = Getvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST1","number")
done_chest_check = GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHEST" & GetPlayerCharNum(Index) , "Chest" & chest_num)
item_num = Int(GetVar("Chests.ini " , "CHEST" & chest_num , "itemnum"))
item_amount = Int(GetVar("Chests.ini " , "CHEST" & chest_num , "itemamount"))
stackablea = GetVar("Chests.ini " , "CHEST" & chest_num , "stackable")
chest_1_message = GetVar("Chests.ini " , "CHEST" & chest_num , "message")

    If done_chest_check = 0 Then
    Call PlayerMsg(index, chest_1_message, 2)
    Call GiveItemb(index, item_num, item_amount, stackablea)
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHEST" & GetPlayerCharNum(Index) , "Chest" & chest_num , 1)
    ElseIf done_chest_check = 1 Then
    Call PlayerMsg(index, "Its Empty.", 2)
    End If
End If
End Sub

'******************************************
Sub chest_2_sub(index)'                   *
'By Brutal(with a little of barons script)*
'******************************************
On Error Resume next
Dim chest_num2
Dim done_chest_check2
Dim item_num2
Dim item_amount2
Dim stackablea2

If Int(GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST2","has_data")) < 0 Then
Call Putvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST2","number", 0)
Call Putvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST2","has_data", 1)
Call Playermsg(index, "Made Chest2 template for map", 14)
Call Playermsg(index, "Credits go to Brutal & Baron(mostly Baron on the template makeing part :P) - http://barony.deviantart.com/", 14)

ElseIf Int(GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST2","has_data")) = 1 Then
Call Playermsg(index, "You Must First Type /mapchest2 on this map and follow instructions to use this chest", 14)

ElseIf Int(GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST2","has_data")) = 2 Then

chest_num2 = Getvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST2","number")
done_chest_check2 = GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHEST" & GetPlayerCharNum(Index) , "Chest" & chest_num2)
item_num2 = Int(GetVar("Chests.ini " , "CHEST" & chest_num2 , "itemnum"))
item_amount2 = Int(GetVar("Chests.ini " , "CHEST" & chest_num2 , "itemamount"))
stackablea2 = GetVar("Chests.ini " , "CHEST" & chest_num2 , "stackable")
chest_2_message = GetVar("Chests.ini " , "CHEST" & chest_num2 , "message")

    If done_chest_check2 = 0 Then
    Call PlayerMsg(index, chest_2_message, 2)
    Call GiveItemb(index, item_num2, item_amount2, stackablea2)
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHEST" & GetPlayerCharNum(Index) , "Chest" & chest_num2 , 1)
    ElseIf done_chest_check2 = 1 Then
    Call PlayerMsg(index, "Its Empty.", 2)
    End If
End If
End Sub

'******************************************
Sub chest_3_sub(index)'                   *
'By Brutal(with a little of barons script)*
'******************************************
On Error Resume next
Dim chest_num3
Dim done_chest_check3
Dim item_num3
Dim item_amount3
Dim stackablea3

If Int(GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST3","has_data")) < 0 Then
Call Putvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST3","number", 0)
Call Putvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST3","has_data", 1)
Call Playermsg(index, "Made Chest3 template for map", 14)
Call Playermsg(index, "Credits go to Brutal & Baron(mostly Baron on the template makeing part :P) - http://barony.deviantart.com/", 14)

ElseIf Int(GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST3","has_data")) = 1 Then
Call Playermsg(index, "You Must First Type /mapchest3 on this map and follow instructions to use this chest", 14)

ElseIf Int(GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST3","has_data")) = 2 Then

chest_num3 = Getvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST3","number")
done_chest_check3 = GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHEST" & GetPlayerCharNum(Index) , "Chest" & chest_num3)
item_num3 = Int(GetVar("Chests.ini " , "CHEST" & chest_num3 , "itemnum"))
item_amount3 = Int(GetVar("Chests.ini " , "CHEST" & chest_num3 , "itemamount"))
stackablea3 = GetVar("Chests.ini " , "CHEST" & chest_num3 , "stackable")
chest_3_message = GetVar("Chests.ini " , "CHEST" & chest_num3 , "message")

    If done_chest_check3 = 0 Then
    Call PlayerMsg(index, chest_3_message, 2)
    Call GiveItemb(index, item_num3, item_amount3, stackablea3)
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHEST" & GetPlayerCharNum(Index) , "Chest" & chest_num3 , 1)
    ElseIf done_chest_check3 = 1 Then
    Call PlayerMsg(index, "Its Empty.", 2)
    End If
End If
End Sub

'******************************************
Sub chest_4_sub(index)'                   *
'By Brutal(with a little of barons script)*
'******************************************
On Error Resume next
Dim chest_num4
Dim done_chest_check4
Dim item_num4
Dim item_amount4
Dim stackablea4

If Int(GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST4","has_data")) < 0 Then
Call Putvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST4","number", 0)
Call Putvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST4","has_data", 1)
Call Playermsg(index, "Made Chest4 template for map", 14)
Call Playermsg(index, "Credits go to Brutal & Baron(mostly Baron on the template makeing part :P) - http://barony.deviantart.com/", 14)

ElseIf Int(GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST4","has_data")) = 1 Then
Call Playermsg(index, "You Must First Type /mapchest4 on this map and follow instructions to use this chest", 14)

ElseIf Int(GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST4","has_data")) = 2 Then

chest_num4 = Getvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST4","number")
done_chest_check4 = GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHEST" & GetPlayerCharNum(Index) , "Chest" & chest_num4)
item_num4 = Int(GetVar("Chests.ini " , "CHEST" & chest_num4 , "itemnum"))
item_amount4 = Int(GetVar("Chests.ini " , "CHEST" & chest_num4 , "itemamount"))
stackablea4 = GetVar("Chests.ini " , "CHEST" & chest_num4 , "stackable")
chest_4_message = GetVar("Chests.ini " , "CHEST" & chest_num4 , "message")

    If done_chest_check4 = 0 Then
    Call PlayerMsg(index, chest_4_message, 2)
    Call GiveItemb(index, item_num4, item_amount4, stackablea4)
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHEST" & GetPlayerCharNum(Index) , "Chest" & chest_num4 , 1)
    ElseIf done_chest_check4 = 1 Then
    Call PlayerMsg(index, "Its Empty.", 2)
    End If
End If
End Sub

'******************************************
Sub chest_5_sub(index)'                   *
'By Brutal(with a little of barons script)*
'******************************************
On Error Resume next
Dim chest_num5
Dim done_chest_check5
Dim item_num5
Dim item_amount5
Dim stackablea5

If Int(GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST5","has_data")) < 0 Then
Call Putvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST5","number", 0)
Call Putvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST5","has_data", 1)
Call Playermsg(index, "Made Chest5 template for map", 15)
Call Playermsg(index, "Credits go to Brutal & Baron(mostly Baron on the template makeing part :P) - http://barony.deviantart.com/", 14)

ElseIf Int(GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST5","has_data")) = 1 Then
Call Playermsg(index, "You Must First Type /mapchest5 on this map and follow instructions to use this chest", 14)

ElseIf Int(GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST5","has_data")) = 2 Then

chest_num5 = Getvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST5","number")
done_chest_check5 = GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHEST" & GetPlayerCharNum(Index) , "Chest" & chest_num5)
item_num5 = Int(GetVar("Chests.ini " , "CHEST" & chest_num5 , "itemnum"))
item_amount5 = Int(GetVar("Chests.ini " , "CHEST" & chest_num5 , "itemamount"))
stackablea5 = GetVar("Chests.ini " , "CHEST" & chest_num5 , "stackable")
chest_5_message = GetVar("Chests.ini " , "CHEST" & chest_num5 , "message")

    If done_chest_check5 = 0 Then
    Call PlayerMsg(index, chest_5_message, 2)
    Call GiveItemb(index, item_num5, item_amount5, stackablea5)
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHEST" & GetPlayerCharNum(Index) , "Chest" & chest_num5 , 1)
    ElseIf done_chest_check5 = 1 Then
    Call PlayerMsg(index, "Its Empty.", 2)
    End If
End If
End Sub




Sub GiveItemb(index, item, value, gjshjr)
If gjshjr = 1 Then
SLOT = 1
Do While SLOT < 24
If GetPlayerInvItemNum(index, SLOT) = 0 Then
Call SetPlayerInvItemNum(index, SLOT, item)
Call SetPlayerInvItemValue(index, SLOT, GetPlayerInvItemValue(index, SLOT)+value)
Call SendInventoryUpdate(index, SLOT)
SLOT = 24
ElseIf GetPlayerInvItemNum(index, SLOT) = item Then
Call SetPlayerInvItemNum(index, SLOT, item)
Call SetPlayerInvItemValue(index, SLOT, GetPlayerInvItemValue(index, SLOT)+value)
Call SendInventoryUpdate(index, SLOT)
SLOT = 24
End If
SLOT = SLOT+1
Loop
ElseIf gjshjr = 0 Then
SLOT = 1
Do While SLOT < 24
If GetPlayerInvItemNum(index, SLOT) = 0 Then
Call SetPlayerInvItemNum(index, SLOT, item)
Call SetPlayerInvItemValue(index, SLOT, GetPlayerInvItemValue(index, SLOT)+value)
Call SendInventoryUpdate(index, SLOT)
SLOT = 24
End If
SLOT = SLOT+1
Loop
Else
Call PlayerMsg(index, "hi", 8)
End If
End Sub



Then Find This
Code: [Select]
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


And Add this under it

Code: [Select]
   If LCase(Mid(TextSay, 1, 9)) = "/mapchest" Then
If Len(TextSay) >= 9 Then
If GetPlayerAccess(index) > 0 Then
On Error Resume next
Dim edit_chest_num
Dim chest_temp
chest_temp = Mid(TextSay, 10, Len(TextSay) - 9)
edit_chest_num = Getvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHESTDATA","editing")
  n = Mid(TextSay, 10, Len(TextSay) - 9)
If n > 0 Then
If edit_chest_num = 0 Then
        Call Putvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHESTDATA","editing", Int(chest_temp))
Call Playermsg(index, "You Will now edit chest" & chest_temp & "'s chest number for this map type /mapchest(chest number you want it to be)", 14)
ElseIf edit_chest_num > 0 Then
Call Putvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST" & edit_chest_num,"number", chest_temp)
Call Putvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHEST" & edit_chest_num,"has_data", 2)
Call Putvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "CHESTDATA","editing", 0)
Call PlayerMsg(index, "You Edited Chest" & edit_chest_num & "'s number to " & chest_temp, 15)
        End If
Else
        Call PlayerMsg(index, "Format:/mapchest~chest number you want to edit on this map(one of the five)(without the ~'s) then follow instructions", 4)
        End If
Else
        Call PlayerMsg(index, "You Need Higher Access To use this command!", 4)
End If
End If
Exit Sub
End If



    If LCase(Mid(TextSay, 1, 10)) = "/editchest" Then
If Len(TextSay) >= 10 Then
If GetPlayerAccess(index) > 0 Then
Dim uuuuu
        Dim ecn
Dim we
ecn = GetVar("Chests.ini", "DATA", "Editingchestnum")
we = GetVar("Chests.ini", "DATA", "whatedited")
n = Mid(TextSay, 11, Len(TextSay) - 10)
If n > 0 Then
If ecn = 0 Then
Call PutVar("Chests.ini", "DATA", "Editingchestnum", Mid(TextSay, 11, Len(TextSay) - 10))
Call PlayerMsg(index, "Now Type /editchest1 to edit the stackable , /editchest2 to edit the itemnum or /editchest3 to edit the itemamount or /editchest4 to edit the message sent upon chest open", 15)
ElseIf ecn > 0 Then
  ecn = GetVar("Chests.ini", "DATA", "Editingchestnum")

If GetVar("Chests.ini", "DATA", "whatedited") = 3 Then
Call PutVar("Chests.ini", "CHEST" & ecn, "itemamount", Mid(TextSay, 11, Len(TextSay) - 10))
Call PlayerMsg(index, "You Edited Chest" & ecn & "'s item amount to " & Mid(TextSay, 11, Len(TextSay) - 10), 15)
Call PutVar("Chests.ini", "DATA", "Editingchestnum", 0)
Call PutVar("Chests.ini", "DATA", "whatedited", 0)
ElseIf GetVar("Chests.ini", "DATA", "whatedited") = 2 Then
Call PutVar("Chests.ini", "CHEST" & ecn, "itemnum", Mid(TextSay, 11, Len(TextSay) - 10))
Call PlayerMsg(index, "You Edited Chest" & ecn & "'s item number to " & Mid(TextSay, 11, Len(TextSay) - 10), 15)
Call PutVar("Chests.ini", "DATA", "Editingchestnum", 0)
Call PutVar("Chests.ini", "DATA", "whatedited", 0)
ElseIf GetVar("Chests.ini", "DATA", "whatedited") = 1 Then
uuuuu = Mid(TextSay, 11, Len(TextSay) - 10)
If uuuuu = 1 Then
Call PutVar("Chests.ini", "CHEST" & ecn, "stackable", Mid(TextSay, 11, Len(TextSay) - 10))
Call PlayerMsg(index, "You Edited Chest" & ecn & "'s stackable to Yes", 15)
Call PutVar("Chests.ini", "DATA", "Editingchestnum", 0)
Call PutVar("Chests.ini", "DATA", "whatedited", 0)
ElseIf uuuuu = 0 Then
Call PutVar("Chests.ini", "CHEST" & ecn, "stackable", Mid(TextSay, 11, Len(TextSay) - 10))
Call PlayerMsg(index, "You Edited Chest" & ecn & "'s stackable to No", 15)
Call PutVar("Chests.ini", "DATA", "Editingchestnum", 0)
Call PutVar("Chests.ini", "DATA", "whatedited", 0)
Else
Call PlayerMsg(index, "You Must Enter /editchest0 or /editchest1 in this position", 5)
End If
ElseIf GetVar("Chests.ini", "DATA", "whatedited") = 0 Then
If Mid(TextSay, 11, Len(TextSay) - 10) < 5 Then
Call PutVar("Chests.ini", "DATA", "whatedited", Mid(TextSay, 11, Len(TextSay) - 10))
Call PlayerMsg(index, "Now type /editchest ~what you want the value to be(without the ~'s)(stackable: 0=no 1=yes)~", 15)
Else
Call PlayerMsg(index, "The Options are /editchest1 to edit the stackable , /editchest2 to edit the itemnum or /editchest3 to edit the itemamount /editchest4 to edit the message - You Said /editchest" & Mid(TextSay, 11, Len(TextSay) - 10), 15)
End If
ElseIf GetVar("Chests.ini", "DATA", "whatedited") = 4 Then
Call PutVar("Chests.ini", "CHEST" & ecn, "message", Mid(TextSay, 11, Len(TextSay) - 10))
Call PlayerMsg(index, "You Edited Chest" & ecn & "'s message to " & Mid(TextSay, 11, Len(TextSay) - 10), 15)
Call PutVar("Chests.ini", "DATA", "Editingchestnum", 0)
Call PutVar("Chests.ini", "DATA", "whatedited", 0)
Else
Call PlayerMsg(index, "The Options are /editchest1 to edit the stackable , /editchest2 to edit the itemnum or /editchest3 to edit the itemamount /editchest4 to edit the message", 15)
End If

  End If
Else
        Call PlayerMsg(index, "Format:/editchest~chest number you want to edit(without the ~'s) then follow instructions~", 4)
        End If
Else
        Call PlayerMsg(index, "You Need Higher Access To use this command", 4)
End If
End If
Exit Sub
End If

    If LCase(Mid(TextSay, 1, 9)) = "/chestini" Then
If Len(TextSay) >= 9 Then
If GetPlayerAccess(index) > 0 Then
n = Mid(TextSay, 10, Len(TextSay) - 9)
            If n > 0 Then
If n < 101 Then
   Call PutVar("Chests.ini", "DATA", "makeamount", Mid(TextSay, 10, Len(TextSay) - 9))
            n = GetVar("Chests.ini", "DATA", "makeamount")
If n < 101 Then
Call make_chestini(index)
Call PlayerMsg(index, "Done - You made " & n & " to make a grand total of " & Int(GetVar("Chests.ini " , "DATA"  , "Amountmade")), 15)
Else
Call PlayerMsg(index, "Format: /chestini ~number of new chest(max 100 at a time)~ (without the ~'s)", 15)
End If
            Else
   Call PlayerMsg(index, "Format: /chestini ~number of new chest(max 100 at a time)~ (without the ~'s)", 15)
   End If
Else
        Call PlayerMsg(index, "Format:/chest~amount of chest you want to make(without the ~'s)~", 4)
        End If
Else
        Call PlayerMsg(index, "you need higher access to use this command", 4)
End If
End If
Exit Sub
End If


then find this
Code: [Select]
Select Case LCase(Trim(TextSay))


and under it add this
Code: [Select]
Case "/chest"
If GetPlayerAccess(index) > 0 Then
On Error Resume next
Dim temptemp
Dim temptemptemp
temptemp = 1
Do While temptemp <= 1000
temptemptemp = GetVar("Chests.ini " , "CHEST" & temptemp , "itemnum")
If temptemptemp < 1 Then
Call PlayerMsg(index, "Chest" &temptemp, 2)
temptemp = 1001
ElseIf temptemptemp > 0 Then
temptemp = temptemp+1
End If
LOOP
End If
Exit Sub


Then Find this
Code: [Select]
'********************************
Sub ScriptedTile(index, Script)  
'********************************

Select Case Script


and add this
Code: [Select]
'<><><><><>
Case 0
Call chest_1_sub(index)
'<><><><><>
Case 1
Call chest_2_sub(index)
'<><><><><>
Case 2
Call chest_3_sub(index)
'<><><><><>
Case 3
Call chest_4_sub(index)
'<><><><><>
Case 4
Call chest_5_sub(index)


CHANGE CASES ACORDINGLY

AND THATS ALL :)

SORRY FOR ALL THE SPELLING ERRORS :P

Code is tested and does work

HOW TO USE:
first type /chestini0 and follow instructions. then lay down the scripted tiles on a map where u want the chest to be. Then walk on it. walk on it again and follow instructions. to edit whats in chest type /editchest0 and follow instructions and thats it (i hope these are understandable)

if not post here and ill try to help but this scripts even makes the .ini so i dont see how you could mess it up
jakeruston
Member
**
Offline Offline

Posts: 85


View Profile WWW Email
« Reply #1 on: July 12, 2006, 06:47:09 AM »

thanks for the great script, i'll try it out later!
Brutal - Zeldo
Ex-Eclipse Programmer
Global Moderator
Active Member
*
Offline Offline

Posts: 324

Pie


View Profile Email
« Reply #2 on: July 12, 2006, 06:56:42 AM »

kk tell me your results i want to make sure it works for everybody
Baron
Lord Of Spleens
Administrator
Teh Uberleet
*
Online Online

Posts: 2,737


Genesis CoCreator - Eclipse Evo Developer


View Profile WWW Email
« Reply #3 on: July 12, 2006, 12:25:06 PM »

Impressive effort, thanks for leaving the credit in :) I do appreciate it.
Brutal - Zeldo
Ex-Eclipse Programmer
Global Moderator
Active Member
*
Offline Offline

Posts: 324

Pie


View Profile Email
« Reply #4 on: July 12, 2006, 05:16:04 PM »

:P no problem i would hope that ppl did that for me even for a small part like that :)
Sakis
Member
**
Offline Offline

Posts: 86



View Profile WWW Email
« Reply #5 on: July 12, 2006, 07:58:52 PM »

well that is a great script man, easier for me to make items in chest and all now
Brutal - Zeldo
Ex-Eclipse Programmer
Global Moderator
Active Member
*
Offline Offline

Posts: 324

Pie


View Profile Email
« Reply #6 on: July 12, 2006, 08:01:43 PM »

:P i made it for mappers thathave no access to server files(all of them but one lol(if the server host maps lol)) i hope it helps it took a lot of hard work and time lots and lots of time...
Sakis
Member
**
Offline Offline

Posts: 86



View Profile WWW Email
« Reply #7 on: July 12, 2006, 08:22:11 PM »

well that is a sign of a true programmer and coder
ZanZan
Member
**
Offline Offline

Posts: 73


View Profile Email
« Reply #8 on: July 14, 2006, 01:15:41 PM »

Yea, you did a nice job =)
Brutal - Zeldo
Ex-Eclipse Programmer
Global Moderator
Active Member
*
Offline Offline

Posts: 324

Pie


View Profile Email
« Reply #9 on: July 14, 2006, 02:09:07 PM »

:P thanks
Cantinfla
Mid Scripter
Member
**
Offline Offline

Posts: 40



View Profile Email
« Reply #10 on: July 15, 2006, 09:13:20 AM »

Wow, nice script, works like a charm. :D
Brutal - Zeldo
Ex-Eclipse Programmer
Global Moderator
Active Member
*
Offline Offline

Posts: 324

Pie


View Profile Email
« Reply #11 on: July 15, 2006, 10:12:48 AM »

:P np i love to script  :shock:
Lee_Dragoon
Active Member
***
Offline Offline

Posts: 167



View Profile Email
« Reply #12 on: February 28, 2008, 10:04:28 PM »

none of my commands seem to be working at the moment.. maybe i copied something wrong, but can you post the full section of code, mine was previously uneditted, but i want to make a comparison between the two, see if i can get mine working... Awsome script tho.
Pages: [1]
  Print  
 
 

Powered by EzPortal
Powered by MySQL Powered by PHP Powered by SMF 2.0 Beta 4 | SMF © 2006–2008, Simple Machines LLC | Sitemap Valid XHTML 1.0! Valid CSS!
Page created in 0.463 seconds with 33 queries.