Eclipse - Free 2D Mmorpg Maker
September 02, 2010, 10:24:16 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 314piwm
[Today at 10:21:04 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


Pages: [1] 2 3 4
Site Author : Topic: Guild Create Script (script submission, 4/5 difficulty)  (Read 9396 times)
0 Members and 1 Guest are viewing this topic.
June 16, 2006, 03:49:53 AM
The Uber-Scriptor
Advanced Member
****
User No : 375
Posts: 590
  • 0 credits
  • View Inventory
  • Send Money To Ilnair
  • Location : Netherlands, The
    The Uber-Scriptor
    • View Profile
    • WWW
    Well, since unnown is gone now, I think I'll try to take over his position as uber-scripter :D.

    I'll start with a very simple script. However, I think most people will love me for nailing this one :D.

    Scripting level:
    0 - damned easy
    5 - very hard
    Newbies: 4/5
    Advanced scripters: 1/5
    Others: 0/5

    A Guild Create script, this is how it works:

    As soon as you are level 50, you can talk to Guild Admin. A querybox will pop up, and you can enter the name of your guild. After that you will be kicked from the server. If you log in 15 seconds later your guild wil be created.


    Installing the script:

    Step 1: Make a npc, called Guild Admin. Change behaviour to scripted, and change script to 4.

    Step 2: Open your main.txt, and find "Sub ScriptedNPC(index, Script)". Without the " and ". And enter the following code above "End Select":
    Code: [Select]
    Case 4
    If GetPlayerLevel(index) > 49 Then
    Call playerquerybox(index, "How do you want to name your guild?", 0)
    Exit Sub
    End If
    Call PlayerMsg(index, "Guild Admin: You have to be level 50 to create a guild!", 2)
    Exit Sub


    If you cannot find "Sub ScriptedNPC(index, Script)", paste the following code at the bottom of your main.txt:

    Code: [Select]
    Sub ScriptedNPC(index, Script)
    Select Case Script
    Case 4
    If GetPlayerLevel(index) > 49 Then
    Call playerquerybox(index, "How do you want to name your guild?", 0)
    Exit Sub
    End If
    Call PlayerMsg(index, "Guild Admin: You have to be level 50 to create a guild!", 2)
    Exit Sub
    End Select
    End Sub


    Step 3: The playerprompt sub. Find "Sub Querybox(index, script)", and enter the following code above the LAST end select:
    Code: [Select]
    Case 0
    If response = "<GM>" then
    If GetPlayerAccess(index) = 0 Then
    Call PlayerMsg(index, "You cannot create this guild!", 12)
    Exit Sub
    End If
    End If
    Call PutVar("tempvars.ini", "GuildCreate", "Login", GetPlayerLogin(index))
    Call PutVar("tempvars.ini", "GuildCreate", "CharNum", GetPlayerCharNum(index))
    Call PutVar("tempvars.ini", "GuildCreate", "GuildName", response & "")
    Call SetTimer("tmrTest " & 0 & ",5", 5000)
    Call GlobalMsg(GetPlayerName(index) & " has created the guild: " & response & "!", 10)
    Call AlertMsg(index, "Your Guild: " & response & " will be created, please relog into the game AFTER 15 seconds!")
    Exit Sub

    If you cannot find it, please enter the following code at the bottom of your main.txt:
    Code: [Select]
    Sub Querybox(index, script)
    On Error Resume next
    Dim response

    response=getvar("\responses.ini","Responses",Int(index))

    Select Case script

    Case 0
    If response = "<GM>" then
    If GetPlayerAccess(index) = 0 Then
    Call PlayerMsg(index, "You cannot create this guild!", 12)
    Exit Sub
    End If
    End If
    Call PutVar("tempvars.ini", "GuildCreate", "Login", GetPlayerLogin(index))
    Call PutVar("tempvars.ini", "GuildCreate", "CharNum", GetPlayerCharNum(index))
    Call PutVar("tempvars.ini", "GuildCreate", "GuildName", response & "")
    Call SetTimer("tmrTest " & 0 & ",5", 5000)
    Call GlobalMsg(GetPlayerName(index) & " has created the guild: " & response & "!", 10)
    Call AlertMsg(index, "Your Guild: " & response & " will be created, please relog into the game AFTER 15 seconds!")
    Exit Sub

    End Select

    End Sub


    Step 4: The timer sub. Find Sub tmrTest(index, script), and enter the following code above End Select:
    Code: [Select]
    Case 5
    Call RemoveTimer("tmrtest " & index & "," & 5)
    login = GetVar("tempvars.ini", "GuildCreate", "Login")
    charnum = GetVar("tempvars.ini", "GuildCreate", "CharNum")
    GuildName = GetVar("tempvars.ini", "GuildCreate", "GuildName")

    If CharNum > 1 Then
    Call PutVar("Banks\" & login & ".ini", "Char" & charnum, "Guild", GuildName & "")
    Call PutVar("Banks\" & login & ".ini", "Char" & charnum, "Guildaccess", "4")
    Else
    Call PutVar("accounts\" & login & ".ini", "Char" & charnum, "Guild", GuildName & "")
    Call PutVar("accounts\" & login & ".ini", "Char" & charnum, "Guildaccess", "4")
    End If
    Exit Sub


    If you cannot find Sub TMRtest, please add the following code at the bottom of your main.txt:
    Code: [Select]
    '********************************
    Sub tmrTest(index, script)
    '********************************
    Dim guildname
    Dim charnum
    Dim login
    On Error Resume Next
    Select case script
    Case 5
    Call RemoveTimer("tmrtest " & index & "," & 5)
    login = GetVar("tempvars.ini", "GuildCreate", "Login")
    charnum = GetVar("tempvars.ini", "GuildCreate", "CharNum")
    GuildName = GetVar("tempvars.ini", "GuildCreate", "GuildName")

    If CharNum > 1 Then
    Call PutVar("Banks\" & login & ".ini", "Char" & charnum, "Guild", GuildName & "")
    Call PutVar("Banks\" & login & ".ini", "Char" & charnum, "Guildaccess", "4")
    Else
    Call PutVar("accounts\" & login & ".ini", "Char" & charnum, "Guild", GuildName & "")
    Call PutVar("accounts\" & login & ".ini", "Char" & charnum, "Guildaccess", "4")
    End If
    Exit Sub

    End Select
    End Sub




    Ok, it should work now. talk to the Guild Admin to try it out! Good luck.

    I would like someone to reply if it's working.
    Logged

    Ilnair
    Uber-Scriptor

    Nishansu, beta testing. Have a look at http://www.nishansu.com
    June 16, 2006, 05:03:40 AM
    Active Member
    ***
    User No : 797
    Posts: 315
  • 0 credits
  • View Inventory
  • Send Money To MegaNanoLith
    • View Profile
    • WWW
    sweetness :)
    Makes people work for getting a guild now
    Logged

    Destiny Unlimited(Dev. Name)

    Paperdoll - 50%
    Scripting - 5% Mapping - 2% Other GFX - 10%
    June 16, 2006, 05:05:49 AM
    The Uber-Scriptor
    Advanced Member
    ****
    User No : 375
    Posts: 590
  • 0 credits
  • View Inventory
  • Send Money To Ilnair
  • Location : Netherlands, The
    The Uber-Scriptor
    • View Profile
    • WWW
    Yah, and admins won't have to be online in order for people to create a guild :D.
    Logged

    Ilnair
    Uber-Scriptor

    Nishansu, beta testing. Have a look at http://www.nishansu.com
    June 16, 2006, 06:05:45 AM
    The Gnome King
    Global Moderator
    Advanced Eclipser
    *
    User No : 264
    Posts: 1442
  • 26 credits
  • View Inventory
  • Send Money To Draken
  • Location : Texas USA
    • View Profile
    • WWW
    very very very super nice WOOT players can make there own gangs now in COI Finally

    you rock man.
    Logged



    With every post my army of gnomes grows larger. Soon we will dominate the WORLD!! DOMINATION!




    Soon looking for a few mappers to help map Storm of Conquest. Will need mappers to do atleast 3 maps a day. PM me with map example if you want to help
    June 16, 2006, 06:50:48 AM
    The Uber-Scriptor
    Advanced Member
    ****
    User No : 375
    Posts: 590
  • 0 credits
  • View Inventory
  • Send Money To Ilnair
  • Location : Netherlands, The
    The Uber-Scriptor
    • View Profile
    • WWW
    Hmm, a lil update. Instead of above the FIRST end select, you have to paste the query box thingy above the last one.
    Logged

    Ilnair
    Uber-Scriptor

    Nishansu, beta testing. Have a look at http://www.nishansu.com
    June 16, 2006, 07:34:34 AM
    Active Member
    ***
    User No : 433
    Posts: 217
  • 0 credits
  • View Inventory
  • Send Money To Jarvis
  • Location : Ohio
    • View Profile
    Well, I was level 48 and I tried talking to the NPC, it said I need to be level 50 to create the guild, therefore it worked so far... After I made it to level 50, I tried and nothing happened... The NPC didn't say or do anything... I tried going to level 51, still nothing =/

    A little help ? :x
    Logged

    Check out Realm of Crusade's WIP subforum - http://www.touchofdeathforums.com/smf/index.php?board=227.0
    June 16, 2006, 07:51:40 AM
    Member
    **
    User No : 1084
    Posts: 26
  • 0 credits
  • View Inventory
  • Send Money To Jae
  • Location : duck
    • View Profile
    nice post man.. and replacing unnown is a good thing...to bad we dont have both of you releasing ill shi*t like this
    Logged

    Chea
    June 16, 2006, 10:17:17 AM
    The Uber-Scriptor
    Advanced Member
    ****
    User No : 375
    Posts: 590
  • 0 credits
  • View Inventory
  • Send Money To Ilnair
  • Location : Netherlands, The
    The Uber-Scriptor
    • View Profile
    • WWW
    hehe, I just hope I'll ever be as good as him, that guy rocks ducking ass.
    Logged

    Ilnair
    Uber-Scriptor

    Nishansu, beta testing. Have a look at http://www.nishansu.com
    June 16, 2006, 04:18:32 PM
    Active Member
    ***
    User No : 658
    Posts: 144
  • 0 credits
  • View Inventory
  • Send Money To Lee_Dragoon
    • View Profile
    Dude I love you!!!!
    Logged
    June 16, 2006, 10:58:27 PM
    The Uber-Scriptor
    Advanced Member
    ****
    User No : 375
    Posts: 590
  • 0 credits
  • View Inventory
  • Send Money To Ilnair
  • Location : Netherlands, The
    The Uber-Scriptor
    • View Profile
    • WWW
    Eeeek, but thanks
    Logged

    Ilnair
    Uber-Scriptor

    Nishansu, beta testing. Have a look at http://www.nishansu.com
    June 17, 2006, 02:19:23 AM
    Active Member
    ***
    User No : 433
    Posts: 217
  • 0 credits
  • View Inventory
  • Send Money To Jarvis
  • Location : Ohio
    • View Profile
    so yeah any ideas how to get it working? when im below level 50, the npc works fine and tells me I need to be level 50, when I do become level 50 or higher, it doesnt say a thing or do anything
    Logged

    Check out Realm of Crusade's WIP subforum - http://www.touchofdeathforums.com/smf/index.php?board=227.0
    June 17, 2006, 02:20:13 AM
    The Uber-Scriptor
    Advanced Member
    ****
    User No : 375
    Posts: 590
  • 0 credits
  • View Inventory
  • Send Money To Ilnair
  • Location : Netherlands, The
    The Uber-Scriptor
    • View Profile
    • WWW
    Hmm, you got total eclipse?
    Logged

    Ilnair
    Uber-Scriptor

    Nishansu, beta testing. Have a look at http://www.nishansu.com
    June 17, 2006, 03:26:06 AM
    Active Member
    ***
    User No : 899
    Posts: 128
  • 0 credits
  • View Inventory
  • Send Money To UberNullx
  • Location : New Castle, Pennsylvania
    • View Profile
    The NPC is not saying anything to me... at al...
    Logged



    Bloodline Forums!
    June 17, 2006, 03:28:32 AM
    The Uber-Scriptor
    Advanced Member
    ****
    User No : 375
    Posts: 590
  • 0 credits
  • View Inventory
  • Send Money To Ilnair
  • Location : Netherlands, The
    The Uber-Scriptor
    • View Profile
    • WWW
    Well, make sure it has at least 1 hp. I think that would be the problem. And make sure you got the Sub ScriptedNPC the right way.
    Logged

    Ilnair
    Uber-Scriptor

    Nishansu, beta testing. Have a look at http://www.nishansu.com
    June 17, 2006, 03:40:10 AM
    Active Member
    ***
    User No : 899
    Posts: 128
  • 0 credits
  • View Inventory
  • Send Money To UberNullx
  • Location : New Castle, Pennsylvania
    • View Profile
    I do, I am using Barons SUper Main, and when I use the /test command everything works. The guy have 10 hp just to be on the safe side, lol.
    Logged



    Bloodline Forums!
    June 17, 2006, 03:58:17 AM
    The Uber-Scriptor
    Advanced Member
    ****
    User No : 375
    Posts: 590
  • 0 credits
  • View Inventory
  • Send Money To Ilnair
  • Location : Netherlands, The
    The Uber-Scriptor
    • View Profile
    • WWW
    And still nothing when you talk to him? Make sure you got the Sub ScriptedNPC the way I said. And there is only 1 Sub ScriptedNPC.
    Logged

    Ilnair
    Uber-Scriptor

    Nishansu, beta testing. Have a look at http://www.nishansu.com
    June 17, 2006, 07:29:22 AM
    Active Member
    ***
    User No : 433
    Posts: 217
  • 0 credits
  • View Inventory
  • Send Money To Jarvis
  • Location : Ohio
    • View Profile
    the NPC has stats and all, and yes I have total eclipse. like said, when im below level 50, the npc actually talks and works fine, after I get to level 50 or above and I try to attack it, nothing happens
    Logged

    Check out Realm of Crusade's WIP subforum - http://www.touchofdeathforums.com/smf/index.php?board=227.0
    June 17, 2006, 07:32:04 AM
    The Uber-Scriptor
    Advanced Member
    ****
    User No : 375
    Posts: 590
  • 0 credits
  • View Inventory
  • Send Money To Ilnair
  • Location : Netherlands, The
    The Uber-Scriptor
    • View Profile
    • WWW
    Then there is a problem with your Sub playerprompt (or whatever), could you add me to msn, and send me your main, I'll have a look.

    msn@dinand.tk
    Logged

    Ilnair
    Uber-Scriptor

    Nishansu, beta testing. Have a look at http://www.nishansu.com
    June 17, 2006, 08:33:31 AM
    Active Member
    ***
    User No : 433
    Posts: 217
  • 0 credits
  • View Inventory
  • Send Money To Jarvis
  • Location : Ohio
    • View Profile
    ok I added you , im Leisy2@hotmail.com
    Logged

    Check out Realm of Crusade's WIP subforum - http://www.touchofdeathforums.com/smf/index.php?board=227.0
    June 17, 2006, 08:40:24 AM
    Similac Child
    Owner
    Demi God
    *
    User No : 13358
    Posts: 7477
  • 1425 credits
  • View Inventory
  • Send Money To Marsh
  • Comfort the disturbed disturb the comfortable
    • View Profile
    • WWW
    He must have 1 of every stat and you must be using total eclipse.


    Btw great script!
    Logged

    don't call your mother - don't call your priest
    don't call your doctor - call the police
    you bring the razor blade - I'll bring the speed
    Take off your coat - it's gonna be a long night
    Pages: [1] 2 3 4
     


    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.311 seconds with 31 queries.