Thread: Question
View Single Post
  #1  
Old 07-11-2004, 06:31 AM
DeFord DeFord is offline
<3 Old Val
Join Date: Nov 2002
Location: Irvine, CA
Posts: 53
DeFord is on a distinguished road
Send a message via AIM to DeFord
Lightbulb Question

Well I have a theory. (No place to test this on currently)
Could I make a database npc that is able to warp, then have it warpto a level the user inputs and aquire all the tile data from that level using an array and tiles[x,y], then warping the npc back to its home level and outputting all of the stored tiles to the home level, in esscence, making a temp. copy of the chosen level without using copylevel.

(No way to test, because my RC for my playerworld is IP protected and I'm on vacation)

Edit:
Tentative Script
NPC Code:

//NPC Made By Zach
if(created) {
canwarp;
}
if(playerchats && startswith(/level,#c)) {
tokenize #c;
setarray tilearr,4096;
warpto #t(1),0,0;
this.k=0;
for(this.i=0;this.i<64;this.i++) {
for(this.j=0;this.j<64;this.j++) {
tilearr[this.k]=tiles[this.i,this,j];
this.k++;
}
}
warpto <homelevelname>,0,0;
this.k=0;
for(this.i=0;this.i<64;this.i++) {
for(this.j=0;this.j<64;this.j++) {
tiles[this.i,this,j]=tilearr[this.k];
updateterrain;
this.k++;
}
}
}

__________________
-Zach Kline-

Last edited by DeFord; 07-11-2004 at 06:40 AM.. Reason: Forgot something
Reply With Quote