Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-28-2004, 08:56 AM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
Automatic Tile Setter

Yes this is lame and yes im very bored
PHP Code:
if (mousedown && leftmousebutton) {
tiles1={0x7FF,0x0,0x7FF,0x1,0x7FF,0x10,0x2A8,0x7FF,0x2A7,0x7FF,0x66F,0x7FF,0x7FF,0x2B7,0x7FF,0x2B8,0x7FF,0x38B,0x6E7,0x7FF,0x6E6,0x7FF,0xD11,0x7FF};
  
tiles2={0x1FF,0x3FF,0x7FF,0x1FF};
  for (
dx=0dx<65dx++) {
    for (
dy=0dy<65dy++) {
      
t=int(random(0,arraylen(tiles1)));
      if (
tiles[dx,dyin tiles2) {
        
tiles[dx,dy]=tiles1[t];
      }
    }
  }
  
updateboard 0,0,64,64;

__________________


Last edited by ZeroTrack; 12-29-2004 at 06:00 AM..
Reply With Quote
  #2  
Old 12-28-2004, 09:39 AM
DarkShadows_Legend DarkShadows_Legend is offline
Cult of the Winky
DarkShadows_Legend's Avatar
Join Date: Apr 2003
Location: Florida
Posts: 614
DarkShadows_Legend is on a distinguished road
Send a message via AIM to DarkShadows_Legend
NPC Code:

tiles1={0x7FF,0x0,0x7FF,0x1,0x7FF,0x10,0x2A8,0x7FF ,0x2A7,0x7FF,0x66F,0x7FF,0x7FF,0x2B7,0x7FF,0x2B8,0 x7FF,0x38B,0x6E7,0x7FF,0x6E6,0x7FF,0xD11,0x7FF};



The tiles1 variable produces an error because of the space. I put it in bold.
__________________
- Criminal X

"I rather be hated for being myself, than be liked for being what you like best. I go above the influence, not under." - Me
Reply With Quote
  #3  
Old 12-28-2004, 10:21 AM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
well mines not lol forums must've done it
__________________

Reply With Quote
  #4  
Old 12-28-2004, 10:45 AM
Moonite Moonite is offline
<3
Join Date: Dec 2003
Location: HollanD
Posts: 595
Moonite is an unknown quantity at this point
Send a message via AIM to Moonite Send a message via Yahoo to Moonite
u better stop foolign around and make some nice scripts 4 eden.... finding good personal is hard these days
Reply With Quote
  #5  
Old 12-28-2004, 11:20 AM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
Moonite: Is that a threat?

Nice script Sern, I havn't tested it yet. I prefer to level by hand though
__________________
V$:CONFL16T
Reply With Quote
  #6  
Old 12-28-2004, 10:06 PM
Anarchy04 Anarchy04 is offline
Registered User
Join Date: Oct 2004
Posts: 2
Anarchy04 is on a distinguished road
I was actually joking around yesterday talking about making one, heh.

That's pretty cool though...I think it details it way too much though, makes it look kinda ugly. You should make it where it it's more random when it lays tiles, so like...maybe it only details 30% of the tiles or something like that.

Also, too bad you can't save the levels like that. The only way you can make it actually save is if you do it online with the serverside updateboard2.

Still though, it's nice.

[Edit] Oh, as far as saving goes...I totally didn't think about putting the script in a text file in the levels/npc's directory and doing it from there. [/Edit]

Last edited by Anarchy04; 12-28-2004 at 11:28 PM..
Reply With Quote
  #7  
Old 12-29-2004, 12:39 AM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
Quote:
Originally Posted by Moonite
u better stop foolign around and make some nice scripts 4 eden.... finding good personal is hard these days
pishh i made the gui , qmenu , and profiler and i have more rights than you so shush =p <3
__________________

Reply With Quote
  #8  
Old 12-29-2004, 03:52 AM
haro41 haro41 is offline
zenkou
haro41's Avatar
Join Date: Jul 2003
Location: Sol Grotto
Posts: 689
haro41 will become famous soon enough
Send a message via AIM to haro41
i dont understand how it works. leftmousebutton when? in level?

i turned it into a editor npc and saved it. is that how i do it? HALP
__________________

Zenkou for life
Reply With Quote
  #9  
Old 12-29-2004, 04:58 AM
Anarchy04 Anarchy04 is offline
Registered User
Join Date: Oct 2004
Posts: 2
Anarchy04 is on a distinguished road
Quote:
Originally Posted by haro41
i dont understand how it works. leftmousebutton when? in level?

i turned it into a editor npc and saved it. is that how i do it? HALP

either of those ways should work. You'll need to add the event flag 'mousedown' in the first if statement though.

if (mousedown && leftmousebutton) {
Reply With Quote
  #10  
Old 12-30-2004, 06:03 PM
CaTigus CaTigus is offline
Scripter
Join Date: Oct 2002
Posts: 80
CaTigus is on a distinguished road
I don't know if some of you know this, But you don't have to have mousedown before leftmousebutton. Mousedown is if any button is pressed and adding leftmousebutton is just completely pointless. You can just do if (leftmousebutton).
Reply With Quote
  #11  
Old 12-30-2004, 06:12 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by CaTigus
Mousedown is if any button is pressed and adding leftmousebutton is just completely pointless. You can just do if (leftmousebutton).
Wrong. leftmousebutton is not an event.
__________________
Reply With Quote
  #12  
Old 12-30-2004, 10:52 PM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
Quote:
Originally Posted by CaTigus
I don't know if some of you know this, But you don't have to have mousedown before leftmousebutton. Mousedown is if any button is pressed and adding leftmousebutton is just completely pointless. You can just do if (leftmousebutton).
wow.... *ahem* , yea what your prob thinking of is if its in a loop .... .. if your not you need to read a bit more *calls rule 4*
__________________

Reply With Quote
  #13  
Old 12-31-2004, 12:53 AM
Evil_Trunks Evil_Trunks is offline
Evil
Evil_Trunks's Avatar
Join Date: Dec 2004
Posts: 391
Evil_Trunks is on a distinguished road
you can also do this, better:

NPC Code:
if (mousedown) {
if (strequals(#p(0),left)) {
stuff();
}
}



but not leftmousebutton alone
__________________


Last edited by Evil_Trunks; 12-31-2004 at 01:28 AM..
Reply With Quote
  #14  
Old 12-31-2004, 01:45 AM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
Quote:
Originally Posted by Evil_Trunks
you can also do this, better:

NPC Code:
if (mousedown) {
if (strequals(#p(0),left)) {
stuff();
}
}



but not leftmousebutton alone
or even
NPC Code:

if(mousedown && mousebuttons == 1){
setplayerprop #c,Left Mouse Clicked;
}

__________________

Reply With Quote
  #15  
Old 12-31-2004, 02:15 AM
CaTigus CaTigus is offline
Scripter
Join Date: Oct 2002
Posts: 80
CaTigus is on a distinguished road
Quote:
Originally Posted by ZeroTrack
wow.... *ahem* , yea what your prob thinking of is if its in a loop .... .. if your not you need to read a bit more *calls rule 4*
NPC Code:

if (mousescreenx in |315,357|&&mousescreeny in |145,183|) {
showimg 801,@tempus sans itc@b@#w(this.index),315,340;
changeimgvis 801,5;
changeimgzoom 801,.65;
if (leftmousebutton) {


There is no loop in my script. Once again you illiterate idiot, That was not a solution, That was a suggestion. Was your little "Rule" quote an attempt to be clever? Because it failed. Go bash someone else, and get your information correct first.
Reply With Quote
  #16  
Old 12-31-2004, 02:23 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Tigairius, the fact remains that leftmousebutton is a flag, not an event. And rule #4 covers advice in addition to complete solutions.
__________________
Reply With Quote
  #17  
Old 12-31-2004, 02:29 AM
Evil_Trunks Evil_Trunks is offline
Evil
Evil_Trunks's Avatar
Join Date: Dec 2004
Posts: 391
Evil_Trunks is on a distinguished road
Quote:
Originally Posted by CaTigus
NPC Code:

if (mousescreenx in |315,357|&&mousescreeny in |145,183|) {
showimg 801,@tempus sans itc@b@#w(this.index),315,340;
changeimgvis 801,5;
changeimgzoom 801,.65;
if (leftmousebutton) {


There is no loop in my script. Once again you illiterate idiot, That was not a solution, That was a suggestion. Was your little "Rule" quote an attempt to be clever? Because it failed. Go bash someone else, and get your information correct first.
you would need something like that in a timeout loop

sure, it will still work, but it's not correct
__________________

Reply With Quote
  #18  
Old 12-31-2004, 02:29 AM
CaTigus CaTigus is offline
Scripter
Join Date: Oct 2002
Posts: 80
CaTigus is on a distinguished road
Quote:
Originally Posted by Kaimetsu
Tigairius, the fact remains that leftmousebutton is a flag, not an event.
Righto.
Reply With Quote
  #19  
Old 12-31-2004, 03:13 AM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
Quote:
Originally Posted by Kaimetsu
Tigairius, the fact remains that leftmousebutton is a flag, not an event. And rule #4 covers advice in addition to complete solutions.
Sern 2 , Tigairius 0
__________________

Reply With Quote
  #20  
Old 12-31-2004, 03:43 AM
CaTigus CaTigus is offline
Scripter
Join Date: Oct 2002
Posts: 80
CaTigus is on a distinguished road
Quote:
Originally Posted by ZeroTrack
Sern 2 , Tigairius 0
Oh I never realized this was a game.
Reply With Quote
  #21  
Old 12-31-2004, 07:29 AM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
Quote:
Originally Posted by CaTigus
Oh I never realized this was a game.
Graal Online most certainly is =D
__________________

Reply With Quote
  #22  
Old 12-31-2004, 07:34 AM
CaTigus CaTigus is offline
Scripter
Join Date: Oct 2002
Posts: 80
CaTigus is on a distinguished road
Well, I'm sure you can see that we are clearly not on Graalonline client talking to each other right now. This is a communication center, not a game.
Reply With Quote
  #23  
Old 12-31-2004, 09:53 AM
haro41 haro41 is offline
zenkou
haro41's Avatar
Join Date: Jul 2003
Location: Sol Grotto
Posts: 689
haro41 will become famous soon enough
Send a message via AIM to haro41
Sern 2, Tigairius 1
__________________

Zenkou for life
Reply With Quote
Reply


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 04:07 PM.


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