Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-06-2003, 07:41 PM
ShadowDarkstar ShadowDarkstar is offline
Registered User
ShadowDarkstar's Avatar
Join Date: Feb 2003
Location: Montreal
Posts: 42
ShadowDarkstar is on a distinguished road
command?

I know on GK(2k2) people can make boats and houses
But how does it generate the random level?
Is it a command we don't know about or something, or is it just for GK?

If someone knows it, plz post it
I would like to experiment ^_^
Reply With Quote
  #2  
Old 03-06-2003, 08:04 PM
Knuckles Knuckles is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 580
Knuckles is on a distinguished road
Send a message via AIM to Knuckles
Generate a random level? I'm not sure what your talking about; 'cause I never actually played 2k1. Just sat on it and talked and worked on Frolic. But, I'm pretty sure the map is like an array, like:

Level_Letter-#.graal

So make an array of letters, then tokenize it, and generate a random #, and letter.

NPC Code:

setstring this.letter = #t(int(rand(0,arraylen(lettersarray))));
this.randnum = int(rand(0,maxnum)))



Then use those in the setlevel part.
__________________
Knuckles
"They say 60% of the time, it works everytime!"
Reply With Quote
  #3  
Old 03-06-2003, 08:28 PM
ShadowDarkstar ShadowDarkstar is offline
Registered User
ShadowDarkstar's Avatar
Join Date: Feb 2003
Location: Montreal
Posts: 42
ShadowDarkstar is on a distinguished road
Quote:
Originally posted by Knuckles
Generate a random level? I'm not sure what your talking about; 'cause I never actually played 2k1. Just sat on it and talked and worked on Frolic. But, I'm pretty sure the map is like an array, like:

Level_Letter-#.graal

So make an array of letters, then tokenize it, and generate a random #, and letter.

NPC Code:

setstring this.letter = #t(int(rand(0,arraylen(lettersarray))));
this.randnum = int(rand(0,maxnum)))



Then use those in the setlevel part.
not 2k1(GMB), 2k2(GK) =/
dunno
maybe they have a ton of levels already uploaded and its a random level number
im sure they would have to add the number to a certain string to make sure it doesnt generate the same number twice
Reply With Quote
  #4  
Old 03-06-2003, 08:30 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
i heard they have new commands just for 2k2.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #5  
Old 03-06-2003, 10:46 PM
Knuckles Knuckles is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 580
Knuckles is on a distinguished road
Send a message via AIM to Knuckles
Quote:
Originally posted by ShadowDarkstar

not 2k1(GMB), 2k2(GK) =/
dunno
maybe they have a ton of levels already uploaded and its a random level number
im sure they would have to add the number to a certain string to make sure it doesnt generate the same number twice
Even so, you can still try my way.
__________________
Knuckles
"They say 60% of the time, it works everytime!"
Reply With Quote
  #6  
Old 03-07-2003, 12:09 AM
Falados Falados is offline
Cucumber NPC
Falados's Avatar
Join Date: Jan 2003
Posts: 141
Falados is on a distinguished road
Send a message via ICQ to Falados Send a message via AIM to Falados
its a special command, copylevel I think it is or something... It would be nice to have deletelevel though... although that might be bad =\
__________________

subliminal message: 1+1=3
Reply With Quote
  #7  
Old 03-07-2003, 12:35 AM
Knuckles Knuckles is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 580
Knuckles is on a distinguished road
Send a message via AIM to Knuckles
Quote:
Originally posted by Falados
its a special command, copylevel I think it is or something... It would be nice to have deletelevel though... although that might be bad =\
O_O I see. YOU mean for the dugeons?
I get it now, I thought you just wanted to warp someone to a random level. Heh.
__________________
Knuckles
"They say 60% of the time, it works everytime!"
Reply With Quote
  #8  
Old 03-07-2003, 12:38 AM
RTelvecho RTelvecho is offline
Banned
RTelvecho's Avatar
Join Date: Oct 2002
Location: Toronto, Ontario, Canada
Posts: 807
RTelvecho is on a distinguished road
Send a message via AIM to RTelvecho
last time i checked copylevel worked on an npc server..
Reply With Quote
  #9  
Old 03-07-2003, 01:38 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Falados
its a special command, copylevel I think it is or something... It would be nice to have deletelevel though... although that might be bad =\
that does exist... o.O
Reply With Quote
  #10  
Old 03-07-2003, 01:49 AM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Quote:
Originally posted by Python523

that does exist... o.O
Enlighten us on how it works then, oh great one
__________________
new account: Trevor
Reply With Quote
  #11  
Old 03-07-2003, 02:16 AM
ShadowDarkstar ShadowDarkstar is offline
Registered User
ShadowDarkstar's Avatar
Join Date: Feb 2003
Location: Montreal
Posts: 42
ShadowDarkstar is on a distinguished road
oo

thx guys ^_^
i think i'll start experimenting with it right away
see how it works and all
Reply With Quote
  #12  
Old 03-07-2003, 02:25 AM
ShadowDarkstar ShadowDarkstar is offline
Registered User
ShadowDarkstar's Avatar
Join Date: Feb 2003
Location: Montreal
Posts: 42
ShadowDarkstar is on a distinguished road
oops =X

x.x
i found out it only works on GK =(
>.<
i dun think its right GK has special commands that only work for that server other than the rpg window, that i can understand =/
Reply With Quote
  #13  
Old 03-07-2003, 02:36 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Re: oops =X

Quote:
Originally posted by ShadowDarkstar
x.x
i found out it only works on GK =(
>.<
i dun think its right GK has special commands that only work for that server other than the rpg window, that i can understand =/
because gk has something called a mudlib which no other server has
and copylevel works on every server with an npcserver
Reply With Quote
  #14  
Old 03-07-2003, 02:55 AM
Knuckles Knuckles is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 580
Knuckles is on a distinguished road
Send a message via AIM to Knuckles
Re: Re: oops =X

Quote:
Originally posted by Python523

because gk has something called a mudlib which no other server has
and copylevel works on every server with an npcserver
... I almost knew that :o ...
__________________
Knuckles
"They say 60% of the time, it works everytime!"
Reply With Quote
  #15  
Old 03-07-2003, 11:00 PM
ShadowDarkstar ShadowDarkstar is offline
Registered User
ShadowDarkstar's Avatar
Join Date: Feb 2003
Location: Montreal
Posts: 42
ShadowDarkstar is on a distinguished road
Re: Re: oops =X

Quote:
Originally posted by Python523

because gk has something called a mudlib which no other server has
and copylevel works on every server with an npcserver
then how does copylevel work?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:48 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.