Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Server (https://forums.graalonline.com/forums/forumdisplay.php?f=14)
-   -   p2p (https://forums.graalonline.com/forums/showthread.php?t=18438)

aesquivel 12-07-2001 08:54 AM

commads!
 
any one know where i could get a list of all the p2p scripting commands so i can get better npcs for my server

Andor_NPC-Admin1 12-09-2001 01:03 PM

Here are most of the commands that work for the NPC server, but not on a free playerworld. I think i'm missing a few commands, so post any more commands if you know them =P

* setshape
* setshape2
* canwarp
* canwarp2
* with(players[i])
* with(getplayer(account))
* with(npcs[i])
* with(getnpcs(name))
* join
* warpto
* freezeplayer2
* unfreezeplayer
* noplayeronwall
* cannotwarp
* addweapon
* removeweapon
* addtiledef
* addtiledef2
* removetiledefs
* attachplayertoobj
* detachplayer
* addguildmember
* deleteguildmember
* deleteguild

aesquivel 12-10-2001 09:53 PM

Quote:

Originally posted by Andor_NPC-Admin1
Here are most of the commands that work for the NPC server, but not on a free playerworld. I think i'm missing a few commands, so post any more commands if you know them =P

* setshape
* setshape2
* canwarp
* canwarp2
* with(players[i])
* with(getplayer(account))
* with(npcs[i])
* with(getnpcs(name))
* join
* warpto
* freezeplayer2
* unfreezeplayer
* noplayeronwall
* cannotwarp
* addweapon
* removeweapon
* addtiledef
* addtiledef2
* removetiledefs
* attachplayertoobj
* detachplayer
* addguildmember
* deleteguildmember
* deleteguild

i know how to use all of thioes except the attachplayertoobj what could that be used in cuz i cant figure it out

BocoC 12-10-2001 10:04 PM

I'm pretty sure setshape and setshape2 are allowed on free servers.

Saga2001 12-10-2001 11:28 PM

har har!
 
yeah,
setshape and setshape2 work on non-p2p and also...lol changeimgcolors works...
--PastAustin

Saga2001 12-10-2001 11:30 PM

lol...
 
i am just curious...does anyone know why changeimgcolors works on non-p2p? i have only tested it with text...

konidias 12-11-2001 12:49 AM

Quote:

Originally posted by aesquivel


i know how to use all of thioes except the attachplayertoobj what could that be used in cuz i cant figure it out

attachplayertoobj 0, id;

that would attach the player to the npc (which means if the npc moves the player follows like it's stuck to it)

you just use

detachplayer;

to detach them..

Check out the platform lifts near mining town and bogenera that lift you up the cliffs. They use attachplayertoobj ;)

TDO2000 12-11-2001 12:55 AM

Re: lol...
 
Quote:

Originally posted by Saga2001
i am just curious...does anyone know why changeimgcolors works on non-p2p? i have only tested it with text...
Stefan enabled it for text only because many guys asked him to do...

Spark910 12-11-2001 02:13 AM

no1 gives tehm out its only a few words for god sacks come on spill the beans people.

aesquivel 12-11-2001 10:34 AM

is there any onwe here that cold give me a ex. of each of the commands listed above??
:confused:

Saga2001 12-12-2001 12:11 AM

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...

aesquivel 12-12-2001 09:15 PM

**** ya that helped now all i need to do it figure out the

addtiledef
and
addtiledef2

^^^^^^^
could some one with plenty of time post how to do this exactly :)

Kumada 12-12-2001 10:01 PM

is getplayer p2p?

aesquivel 12-13-2001 05:52 AM

i dunno i jus need ta know things like that im no sure though

Andor_NPC-Admin1 12-18-2001 01:45 AM

ohh, its not deleteguildmember, or deleteguild =P
its removeguild, and removeguildmember


All times are GMT +2. The time now is 06:50 AM.

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