View Single Post
  #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