Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Server (https://forums.graalonline.com/forums/forumdisplay.php?f=14)
-   -   My gift to all playerworlds owners. (https://forums.graalonline.com/forums/showthread.php?t=35519)

BinaryCrash 08-10-2002 08:50 AM

My gift to all playerworlds owners.
 
Many people asked about the script to change the rc head,
so i am giving it here to everyone, i asked Warcaptain at the
first time, but he refused to tell me about it, just said it's a script.
So i script my own script and like i help all graal and not only Maloria i am giving it out. ;)


NPC Code:

//By BinaryCrash
timeout=2;
if (timeout) {
x=0;
y=0;
dontblock;
timeout=2;
for(h=0;h<=allplayerscount;h++) {
with (allplayers[h]) {
if (playerx==30&&playery==30&&playerap=50){
if (!strequals(#3,maloriaheadrc.png)) setplayerprop #3,maloriaheadrc.png;
}
}
}
}




It was not stolen if you are thinking it.
i can describe how i got this way to script it.

Python523 08-10-2002 08:54 AM

Re: My gift to all playerworlds owners.
 
Quote:

Originally posted by BinaryCrash
Many people asked about the script to change the rc head,
so i am giving it here to everyone, i asked Warcaptain at the
first time, but he refused to tell me about it, just said it's a script.
So i script my own script and like i help all graal and not only Maloria i am giving it out. ;)


NPC Code:

//By BinaryCrash
timeout=2;
if (timeout) {
x=0;
y=0;
dontblock;
timeout=2;
for(h=0;h<=allplayerscount;h++) {
with (allplayers[h]) {
if (playerx==30&&playery==30&&playerap=50){
if (!strequals(#3,maloriaheadrc.png)) setplayerprop #3,maloriaheadrc.png;
}
}
}
}




It was not stolen if you are thinking it.
i can describe how i got this way to script it.

that would change other players heads as well if there AP was 50, and the x/y was 30
you should do
strlen(#F)==0 instead

BinaryCrash 08-10-2002 09:03 AM

that is another way to script.
also on maloria they cant get the ap exactly 50 because the ap increase to fast and wont get all that sequence.

u can also check every timeout to if it is not that 3 variables and is the rc head to change it back. ;)

emortylone 08-13-2002 08:24 AM

Cant you just read something such as the id?

Im not sure since i have never worked online(im looking for a job as NAT if anyones hiring(i want to start learning NPC Server))

zorakid2001 08-14-2002 10:24 AM

Im looking for a job as nat too!

emortylone 08-23-2002 09:58 AM

He he. 1st off the earlier post on this ACC was NOT me... I've been staff REPEATEDLY on Pw's w/ NPC Servers =) (this is Projectshifter btw)
I think that coding is that great x.X how about this:
NPC Code:

if (actionplayeronline)
{ for (i=0;i<allplayerscount;i++)
{ with (allplayers[i])
{ if (strequals(#F,) && strequals(#3,rchead.png))
{ setplayerprop #3,newrchead.png;}
}
}
}


MUCH Simpler, and it is basic. rchead.png is the old RC head, and newrchead.png is the new RC head you want. It is much simpler. RC's don't have a level, so if #F (level the Player is in) has no value, and it has the RC head, then it changes it XP. Easier, and better ;)
---Shifter

BinaryCrash 08-23-2002 08:37 PM

Quote:

Originally posted by emortylone
He he. 1st off the earlier post on this ACC was NOT me... I've been staff REPEATEDLY on Pw's w/ NPC Servers =) (this is Projectshifter btw)
I think that coding is that great x.X how about this:
NPC Code:

if (actionplayeronline)
{ for (i=0;i<allplayerscount;i++)
{ with (allplayers[i])
{ if (strequals(#F,) && strequals(#3,rchead.png))
{ setplayerprop #3,newrchead.png;}
}
}
}


MUCH Simpler, and it is basic. rchead.png is the old RC head, and newrchead.png is the new RC head you want. It is much simpler. RC's don't have a level, so if #F (level the Player is in) has no value, and it has the RC head, then it changes it XP. Easier, and better ;)
---Shifter


the old rc head is head25

user13-xo 08-24-2002 02:37 AM

Quote:

Originally posted by emortylone
He he. 1st off the earlier post on this ACC was NOT me... I've been staff REPEATEDLY on Pw's w/ NPC Servers =) (this is Projectshifter btw)
I think that coding is that great x.X how about this:
NPC Code:

if (actionplayeronline)
{ for (i=0;i<allplayerscount;i++)
{ with (allplayers[i])
{ if (strequals(#F,) && strequals(#3,rchead.png))
{ setplayerprop #3,newrchead.png;}
}
}
}


MUCH Simpler, and it is basic. rchead.png is the old RC head, and newrchead.png is the new RC head you want. It is much simpler. RC's don't have a level, so if #F (level the Player is in) has no value, and it has the RC head, then it changes it XP. Easier, and better ;)
---Shifter

This will not work since actionplayeronline is for players and not RCs, correct me if i'm wrong.

Python523 08-24-2002 06:49 AM

Quote:

Originally posted by user13-xo


This will not work since actionplayeronline is for players and not RCs, correct me if i'm wrong.

rc's dont see heads though o_O I personally would do somethin like
if(created){
timeout = 5;
}
if(timeout){
if(this.oldcount != allplayerscount){
stuff
}
this.oldcount = allplayerscount;
timeout = 5;
}

BinaryCrash 08-24-2002 08:41 AM

the code will work if used in control npc, because of the actionplayeronline.
and will check if filename is empty and the head (string) is rchead.png then will change the atribute to another string.
rcs have player atributes too, like, nickname, read, guiltag, etc.
they are like npc server, and vice-versa.
like you can prove it making a script to read the atributes of allplayers[i]
it will include rcs.
and on ftp in logs folder you can check in the playerlist you can see the rcs there and some atributes of rcs like ap, levelname, x,y, etc.

BinaryCrash 08-24-2002 08:45 AM

Quote:

Originally posted by emortylone
Cant you just read something such as the id?

Im not sure since i have never worked online(im looking for a job as NAT if anyones hiring(i want to start learning NPC Server))

i never tried it, but... with (allplayers[i]) the "i" on [] is the id of the player.

just thinking, logic.

for( blah blah) {
with(allplayers[i]) {
if (strequals(#a,BinaryCrash)) {
sendtonc BinaryCrash id = #v(i);
}
}
}
//ps: never tested

emortylone 08-24-2002 12:05 PM

P.S. Won't work =P He he. I don't quite see the point of that. if (actionplayeronline) should also work for RC. Since it isn't set for the player to actually connect to a LEVEL, but more or less enter the server, it should work just fine. And btw: head25.png is not NECESSARILY the one it was set for. While it MAY be the same head, it could be something different. Same pic, different name, entirely possible =P
---Shifter


All times are GMT +2. The time now is 09:57 PM.

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