Eclipse
January 05, 2009, 04:32: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 +-
Merrimint's Website by The Oracle
Today at 04:31:23 PM

J-HASP! by Dr. Who Cares
Today at 04:31:22 PM

Open Book by Jarvis ♥ Pie
Today at 04:31:08 PM

The New Eclipse Raid on Runscape by Paladin
Today at 04:30:54 PM

Lostica [Project Revamp] by The Oracle
Today at 04:29:40 PM

Free movies? by Paladin
Today at 04:28:25 PM

what? by The Oracle
Today at 04:27:04 PM

Rate the above user by Paladin
Today at 04:25:46 PM

[Real Life Picture Thread] by The Oracle
Today at 04:25:17 PM

Spike's Adminishness! by The Oracle
Today at 04:23:31 PM

Members Online +-
15 Guests, 33 Users
‪‫‬‭‮‪‫‬‭Admiral Refuge,
Dr. Who Cares,
Airscar,
chrisaub,
The Oracle,
Chief,
Paladin,
Jarvis ♥ Pie,
Almighty Wing,
Sk3wer,
Hikaru,
Gwendalin,
Ankoku,
Maxac,
Jax The Mighty,
grenegg1,
Zananok,
Balliztik,
>~(Squiddle)~<,
ShadowChao,
Simius Cruentus,
ralir,
Munro,
slym,
THE Tim,
Reguba,
tiggilyboo,
newman,
The MrMiguu™ [pizza pretzles],
ploxie,
HawkStorm95,
Zuleloan,
colby250
Pages: [1]
  Print  
Author Topic: Barons 8Ball Random Message Script  (Read 1241 times)
0 Members and 1 Guest are viewing this topic.
Baron
Lord Of Spleens
Administrator
Teh Uberleet
*
Offline Offline

Posts: 2,735


Genesis CoCreator - Eclipse Evo Developer


View Profile WWW Email
« on: March 05, 2006, 04:05:16 AM »

THIS SCRIPT AND ALL DERIVATIVE WORKS ARE COPYRIGHT OF REDEEMER GAME STUDIOS UNLESS THEY ARE USING ECLIPSE ENGINES. ITS USE IS OPEN TO ALL USERS OF ECLIPSE ENGINES ALONG WITH THE RIGHT TO EDIT IT FREELY. ANY OTHER ENGINES / GAMES REQUIRE APPROVAL FOR USE. THIS MAY NOT BE POSTED ON OTHER BOARDS.

Used to call random messages from a .ini file. Follow the instructions cant go wrong.

Add this above the line
Case "/bell"

Quote


Case"/8ball"
Call random(index)
Exit Sub



Change this to the /command you want players to type to use your script. You can also call random.ini by using scripted tiles etc.

At the very bottom of your main.txt, add this

Quote


Sub random(index)
Dim randomiser
Dim max
Dim message

max = Getvar("random.ini", "index", "total_messages")

randomiser = Int((Int(max) + 1) * Rnd) + 0

If randomiser = 0 Then
randomiser = 1
End If

message = Getvar("random.ini", "messages", Int(randomiser) )

Call Playermsg(index, message, 10)

End Sub



Change this to the name of your .ini you will be drawing messages from

Create your random.ini and add inside it:

Quote


[INDEX]
total_messages=5

[MESSAGES]
1=No
2=Maybe
3=Yes
4=Perhaps
5=Dance like a chicken while juggling midgets




This number is your total number of messages starting at 1

These are the possible responses it can give.

Hope you enjoy the 8ball random message script. enjoy.
The Wise Fool
Member
**
Offline Offline

Posts: 51



View Profile Email
« Reply #1 on: March 05, 2006, 07:35:38 AM »

I was trying to do something similar to that, but rather than it being a message, I wanted to give a random item, once.  Thanks Baron :D
Anonymous
Guest


Email
« Reply #2 on: March 05, 2006, 05:18:22 PM »

Hrmmmm would be a fairly simple matter to modify this scripts framework to get it to give random items, give it a try :)
Pickle
REBEL SCUM
Veteran
Advanced Eclipser
*
Offline Offline

Posts: 1,765


So, a baby seal walks into a club...


View Profile Email
« Reply #3 on: March 05, 2006, 05:28:30 PM »

More useless yet entertaining scripts from Baron :)
n0madic0debc
Active Member
***
Offline Offline

Posts: 415


View Profile Email
« Reply #4 on: March 05, 2006, 09:11:01 PM »

the fun part about scripting having fun with it. Im looking for a way to do the random item thing.  :lol:
Anonymous
Guest


Email
« Reply #5 on: March 05, 2006, 09:55:12 PM »

Guest is Baron here :)

The random item would need a few more fields in your ini for each entry :

ie

1_num:
1_val:
1_dur:
1_cur:

and the script would just give the item the same way it calls a message only loading from those four fields, you should also add checks for free inventory space though.
mmaatteeoo2003
Active Member
***
Offline Offline

Posts: 108


View Profile WWW Email
« Reply #6 on: March 13, 2006, 03:14:45 AM »

how do you do this with scipted tile :P
Baron
Lord Of Spleens
Administrator
Teh Uberleet
*
Offline Offline

Posts: 2,735


Genesis CoCreator - Eclipse Evo Developer


View Profile WWW Email
« Reply #7 on: March 13, 2006, 04:59:54 AM »

put the line

Call random(index)

under a new case in your sub scriptedtile(index,script)
mmaatteeoo2003
Active Member
***
Offline Offline

Posts: 108


View Profile WWW Email
« Reply #8 on: March 13, 2006, 05:32:17 AM »

Quote from: Baron
put the line

Call random(index)

under a new case in your sub scriptedtile(index,script)


k i wasn't sure if you had to do diffent commands :P i am thinking of doing a fontun telling tabel and you knoe that thing.
Baron
Lord Of Spleens
Administrator
Teh Uberleet
*
Offline Offline

Posts: 2,735


Genesis CoCreator - Eclipse Evo Developer


View Profile WWW Email
« Reply #9 on: March 13, 2006, 08:38:22 AM »

well, if you want it to play messages other then those in the 8ball.ini you'd need to change the way the script handles certain stuff

just changing all the 8ball.ini references to something different would work though i think.
IrunoHatake
Active Member
***
Offline Offline

Posts: 109



View Profile WWW Email
« Reply #10 on: April 12, 2008, 11:49:47 AM »

how would you go about the random item thing but making only like once a day? that would probably need timers and stuff and i almost never keep my server up for more than a hour so it would be kinda hard. any ideas?

also why is it that now i like always talk in old posts? ???
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.311 seconds with 33 queries.