Thread: p2p
View Single Post
  #11  
Old 12-12-2001, 12:11 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
sure...

i am at school, so if i don't finish this, i will finish it when i am at home...

* setshape type,width,height;
NPC Code:

setshape 1,32,32;
/*
Makes a square 32 X 32 pixels that is blocking...
*/


* setshape2 width,height,{type}
NPC Code:

setshape2 2,2,{3,3,3,3};
/*
Makes a 2 X 2 (board size) place on the board that is a chair, or acts as a chair, all the types are in newfeatures2001.txt. Also, if you had a 3 X # it would be {3,3,3,3,3,3,3,3,3} the first three representing the first row, the middle three representing the middle row, and the last three representing the last row. (useful for when you attachplayertoobj 1,id;. Another thing you can do is make it like this so you can understand it more...
*/
setshape2 3,3,{
3,3,3,
3,3,3,
3,3,3
};


* canwarp - lets the npc leave the level, works only for database npcs.
NPC Code:

canwarp;


* canwarp2 - let someone else help on this, i am not sure weather canwarp or canwarp2 is the one that finds all logical links...
NPC Code:

canwarp2;


* with(players[i]) - allows you to get and set a player's attributes and set flags for them. Using the player's server index? or level index? i am not sure
NPC Code:

with(players[0]) {
setstring client.stupid,yes;
}


* with(getplayer(account)) - allows you to get and set a players attributes as long as the player is online, using accountname.
NPC Code:

if (playerchats) {
if (startswith(Set Attribs,#c)) setstring client.gotaccount,#e(12,-1,#c);
else if (startswoth(shoes)) {triggeraction x,y,Shoes,#e(6,-1,#c),#s(client.gotaccount);}
}
if (actionShoes) {
with (getplayer(#p(1))) {
setplayerprop #C3,#p(0);
}
}
/*
i am not to sure on this one, but what this does is the player who is by this npc says Set Attribs <accountname> and than says shoes <color> and it changes the player's shoe color toy <color>...correct me if i am wrong...
*/


* with(npcs[i]) - dunno
* with(getnpcs(name)) - dunno
* join - allows you to add a script into a script
Script
NPC Code:

join code.txt;
/*
will basically add the code into the npc at the specified point, meaning it does code.txt...
*/


code.txt
NPC Code:

showcharacter;
setcharprop #C0,Black;
setcharprop #3,head116.png;


is equal to
Script
NPC Code:

showcharacter;
setcharprop #C0,Black;
setcharprop #3,head116.png;


* warpto - moves the npc to a level, must be a database npc, i do not know the arguments to this so i won't try...
* freezeplayer2 - I believe this is like disabledefmovement, and its useful with
the with() command.
* unfreezeplayer
NPC Code:

//Weapon
setshape 1,32,32;
if (playertouchsme) toweapons PlayerFreeze;
if (playerchats) {
if(startswith(Freeze,#c)) triggeraction 0,0,serverFreezeplayer,#e(7,-1,#c);
if(startswith(unFreeze,#c)) triggeraction 0,0,serverunFreezeplayer,#e(9,-1,#c);
}
//Database NPC
if (actionserverFreezeplayer) {
with(getplayer(#p(0))) {
freezeplayer2;
}
}
if (actionserverunFreezeplayer) {
with(getplayer(#p(0))) {
unfreezeplayer;
}
}


* noplayeronwall - stops the onwall() detection from players being an onwall...
NPC Code:

noplayeronwall;


* cannotwarp - stops the database npc from moving levels.
NPC Code:

cannotwarp;


* addweapon - adds a weapon from the database.
NPC Code:

addweapon Bomb;
addweapon Bow;
addweapon -System;


* removeweapon - rempves a weapon from the player's npc list...
NPC Code:

removeweapon Bomb;
removeweapon Bow;
removeweapon -System;


* addtiledef - hard to explain
* addtiledef2 - harder to explain
* removetiledefs - ...
* attachplayertoobj type,id; - refer to earlier post...
* detachplayer - takes the player off ot the attachment
* addguildmember - i'll post about this later unless someone else does, i am not so sure about the arguments;
* deleteguildmember - i'll post about this later unless someone else does, i am not so sure about the arguments;
* deleteguild - i'll post about this later unless someone else does, i am not so sure about the arguments;


there ye go, hope it helps...
__________________

!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