Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


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 01:38 PM.


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