Eclipse - Free 2D Mmorpg Maker
September 02, 2010, 10:17:12 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


Site Author : Topic: GiveSpell/TakeSpell  (Read 2328 times)
0 Members and 1 Guest are viewing this topic.
July 28, 2006, 04:47:04 PM
The Real Slim Shady
Veteran
Advanced Eclipser
*
User No : 270
Posts: 1730
  • 8 credits
  • View Inventory
  • Send Money To [BS] Pickle
    • View Profile
    Wrote these a while back for a different script. Hope someone finds them useful :)

    Copy into your main (bottom works fine):

    Code: [Select]

    'GiveSpell/TakeSpell subs
    'Written by PICKLE :O
    '**************************
    Sub GiveSpell(index, spell)
    '**************************
    Dim slot
    slot = 1
    Do while slot <= 20
    If GetPlayerSpell(index, Int(slot)) < 1 Then
    Call SetPlayerSpell(index, Int(slot), spell)
    Exit Sub
    End If
    slot = slot + 1
    Loop
    End Sub

    '**************************
    Sub TakeSpell(index, spell)
    '**************************
    Dim slot
    slot = 1
    Do while slot <= 20
    If GetPlayerSpell(index, Int(slot)) < 1 Then
    Call SetPlayerSpell(index, Int(slot), 0)
    Exit Sub
    End If
    slot = slot + 1
    Loop
    End Sub

    '***********************
    Sub ClearSpells(index)
    '***********************
    Dim slot
    slot = 1
    Do while slot <= 20
    Call SetPlayerSpell(index, Int(slot), 0)
    slot = slot + 1
    Loop
    Call PlayerMsg(index, "Spells cleared.", 14)
    End Sub


    Usage:

    Call GiveSpell(index, spell)

    Sets a player's spell slot to the spell number you specify

    Call TakeSpell(index, spell)

    Removes one of the spells you specify from the player's spell list

    Call ClearSpells(index)

    Completely clears the spell list

    Note: TakeSpell isn't tested so if someone could tell me if that works that'd be great.
    Logged

    gentlemen, you can't fight in here! This is the War Room!
    October 25, 2007, 11:54:24 PM
    Member
    **
    User No : 4445
    Posts: 73
  • 0 credits
  • View Inventory
  • Send Money To unixfr3ak
  • Green Dixy The Source is Your End
    • View Profile
    with this one wouldint you need something like


    Code: [Select]
    If LCase(Mid(TextSay, 1, 6)) = "/takespell" Then
       Call GiveSpell(index, spell)
     end sub
    end if

    sorry just learning so if I compleetly messed up ....  you know what I mean thoe
    Logged

    ---------=--Green-Dixy--=----------
    July 18, 2009, 02:09:00 PM
    Member
    **
    User No : 9335
    Posts: 56
  • 8 credits
  • View Inventory
  • Send Money To Sowether
    • View Profile
    Awesome script......
    I think it will help a lot of people like me.

    But I think I find a mistake in the Sub TakeSpell.
    I think the right should be this:
    Code: [Select]
    '**************************
    Sub TakeSpell(index, spell)
    '**************************
    Dim slot
    slot = 1
    Do while slot <= 20 
    If GetPlayerSpell(index, Int(slot)) = spell Then
    Call SetPlayerSpell(index, Int(slot), 0)
    Exit Sub
    End If
    slot = slot + 1
    Loop
    End Sub

    I don't know if someone is gonna read this topic again, because this is very old....
    But anyway, I thought I should fix the script.
    Logged

     


    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.256 seconds with 30 queries.