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 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
  #2  
Old 01-03-2002, 10:44 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
That could be made much more effective.
Reply With Quote
  #3  
Old 01-03-2002, 11:05 PM
Kumada Kumada is offline
Ded
Kumada's Avatar
Join Date: Nov 2001
Location: Usa
Posts: 1,088
Kumada is on a distinguished road
Quote:
Originally posted by Loriel
That could be made much more effective.
Please dont make fun of my leet scripting skillz.
__________________
Aim: Mmm Kumada

Reply With Quote
  #4  
Old 01-04-2002, 02:08 AM
ShockwaveISTHEBEST ShockwaveISTHEBEST is offline
Registered User
Join Date: Nov 2001
Location: never never land
Posts: 208
ShockwaveISTHEBEST is on a distinguished road
Send a message via AIM to ShockwaveISTHEBEST Send a message via Yahoo to ShockwaveISTHEBEST
Exactly what I needed.
__________________
[img]http://rick.*******ers.net/ss/users/jerrytyrrell64/Shockwave%20Sig%2003.jpg[/img]
Reply With Quote
  #5  
Old 01-04-2002, 03:23 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Wouldn't you run into a problem with people who aren't in the level at the time of the closing and opening, you should probably use a server.string
Reply With Quote
  #6  
Old 01-04-2002, 06:32 AM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 has a spectacular aura about
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
Exactly
__________________
Reply With Quote
  #7  
Old 01-04-2002, 06:43 AM
ShockwaveISTHEBEST ShockwaveISTHEBEST is offline
Registered User
Join Date: Nov 2001
Location: never never land
Posts: 208
ShockwaveISTHEBEST is on a distinguished road
Send a message via AIM to ShockwaveISTHEBEST Send a message via Yahoo to ShockwaveISTHEBEST
Cant you just use timereverywhere
__________________
[img]http://rick.*******ers.net/ss/users/jerrytyrrell64/Shockwave%20Sig%2003.jpg[/img]
Reply With Quote
  #8  
Old 01-04-2002, 07:01 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Timereeverywhere is obsolete on a P2P server, since if its not defined client side it is already global. therefor timers effect everyone. But acuallt. timers dont effect everyone, just the server. Becasue the server sends data to you.

You forgot the attach and setshape2.got other errrors but if this was a first attempt, i wouldnt blame you.
__________________

subliminal message: 1+1=3
Reply With Quote
  #9  
Old 01-04-2002, 07:03 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
If this is non ppp2p- you really can even used setshpae 2 so its impossible to make a bridge.
__________________

subliminal message: 1+1=3
Reply With Quote
  #10  
Old 01-04-2002, 07:03 AM
ShockwaveISTHEBEST ShockwaveISTHEBEST is offline
Registered User
Join Date: Nov 2001
Location: never never land
Posts: 208
ShockwaveISTHEBEST is on a distinguished road
Send a message via AIM to ShockwaveISTHEBEST Send a message via Yahoo to ShockwaveISTHEBEST
So how would I put a server.string into that
__________________
[img]http://rick.*******ers.net/ss/users/jerrytyrrell64/Shockwave%20Sig%2003.jpg[/img]
Reply With Quote
  #11  
Old 01-04-2002, 07:06 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
Quote:
Originally posted by Python523
Wouldn't you run into a problem with people who aren't in the level at the time of the closing and opening, you should probably use a server.string
omg y does everyone want to use serverstrings?
save-vars can be used in this part much better and do not lagg the server...
__________________
No Webhost at the moment
Reply With Quote
  #12  
Old 01-04-2002, 10:36 PM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Quote:
Originally posted by Python523
Wouldn't you run into a problem with people who aren't in the level at the time of the closing and opening, you should probably use a server.string
well the this.string saves it to the NPC itself so i see no problem with people not in the levels ....
Reply With Quote
  #13  
Old 01-05-2002, 05:16 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Quote:
Originally posted by Loriel
That could be made much more effective.
i agree
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #14  
Old 01-05-2002, 05:37 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
hmmmmmm....

i was gonna suggest save[] vars too, they be nice...
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
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 03:47 PM.


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