For Neopets ONLY discussion.
Topic locked

Fri Jun 02, 2006 9:47 pm

Spell Finder program source code (VB6), you need 1 text box, 1 web browser control, and one command button on the form. The text box stores the current spell id:


Private Sub Command1_Click()

Dim PostData As String
Dim Headers As String
Dim blnFound As Boolean
Dim strPageText As String
Dim strURL
Dim SpellArray(20) As String


Dim vPost As Variant
Dim vHeader As Variant
Dim startAt
Dim aByte() As byte

startAt = CLng(Me.Text1.Text)

SpellArray(1) = "A confused-looking Kadoatie appears out of thin air, then suddenly vanishes."
SpellArray(2) = "A horrible stench fills the room, and just as quickly vanishes."
SpellArray(3) = "A loud thumping sound reverberates through the halls."
SpellArray(4) = "A mystical howling echoes in the distance."
SpellArray(5) = "A thick cloud of dust appears from nowhere, sending you into a coughing fit."
SpellArray(6) = "A tiny storm cloud forms in the center of the room and rains for a few seconds."

SpellArray(7) = "It is pitch black. You are likely to be eaten by a Grue."

SpellArray(8 ) = "Lightning bolts shoot out from the walls! You barely avoid being incinerated."

SpellArray(9) = "Suddenly, everything appears upside-down to you."

SpellArray(10) = "The ghost of King Coltzan flies through the room!"
SpellArray(11) = "The lights go out for a moment, then flicker back to life."
SpellArray(12) = "The temperature in the room drops by forty degrees."
SpellArray(13) = "The room shakes, then all goes still."
SpellArray(14) = "The stone beneath your feet turns to mud."

SpellArray(15) = "You grow to ten times of one-tenth your normal size!"
SpellArray(16) = "You suddenly feel very dizzy."
SpellArray(17) = "Your hair catches on fire!"
SpellArray(18 ) = "Your pants disappear! Good thing you're alone."
SpellArray(19) = "Your personal gravity field suddenly reverses, and you find yourself standing on the ceiling for a few seconds, before crashing back to the floor."
SpellArray(20) = "Your skin cycles through a dozen random shades before settling back down to its normal colour."

For i = startAt To 52143

Me.Text1.Text = i

PostData = "goarch=YOUR_DATA_HERE&arcx=YOUR_DATA_HERE&arcy=
YOUR_DATA_HERE&read_book=YOUR_DATA_HERE&spell_id=" & i


' VB creates a Unicode string by default so we need to
' convert it back to Single byte character set.
'PostData = StrConv(PostData, vbFromUnicode)

Headers = "Content-Type: application/x-www-form-urlencoded" & _
vbCrLf & "Referer: http://www.neopets.com/altador/archives.phtml" & _
vbCrLf

vHeader = Headers

ReDim aByte(0) As Byte
PackBytes abyte(), PostData
vPost = abyte


10: Me.WebBrowser1.Navigate "http://www.neopets.com/altador/archives.phtml", 0, "", vPost, vHeader
While Not Me.WebBrowser1.ReadyState = READYSTATE_COMPLETE
DoEvents
Wend

blnFound = False

For j = 1 To 20

If InStr(Me.WebBrowser1.Document.body.innerText, SpellArray(j)) Then

blnFound = True

End If

If Me.WebBrowser1.Document.body.innerText = "" Or InStr(Me.WebBrowser1.Document.body.innerText, "The page cannot be displayed") Then

blnFound = True
GoTo 10

End If

Next j

If blnFound = False Then

MsgBox "Spell ID: " & i

Exit For

End If

Next i

End Sub

Private Sub PackBytes(ByteArray() As Byte, ByVal PostData As String)
Dim iNewBytes As Integer
Dim iCursize As Integer
Dim i As Integer
Dim ch As String


iNewBytes = Len(PostData)
If iNewBytes = 0 Then
Exit Sub
End If
iCursize = UBound(ByteArray) - LBound(ByteArray)
ReDim Preserve ByteArray(iNewBytes + iCursize)
For i = 1 To iNewBytes
ch = Mid(PostData, i, 1)
If ch = Space(1) Then
ch = "+"
End If
ByteArray(i + iCursize - 1) = Asc(ch)
Next
End Sub

SNak Edit: Long Lines stretch the forum! Makes people sad! I italicized the line that was chopped up.

Fri Jun 02, 2006 9:48 pm

hammy1142mek wrote:I was so sick of guessing rooms I walked away made a cheesecake hoping when I came back someone would have figured out a better way of doing it. And they did. Great job!


I hope you made enough for all of us (or at least for me too) :D

Anyway, thank everyone SOOOOO much. There are a lot of smart people here!!!! I would have been in that stupid archive forever!!!

Fri Jun 02, 2006 9:48 pm

hammy1142mek wrote:
crashbash wrote:
hammy1142mek wrote:
crashbash wrote:okay, so here are my co-ords for my sleeper const.

-166, -261
-126, -291
-86, -321
-46, -321
-6, -291
34, -261

so i get 464, 1746 =14,18, but everyone has multiples of 3 so the 14 is wrong, can someone help



its room 14,14 and its nor wrong if your using the write const. try it.


well i just went all through room 14, 14 and got nothing, so does anyone else have any ideas


I just realized your coords are wrong. see they either end with a 6 or a 1 and you have one that ends with a 4


no they're not. the numbers are starting from -166, you add 40, which is -126, and so on. -6 + 40 = 34.

Fri Jun 02, 2006 9:52 pm

