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 01-09-2012, 01:05 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Changing Tile

PHP Code:
function fixTiles() {
  
//replace tile 0xFFF,4095 with 0xAE9,2793 
  //so it doesnt block on layers
  
for ( i=0i<64i++ ) { 
    for ( 
j=0j<64j++ ) { 
      if ( 
tiles[i,j] == 4095 ) { 
        
tiles[i,j] = 2793;
      } 
    } 
  } 
  
updateboard(0,0,64,64);

Called onCreated and onPlayerEnters to make sure it happens, but nothing happens. Im finding the tile numbers with tiles(mousex,mousey). I'm probably just not applying them right, because I honestly don't get it too much. If someone could correct me and explain a little on exactly how it works? :/
Oh, just trying to replace a tile with a different tile, everywhere, for everyone, period. It will never change back. Layer issues, but if there is another way to fix the issue with using type 1 tilesets where it makes the bottom right tile def over everything else, which also makes it block, I would love to know. All it does is when it updates, it wont let you walk anymore on anything except the level you are on in gmap (thats all that has been tested).
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...



Last edited by sssssssssss; 01-09-2012 at 02:22 AM.. Reason: removed comments on for loops, because I tested it that way and its a no go.
Reply With Quote
  #2  
Old 01-09-2012, 01:30 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
You'll need to uncomment the for loop so that it checks the tile value of each tile in the level. Besides that it looks fine.
__________________
Reply With Quote
  #3  
Old 01-09-2012, 01:32 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is just really niceTricxta is just really nice
I manipulate tiles using the hex numbers instead
so I usually do this.ctiles = {0xFFF,0xAE9};

then
for (i = 0; i < 4096; i++){
if (tiles[i%64,int(i/64)] == this.ctiles[0])
tiles[i%64,int(i/64)] = this.ctiles[1];
}
updateboard(0,0,64,64);

Hope this clarifies things for you
Reply With Quote
  #4  
Old 01-09-2012, 01:42 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
I had them uncommented and tested. I just forgot to put it back when I copied/pasted on here after trying something else.

Tricxta's use didn't work either. I really don't understand whey this isn't working. :/


Is this the only way to fix the issue with type 1 tilesets with layers showing the bottom right tile over everything and blocking the player? Also, any reason this wouldn't work or is there another route?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #5  
Old 01-09-2012, 01:45 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is just really niceTricxta is just really nice
If you have access to a different server try it on there as well. If that doesn't work remove the array variables and have if (tiles[i%64,int(i/64)] == 0xFFF) etc
Reply With Quote
  #6  
Old 01-09-2012, 02:21 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
I tried that as well and no go. I don't have access to any other server. :/

This blows if it can't work because that means we have no layers allowed...
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #7  
Old 01-09-2012, 02:55 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Found the issue on fixing layers and stuff, so I'm scrapping this for now, but I appreciate the help.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


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 11:31 AM.


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