Eclipse
January 05, 2009, 07:24:53 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 +-
Lostica [Project Revamp] by Sʎ|3><(_)z
Today at 07:23:54 PM

Makai Realms by kira423
Today at 07:18:03 PM

Teh Cult by Teh_General
Today at 07:17:35 PM

Phantasy Forum by Sʎ|3><(_)z
Today at 07:16:16 PM

Azkanan's Workshop (Graphics) by Devogen
Today at 07:15:32 PM

Will do custom graphics using Photoshop (GUI/Banners/Logos/PD Sprites/ect..) by Sʎ|3><(_)z
Today at 07:15:30 PM

[E++] Fun with sprites! by Hikaru
Today at 07:11:35 PM

The New Eclipse Raid on Runscape by Teh Jna
Today at 07:10:00 PM

Disparity Recruiting by Peter
Today at 07:08:30 PM

Sylerean Online Alpha 1.2 Released by tehg00n
Today at 07:07:53 PM

Members Online +-
11 Guests, 27 Users
karminezr0x,
Xavi,
Southern,
Sʎ|3><(_)z,
shrig94,
Devogen,
Hikaru,
Syner,
Echo ♥ Pie,
The BanHammer! [Thor!],
Electrokinesis,
Elixix,
‪‫‬‭‮‪‫‬‭Admiral Refuge,
Keebler Elf,
westin444,
grenegg1,
Teh_General,
colby250,
kira423,
Niko,
l0lz!,
The Alster,
Peter,
♠ Gaming Ace ♠,
Seba,
Airscar,
Teh Jna
Pages: [1] 2 3
  Print  
Author Topic: Guild Create Script (script submission, 4/5 difficulty)  (Read 4041 times)
0 Members and 1 Guest are viewing this topic.
Ilnair
The Uber-Scriptor
Advanced Member
****
Offline Offline

Posts: 592


The Uber-Scriptor


View Profile WWW Email
« on: June 16, 2006, 03:49:53 AM »

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.
MegaNanoLith
Active Member
***
Offline Offline

Posts: 324


View Profile WWW Email
« Reply #1 on: June 16, 2006, 05:03:40 AM »

sweetness :)
Makes people work for getting a guild now
Ilnair
The Uber-Scriptor
Advanced Member
****
Offline Offline

Posts: 592


The Uber-Scriptor


View Profile WWW Email
« Reply #2 on: June 16, 2006, 05:05:49 AM »

Yah, and admins won't have to be online in order for people to create a guild :D.
Daddy Gnome Draken
THE GNOME KING
Global Moderator
Advanced Member
*
Offline Offline

Posts: 947


Clay Gnome Productions


View Profile WWW Email
« Reply #3 on: June 16, 2006, 06:05:45 AM »

very very very super nice WOOT players can make there own gangs now in COI Finally

you rock man.
Ilnair
The Uber-Scriptor
Advanced Member
****
Offline Offline

Posts: 592


The Uber-Scriptor


View Profile WWW Email
« Reply #4 on: June 16, 2006, 06:50:48 AM »

Hmm, a lil update. Instead of above the FIRST end select, you have to paste the query box thingy above the last one.
Jarvis
Active Member
***
Offline Offline

Posts: 103


View Profile Email
« Reply #5 on: June 16, 2006, 07:34:34 AM »

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
Jae
Member
**
Offline Offline

Posts: 26


View Profile Email
« Reply #6 on: June 16, 2006, 07:51:40 AM »

nice post man.. and replacing unnown is a good thing...to bad we dont have both of you releasing ill shi*t like this
Ilnair
The Uber-Scriptor
Advanced Member
****
Offline Offline

Posts: 592


The Uber-Scriptor


View Profile WWW Email
« Reply #7 on: June 16, 2006, 10:17:17 AM »

hehe, I just hope I'll ever be as good as him, that guy rocks Ducking ass.
Lee_Dragoon
Active Member
***
Offline Offline

Posts: 167



View Profile Email
« Reply #8 on: June 16, 2006, 04:18:32 PM »

Dude I love you!!!!
Ilnair
The Uber-Scriptor
Advanced Member
****
Offline Offline

Posts: 592


The Uber-Scriptor


View Profile WWW Email
« Reply #9 on: June 16, 2006, 10:58:27 PM »

Eeeek, but thanks
Jarvis
Active Member
***
Offline Offline

Posts: 103


View Profile Email
« Reply #10 on: June 17, 2006, 02:19:23 AM »

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
Ilnair
The Uber-Scriptor
Advanced Member
****
Offline Offline

Posts: 592


The Uber-Scriptor


View Profile WWW Email
« Reply #11 on: June 17, 2006, 02:20:13 AM »

Hmm, you got total eclipse?
UberNullx
Active Member
***
Offline Offline

Posts: 142


View Profile Email
« Reply #12 on: June 17, 2006, 03:26:06 AM »

The NPC is not saying anything to me... at al...
Ilnair
The Uber-Scriptor
Advanced Member
****
Offline Offline

Posts: 592


The Uber-Scriptor


View Profile WWW Email
« Reply #13 on: June 17, 2006, 03:28:32 AM »

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.
UberNullx
Active Member
***
Offline Offline

Posts: 142


View Profile Email
« Reply #14 on: June 17, 2006, 03:40:10 AM »

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.
Ilnair
The Uber-Scriptor
Advanced Member
****
Offline Offline

Posts: 592


The Uber-Scriptor


View Profile WWW Email
« Reply #15 on: June 17, 2006, 03:58:17 AM »

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.
Jarvis
Active Member
***
Offline Offline

Posts: 103


View Profile Email
« Reply #16 on: June 17, 2006, 07:29:22 AM »

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
Ilnair
The Uber-Scriptor
Advanced Member
****
Offline Offline

Posts: 592


The Uber-Scriptor


View Profile WWW Email
« Reply #17 on: June 17, 2006, 07:32:04 AM »

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
Jarvis
Active Member
***
Offline Offline

Posts: 103


View Profile Email
« Reply #18 on: June 17, 2006, 08:33:31 AM »

ok i added you , im Leisy2@hotmail.com
Marsh
Demi God

Offline Offline

Posts: 7,280


Comfort the disturbed. Disturb the comfortable.


View Profile WWW Email
User is on moderator watch listWatched
« Reply #19 on: June 17, 2006, 08:40:24 AM »

He must have 1 of every stat and you must be using total eclipse.


Btw great script!
Pages: [1] 2 3
  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.387 seconds with 33 queries.