| December 24, 2006, 12:09:19 PM |
|
|
 |
|
|
The Scriptreplace Sub OnAttack(index) with: Sub OnAttack(index) Dim PX Dim PY Dim PM Dim check PX = GetPlayerX(index) PY = GetPlayerY(index) PM = GetPlayerMap(index) For check = 1 to 9999 If GetPlayerDir(index) = 1 And Int(PX + 1) = GetVar("xmas.ini", check, X) And PY = GetVar("xmas.ini", check, Y) And PM = GetVar("xmas.ini", check, MAP) And GetVar("xmas.ini", check, DIR) = "^" Then Call Playerwarp(index, PM, Int(PX + 2), PY) Call PlayerMsg(index, "You feel like you walked trough the door.", 12) Call PlaySound(index, "key.wav") Exit Sub End If If GetPlayerDir(index) = 3 And Int(PX - 1) = GetVar("xmas.ini", check, X) And PY = GetVar("xmas.ini", check, Y) And PM = GetVar("xmas.ini", check, MAP) And GetVar("xmas.ini", check, DIR) = "V" Then Call Playerwarp(index, PM, Int(PX - 2), PY) Call PlayerMsg(index, "You feel like you walked trough the door.", 12) Call PlaySound(index, "key.wav") Exit Sub End If If GetPlayerDir(index) = 2 And Int(PY + 1) = GetVar("xmas.ini", check, X) And PY = GetVar("xmas.ini", check, Y) And PM = GetVar("xmas.ini", check, MAP) And GetVar("xmas.ini", check, DIR) = ">" Then Call Playerwarp(index, PM, PX, Int(PY + 2)) Call PlayerMsg(index, "You feel like you walked trough the door.", 12) Call PlaySound(index, "key.wav") Exit Sub End If If GetPlayerDir(index) = 4 And Int(PX + 1) = GetVar("xmas.ini", check, X) And PY = GetVar("xmas.ini", check, Y) And PM = GetVar("xmas.ini", check, MAP) And GetVar("xmas.ini", check, DIR) = "<" Then Call Playerwarp(index, PM, PX, Int(PY - 2)) Call PlayerMsg(index, "You feel like you walked trough the door.", 12) Call PlaySound(index, "key.wav") Exit Sub End If Next Check End SubMake an ini called xmas.ini put the next into it you can always change the values and stuff  xmas.ini [1] X= Y= MAP= DIR= [2] X= Y= MAP= DIR= [3] X= Y= MAP= DIR= [4] X= Y= MAP= DIR= [CONFIG] [HOUSE] MAP= X= Y= [FACTORY] MAP= X= Y= [NEEDEDITEM1] Name= ItemNum= ItemVal= [NEEDEDITEM2] Name= ItemNum= ItemVal= [NEEDEDITEM3] Name= ItemNum= ItemVal= [NEEDEDITEM4] Name= ItemNum= ItemVal= [NEEDEDITEM5] Name= ItemNum= ItemVal= [NEEDEDITEM6] Name= ItemNum= ItemVal= [GETITEM] Num= Total= [LABYRINTH] MAP= X= Y= [EndSpawn] MAP= X= Y= [REWARD] Num= Val=Replace Sub ScriptedTile(index,script) with: Sub ScriptedTile(index, Script) Dim check Dim check2 Dim check3 Dim check4 Dim A Dim B Dim C Dim M Dim X Dim Y Dim N1 Dim N2 Dim N3 Dim N4 Dim N5 Dim N6 Dim G N1 = GetVar("xmas.ini", "NEEDEDITEM1", "NAME") ) N2 = GetVar("xmas.ini", "NEEDEDITEM2", "NAME") ) N3 = GetVar("xmas.ini", "NEEDEDITEM3", "NAME") ) N4 = GetVar("xmas.ini", "NEEDEDITEM4", "NAME") ) N5 = GetVar("xmas.ini", "NEEDEDITEM5", "NAME") ) N6 = GetVar("xmas.ini", "NEEDEDITEM6", "NAME") ) Select Case Script Case 0 For check = 1 to 17 If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM1", "ITEMNUM") And GetPlayerInvItemVal(index, check) = GetVar("xmas.ini", "NEEDEDITEM1", "ITEMVAL") Then A = check For check2 = 1 to 17 If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM2", "ITEMNUM") And GetPlayerInvItemVal(index, check) = GetVar("xmas.ini", "NEEDEDITEM2", "ITEMVAL") Then B = check2 For check3 = 1 to 17 If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM3", "ITEMNUM") And GetPlayerInvItemVal(index, check) = GetVar("xmas.ini", "NEEDEDITEM3", "ITEMVAL") Then C = check3 Call SetPlayerInvItemVal(index, A, Int(GetPlayerInvItemVal(index, A) - GetVar("xmas.ini", "NEEDEDITEM1", "ITEMVAL") ) Call SetPlayerInvItemVal(index, B, Int(GetPlayerInvItemVal(index, B) - GetVar("xmas.ini", "NEEDEDITEM2", "ITEMVAL") ) Call SetPlayerInvItemVal(index, C, Int(GetPlayerInvItemVal(index, C) - GetVar("xmas.ini", "NEEDEDITEM3", "ITEMVAL") ) M = GetVar("xmas.ini", "Labyrinth", "MAP") ) X = GetVar("xmas.ini", "Labyrinth", "X") ) Y = GetVar("xmas.ini", "Labyrinth", "Y") ) Call PlayerWarp(index, M, X, Y) Call PlayerMsg(index, "You stand up and see's that you are into a small room with 4 doors.", 12) Else Call PlayerMsg(index, "You don't have " & N3 & "." , 12) End If Next check3 Else Call PlayerMsg(index, "You don't have" & N2 & "." , 12) End If Next check2 Else Call PlayerMsg(index, "You don't have " & N1 & "." , 12) End If Next check Case 1 M = GetVar("xmas.ini", "Factory", "MAP") ) X = GetVar("xmas.ini", "Factory", "X") ) Y = GetVar("xmas.ini", "Factory", "Y") ) Call PlayerWarp(index, M, X, Y) Call PlaySound(index, "key.wav") Case 2 If GetVar("xmas.ini", "Accounts\" & GetPLayerLogin(index) & ".ini", "QUESTXMAS2006") = 1 Then M = GetVar("xmas.ini", "House", "MAP") ) X = GetVar("xmas.ini", "House", "X") ) Y = GetVar("xmas.ini", "House", "Y") ) Call PlayerWarp(index, M, X, Y) Call PlaySound(index, "key.wav") Case 3 For check = 1 to 17 For check2 = 1 to 17 If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM1", "ITEMNUM") And GetPlayerInvItemVal(index, Check) >= GetVar("xmas.ini", "NEEDEDITEM1", "ITEMNUM") Then Call PlayerMsg(index, "You can't find anything.", 12) Exit Sub Elseif GetPlayerInvItemNum(index, check2) = 0 Then Call SetPlayerInvItemNum(index, check2, GetVar("xmas.ini", "NEEDEDITEM1", "ITEMNUM") ) Call SetPlayerInvItemVal(index, check2, int(GetPlayerInvItemVal(index,check) + GetVar("xmas.ini", "NEEDEDITEM1", "ITEMVAL") ) ) Call PlayerMsg(index, "You founded a " & N1 , 12) End If Next check2 Next check Case 4 For check = 1 to 17 For check2 = 1 to 17 If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM2", "ITEMNUM") And GetPlayerInvItemVal(index, Check) >= GetVar("xmas.ini", "NEEDEDITEM2", "ITEMNUM") Then Call PlayerMsg(index, "You can't find anything.", 12) Exit Sub Elseif GetPlayerInvItemNum(index, check2) = 0 Then Call SetPlayerInvItemNum(index, check2, GetVar("xmas.ini", "NEEDEDITEM2", "ITEMNUM") ) Call SetPlayerInvItemVal(index, check2, int(GetPlayerInvItemVal(index,check) + GetVar("xmas.ini", "NEEDEDITEM2", "ITEMVAL") ) ) Call PlayerMsg(index, "You founded a " & N2 , 12) End If Next check2 Next check Case 5 For check = 1 to 17 For check2 = 1 to 17 If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM3", "ITEMNUM") And GetPlayerInvItemVal(index, Check) >= GetVar("xmas.ini", "NEEDEDITEM3", "ITEMNUM") Then Call PlayerMsg(index, "You can't find anything.", 12) Exit Sub Elseif GetPlayerInvItemNum(index, check2) = 0 Then Call SetPlayerInvItemNum(index, check2, GetVar("xmas.ini", "NEEDEDITEM3", "ITEMNUM") ) Call SetPlayerInvItemVal(index, check2, int(GetPlayerInvItemVal(index,check) + GetVar("xmas.ini", "NEEDEDITEM3", "ITEMVAL") ) ) Call PlayerMsg(index, "You founded a " & N3 , 12) End If Next check2 Next check Case 6 For check = 1 to 17 For check2 = 1 to 17 If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM4", "ITEMNUM") And GetPlayerInvItemVal(index, Check) >= GetVar("xmas.ini", "NEEDEDITEM4", "ITEMNUM") Then Call PlayerMsg(index, "You can't find anything.", 12) Exit Sub Elseif GetPlayerInvItemNum(index, check2) = 0 Then Call SetPlayerInvItemNum(index, check2, GetVar("xmas.ini", "NEEDEDITEM4", "ITEMNUM") ) Call SetPlayerInvItemVal(index, check2, int(GetPlayerInvItemVal(index,check) + GetVar("xmas.ini", "NEEDEDITEM4", "ITEMVAL") ) ) Call PlayerMsg(index, "You founded a " & N4 , 12) End If Next check2 Next check Case 7 For check = 1 to 17 For check2 = 1 to 17 If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM5", "ITEMNUM") And GetPlayerInvItemVal(index, Check) >= GetVar("xmas.ini", "NEEDEDITEM5", "ITEMNUM") Then Call PlayerMsg(index, "You can't find anything.", 12) Exit Sub Elseif GetPlayerInvItemNum(index, check2) = 0 Then Call SetPlayerInvItemNum(index, check2, GetVar("xmas.ini", "NEEDEDITEM5", "ITEMNUM") ) Call SetPlayerInvItemVal(index, check2, int(GetPlayerInvItemVal(index,check) + GetVar("xmas.ini", "NEEDEDITEM5", "ITEMVAL") ) ) Call PlayerMsg(index, "You founded a " & N5 , 12) End If Next check2 Next check Case 8 For check = 1 to 17 For check2 = 1 to 17 If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM6", "ITEMNUM") And GetPlayerInvItemVal(index, Check) >= GetVar("xmas.ini", "NEEDEDITEM6", "ITEMNUM") Then Call PlayerMsg(index, "You can't find anything.", 12) Exit Sub Elseif GetPlayerInvItemNum(index, check2) = 0 Then Call SetPlayerInvItemNum(index, check2, GetVar("xmas.ini", "NEEDEDITEM6", "ITEMNUM") ) Call SetPlayerInvItemVal(index, check2, int(GetPlayerInvItemVal(index,check) + GetVar("xmas.ini", "NEEDEDITEM6", "ITEMVAL") ) ) Call PlayerMsg(index, "You founded a " & N6 , 12) End If Next check2 Next check Case 9 For check = 1 to 17 If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM4", "ITEMNUM") And GetPlayerInvItemVal(index, check) = GetVar("xmas.ini", "NEEDEDITEM4", "ITEMVAL") Then A = check For check2 = 1 to 17 If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM5", "ITEMNUM") And GetPlayerInvItemVal(index, check) = GetVar("xmas.ini", "NEEDEDITEM5", "ITEMVAL") Then B = check2 For check3 = 1 to 17 If GetPlayerInvItemNum(index, check) = GetVar("xmas.ini", "NEEDEDITEM6", "ITEMNUM") And GetPlayerInvItemVal(index, check) = GetVar("xmas.ini", "NEEDEDITEM6", "ITEMVAL") Then C = check3 For check4 = 1 to 17 G = GetVar("xmas.ini", "GetItem", "Num") If GetPlayerInvItem(index, check4) = 0 then Call SetPlayerInvItemNum(index, check4, G) Call PlayerMsg(index, "You gained a package. You still need " & int(GetVar("xmas.ini", "GetItem", "Total")) - GetPlayerInvVal(index, check4)), 12) ElseIf GetPlayerInvItem(index, check4) < GetVar("xmas.ini", "GetItem", "Total") then Call SetPlayerInvItemVal(index, check4, Int(GetPlayerInvItemVal(index, check4) + 1)) Call PlayerMsg(index, "You gained a package. You still need " & int(GetVar("xmas.ini", "GetItem", "Total")) - GetPlayerInvVal(index, check4)), 12) Else Exit Sub End If Next check4 Call SetPlayerInvItemVal(index, A, Int(GetPlayerInvItemVal(index, A) - GetVar("xmas.ini", "NEEDEDITEM4", "ITEMVAL") ) Call SetPlayerInvItemVal(index, B, Int(GetPlayerInvItemVal(index, B) - GetVar("xmas.ini", "NEEDEDITEM5", "ITEMVAL") ) Call SetPlayerInvItemVal(index, C, Int(GetPlayerInvItemVal(index, C) - GetVar("xmas.ini", "NEEDEDITEM6", "ITEMVAL") ) Else Call PlayerMsg(index, "You don't have " & N6 & "." , 12) End If Next check3 Else Call PlayerMsg(index, "You don't have" & N5 & "." , 12) End If Next check2 Else Call PlayerMsg(index, "You don't have " & N4 & "." , 12) End If Next check End Select End Subreplace Sub ScriptedNPC(index,script) with: Sub ScriptedNPC(index, Script) Dim check Dim check2 Dim check3 Dim M Dim X Dim Y M = GetVar("xmas.ini", "EndSpawn", "MAP") X = GetVar("xmas.ini", "EndSpawn", "X") Y = GetVar("xmas.ini", "EndSpawn", "Y") Select Case Script Case 0 Call PlayerMsg("Welcome to the Christmas Quest of 2006", 12) Call PlayerMsg("Can you help my gnomes with making 25 christmas presents?", 12) Call PlayerMsg("You need to go to the old house...", 12) Call PutVar("xmas.ini", "Accounts\" & GetPLayerLogin(index) & ".ini", "QUESTXMAS2006", 1) Case 1 For check = 1 to 17 If GetPlayerInvItem(index, check) = GetVar("xmas.ini", "GetItem", "Num") And GetPlayerInvVal(index, check) = GetVar("xmas.ini", "GetItem", "Total") Then Call SetPlayerInvItemNum(index, check, GetVar("xmas.ini", "Reward", "Num")) Call SetPlayerInvItemVal(index, check, GetVar("xmas.ini", "Reward", "Val")) Call PlayerMsg(index, "Quest Complete!, Merry Christmas!", 12) Call PlayerWarp(index, M, X, Y) Call PutVar("xmas.ini", "Accounts\" & GetPLayerLogin(index) & ".ini", "QUESTXMAS2006", 2) End If Next Check End Select End Subin Sub JoinGame(index) add total down above end sub: If GetVar("xmas.ini", "Accounts\" & GetPLayerLogin(index) & ".ini", "QUESTXMAS2006") = 1 Then Exit Sub ElseIf GetVar("xmas.ini", "Accounts\" & GetPLayerLogin(index) & ".ini", "QUESTXMAS2006") = 2 Then Exit Sub Else Call PutVar("xmas.ini", "Accounts\" & GetPLayerLogin(index) & ".ini", "QUESTXMAS2006", 0) End IfINSTALLATION:Well Installing is easy read the notes in the SCRIPT piece. Well for the INI. - you can put here 1 to 9999 doesn't matter. These are tiles.
MAP=On which map the tile is. X=On which X the tile is. Y=On which Y the tile is. DIR=# # can be V, >, <, ^ it is the direction where you can get it. These are one sided doors. [HOUSE] This is where the door of the house is. MAP=You Know X=You Know Y=You Know [FACTORY]You Know MAP=You Know X=You Know Y=You Know [NEEDEDITEM1]What you need for the stairs Name=The name ItemNum=The item number ItemVal=The item value, 0 is for non-stackable [NEEDEDITEM2]You Know Name=You Know ItemNum=You Know ItemVal=You Know [NEEDEDITEM3]You Know Name=You Know ItemNum=You Know ItemVal=You Know [NEEDEDITEM4]This is for getting the 25 packets Name=You Know ItemNum=You Know ItemVal=You Know [NEEDEDITEM5]You Know Name=You Know ItemNum=You Know ItemVal=You Know [NEEDEDITEM6]You Know Name=You Know ItemNum=You Know ItemVal=You Know [GETITEM]This is what you get out of the machine. Num=You Know Total=Same as Value [LABYRINTH]This is the point where you spawn into the labyrinth. MAP=You Know X=You Know Y=You Know [EndSpawn]Where you spawn after doing the quest. MAP=You Know X=You Know Y=You Know [REWARD]This is the reward you get after the quest. Num=You Know Val=You Know SCREENSHOTS:Not available yet. WINNER OF SCRIPTING CONTEST 2006: FUNCTION:This script is a quest. The quest begins normally installed at Santa. He needs 25 christmas presents. Well he tells you that you need to go to an old house. You can only go in when you talked to Santa. Well if you are in then you need to search at the drawers and cupboards to find 12 planks, 48 nails and a hammer(or something else depends on what you configured). If you found that then you need to go to the broken stairs without those items you can't fix it. When you fix it then you fall down into the labyrinth(mini-game, maze). You need to try all doors until your are at the end. All doors are one sided. which means you can get in but not out. When you go into the end then you go to a factory there you need to find 25 papers, ropes and toys. You need to go to a machine which makes you the christmas presents. When you have 25 then you need to talk to the gnome. He will give you the reward(santa hat or whatever you want.) and he will take your items and he will teleport you to a place. Quest Complete. Merry Christmas. Comments and Bugs or other stuff may be replied. No flaming is allowed.EDIT: Script will be re-made if I have some time.
|
|
|
|
« Last Edit: October 07, 2009, 09:39:54 AM by Godlord »
|
Logged
|
- I do not provide help through the PM-system, e-mail, Skype or MSN, since this is kind of disturbing. I encourage you to make a new topic with proper spelling and grammar in the appropriate board instead, if possible.
- I can't stand people who act like if they were children, so please don't.
- I recommend you to read the rules before posting. It might solve conflicts before they actually occur.
- I also recommend you to find the solution yourself before making a new topic about your issue. Chances are that other people had the same issue as well.
|
|
|