Okay so accordingto most of the people who helped me out my room is suppose to be 15, 12.... But I've looked at every book and no luck... Did I do something wrong? Ugh... This is so hard for those of us who are mathematicaly challenged >.<

Once again... My co-ords.

(-137, 28), (-97, -2), (-57, -32), (-17, -32), (23, -2), (63, 28)

Fri Jun 02, 2006 9:53 pm

NeoPet_online wrote:Okay so accordingto most of the people who helped me out my room is suppose to be 15, 12.... But I've looked at every book and no luck... Did I do something wrong? Ugh... This is so hard for those of us who are mathematicaly challenged >.<

Once again... My co-ords.

(-137, 28), (-97, -2), (-57, -32), (-17, -32), (23, -2), (63, 28)


i got 6, 12

Fri Jun 02, 2006 9:56 pm

-253,-245
-243,-275
-173,-305
-133,-305
-93,-275
-53,-245

These are my friends coordinates, im not sure how to do the negative #'s, can someone please do the math for me

Fri Jun 02, 2006 9:56 pm

celebutante wrote:
NeoPet_online wrote:Okay so accordingto most of the people who helped me out my room is suppose to be 15, 12.... But I've looked at every book and no luck... Did I do something wrong? Ugh... This is so hard for those of us who are mathematicaly challenged >.<

Once again... My co-ords.

(-137, 28), (-97, -2), (-57, -32), (-17, -32), (23, -2), (63, 28)


i got 6, 12


I got 6, 3

Fri Jun 02, 2006 9:57 pm

gsokrispy wrote:-253,-245
-243,-275
-173,-305
-133,-305
-93,-275
-53,-245

These are my friends coordinates, im not sure how to do the negative #'s, can someone please do the math for me


try room 21,12

Fri Jun 02, 2006 9:57 pm

spudge wrote:Spell Finder program source code (VB6), you need 1 text box, 1 web browser control, and one command button on the form. The text box stores the current spell id:


So...What does it do? And how can we use it?

Fri Jun 02, 2006 9:58 pm

spudge wrote:SpellArray(1) = "A confused-looking Kadoatie appears out of thin air, then suddenly vanishes."
SpellArray(2) = "A horrible stench fills the room, and just as quickly vanishes."
SpellArray(3) = "A loud thumping sound reverberates through the halls."
SpellArray(4) = "A mystical howling echoes in the distance."
SpellArray(5) = "A thick cloud of dust appears from nowhere, sending you into a coughing fit."
SpellArray(6) = "A tiny storm cloud forms in the center of the room and rains for a few seconds."

SpellArray(7) = "It is pitch black. You are likely to be eaten by a Grue."

SpellArray(8) = "Lightning bolts shoot out from the walls! You barely avoid being incinerated."

SpellArray(9) = "Suddenly, everything appears upside-down to you."

SpellArray(10) = "The ghost of King Coltzan flies through the room!"
SpellArray(11) = "The lights go out for a moment, then flicker back to life."
SpellArray(12) = "The temperature in the room drops by forty degrees."
SpellArray(13) = "The room shakes, then all goes still."
SpellArray(14) = "The stone beneath your feet turns to mud."

SpellArray(15) = "You grow to ten times of one-tenth your normal size!"
SpellArray(16) = "You suddenly feel very dizzy."
SpellArray(17) = "Your hair catches on fire!"
SpellArray(18) = "Your pants disappear! Good thing you're alone."
SpellArray(19) = "Your personal gravity field suddenly reverses, and you find yourself standing on the ceiling for a few seconds, before crashing back to the floor."
SpellArray(20) = "Your skin cycles through a dozen random shades before settling back down to its normal colour."


I didn't really feel like reading the whole thing, but does this mean that all outcomes for every number are... One of the same 20 lines? We've already gotten?

Fri Jun 02, 2006 9:59 pm

celebutante wrote:
NeoPet_online wrote:Okay so accordingto most of the people who helped me out my room is suppose to be 15, 12.... But I've looked at every book and no luck... Did I do something wrong? Ugh... This is so hard for those of us who are mathematicaly challenged >.<

Once again... My co-ords.

(-137, 28), (-97, -2), (-57, -32), (-17, -32), (23, -2), (63, 28)


i got 6, 12


I LOVE YOU!!!!!!!!!! MARRY ME!!!!! CELEBUTANTE FOR PREZ!!!!

AHH!! That was the hardest thing I've ever done on Neopets. THANK YOU!

Now off to getting spells!

Fri Jun 02, 2006 9:59 pm

NeoPet_online wrote:Okay so accordingto most of the people who helped me out my room is suppose to be 15, 12.... But I've looked at every book and no luck... Did I do something wrong? Ugh... This is so hard for those of us who are mathematicaly challenged >.<

Once again... My co-ords.

(-137, 28 ), (-97, -2), (-57, -32), (-17, -32), (23, -2), (63, 28 )

I got 16,7 o_O

Fri Jun 02, 2006 10:00 pm

I don't think the spell book does anything yet. And to answer the other question. Every spell has twenty outcomes.

Fri Jun 02, 2006 10:00 pm

found my book, it was #28 on my shelves

Fri Jun 02, 2006 10:01 pm

StarryEyed502 wrote:
NeoPet_online wrote:Okay so accordingto most of the people who helped me out my room is suppose to be 15, 12.... But I've looked at every book and no luck... Did I do something wrong? Ugh... This is so hard for those of us who are mathematicaly challenged >.<

Once again... My co-ords.

(-137, 28 ), (-97, -2), (-57, -32), (-17, -32), (23, -2), (63, 28 )

I got 16,7 o_O



I got 6,12
Topic locked