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 01-03-2002, 09:25 PM
Kumada Kumada is offline
Ded
Kumada's Avatar
Join Date: Nov 2001
Location: Usa
Posts: 1,088
Kumada is on a distinguished road
Smile For all of you people who need Kingdom Gates

Here...
Remeber these are 2 seperate npcs.. one is the gate and one can be a block so if the player touchs it and the gate is open then they can get warped.. (usually under the gate like the bricks at dustari)
NPC Code:

//Gate NPC
if (created){
setimg gate.png;
show;
}

if (playerchats&&strequals(#g,myguild)){
if (strequals(#c,open gate)&&!strequals(#s(this.gate),open)){
move 0,-2,2,0;
setstring this.gate,open;
}
}

if (playerchats&&strequals(#g,myguild)){
if (strequals(#c,open gate)&&strequals(#s(this.gate),open)){
move 0,2,2,0;
setstring this.gate,closed;
}
}



This is the npc that you use so players cannot lag thru.. just put some tiles under it like yellow blocks.

NPC Code:

//Block NPC
if (created){
setimg block.png;
show;
}

//Entering
if (playertouchsme&&playerdir == 2){
if (strequals(#s(this.gate),open)){
playerx=<The x coords after gate>;
playery=<The y coords after gate>;
}
}

//Leaving
if (playertouchsme&&playerdir == 0){
playerx=<The x coords before gate>;
playery=<The y coords before gate>;
}

//Guild Members Entering
if (playertouchsme&&playerdir == 2){
if (strequals(#g,myguild)){
playerx=<The x coords after gate>;
playery=<The y coords after gate>;
}
}

__________________
Aim: Mmm Kumada

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 08:51 PM.


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