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 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
  #2  
Old 07-15-2004, 04:13 PM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
if you really wish, i may let you try it on elemental kingdoms, my server
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #3  
Old 07-16-2004, 05:32 AM
Alexander Alexander is offline
Registered User
Join Date: Apr 2003
Location: California
Posts: 246
Alexander is on a distinguished road
Send a message via AIM to Alexander
Does work, I use this in my script, also use updateboard(2) instead of updateterrain (After the fors).
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 08:47 AM.


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