Eclipse
January 05, 2009, 08:54:02 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 +-
The New Eclipse Raid on Runscape by Kreator
Today at 08:53:50 PM

Dreadlord Online v1.2 Beta - Need Moderators and Trustworthy Mappers! by The Tribal
Today at 08:52:50 PM

[$$] Paying Paypal - GFX artists [$$] by The Tribal
Today at 08:51:19 PM

THE Cult by The Tribal
Today at 08:49:34 PM

SnowCap by Ninja-Tech
Today at 08:45:29 PM

Teh Cult by Simius Cruentus
Today at 08:44:15 PM

Disparity Recruiting by Peter
Today at 08:44:05 PM

Makai Realms by kira423
Today at 08:41:25 PM

My Game by Kreator
Today at 08:40:25 PM

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

Members Online +-
19 Guests, 16 Users
ralir,
Kreator,
‪‫‬‭‮‪‫‬‭The Admiral,
kira423,
Peter,
The Tribal,
The Troy,
Baron,
The Roujo,
Ninja-Tech,
westin444,
Simius Cruentus,
RamBONE,
ʇıunpp ʎqɹıʞ࣭,
Juggernaut,
Marsh
Pages: [1]
  Print  
Author Topic: Christmas Script 2006 by Godlord (Quest with MiniGame)  (Read 1642 times)
0 Members and 1 Guest are viewing this topic.
Godlord
Stephanus sum
Veteran
Teh Uberleet
*
Offline Offline

Posts: 4,109


View Profile WWW Email
« on: December 24, 2006, 12:09:19 PM »



My First Massive Sadscript  :-).

This script was made by me with a lot of effort. This is for free use so long you add credits to your main.txt this is official made for the Script Contest of December 2006.

SCRIPT:

Code: [Select]
'~~~Christmas Script was writen by Godlord ©2006~~~You need to add that into your main.txt totally above.  8-)

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

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

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

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

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


INSTALLATION:
Well Installing is easy read the notes in the SCRIPT piece.
Well for the INI.
  • you can put here 1 to 9999 doesn't matter. These are tiles.
MAP=On which map the tile is.
X=On which X the tile is.
Y=On which Y the tile is.
DIR=# # can be V, >, <, ^ it is the direction where you can get it. These are one sided doors.
[HOUSE] This is where the door of the house is.
MAP=You Know
X=You Know
Y=You Know
[FACTORY]You Know
MAP=You Know
X=You Know
Y=You Know
[NEEDEDITEM1]What you need for the stairs
Name=The name
ItemNum=The item number
ItemVal=The item value, 0 is for non-stackable
[NEEDEDITEM2]You Know
Name=You Know
ItemNum=You Know
ItemVal=You Know
[NEEDEDITEM3]You Know
Name=You Know
ItemNum=You Know
ItemVal=You Know
[NEEDEDITEM4]This is for getting the 25 packets
Name=You Know
ItemNum=You Know
ItemVal=You Know
[NEEDEDITEM5]You Know
Name=You Know
ItemNum=You Know
ItemVal=You Know
[NEEDEDITEM6]You Know
Name=You Know
ItemNum=You Know
ItemVal=You Know
[GETITEM]This is what you get out of the machine.
Num=You Know
Total=Same as Value
[LABYRINTH]This is the point where you spawn into the labyrinth.
MAP=You Know
X=You Know
Y=You Know
[EndSpawn]Where you spawn after doing the quest.
MAP=You Know
X=You Know
Y=You Know
[REWARD]This is the reward you get after the quest.
Num=You Know
Val=You Know

SCREENSHOTS:
Not available yet.


WINNER OF SCRIPTING CONTEST 2006:



FUNCTION:
This script is a quest. The quest begins normally installed at Santa. He needs 25 christmas presents. Well he tells you that you need to go to an old house. You can only go in when you talked to Santa. Well if you are in then you need to search at the drawers and cupboards to find 12 planks, 48 nails and a hammer(or something else depends on what you configured). If you founded 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 untill 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.
:DNINJA
Advanced Member
****
Offline Offline

Posts: 660


^-^


View Profile WWW Email
« Reply #1 on: January 08, 2007, 01:46:48 AM »

thats awsum godlord :) ill have to shove it in on my game somewhere thanks  :blob:
Wojtexx
Member
**
Offline Offline

Posts: 89


View Profile Email
« Reply #2 on: January 11, 2007, 03:36:09 PM »

This script is amazing thanks for this !!! you ar king XDgodlord
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.484 seconds with 32 queries.