View Single Post
  #1  
Old 01-26-2002, 07:19 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
editor npc -deepwater

I havent finished this but its for the editor npc thing.
I just started 2day and I havent really had a grasp of Stefan's arithmetics yet so this is not perfect..

NPC Code:

// NPC made by LiquidIce
allwatertiles={12+225*16,13+225*16,12+226*16,13+22 6*16,12+227*16};
deepwater=12+227*16;
waterstar={12+225*16,13+225*16,12+226*16,13+226*16 }
if (playerenters) { setarray order,4; }

if (playerenters || timeout) {
if (mousebuttons%2>=1&&this.count=0) {
mousetileL=tiles[mousex-1,mousey];
mousetileR=tiles[mousex,mousey];
mousetileDL=tiles[mousex-1,mousey+1];
mousetileD=tiles[mousex,mousey+1];
this.tilecount=0;
if (mousetileL in allwatertiles) { this.tilecount++; }
if (mousetileR in allwatertiles) { this.tilecount++; }
if (mousetileD in allwatertiles) { this.tilecount++; }
if (mousetileDL in allwatertiles) { this.tilecount++; }
if (this.tilecount<=1) {
if (mousetileL in allwatertiles) { if (!mousetileL=waterstar[0]) { order[0]=deepwater; } }
else { order[0]=waterstar[0]; }

if (mousetileR in allwatertiles) { if (!mousetileR=waterstar[1]) { order[1]=deepwater; } }
else { order[1]=waterstar[1]; }

if (mousetileDL in allwatertiles) { if (!mousetileDL=waterstar[2]) { order[2]=deepwater; } }
else { order[2]=waterstar[2]; }

if (mousetileD in allwatertiles) { if (!mousetileD=waterstar[3]) { order[3]=deepwater; } }
else { order[3]=waterstar[3]; }

tiles[mousex-1,mousey]=order[0];
tiles[mousex,mousey]=order[1];
tiles[mousex-1,mousey+1]=order[2];
tiles[mousex,mousey+1]=order[3];

updateboard 0,0,64,64;
this.count=2;
}
}
if (this.count>0) { this.count--; }
timeout=.05;
}

__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote